-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Ignore missing 'debug.file_link_formatter' service in Debug and Twig bundles #20701
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
Wait, the service is also defined as part of the Framework bundle with 3.2. So either way it seems there's a missing required dependency, but now I'm not sure what it should be. |
In the TwigBundle, we could just pass <service id="twig.extension.code" class="Symfony\Bridge\Twig\Extension\CodeExtension" public="false">
<tag name="twig.extension" />
<argument type="service" id="debug.file_link_formatter" on-invalid="ignore"></argument>
<argument>%kernel.root_dir%</argument>
<argument>%kernel.charset%</argument>
</service> |
Thanks for that idea @xabbuh. I've changed the PR's details to match the suggestion. |
I think we can solve this for the FrameworkBundle in a similar way. |
Shouldn't we patch these files also? @xabbuh, it looks like |
Done
Not needed, the service has a second definition in that file and the bundle depends on HttpKernel ~3.2 so the service class will always exist. |
I think you also need to update the |
It does already unless I've misread
|
Sorry, I confused that on my mobile. :( 👍 looks good to me Status: Reviewed |
👍 |
Thank you @mbabker. |
…g and Twig bundles (mbabker) This PR was merged into the 3.2 branch. Discussion ---------- Ignore missing 'debug.file_link_formatter' service in Debug and Twig bundles | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | TBD | Fixed tickets | N/A | License | MIT | Doc PR | N/A The TwigBundle's `twig.extension.code` service and the DebugBundle's `data_collector.dump` service require the new `debug.file_link_formatter` service however this is only available with the FrameworkBundle or WebProfilerBundle 3.2. The class it refers to was added to the HttpKernel at 3.2 as well. In the case of the TwigBundle, attempting to upgrade a site's dependencies where you try to install `symfony/twig-bundle ~3.2` with `symfony/framework-bundle <3.2` or `symfony/web-profiler-bundle <3.2` causes a `ServiceNotFoundException` with message 'The service "twig" has a dependency on a non-existent service "debug.file_link_formatter".' to be thrown. Commits ------- 0cd2c58 Ignore missing 'debug.file_link_formatter' service in Debug and Twig bundles
The TwigBundle's
twig.extension.code
service and the DebugBundle'sdata_collector.dump
service require the newdebug.file_link_formatter
service however this is only available with the FrameworkBundle or WebProfilerBundle 3.2. The class it refers to was added to the HttpKernel at 3.2 as well. In the case of the TwigBundle, attempting to upgrade a site's dependencies where you try to installsymfony/twig-bundle ~3.2
withsymfony/framework-bundle <3.2
orsymfony/web-profiler-bundle <3.2
causes aServiceNotFoundException
with message 'The service "twig" has a dependency on a non-existent service "debug.file_link_formatter".' to be thrown.