Skip to content

Commit c1e097d

Browse files
mstrzyzewskiMaksymilian Strzyżewski
andauthored
Adjust code for Magento 2.4.2 (#97)
Co-authored-by: Maksymilian Strzyżewski <m.strzyzewski@macopedia.pl>
1 parent 0155bbb commit c1e097d

File tree

6 files changed

+25
-33
lines changed

6 files changed

+25
-33
lines changed

Console/Command/AbstractImportOrders.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,16 @@
1515
abstract class AbstractImportOrders extends Command
1616
{
1717
/** @var State */
18-
private $state;
18+
protected $state;
1919

2020
/**
2121
* AbstractImportOrders constructor.
2222
* @param State $state
23-
* @param string|null $name
2423
*/
25-
public function __construct(
26-
State $state,
27-
string $name = null
28-
) {
24+
public function __construct(State $state)
25+
{
2926
$this->state = $state;
30-
parent::__construct($name);
27+
parent::__construct();
3128
}
3229

3330
/**

Console/Command/CleanOffersMapping.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,12 @@ class CleanOffersMapping extends Command
2727
* CleanOffersMapping constructor.
2828
* @param State $state
2929
* @param OffersMapping $offersMapping
30-
* @param string|null $name
3130
*/
3231
public function __construct(
3332
State $state,
34-
OffersMapping $offersMapping,
35-
string $name = null
33+
OffersMapping $offersMapping
3634
) {
37-
parent::__construct($name);
35+
parent::__construct();
3836
$this->state = $state;
3937
$this->offersMapping = $offersMapping;
4038
}

Console/Command/ImportOrder.php

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Symfony\Component\Console\Input\InputInterface;
1313
use Symfony\Component\Console\Input\InputOption;
1414
use Symfony\Component\Console\Output\OutputInterface;
15-
use Macopedia\Allegro\Model\OrderImporter\Processor;
15+
use Macopedia\Allegro\Model\OrderImporter\Processor\Proxy;
1616

1717
/**
1818
* ImportOrder command class
@@ -21,29 +21,27 @@ class ImportOrder extends Command
2121
{
2222
const NAME = 'checkoutFormId';
2323

24-
/** @var Processor */
25-
private $processor;
24+
/** @var Proxy */
25+
protected $processor;
2626

2727
/** @var CheckoutFormRepositoryInterface */
28-
private $checkoutFormRepository;
28+
protected $checkoutFormRepository;
2929

3030
/** @var State */
31-
private $state;
31+
protected $state;
3232

3333
/**
3434
* ImportOrder constructor.
35-
* @param Processor $processor
35+
* @param Proxy $processor
3636
* @param CheckoutFormRepositoryInterface $checkoutFormRepository
3737
* @param State $state
38-
* @param string|null $name
3938
*/
4039
public function __construct(
41-
Processor $processor,
40+
Proxy $processor,
4241
CheckoutFormRepositoryInterface $checkoutFormRepository,
43-
State $state,
44-
string $name = null
42+
State $state
4543
) {
46-
parent::__construct($name);
44+
parent::__construct();
4745
$this->processor = $processor;
4846
$this->checkoutFormRepository = $checkoutFormRepository;
4947
$this->state = $state;
@@ -71,7 +69,7 @@ protected function configure()
7169
/**
7270
* @param InputInterface $input
7371
* @param OutputInterface $output
74-
* @return int|void|null
72+
* @return void
7573
* @throws LocalizedException
7674
*/
7775
protected function execute(InputInterface $input, OutputInterface $output)

Console/Command/ImportOrders.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,19 @@ class ImportOrders extends AbstractImportOrders
1515
{
1616

1717
/** @var OrderImporterFactory */
18-
private $orderImporterFactory;
18+
protected $orderImporterFactory;
1919

2020
/**
2121
* ImportOrders constructor.
2222
* @param OrderImporterFactory $orderImporterFactory
2323
* @param State $state
24-
* @param null $name
2524
*/
2625
public function __construct(
2726
OrderImporterFactory $orderImporterFactory,
28-
State $state,
29-
$name = null
27+
State $state
3028
) {
3129
$this->orderImporterFactory = $orderImporterFactory;
32-
parent::__construct($state, $name);
30+
parent::__construct($state);
3331
}
3432

3533
/**

Console/Command/ImportOrdersWithErrors.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,19 @@ class ImportOrdersWithErrors extends AbstractImportOrders
1515
{
1616

1717
/** @var OrderWithErrorImporterFactory */
18-
private $orderImporterFactory;
18+
protected $orderImporterFactory;
1919

2020
/**
2121
* ImportOrdersWithErrors constructor.
2222
* @param OrderWithErrorImporterFactory $orderImporterFactory
2323
* @param State $state
24-
* @param null $name
2524
*/
2625
public function __construct(
2726
OrderWithErrorImporterFactory $orderImporterFactory,
28-
State $state,
29-
$name = null
27+
State $state
3028
) {
3129
$this->orderImporterFactory = $orderImporterFactory;
32-
parent::__construct($state, $name);
30+
parent::__construct($state);
3331
}
3432

3533
/**

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ Import wszystkich zamówień:
200200
Import zamówień z błędami:
201201
``macopedia:allegro:orders-with-errors-import``
202202

203+
Usunięcie mapowań produktów z nieistniejącymi ofertami:
204+
``macopedia:allegro:clean-offers-mapping``
205+
203206
## Konfiguracja MYSQL MQ
204207

205208
konfiguracja w pliku config.php

0 commit comments

Comments
 (0)