-
Notifications
You must be signed in to change notification settings - Fork 53
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
Question: Why there is no set method? #46
Comments
Hi, this is explained in this document here: https://www.php-fig.org/psr/psr-11/meta/#31-goals Hope that answers your question! |
Thanks for clarifying and sorry for the rtfm thing. I had a different expectation and simply was surprised that the set method is not included. In simplified terms, could one say that the target audience for the container interface are authors of libraries or frameworks and not authors of concrete applications where the application itself is responsible for filling the container? |
Exactly yes. |
Not so nice. Simple example:
Perhaps we can get a |
@cottton this would be a separate PSR, I don't think it's worth discussing here because this PSR is not about that. It will never happen in this PSR specifically. |
Is a standard for DI configuration worked on? To find the best implementation you now have to learn how each package works. A common setup syntax would fix that. |
With my own framework I simply extended pimple but created a |
Why doesn't the interface provide a "set" method? I wonder what the use case for the interface is if I can't rely on a contract about how objects can be stored in the container?
See similar question on SO at https://stackoverflow.com/q/61504435/6161354.
Thanks for clarifying.
The text was updated successfully, but these errors were encountered: