Skip to content

Commit f0027cc

Browse files
committed
feature #32504 [ErrorRenderer] Add DebugCommand for easy debugging and testing (yceruto)
This PR was squashed before being merged into the 4.4 branch (closes #32504). Discussion ---------- [ErrorRenderer] Add DebugCommand for easy debugging and testing | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - ![debug-error-renderer](https://user-images.githubusercontent.com/2028198/61086533-170a8a00-a401-11e9-89a6-3b8195ba80c1.gif) This command helps you test built-in renderers and others provided by third-party packages (thinking API-Platform, FOSRestBundle, etc.) without requiring the TwigBundle preview mechanism. <del>This also fixes a bug in `ErrorRendererPass` related to the order of priorities.</del> Commits ------- 97c89686b1 [ErrorRenderer] Add DebugCommand for easy debugging and testing
2 parents 87b8c1e + 29662d3 commit f0027cc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Resources/config/console.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,5 +194,11 @@
194194
<argument type="service" id="debug.file_link_formatter" on-invalid="null" />
195195
<tag name="console.command" command="debug:form" />
196196
</service>
197+
198+
<service id="console.command.error_renderer_debug" class="Symfony\Component\ErrorRenderer\Command\DebugCommand">
199+
<argument type="collection" /> <!-- All error renderers are injected here by ErrorRendererPass -->
200+
<argument type="service" id="debug.file_link_formatter" on-invalid="null" />
201+
<tag name="console.command" command="debug:error-renderer" />
202+
</service>
197203
</services>
198204
</container>

0 commit comments

Comments
 (0)