Skip to content

Commit 018191a

Browse files
pyrechfabpot
authored andcommitted
[ErrorHandler] Add a command to dump static error pages
1 parent a9faafe commit 018191a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Resources/config/console.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
use Symfony\Component\Console\EventListener\ErrorListener;
4545
use Symfony\Component\Console\Messenger\RunCommandMessageHandler;
4646
use Symfony\Component\Dotenv\Command\DebugCommand as DotenvDebugCommand;
47+
use Symfony\Component\ErrorHandler\Command\ErrorDumpCommand;
4748
use Symfony\Component\Messenger\Command\ConsumeMessagesCommand;
4849
use Symfony\Component\Messenger\Command\DebugCommand as MessengerDebugCommand;
4950
use Symfony\Component\Messenger\Command\FailedMessagesRemoveCommand;
@@ -59,6 +60,7 @@
5960
use Symfony\Component\Translation\Command\TranslationPushCommand;
6061
use Symfony\Component\Translation\Command\XliffLintCommand;
6162
use Symfony\Component\Validator\Command\DebugCommand as ValidatorDebugCommand;
63+
use Symfony\WebpackEncoreBundle\Asset\EntrypointLookupInterface;
6264

6365
return static function (ContainerConfigurator $container) {
6466
$container->services()
@@ -385,6 +387,14 @@
385387
])
386388
->tag('console.command')
387389

390+
->set('console.command.error_dumper', ErrorDumpCommand::class)
391+
->args([
392+
service('filesystem'),
393+
service('error_renderer.html'),
394+
service(EntrypointLookupInterface::class)->nullOnInvalid(),
395+
])
396+
->tag('console.command')
397+
388398
->set('console.messenger.application', Application::class)
389399
->share(false)
390400
->call('setAutoExit', [false])

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"symfony/config": "^7.3",
2424
"symfony/dependency-injection": "^7.2",
2525
"symfony/deprecation-contracts": "^2.5|^3",
26-
"symfony/error-handler": "^6.4|^7.0",
26+
"symfony/error-handler": "^7.3",
2727
"symfony/event-dispatcher": "^6.4|^7.0",
2828
"symfony/http-foundation": "^7.3",
2929
"symfony/http-kernel": "^7.2",

0 commit comments

Comments
 (0)