-
Notifications
You must be signed in to change notification settings - Fork 27
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
Why was PublicServicePass removed in v2? #72
Comments
Hey @loevgaard, it was removed in #48 as Symfony provides the https://symfony.com/doc/current/testing.html#retrieving-services-in-the-test |
Hi, @chapterjason Yes, but it doesn't give me access to removed services. See https://github.com/symfony/symfony/blob/6.2/src/Symfony/Bundle/FrameworkBundle/Test/TestContainer.php#L19-L23 |
Yes, that is right.
IMO It is better to explicitly set only the neccessary services public in a separate file and load it with |
That may be right. I find it easier to do with the compiler pass, but yes your way is more explicit. Thanks for your quick response! |
Thanks for this great package 🎉
Why was https://github.com/SymfonyTest/symfony-bundle-test/blob/1.x/src/CompilerPass/PublicServicePass.php removed in v2? If I want to test services that are only used by users of the bundle they are removed by default in Symfony and hence I cannot test them using this package. If I mark them public with the old
PublicServicePass
then I can.Can you elaborate on this? Am I missing something? :)
The text was updated successfully, but these errors were encountered: