Skip to content

Preference in the wrong di.xml file #1291

Closed
@tzyganu

Description

@tzyganu

This line from the di.xml file of the Magento_Catalog module

<preference for="Magento\Framework\Pricing\PriceCurrencyInterface" type="Magento\Directory\Model\PriceCurrency" />

should be moved to the Magento_Directory module.
Having it like it is now forces a dependency that's not needed.

[EDIT]
While on the subject I found this line

<preference for="Magento\Authorization\Model\UserContextInterface" type="Magento\Authorization\Model\CompositeUserContext"/>

in 3 different places Magento/Quote/etc/di.xml, Magento/Webapi/etc/webapi_rest/di.xml and Magento/Webapi/etc/webapi_soap/di.xml. Shouldn't this be moved to the Magento_Authorization module?

This issue is based on what I understood so far about the di.xml files. if I have it wrong please let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions