Skip to content

issue #21193 #21796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

issue #21193 #21796

wants to merge 2 commits into from

Conversation

MaksymGrom
Copy link

@MaksymGrom MaksymGrom commented Mar 16, 2019

Fixed merging process in configs between global and scoped (frontend, adminhtml etc) areas.

Description

Fixed merging process in configs between general and specific (frontend, adminhtml etc) areas.
Magento has a lot classes with array node in constructor used as services pull.
Usage array_replace did replacing nodes on first level of constructor attributes, frontend or adminhtml di totally rewrite services pull node.
Developer want's to have possibility to register different services for different scopes (frontend, adminhtml) without loosing general config.

Fixed Issue

  1. Types not merged for etc/di.xml etc/adminhtml/di.xml #21193: Types not merged for etc/di.xml etc/adminhtml/di.xml
  2. Fix issue with di.xml config merging for classes array argument in case of different sources and the class name difference in leading slash. #20891: Fix issue with di.xml config merging for classes array argument in case of different sources and the class name difference in leading slash.

Manual testing scenarios (*)

  1. Create new module or use existing
  2. Add in etc/adminhtml/di.xml
    `
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
    <arguments>
        <argument name="collections" xsi:type="array">
            <item name="cms_page_listing_data_source" xsi:type="string">Magento\Cms\Model\ResourceModel\Page\Grid\Collection</item>
            <item name="custom_listing_data_source_adminhtml" xsi:type="string">Magento\Sales\Model\ResourceModel\Order\Creditmemo\Order\Grid\Collection</item>
        </argument>
    </arguments>
</type>

`
3. Open Sales -> Order page in admin
4. After fix, grid is opened correct.
Before fix, "Not registered handle sales_order_grid_data_source" error was instead grid

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Contributor

Hi @MaksymGrom. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Mar 16, 2019

CLA assistant check
All committers have signed the CLA.

@Nazar65
Copy link
Member

Nazar65 commented Mar 16, 2019

#20891

@sidolov
Copy link
Contributor

sidolov commented May 24, 2019

Hi @MaksymGrom , we had PR with the same changes before, but we are not able to approve them due to backward compatibility. Please, review comment in the #20891 for detailed info. I'm closing this PR, thank you for your contribution!

@sidolov sidolov closed this May 24, 2019
@m2-assistant
Copy link

m2-assistant bot commented May 24, 2019

Hi @MaksymGrom, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants