-
Notifications
You must be signed in to change notification settings - Fork 15
do not search for service_container references #37
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
Conversation
Excellent work as always :) |
this change is now breaking my Symfony-2.8.x application. on
|
reverting to 1.2.6 removes the errors and the project builds properly. |
@xabbuh Any idea how to fix this? The type of `service_container` might
have to be changed to `ContainerInterface`. Not sure if that works though!
On Feb 9, 2017 03:37, "Craig Heydenburg" <notifications@github.com> wrote:
reverting to 1.2.6 removes the errors and the project builds properly.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABI0djwAlp0y8HAz0F2jlopMtoz_HJ7tks5ranvggaJpZM4L3--Y>
.
|
@matthiasnoback That won't solve the issue either. The By the way, expecting a |
thank you @xabbuh |
@craigh Is there a test in Zikula I could execute to reproduce the issue? |
@xabbuh sadly, no. Zikula isn't quite up to spec on proper tests yet. you can see here: zikula/core@4d6dd49 that I restricted the version. If you revert that and run |
Thanks for fixing this 👍 I did not provide a pr because I wasn't sure how to fix this 😅 |
As far as I can see there is no way to solve the problem without removing the code that validates the argument type hint (no matter what class we used for the pseudo container definition all would fail when the service expects a @matthiasnoback I think we need to drop the type check for the special |
Okay, I would agree with a hard-coded rule to ignore this particular
service, though it's not pretty of course ;)
Another, maybe future solution would be to raise a warning for this kind of
Liskov substitution principle violation. But people wouldn't be able to fix
broken external dependencies anyway so it might not be helpful at all :)
Thanks for your work @xabbuh!
On Feb 12, 2017 20:04, "Christian Flothmann" <notifications@github.com> wrote:
As far as I can see there is no way to solve the problem without removing
the code that validates the argument type hint (no matter what class we
used for the pseudo container definition all would fail when the service
expects a ContainerBuilder instance).
@matthiasnoback <https://github.com/matthiasnoback> I think we need to drop
the type check for the special service_container to not break BC. What do
you think?
|
@matthiasnoback I agree that this solution is not pretty. But since we don't know if people actually do compile the container after it has been build, we don't know if it's safe for them to make these assumptions (like, for example, Zikula seems to always use the |
@xabbuh Okay, seems fine to me then! |
@craigh It looks like even if we make the change I suggested above, you will run into the same problems due to the |
see #39 |
This fixes #36.