From 041cb66fef6aa974ddacae721ece882ebc57b444 Mon Sep 17 00:00:00 2001 From: Daniel Opitz Date: Wed, 24 Apr 2024 00:12:10 +0200 Subject: [PATCH 1/2] Bump psr/http-message requirement from '^1.1' to '^1.1 || ^2.0' --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1601f6d..9eda381 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ ], "require": { "php": "^7.4 || ^8.0", - "psr/http-message": "^1.1", + "psr/http-message": "^1.1 || ^2.0", "slim/slim": "^4.12", "twig/twig": "^3.8", "symfony/polyfill-php81": "^1.29" From 07aa803a30a60535c9889bd55e8084a6fdb2416e Mon Sep 17 00:00:00 2001 From: Daniel Opitz Date: Wed, 24 Apr 2024 00:31:50 +0200 Subject: [PATCH 2/2] Fix test --- tests/TwigRuntimeExtensionTest.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/TwigRuntimeExtensionTest.php b/tests/TwigRuntimeExtensionTest.php index 8241971..9219e47 100644 --- a/tests/TwigRuntimeExtensionTest.php +++ b/tests/TwigRuntimeExtensionTest.php @@ -48,9 +48,9 @@ protected function createRouteCollector(string $basePath): RouteCollector * Map a route to the given route collector. * * @param RouteCollector $routeCollector - * @param array $methods - * @param string $pattern - * @param string $routeName + * @param array $methods + * @param string $pattern + * @param string $routeName * * @return RouteInterface */ @@ -79,11 +79,11 @@ public function isCurrentUrlProvider(): array /** * @dataProvider isCurrentUrlProvider * - * @param string $pattern - * @param array $data - * @param string $path + * @param string $pattern + * @param array $data + * @param string $path * @param string|null $basePath - * @param bool $expected + * @param bool $expected */ public function testIsCurrentUrl(string $pattern, array $data, string $path, ?string $basePath, bool $expected) { @@ -125,7 +125,7 @@ public function currentUrlProvider(): array * @param string $pattern * @param string $url * @param string $basePath - * @param bool $withQueryString + * @param bool $withQueryString */ public function testCurrentUrl(string $pattern, string $url, string $basePath, bool $withQueryString) { @@ -138,7 +138,7 @@ public function testCurrentUrl(string $pattern, string $url, string $basePath, b $uriProphecy = $this->prophesize(UriInterface::class); $path = parse_url($url, PHP_URL_PATH); - $query = parse_url($url, PHP_URL_QUERY); + $query = parse_url($url, PHP_URL_QUERY) ?? ''; $uriProphecy ->getPath() @@ -178,8 +178,8 @@ public function urlForProvider(): array * @dataProvider urlForProvider * * @param string $pattern - * @param array $routeData - * @param array $queryParams + * @param array $routeData + * @param array $queryParams * @param string $basePath * @param string $expectedUrl */ @@ -224,8 +224,8 @@ public function fullUrlForProvider(): array * @dataProvider fullUrlForProvider * * @param string $pattern - * @param array $routeData - * @param array $queryParams + * @param array $routeData + * @param array $queryParams * @param string $basePath * @param string $expectedFullUrl */