-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[ DependencyInjection] Container::getServiceIds() missing from any interface #15336
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
Comments
Adding it in an existing interface is not possible (it is a BC break). But we could indeed add a new interface for that. |
Even if the interface lacks the |
Background on the |
@znerol adding methods in an interface is always a BC break. Even though non-api interfaces may be allowed to do such BC break according to our policy, we also have a note sayign that it should be avoided whenever possible. In the current case, it does not deserve a BC break IMO (thus we should probably tag IntrospectableContainerInterface as |
Diffing the container class and the interface I found some more which do not seem to be declared anywhere:
Before I will cook up an interface for |
I don't see why all methods should be in an interface. |
Perhaps at least those which are used in other bundles/component/projects? |
But then again, why? what does it bring to the table? I mean, you can only type hint by one interface, so adding another one would not help, right? |
|
I examined the usage of the other methods mentioned in one of my comments above. Those are indeed only used inside the component. Regarding So, is it worth to submit a PR and if yes which approach should it implement? |
|
The public method
Container::getServiceIds()
is not declared in any interface. This method is used by several Symfony bundles both in test as well as in production code. It is also required in Drupal.I guess an appropriate place for the method declaration would be in
IntrospectableContainerInterface
.Could this go into 2.8 or should I only open up a PR for master?
The text was updated successfully, but these errors were encountered: