setName('doctrine:query:sql')
->setHelp(<<<'EOT'
The %command.name% command executes the given SQL query and
outputs the results:
php %command.full_name% "SELECT * FROM users"
EOT);
}
protected function execute(InputInterface $input, OutputInterface $output): int
{
trigger_deprecation(
'doctrine/doctrine-bundle',
'2.2',
'The "%s" (doctrine:query:sql) is deprecated, use dbal:run-sql command instead.',
self::class,
);
return parent::execute($input, $output);
}
}