diff --git a/Build/TreeFactory.php b/Build/TreeFactory.php index 78f4a41..24119b3 100644 --- a/Build/TreeFactory.php +++ b/Build/TreeFactory.php @@ -12,10 +12,10 @@ use Psr\Log\LoggerInterface; use Symfony\Component\Config\ConfigCacheFactoryInterface; use Symfony\Component\Config\ConfigCacheInterface; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\DependencyInjection\ServiceSubscriberInterface; use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\Stopwatch\StopwatchEvent; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; +use Symfony\Contracts\Service\ServiceSubscriberInterface; use Webfactory\Bundle\NavigationBundle\Event\TreeInitializedEvent; use Webfactory\Bundle\NavigationBundle\Tree\Tree; diff --git a/Command/DumpTreeCommand.php b/Command/DumpTreeCommand.php index 74c2703..bd28d9e 100644 --- a/Command/DumpTreeCommand.php +++ b/Command/DumpTreeCommand.php @@ -19,7 +19,7 @@ protected function configure() ->addOption('short', null, InputOption::VALUE_NONE, 'Kompakte Ausgabe'); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->shortOutput = $input->getOption('short'); @@ -28,6 +28,8 @@ protected function execute(InputInterface $input, OutputInterface $output) foreach ($roots as $root) { $this->dumpNode($root, $output); } + + return 0; } private function dumpNode(Node $n, OutputInterface $output, $depth = 0) diff --git a/Command/LookupNodeCommand.php b/Command/LookupNodeCommand.php index 62cfe04..3163fab 100644 --- a/Command/LookupNodeCommand.php +++ b/Command/LookupNodeCommand.php @@ -16,7 +16,7 @@ protected function configure() ->addArgument('queryParam', InputArgument::IS_ARRAY, 'One or several key=value pairs to search in the node index'); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $provisions = []; @@ -35,5 +35,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } else { $output->writeln('No matching node found.'); } + + return 0; } } diff --git a/Event/TreeInitializedEvent.php b/Event/TreeInitializedEvent.php index c27a562..4bab04a 100644 --- a/Event/TreeInitializedEvent.php +++ b/Event/TreeInitializedEvent.php @@ -8,7 +8,7 @@ namespace Webfactory\Bundle\NavigationBundle\Event; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; use Webfactory\Bundle\NavigationBundle\Tree\Tree; class TreeInitializedEvent extends Event diff --git a/composer.json b/composer.json index f5f8cc1..3344358 100644 --- a/composer.json +++ b/composer.json @@ -9,17 +9,24 @@ "require": { "php": "^7.2", - "symfony/config": "^2.8|^3.4|^4.0", - "symfony/console": "^2.8|^3.4|^4.0", - "symfony/dependency-injection": "^3.4|^4.0", - "symfony/event-dispatcher": "^4.3", - "symfony/framework-bundle": "^3.4|^4.0", - "symfony/http-foundation": "^2.8|^3.4|^4.0", - "symfony/http-kernel": "^2.8|^3.4|^4.0", - "symfony/proxy-manager-bridge": "^2.8|^3.4|^4.0", + "psr/container": "^1.0", + "psr/log": "^1.1", + "symfony/config": "^4.0|^5.0", + "symfony/console": "^4.0|^5.0", + "symfony/dependency-injection": "^4.2|^5.0", + "symfony/event-dispatcher": "^4.3|^5.0", + "symfony/event-dispatcher-contracts": "^1.0|^2.0", + "symfony/http-foundation": "^4.0|^5.0", + "symfony/http-kernel": "^4.0|^5.0", + "symfony/proxy-manager-bridge": "^4.0|^5.0", + "symfony/service-contracts": "^1.0|^2.0", "twig/twig": "^1.36|^2.6" }, + "require-dev": { + "symfony/stopwatch": "^5.4" + }, + "suggest": { "symfony/stopwatch": "um zu messen, wie lange der Aufbau des NavigationTree dauert", "ocramius/proxy-manager": "damit der NavigationTree wirklich lazy erzeugt wird"