-
Notifications
You must be signed in to change notification settings - Fork 26
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
Integration tests failing after module installation #2
Comments
Hmm, that's odd. It feels more like a dependency was not declared correctly which makes this module load earlier than it should load. But I'm wondering which one ( Adding proxies probably will fix this, but I'm not sure yet if that is the most correct solution here. Have you seen this sort of problem happen before with other modules, and was the best way to fix that by introducing proxies? I'll see if I can reproduce this somehow in the next few days, it suffices to run the built-in integration tests of Magento with this module installed? Thanks a lot for the issue and for the PR btw! |
Yes, it will then try to setup Magento with an emtpy DB and then the error will be trown.
Yes, in most cases adding a dependency in module.xml is enough. But i'm 90% certain that with console commands you also need to add proxies via DI.xml for certain classes. I always solve this with a proxies, it seems like a clean solution. |
Alrighty, I was able to reproduce the problem, here is the stack trace:
Looking through it, it seems like instantiating a Anyway, as a fix we should probably proxy the I got the integration tests running by replacing the following in that Meta class:
with:
I'm not sure yet what I prefer, doing the proxying in di.xml or in the php class itself. Thoughts? Does this makes any sense? |
But then again, Magento2's Coding Standard doesn't seem to like this:
So we should then still go for the proxying defined in the di.xml file. Could you update your PR to proxy the |
Yes, good solution, the This is the constructor of that class:
It's failing because of the I'll update the PR in a minute. |
Merged #3, which fixes this issue, thanks again! |
Just FYI: since you guys already make use of the module and there seems to be some interest in the module by others, I decided to publish the package to packagist.org and tagged a version v1.0.0, so you may want to update the projects where you make use of this module 🙂 |
@hostep i've prepared a PR that will fix this issue in the core: magento/magento2#26538 |
Oeh, awesome, good job, I'll keep my eye on it to see if it gets merged! |
After installing this module via composer, our integration testing suite broke. This is because of the three console commands that this module provides. I'll create a PR it fix this in a minute.
The text was updated successfully, but these errors were encountered: