-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Support laminas code ^4.5.0 #530
Conversation
f10e13c
to
fa15434
Compare
fa15434
to
4a64771
Compare
I'm a bit confused.. 4.14 is in those dependency ranges right? |
Not in the one for 2.4.4, which was released a bit more than a year ago |
Since 4.x is a new major release, it might make more sense to keep it as is. Those on older Magento installations van keep on using an older soap-client version until they have the chance to upgrade their Magento installations. I'm not too keen on adding hacks like this to the project from a maintainability point of view. It already is a year old to be fair... Maybe a small question from me: were you able to play around with the V4 alpha version? Would love to get some early feedback rather than launching it directly and having to fix bugs under pressure :-) |
I thought a bit more about the issue and I could see another path: what if code generation and runtime would be separate, so that a library can require the code generation functionality through require-dev and the runtime through require. The dependency tree for require could look like this:
I am sure I got some dependency slightly wrong, but the result would be that libraries using phpro/soap-client can only depend on phpro/soap-runtime and get minimal dependencies (no Symfony, no Laminas) and therefore reducing the likelihood of conflict. The result would also be that existing implementation would continue to depend on phpro/soap-client and that would continue to work transparently. What do you think? |
@lstrojny I've thought about that as well and it could make sense to do so. The only thing this package really does is code generation and providing a small 'caller' system for runtime. I'm also not sure how splitting it up would solve your initial problem? You'dd still need to require the code generator package into your dev dependencies, making it still collapse with the laminas code package. |
That would totally work as well, yes.
Because it’s only in require-dev, the code generation dependencies are irrelevant for the resolval of the overall tree. So the structure would practically be something like Magento -> My Library -> SOAP runtime (require) and SOAP code generation (require-dev). Therefore when Magento builds it’s dependency tree, dev dependencies from My Library are ignored. |
To come back to the original pull request: I understand you correctly that there is no interest from your side to get it merged? |
@lstrojny Indeed : there currently is no interest in merging this PR. I've kept it open to keep track of the feedback provided to make this package a dev-only package. As mentioned above : Since v4 will be a new major release, I don't see much value in lowering the dependencies atm: You can either upgrade magento (given support for 2.4.4 will be dropped in a half year) or use an older version of this package to overcome the issue. Nevertheless thank you for your insight and work on this. |
It’s not a great change but … hear me out.
Magento requires these versions of laminas-code:
This means: phpro/soap-client cannot be installed with Magento as it will create version conflicts. The simplest way to fix that would be to tolerate lower versions of laminas and do feature detection. This is what this patch does. If PropertyGenerator from laminas-code does not support setting type information, it will just be skipped.