Skip to content

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

Open
@lbajsarowicz

Description

@lbajsarowicz

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 (*)

<preference for="\Magento\Framework\Setup\ModuleDataSetupInterface" type="\Magento\Setup\Module\DataSetup" />

overridden by
<preference for="Magento\Framework\Setup\ModuleDataSetupInterface" type="Magento\Setup\Module\DataSetup" />

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 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: FrameworkComponent: SetupIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Progress: ready for devReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions