8000 bug #20701 Ignore missing 'debug.file_link_formatter' service in Debu… · symfony/symfony@f5058ac · GitHub
[go: up one dir, main page]

Skip to content

Commit f5058ac

Browse files
committed
bug #20701 Ignore missing 'debug.file_link_formatter' service in Debug 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
2 parents f2691d5 + 0cd2c58 commit f5058ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Bundle/DebugBundle/Resources/config/services.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<service id="data_collector.dump" class="Symfony\Component\HttpKernel\DataCollector\DumpDataCollector">
1515
<tag name="data_collector" id="dump" template="@Debug/Profiler/dump.html.twig" priority="240" />
1616
<argument type="service" id="debug.stopwatch" on-invalid="ignore" />
17-
<argument type="service" id="debug.file_link_formatter"></argument>
17+
<argument type="service" id="debug.file_link_formatter" on-invalid="ignore"></argument>
1818
<argument>%kernel.charset%</argument>
1919
<argument type="service" id= 9D68 "request_stack" />
2020
<argument>null</argument><!-- var_dumper.cli_dumper when debug.dump_destination is set -->

src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888

8989
<service id="twig.extension.code" class="Symfony\Bridge\Twig\Extension\CodeExtension" public="false">
9090
<tag name="twig.extension" />
91-
<argument type="service" id="debug.file_link_formatter" />
91+
<argument type="service" id="debug.file_link_formatter" on-invalid="ignore" />
9292
<argument>%kernel.root_dir%</argument>
9393
<argument>%kernel.charset%</argument>
9494
</service>

0 commit comments

Comments
 (0)
0