-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
FIX for issue #21916 - Elasticsearch6 generation does not exist #22046
FIX for issue #21916 - Elasticsearch6 generation does not exist #22046
Conversation
Hi @phoenix128. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @rogyar, thank you for the review. |
Hi @phoenix128 I'm currently upgrading a shop of ours to Magento 2.3.1, this shop has the particular Amasty Shopby module installed, currently version 2.11.1 (not updated to 2.11.2 yet which is supposed to fix this problem, even though that's probably a workaround?). I then tested this fix you are proposing, but I'm still seeing the same error:
I thought we didn't need to upgrade the Amasty module and only apply this fix as a patch to circumvent the problem, but that doesn't seem to be the case? If you need more info from me for this particular problem, I will gladly provide it :) |
cd2affa
to
b06ead6
Compare
Magento was not checking concrete class while applying plugins, this commit prevents virtual types to be autogenerated
b06ead6
to
fa079c9
Compare
Nice one @phoenix128! I can confirm this fixes the problem with the amasty/shopby module (version 2.11.1). It also looks like Just an observation, not sure if this is a problem or not, but before this change, the following files got generated, and after the change this no longer happens (tested on Magento OS 2.3.1 - developer mode):
|
Hello @hostep, If you take for example So, since my patch prevents the code generation of VirtualTypes ending with a generation suffix ( I would like some Magento architect to confirm this aspect anyway. |
I added test coverage for virtual types code generation. Seems like we also had a small performance boost while DI compiling as a side effect. |
f4bda3b
to
75684ca
Compare
…elasticsearch6-generation-does-not-exist
c5f587a
to
b8ab61b
Compare
Hi @phoenix128, thank you for your contribution! |
Magento was not checking concrete class while applying plugins
Description (*)
If the pluginized class was virtualtyped by a class with name ending with an autogenerated suffix and without the implementation of the base concrete class, the di compile was failing.
This PR prevents code generation for VirtualTypes.
Fixed Issues
Additional
generateClass
Contribution checklist (*)