Skip to content

Commit 95e4fef

Browse files
ENGCOM-8232: Fix for communication.xml Handlers merging processs #28926
- Merge Pull Request #28926 from matiashidalgo/magento2:mhidalgo/fix-handlers-not-being-merged-correctly - Merged commits: 1. fb9f52d 2. 2cbb726 3. 11ccb29 4. 623e87f 5. d5680d2 6. cf9de17 7. 8e054c7 8. e7cde72 9. 90e457d 10. 1bf790a 11. c373f3e 12. 0cfb88a 13. be308fa
2 parents 26acabe + be308fa commit 95e4fef

File tree

7 files changed

+117
-97
lines changed

7 files changed

+117
-97
lines changed

app/etc/di.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,17 @@
229229
</arguments>
230230
</type>
231231
<preference for="Magento\AsynchronousOperations\Model\ConfigInterface" type="Magento\WebapiAsync\Model\Config\Proxy" />
232+
<virtualType name="Magento\Framework\Communication\Config\Reader\XmlReader" type="Magento\Framework\Config\Reader\Filesystem">
233+
<arguments>
234+
<argument name="converter" xsi:type="object">Magento\Framework\Communication\Config\Reader\XmlReader\Converter</argument>
235+
<argument name="schemaLocator" xsi:type="object">Magento\Framework\Communication\Config\Reader\XmlReader\SchemaLocator</argument>
236+
<argument name="fileName" xsi:type="string">communication.xml</argument>
237+
<argument name="idAttributes" xsi:type="array">
238+
<item name="/config/topic" xsi:type="string">name</item>
239+
<item name="/config/topic/handler" xsi:type="string">name</item>
240+
</argument>
241+
</arguments>
242+
</virtualType>
232243
<type name="Magento\Framework\Communication\Config\CompositeReader">
233244
<arguments>
234245
<argument name="readers" xsi:type="array">

dev/tests/integration/testsuite/Magento/Framework/Communication/ConfigTest.php

Lines changed: 85 additions & 44 deletions
Large diffs are not rendered by default.

dev/tests/integration/testsuite/Magento/Framework/Communication/_files/valid_communication_expected.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
'type' => \Magento\Customer\Api\CustomerRepositoryInterface::class,
3434
'method' => 'delete',
3535
],
36+
'customerCreatedExtra' => [
37+
'type' => \Magento\Customer\Api\CustomerRepositoryInterface::class,
38+
'method' => 'save',
39+
],
3640
'saveNameNotDisabled' => [
3741
'type' => \Magento\Customer\Api\CustomerRepositoryInterface::class,
3842
'method' => 'save',
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Communication/etc/communication.xsd">
9+
<topic name="customerAdded" request="string[]">
10+
<handler name="customerCreatedExtra" type="Magento\Customer\Api\CustomerRepositoryInterface" method="save"/>
11+
</topic>
12+
</config>

dev/tests/integration/testsuite/Magento/Framework/Communication/_files/valid_communication_input.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
'type' => \Magento\Customer\Api\CustomerRepositoryInterface::class,
3636
'method' => 'delete',
3737
],
38+
'customerCreatedExtra' => [
39+
'type' => \Magento\Customer\Api\CustomerRepositoryInterface::class,
40+
'method' => 'save',
41+
],
3842
'saveNameNotDisabled' => [
3943
'type' => \Magento\Customer\Api\CustomerRepositoryInterface::class,
4044
'method' => 'save',

dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/blacklist/common.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/Interceptor
99
lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php
1010
dev/tests/integration/framework/deployTestModules.php
1111
dev/tests/integration/testsuite/Magento/Framework/Code/Generator/AutoloaderTest.php
12+
dev/tests/integration/testsuite/Magento/Framework/Communication/ConfigTest.php
1213
dev/tests/integration/testsuite/Magento/Framework/Filter/DirectiveProcessor/SimpleDirectiveTest.php
1314
dev/tests/integration/testsuite/Magento/Framework/Session/ConfigTest.php
1415
dev/tests/integration/testsuite/Magento/Framework/Session/SessionManagerTest.php

lib/internal/Magento/Framework/Communication/Config/Reader/XmlReader.php

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)