Skip to content

Commit 05c01c8

Browse files
authored
Merge pull request #1590 from algolia/bugfix/MAGE-1010
MAGE-1010 Fix Magento coding standards error with proxy injection
2 parents bd02e32 + 38330bb commit 05c01c8

File tree

5 files changed

+59
-30
lines changed

5 files changed

+59
-30
lines changed

Console/Command/ReplicaDeleteCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ class ReplicaDeleteCommand extends AbstractReplicaCommand implements ReplicaDele
2323
protected const UNUSED_OPTION_SHORTCUT = 'u';
2424

2525
public function __construct(
26-
protected ReplicaManagerInterface\Proxy $replicaManager,
27-
protected StoreManagerInterface $storeManager,
28-
State $state,
29-
StoreNameFetcher $storeNameFetcher,
30-
?string $name = null
26+
protected ReplicaManagerInterface $replicaManager,
27+
protected StoreManagerInterface $storeManager,
28+
State $state,
29+
StoreNameFetcher $storeNameFetcher,
30+
?string $name = null
3131
)
3232
{
3333
parent::__construct($state, $storeNameFetcher, $name);

Console/Command/ReplicaDisableVirtualCommand.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ class ReplicaDisableVirtualCommand extends AbstractReplicaCommand implements Rep
2525
use ReplicaSyncCommandTrait;
2626

2727
public function __construct(
28-
protected WriterInterface $configWriter,
29-
protected ConfigChecker $configChecker,
30-
protected ReinitableConfigInterface $scopeConfig,
31-
protected SerializerInterface $serializer,
32-
protected ConfigHelper\Proxy $configHelper,
33-
protected CacheManager $cacheManager,
34-
protected ReplicaManagerInterface\Proxy $replicaManager,
35-
protected StoreManagerInterface $storeManager,
36-
protected ProductHelper\Proxy $productHelper,
37-
State $state,
38-
StoreNameFetcher $storeNameFetcher,
39-
?string $name = null
28+
protected WriterInterface $configWriter,
29+
protected ConfigChecker $configChecker,
30+
protected ReinitableConfigInterface $scopeConfig,
31+
protected SerializerInterface $serializer,
32+
protected ConfigHelper $configHelper,
33+
protected CacheManager $cacheManager,
34+
protected ReplicaManagerInterface $replicaManager,
35+
protected StoreManagerInterface $storeManager,
36+
protected ProductHelper $productHelper,
37+
State $state,
38+
StoreNameFetcher $storeNameFetcher,
39+
?string $name = null
4040
)
4141
{
4242
parent::__construct($state, $storeNameFetcher, $name);

Console/Command/ReplicaRebuildCommand.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ class ReplicaRebuildCommand
2626
use ReplicaDeleteCommandTrait;
2727

2828
public function __construct(
29-
protected ProductHelper\Proxy $productHelper,
30-
protected ReplicaManagerInterface\Proxy $replicaManager,
31-
protected StoreManagerInterface $storeManager,
32-
protected ReplicaState $replicaState,
33-
AppState $appState,
34-
StoreNameFetcher $storeNameFetcher,
35-
?string $name = null
29+
protected ReplicaManagerInterface $replicaManager,
30+
protected ProductHelper $productHelper,
31+
protected StoreManagerInterface $storeManager,
32+
protected ReplicaState $replicaState,
33+
AppState $appState,
34+
StoreNameFetcher $storeNameFetcher,
35+
?string $name = null
3636
)
3737
{
3838
parent::__construct($appState, $storeNameFetcher, $name);

Console/Command/ReplicaSyncCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ class ReplicaSyncCommand extends AbstractReplicaCommand implements ReplicaSyncCo
2424
use ReplicaSyncCommandTrait;
2525

2626
public function __construct(
27-
protected ProductHelper\Proxy $productHelper,
28-
protected ReplicaManagerInterface\Proxy $replicaManager,
29-
protected StoreManagerInterface $storeManager,
30-
State $state,
31-
StoreNameFetcher $storeNameFetcher,
32-
?string $name = null
27+
protected ReplicaManagerInterface $replicaManager,
28+
protected ProductHelper $productHelper,
29+
protected StoreManagerInterface $storeManager,
30+
State $state,
31+
StoreNameFetcher $storeNameFetcher,
32+
?string $name = null
3333
)
3434
{
3535
parent::__construct($state, $storeNameFetcher, $name);

etc/di.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,33 @@
154154
</argument>
155155
</arguments>
156156
</type>
157+
158+
<type name="Algolia\AlgoliaSearch\Console\Command\ReplicaSyncCommand">
159+
<arguments>
160+
<argument name="replicaManager" xsi:type="object">Algolia\AlgoliaSearch\Api\Product\ReplicaManagerInterface\Proxy</argument>
161+
<argument name="productHelper" xsi:type="object">Algolia\AlgoliaSearch\Helper\Entity\ProductHelper\Proxy</argument>
162+
</arguments>
163+
</type>
164+
165+
<type name="Algolia\AlgoliaSearch\Console\Command\ReplicaDeleteCommand">
166+
<arguments>
167+
<argument name="replicaManager" xsi:type="object">Algolia\AlgoliaSearch\Api\Product\ReplicaManagerInterface\Proxy</argument>
168+
</arguments>
169+
</type>
170+
171+
<type name="Algolia\AlgoliaSearch\Console\Command\ReplicaRebuildCommand">
172+
<arguments>
173+
<argument name="replicaManager" xsi:type="object">Algolia\AlgoliaSearch\Api\Product\ReplicaManagerInterface\Proxy</argument>
174+
<argument name="productHelper" xsi:type="object">Algolia\AlgoliaSearch\Helper\Entity\ProductHelper\Proxy</argument>
175+
</arguments>
176+
</type>
177+
178+
<type name="Algolia\AlgoliaSearch\Console\Command\ReplicaDisableVirtualCommand">
179+
<arguments>
180+
<argument name="configHelper" xsi:type="object">Algolia\AlgoliaSearch\Helper\ConfigHelper\Proxy</argument>
181+
<argument name="replicaManager" xsi:type="object">Algolia\AlgoliaSearch\Api\Product\ReplicaManagerInterface\Proxy</argument>
182+
<argument name="productHelper" xsi:type="object">Algolia\AlgoliaSearch\Helper\Entity\ProductHelper\Proxy</argument>
183+
</arguments>
184+
</type>
185+
157186
</config>

0 commit comments

Comments
 (0)