Summary
For some reason our <preference/> does not work anymore after magento patch.2.4.6p14, so we started troubleshooting...
We don't know if it's only affected to the version, it started with updating the codebase - maybe another component is involved. We experienced that behavior on 2 different projects.
So far
- preference for interfaces seems to work (of course that would break anything otherwise)
- preference to override a simple class does not
- new plugins are working
disabled="true" didn't work on existing plugins, now it does without change - strange
Magento does not complain about the preference at compilation time and it shows the preference registered by di:info command, yet the original class is now loaded, not the preference as it did before.
Examples
The preference we need to override (because it's buggy) is:
Magento\Tax\Model\Sales\Total\Quote\CommonTaxCollector
The other example is a simple plugin on load() of
Magento\Catalog\Model\ResourceModel\Product\Collection
Yeah, it may work in a vanilla empty instance - we didn't test it, also this doesn't help much - we want to know what probably could be broken or has changed.
Could someone please respond if there are breaking changes to this topic?
Edit:
Proposed solution
No response
Release note
No response
Triage and priority
Summary
For some reason our
<preference/>does not work anymore after magento patch.2.4.6p14, so we started troubleshooting...We don't know if it's only affected to the version, it started with updating the codebase - maybe another component is involved. We experienced that behavior on 2 different projects.
So far
disabled="true"didn't work on existing plugins, now it does without change - strangeMagento does not complain about the preference at compilation time and it shows the preference registered by di:info command, yet the original class is now loaded, not the preference as it did before.
Examples
The preference we need to override (because it's buggy) is:
Magento\Tax\Model\Sales\Total\Quote\CommonTaxCollectorThe other example is a simple plugin on load() of
Magento\Catalog\Model\ResourceModel\Product\CollectionYeah, it may work in a vanilla empty instance - we didn't test it, also this doesn't help much - we want to know what probably could be broken or has changed.
Could someone please respond if there are breaking changes to this topic?
Edit:
Proposed solution
No response
Release note
No response
Triage and priority