Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[5.5] [Concept] PSR-11 compliant container #19822
Following up on laravel/ideas#550 I drafted up this commit to draw traction to the debate of whether Laravel container should be PSR-11 compliant or not.
Given that Laravel container already offers a complete set of features, the compliance would probably warrant just the exposure of
I know it may sound weird to open a PR and discredit it, but like I said my goal is to bring traction to the subject now that PSR-11 was accepted.
Does the spec explicitly prevent
If so then this implementation looks fine to me. If not, I wonder if it might be worth checking to see if an object is buildable (idk try to create it?) by catching the
@thecrypticace from the PSR
I'm interpreting this as: If you want to build something concrete, just build it yourself. The container will throw exception if the given identifier is unknown to itself.
I'm not sure if my interpretation is correct.