-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Stand alone plugin manager replacement #123
Conversation
Paging @Ocramius and @froschdesign for review/discussion 🙏 If this looks like a feasible approach, I'll do some more work on it… It'd be great if we could get #118 merge so that CI stands a chance too :) |
Signed-off-by: George Steel <[email protected]>
9b41f03
to
3f014d4
Compare
Just curious about this: Do we plan to remove |
I personally think that making "things" more vendor agnostic might mean that laminas-view specifically might have broader appeal. In my typical uses of the lib, I'd still be using Service Manager, but I think it's generally a good thing that all you need is any Psr-11 container wired up… I'd appreciate further discussion on whether this pull is feasible/likely to be merged - I'll put in some more effort if so. |
I think we should ask @weierophinney because the idea is based on his work on laminas-feed. |
Note: if we plan to get rid of plugin managers from That was what we had with Yes, having the dependency here is a pain, but the abstraction should be well defined, and @gsteel accumulated loads of experience in how to make type-safe plugin-manager abstractions. Having a PSR-11 dependency (that provides the plugins) would certainly suffice, if well-typed, but rewriting it everywhere feels meh. |
TBH: I would be fine if the project depends on |
Is it feasible to look at |
There's a pretty huge BC break if we do that, however: since the release of ZF 2.0, we've been able to provide Yes, moving to straight-up PSR-11 would be easiest in terms of upgrade path and interop, but it comes at the expense of our own ecosystem. |
Further to my comment, I had something like this in mind: https://gist.github.com/gsteel/eb0cff849f57bdda5aee98bfd601af66 |
I'm killing this PR - In summary I think most feel it's lacking much advantage over the current plugin manager. |
@gsteel remember to adjust milestone/labels, or else it still lands in release notes 😬 |
Sorry @Ocramius - I'll remember next time! |
Description
Further to discussion in #121, this is an initial draft (Without docs or tests) for a replacement plugin manager enabling the removal of the hard dependency on Laminas Service Manager.
The expectation is that view helpers are configured as a map of
['alias' => 'container-id-or-class-string']
. An attempt is made tonew
class-strings not present in the container and whatever comes out needs to becallable
Questions
Closure
and use closure from callable before returning?