From 20fd9581c5e1ec8b5b508f17924a3c29814cd9e7 Mon Sep 17 00:00:00 2001 From: fbuchlak <30214087+fbuchlak@users.noreply.github.com> Date: Thu, 25 Jan 2024 19:21:36 +0100 Subject: [PATCH] symfony7-support --- composer.json | 12 ++++++------ src/ChainRouter.php | 4 ++-- src/DynamicRouter.php | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 3a3edac..c0b63e0 100644 --- a/composer.json +++ b/composer.json @@ -16,16 +16,16 @@ ], "require": { "php": "^8.0", - "symfony/routing": "^6.0", - "symfony/http-kernel": "^6.0", + "symfony/routing": "^6.0 || ^7.0", + "symfony/http-kernel": "^6.0 || ^7.0", "psr/log": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { "doctrine/annotations": "^1.5", - "symfony/phpunit-bridge": "^6.0", - "symfony/dependency-injection": "^6.0", - "symfony/config": "^6.0", - "symfony/event-dispatcher": "^6.0" + "symfony/phpunit-bridge": "^6.0 || ^7.0", + "symfony/dependency-injection": "^6.0 || ^7.0", + "symfony/config": "^6.0 || ^7.0", + "symfony/event-dispatcher": "^6.0 || ^7.0" }, "suggest": { "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version ^6.0" diff --git a/src/ChainRouter.php b/src/ChainRouter.php index 23dc1ca..3cdeff3 100644 --- a/src/ChainRouter.php +++ b/src/ChainRouter.php @@ -279,11 +279,11 @@ public function setContext(RequestContext $context): void $this->context = $context; } - public function warmUp(string $cacheDir): array + public function warmUp(string $cacheDir, string $buildDir = null): array { foreach ($this->all() as $router) { if ($router instanceof WarmableInterface) { - $router->warmUp($cacheDir); + $router->warmUp($cacheDir, $buildDir); } } diff --git a/src/DynamicRouter.php b/src/DynamicRouter.php index 86e46e2..63cbabd 100644 --- a/src/DynamicRouter.php +++ b/src/DynamicRouter.php @@ -73,7 +73,7 @@ public function __construct( /** * {@inheritdoc} */ - public function getRouteCollection(): ?RouteCollection + public function getRouteCollection(): RouteCollection { if (!$this->routeCollection instanceof RouteCollection) { $this->routeCollection = $this->provider