-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[TwigBundle] Fix usage of TwigBundle without FrameworkBundle #28893
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
|
@@ -142,7 +141,7 @@ | |||
</service> | |||
|
|||
<service id="twig.controller.preview_error" class="Symfony\Bundle\TwigBundle\Controller\PreviewErrorController" public="true"> | |||
<argument type="service" id="http_kernel" /> | |||
<argument /> |
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.
that is still a broken service definition here. The compiler pass should not handle adding the argument, but should handle removing the service instead (if we don't have HttpKernel, we don't really need the error preview controller)
9a85049
to
cad2d39
Compare
Updated |
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.
To be merged in master (no 3.4 versions worked without FrameworkBundle).
cad2d39
to
246a905
Compare
Thank you @tgalopin. |
…Bundle (tgalopin) This PR was squashed before being merged into the 3.4 branch (closes #28893). Discussion ---------- [TwigBundle] Fix usage of TwigBundle without FrameworkBundle | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - According to the composer.json (https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/TwigBundle/composer.json), the FrameworkBundle shouldn't be required to use the bundle (which can be useful in tests of other bundles for instance). However, it is not the case, mainly due to issues with direct references to unavailable services. I target 3.4 because 812fbb4 is the main reason for the issue. We may have added additional problems in 4.0 and 4.1. Commits ------- 246a905 [TwigBundle] Fix usage of TwigBundle without FrameworkBundle
And you got it in 3.4 as I forgot to switch the branch when merging :) |
According to the composer.json (https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/TwigBundle/composer.json), the FrameworkBundle shouldn't be required to use the bundle (which can be useful in tests of other bundles for instance). However, it is not the case, mainly due to issues with direct references to unavailable services.
I target 3.4 because 812fbb4 is the main reason for the issue. We may have added additional problems in 4.0 and 4.1.