-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Cleanup app/etc/di.xml #30886
base: 2.4-develop
Are you sure you want to change the base?
Cleanup app/etc/di.xml #30886
Conversation
Hi @thomas-kl1. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento create issue |
@magento run all tests |
1 similar comment
@magento run all tests |
<argument name="state" xsi:type="object" shared="false">Magento\Framework\Mview\View\StateInterface</argument> | ||
<argument name="changelog" xsi:type="object" shared="false">Magento\Framework\Mview\View\ChangelogInterface</argument> | ||
</arguments> | ||
</type> | ||
<type name="Magento\Catalog\Model\Indexer\Product\Full"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we need remove this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, it shouldn't, didn't seen the shared="false" at first place. I need to investigate the reason to have shared="false"
@@ -1113,7 +1053,7 @@ | |||
</type> | |||
<type name="Magento\Framework\Session\Validator"> | |||
<arguments> | |||
<argument name="scopeType" xsi:type="const">Magento\Store\Model\ScopeInterface::SCOPE_STORE</argument> | |||
<argument name="scopeType" xsi:type="const">Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT</argument> | |||
<argument name="skippedUserAgentList" xsi:type="array"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
argument scopeType
should be remove due duplicated in module Store already defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's overriden in the Magento\Store module, the idea is to separate responsabilities and design scope. app/etc/di.xml should only contain framework di without knowing the context of modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no Magento_Store will override this file. File app/etc/di.xml will ultilized first after that is module global di.xml
@@ -485,7 +445,7 @@ | |||
<type name="Magento\Framework\Url"> | |||
<arguments> | |||
<argument name="session" xsi:type="object">Magento\Framework\Session\Generic\Proxy</argument> | |||
<argument name="scopeType" xsi:type="const">Magento\Store\Model\ScopeInterface::SCOPE_STORE</argument> | |||
<argument name="scopeType" xsi:type="const">Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT</argument> | |||
</arguments> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be Magento\Store\Model\ScopeInterface::SCOPE_STORE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's overriden with proper value in Magento\Store module
In my opinion you only need clean file app/etc/di.xml with remove some parts unneccessary (backslash) is enough |
app/etc/di declarations should only be framework specific. Anything that belongs to a module should be declared as specific in the module di. THe idea behind that is to get magento2 base module agnostic |
Much better seem ok with me ! |
Modules I don't want to touch: Magento\Ui |
@magento run all tests |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Cleanup the app/etc/di.xml that belongs to magento/magento2-base I guess
Resolved issues: