Skip to content

Commit 0f79c35

Browse files
loic425fabpot
authored andcommitted
[Serializer] Add Debug command
1 parent fa3f9a5 commit 0f79c35

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,8 @@ public function load(array $configs, ContainerBuilder $container)
371371

372372
$container->getDefinition('argument_resolver.request_payload')
373373
->replaceArgument(0, new Reference('.argument_resolver.request_payload.no_serializer', ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE));
374+
375+
$container->removeDefinition('console.command.serializer_debug');
374376
}
375377

376378
if ($propertyInfoEnabled) {

Resources/config/console.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
use Symfony\Component\Messenger\Command\StatsCommand;
5151
use Symfony\Component\Messenger\Command\StopWorkersCommand;
5252
use Symfony\Component\Scheduler\Command\DebugCommand as SchedulerDebugCommand;
53+
use Symfony\Component\Serializer\Command\DebugCommand as SerializerDebugCommand;
5354
use Symfony\Component\Translation\Command\TranslationPullCommand;
5455
use Symfony\Component\Translation\Command\TranslationPushCommand;
5556
use Symfony\Component\Translation\Command\XliffLintCommand;
@@ -239,6 +240,12 @@
239240
])
240241
->tag('console.command')
241242

243+
->set('console.command.serializer_debug', SerializerDebugCommand::class)
244+
->args([
245+
service('serializer.mapping.class_metadata_factory'),
246+
])
247+
->tag('console.command')
248+
242249
->set('console.command.translation_debug', TranslationDebugCommand::class)
243250
->args([
244251
service('translator'),

0 commit comments

Comments
 (0)