-
Notifications
You must be signed in to change notification settings - Fork 26
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
Symfony 4 Support #64
Conversation
Symfony 4.0 isn't compatible with old PHP versions (before PHP 7.1 ). I suggest to:
Thank you very much @thomaspicquet for contributing :P |
Thanks for this PR @thomaspicquet :) I agree with @DocRoms, so here is what I expect to see (at least) in this PR:
After what I'll approve it :) |
Fixed deprecated ConsoleExceptionEvent
We just made the changes but the tests are still failing because of the way the container is built with the client, for some reason it can't see any of the new services even if they're public. We tried to add a kernel class since someone recommended it but that didnt fix it. |
@thomaspicquet not too sure about what is failing exactly, but i'd say that some services are not "public" anymore (since SF4 make them "private" by default) If I understood this failure:
=> tests expect a service "m6_statsd.wildcard_foo" (which is the service id of a "statsd client" service from the fixtures) to be "public" (because we try to access its definition in our tests...), but it's not I think adding: $definition->setPublic(true); would fix this test (maybe not all though) (see https://symfony.com/blog/new-in-symfony-3-4-services-are-private-by-default for more details) |
Hey sorry for the late reply, we tried to set the service as public but it didnt help. It seems the client during the test doesn't see any service at all. |
Hi ! $definition->setPublic(true); In all the services concerned? I think you want to add this method here : Like @Oliboy50 said it, Thank you very much to try it :-) You can also execute the tests in you local environment with this command : ./bin/atoum (The FAQ has an error... ) |
Made all m6 services public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you :)
I think we won't need to make our services public later, because SF4 is about "dependency injection everywhere", so no one would have to $container->get()
our services anymore, but we could remove the setPublic
later (for a pretty small performance gain), so it's ok for now :)
👍
I agree, it shouldn't have to be public anymore :) You're welcome, all the credits go to my colleague @tonyh79 for this update. |
Removed test kernel class
@thomaspicquet I'll wait for #65 to be merged before bumping a thanks again :) |
|
No description provided.