From 54bfbe48efbf05a8c3285ae3b48e16d57dc9993e Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Mon, 19 Feb 2024 03:01:27 +0100 Subject: [PATCH] bump routing --- composer.json | 7 +++--- phpunit.xml.dist | 23 ++++++++----------- src/Doctrine/Orm/RedirectRoute.php | 9 ++------ .../Doctrine/Orm/RedirectRouteTest.php | 8 ++----- 4 files changed, 17 insertions(+), 30 deletions(-) diff --git a/composer.json b/composer.json index 737a71b5..6a59ac37 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ ], "require": { "php": "^8.1", - "symfony-cmf/routing": "^3.0", + "symfony-cmf/routing": "^3.0.3", "symfony/framework-bundle": "^6.4 || ^7.0" }, "require-dev": { @@ -36,7 +36,7 @@ "symfony/translation": "^6.4 || ^7.0", "symfony/validator": "^6.4 || ^7.0", "symfony/twig-bundle": "^6.4 || ^7.0", - "symfony-cmf/testing": "dev-sf7 as 4.2.0", + "symfony-cmf/testing": "^5.0.0", "twig/twig": "^2.4.4 || ^3.0" }, "suggest": { @@ -69,6 +69,5 @@ "allow-plugins": { "composer/package-versions-deprecated": true } - }, - "minimum-stability": "dev" + } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f40ee5f1..8f6f0ec5 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,36 +1,33 @@ - - - ./tests/Unit - ./tests/Functional ./tests/Functional/Doctrine/Orm - ./tests/Functional/Doctrine/Orm - - + + src/ - - Resources/ - - - + + + src/Resources/ + + - + diff --git a/src/Doctrine/Orm/RedirectRoute.php b/src/Doctrine/Orm/RedirectRoute.php index 5bc160d6..3bb5f210 100644 --- a/src/Doctrine/Orm/RedirectRoute.php +++ b/src/Doctrine/Orm/RedirectRoute.php @@ -17,16 +17,11 @@ * {@inheritdoc} * * Provides a redirect route stored in the Doctrine ORM and used as content for generic route to provide redirects + * + * @property int $id */ class RedirectRoute extends RedirectRouteModel { - /** - * Unique id of this route. - * - * @var int - */ - protected $id; - protected string $serialisedParameters; /** diff --git a/tests/Functional/Doctrine/Orm/RedirectRouteTest.php b/tests/Functional/Doctrine/Orm/RedirectRouteTest.php index a46b65ac..7545f919 100644 --- a/tests/Functional/Doctrine/Orm/RedirectRouteTest.php +++ b/tests/Functional/Doctrine/Orm/RedirectRouteTest.php @@ -18,9 +18,7 @@ class RedirectRouteTest extends OrmTestCase { - private $repository; - - private $controller; + private RedirectController $controller; public function setUp(): void { @@ -28,11 +26,10 @@ public function setUp(): void $this->clearDb(Route::class); $this->clearDb(RedirectRoute::class); - $this->repository = $this->getContainer()->get('cmf_routing.route_provider'); $this->controller = new RedirectController($this->getContainer()->get('router')); } - public function testRedirectDoctrine() + public function testRedirectDoctrine(): void { $route = $this->createRoute('route1', '/test'); @@ -52,7 +49,6 @@ public function testRedirectDoctrine() $response = $this->controller->redirectAction($redirectRoute->getContent()); - $this->assertInstanceOf(RedirectResponse::class, $response); $this->assertSame(301, $response->getStatusCode()); $this->assertSame('http://localhost/test', $response->getTargetUrl()); }