From ca1a58c674f9797d70c0a5282b4e57e8fa866eee Mon Sep 17 00:00:00 2001 From: Christoph Reiter <reiter.christoph@gmail.com> Date: Tue, 11 Jan 2022 11:24:15 +0100 Subject: [PATCH] tests: only ignore external deprecation warnings and error out on internal ones --- phpunit.xml.dist | 2 +- src/Command/TestCommand.php | 2 +- src/DataPersister/PlaceDataPersister.php | 2 +- src/DependencyInjection/Configuration.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 605a692..ff463f6 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -11,7 +11,7 @@ <ini name="error_reporting" value="-1"/> <server name="APP_ENV" value="test" force="true"/> <server name="SHELL_VERBOSITY" value="-1"/> - <server name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/> + <server name="SYMFONY_DEPRECATIONS_HELPER" value='max[direct]=0&quiet[]=indirect'/> <server name="KERNEL_CLASS" value="Dbp\Relay\TemplateBundle\Tests\Kernel"/> </php> <testsuites> diff --git a/src/Command/TestCommand.php b/src/Command/TestCommand.php index aae2a4c..87f0172 100644 --- a/src/Command/TestCommand.php +++ b/src/Command/TestCommand.php @@ -24,7 +24,7 @@ class TestCommand extends Command $this->setDescription('Hey there!'); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $argument = $input->getArgument('argument'); $output->writeln($argument); diff --git a/src/DataPersister/PlaceDataPersister.php b/src/DataPersister/PlaceDataPersister.php index d6ff8bc..bec4060 100644 --- a/src/DataPersister/PlaceDataPersister.php +++ b/src/DataPersister/PlaceDataPersister.php @@ -23,7 +23,7 @@ class PlaceDataPersister extends AbstractController implements DataPersisterInte return $data instanceof Place; } - public function persist($data) + public function persist($data): void { // TODO } diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 5506ae2..4e38e5a 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -9,7 +9,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface; class Configuration implements ConfigurationInterface { - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('dbp_relay_template'); -- GitLab