magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.45k stars 9.29k forks source link

Multiple `app/etc/di.xml` overridding preferences #28017

Open lbajsarowicz opened 4 years ago

lbajsarowicz commented 4 years ago

Preconditions (*)

Magento 2.4-develop Magento OOTB should provide only 1 preference for each Interface in app/etc/di.xml as it's "base config"

Steps to reproduce (*)

Verify the contents of app/etc/di.xml

Expected result (*)

Only 1 preference for 1 Interface

Actual result (*)

https://github.com/magento/magento2/blob/960a51f7afa371e444842b953f0b5493d2255b13/app/etc/di.xml#L46 overridden by https://github.com/magento/magento2/blob/960a51f7afa371e444842b953f0b5493d2255b13/app/etc/di.xml#L116

Possible that there are other issues like that. We need to add some kind of validation for di.xml to avoid such situations in future (CC: @lenaorobei )

m2-assistant[bot] commented 3 years ago

Hi @engcom-Alfa. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

magento-engcom-team commented 3 years ago

:white_check_mark: Confirmed by @engcom-Alfa Thank you for verifying the issue. Based on the provided information internal tickets MC-40269 were created

Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.