Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UPGRADE-8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ FrameworkBundle
* Remove the `router.cache_dir` config option
* Remove the `validation.cache` option
* Remove `TranslationUpdateCommand` in favor of `TranslationExtractCommand`
* Remove deprecated `--show-arguments` option from `debug:container` command

HtmlSanitizer
-------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ protected function configure(): void
$this
->setDefinition([
new InputArgument('name', InputArgument::OPTIONAL, 'A service name (foo)'),
new InputOption('show-arguments', null, InputOption::VALUE_NONE, 'Show arguments in services'),
new InputOption('show-hidden', null, InputOption::VALUE_NONE, 'Show hidden (internal) services'),
new InputOption('tag', null, InputOption::VALUE_REQUIRED, 'Show all services with a specific tag'),
new InputOption('tags', null, InputOption::VALUE_NONE, 'Display tagged services for an application'),
Expand All @@ -69,10 +68,6 @@ protected function configure(): void

<info>php %command.full_name% validator</info>

To get specific information about a service including all its arguments, use the <info>--show-arguments</info> flag:

<info>php %command.full_name% validator --show-arguments</info>

To see available types that can be used for autowiring, use the <info>--types</info> flag:

<info>php %command.full_name% --types</info>
Expand Down Expand Up @@ -151,10 +146,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$tag = $this->findProperTagName($input, $errorIo, $object, $tag);
$options = ['tag' => $tag];
} elseif ($name = $input->getArgument('name')) {
if ($input->getOption('show-arguments')) {
$errorIo->warning('The "--show-arguments" option is deprecated.');
}

$name = $this->findProperServiceName($input, $errorIo, $object, $name, $input->getOption('show-hidden'));
$options = ['id' => $name];
} elseif ($input->getOption('deprecations')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,22 +342,4 @@ public static function provideCompletionSuggestions(): iterable
['txt', 'xml', 'json', 'md'],
];
}

public function testShowArgumentsProvidedShouldTriggerDeprecation()
{
static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml', 'debug' => true]);
$path = \sprintf('%s/%sDeprecations.log', static::$kernel->getContainer()->getParameter('kernel.build_dir'), static::$kernel->getContainer()->getParameter('kernel.container_class'));
@unlink($path);

$application = new Application(static::$kernel);
$application->setAutoExit(false);

@unlink(static::getContainer()->getParameter('debug.container.dump'));

$tester = new ApplicationTester($application);
$tester->run(['command' => 'debug:container', 'name' => 'router', '--show-arguments' => true]);

$tester->assertCommandIsSuccessful();
$this->assertStringContainsString('[WARNING] The "--show-arguments" option is deprecated.', $tester->getDisplay());
}
}
Loading