-
-
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
Adjusted built-in plugin managers for psr/container:^2
compatibility
#59
Adjusted built-in plugin managers for psr/container:^2
compatibility
#59
Conversation
22f0c64
to
cb40e48
Compare
This counts as a minor BC break (which is already inherent of switching to `psr/container:^2`), since the return type of `ExtensionManagerInterface#has()` now requires a `bool` return type, and so will further child classes. To mitigate this BC break, the methods for the two `ExtensionManagerInterface` types have been moved to the docblock definitions, reducing the chance of inheritance-based BC breaks. The two `ExtensionManagerInterface` have also been deprecated, since they came from a time where `Zend_Loader` (in `zendframework/zendframework1`) was still a thing, whereas `laminas/laminas-servicemanager` currently provides healthy abstractions for building objects of a specific category, by using cleaner dependency injection patterns.
cb40e48
to
e79381f
Compare
It was introduced as a standalone implementation: 57f1fc8
And that goes in the direction you have suggested: remove the plugin managers of laminas-servicemanager. |
Hmm, possibly because Drupal didn't want the
I'd rather say that this goes the opposite way: if we want to use the plugin managers, let them be proper plugin manager (which @gsteel spent a lot of time refining at type level too) |
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.
To preserve BC, would it not be better to conflict with psr/container >= 2.0 in a patch release? Otherwise 👍
TBH, very vary of changing dependency ranges in patches, since users will just get a previous release installed (depending on SAT). It's potentially viable, but I feel like this is the smaller evil, as it breaks only for those that extend our provided plugin managers (really rare) |
🚢 here to go back to ✅ builds and downstream usage. @froschdesign happy to iterate on the deprecation in a new patch or minor, if you feel like it isn't a clear one. |
@Ocramius
That's why I asked. 😄 |
Ah, that part I agree with, but it's certainly better to have our own general concept of plugin managers, than having each package declare its own approach to plugin managers :D |
@Ocramius (Related to laminas/laminas-view#123) |
This counts as a minor BC break (which is already inherent of switching to
psr/container:^2
),since the return type of
ExtensionManagerInterface#has()
now requires abool
return type,and so will further child classes.
To mitigate this BC break, the methods for the two
ExtensionManagerInterface
types have beenmoved to the docblock definitions, reducing the chance of inheritance-based BC breaks.
The two
ExtensionManagerInterface
have also been deprecated, since they came from a time whereZend_Loader
(inzendframework/zendframework1
) was still a thing, whereaslaminas/laminas-servicemanager
currently provides healthy abstractions for building objects of a specific category, by using
cleaner dependency injection patterns.