Skip to content

Commit 82fd21f

Browse files
committed
bump routing
1 parent e526996 commit 82fd21f

File tree

5 files changed

+21
-35
lines changed

5 files changed

+21
-35
lines changed

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
],
1717
"require": {
1818
"php": "^8.1",
19-
"symfony-cmf/routing": "^3.0",
19+
"symfony-cmf/routing": "^3.0.3",
2020
"symfony/framework-bundle": "^6.4 || ^7.0"
2121
},
2222
"require-dev": {
2323
"doctrine/data-fixtures": "^1.0.0",
24-
"doctrine/doctrine-bundle": "^2.0",
24+
"doctrine/doctrine-bundle": "^2.8",
2525
"doctrine/orm": "^2.9 || ^3.0",
2626
"doctrine/phpcr-bundle": "^3.0",
2727
"doctrine/phpcr-odm": "^2.0",
28-
"jackalope/jackalope-doctrine-dbal": "^1.3 || ^2.0",
28+
"jackalope/jackalope-doctrine-dbal": "^2.0",
2929
"matthiasnoback/symfony-dependency-injection-test": "^4.1.0 || ^5.1.0",
3030
"matthiasnoback/symfony-config-test": "^4.1.0 || ^5.1.0",
3131
"symfony/phpunit-bridge": "^7.0.3",
@@ -36,7 +36,7 @@
3636
"symfony/translation": "^6.4 || ^7.0",
3737
"symfony/validator": "^6.4 || ^7.0",
3838
"symfony/twig-bundle": "^6.4 || ^7.0",
39-
"symfony-cmf/testing": "dev-sf7 as 4.2.0",
39+
"symfony-cmf/testing": "dev-fix-test-kernel as 5.0.2",
4040
"twig/twig": "^2.4.4 || ^3.0"
4141
},
4242
"suggest": {
@@ -69,6 +69,5 @@
6969
"allow-plugins": {
7070
"composer/package-versions-deprecated": true
7171
}
72-
},
73-
"minimum-stability": "dev"
72+
}
7473
}

phpunit.xml.dist

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
3-
<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
42
<phpunit
53
colors="true"
64
bootstrap="vendor/symfony-cmf/testing/bootstrap/bootstrap.php"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
77
>
8-
98
<testsuites>
109
<testsuite name="unit tests">
1110
<directory>./tests/Unit</directory>
1211
</testsuite>
13-
1412
<testsuite name="functional tests with phpcr">
1513
<directory>./tests/Functional</directory>
1614
<exclude>./tests/Functional/Doctrine/Orm</exclude>
1715
</testsuite>
18-
1916
<testsuite name="functional tests with orm">
2017
<directory>./tests/Functional/Doctrine/Orm</directory>
2118
</testsuite>
2219
</testsuites>
2320

24-
<filter>
25-
<whitelist addUncoveredFilesFromWhitelist="true">
21+
<coverage includeUncoveredFiles="true">
22+
<include>
2623
<directory>src/</directory>
27-
<exclude>
28-
<directory>Resources/</directory>
29-
</exclude>
30-
</whitelist>
31-
</filter>
24+
</include>
25+
<exclude>
26+
<directory>src/Resources/</directory>
27+
</exclude>
28+
</coverage>
3229

3330
<php>
34-
<env name="KERNEL_CLASS" value="\Symfony\Cmf\Bundle\RoutingBundle\Tests\Fixtures\App\Kernel" />
31+
<env name="KERNEL_CLASS" value="\Symfony\Cmf\Bundle\RoutingBundle\Tests\Fixtures\App\Kernel"/>
3532
</php>
3633
</phpunit>

src/Doctrine/Orm/RedirectRoute.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,11 @@
1717
* {@inheritdoc}
1818
*
1919
* Provides a redirect route stored in the Doctrine ORM and used as content for generic route to provide redirects
20+
*
21+
* @property int $id
2022
*/
2123
class RedirectRoute extends RedirectRouteModel
2224
{
23-
/**
24-
* Unique id of this route.
25-
*
26-
* @var int
27-
*/
28-
protected $id;
29-
3025
protected string $serialisedParameters;
3126

3227
/**

tests/Fixtures/App/Kernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class Kernel extends TestKernel
1919
{
20-
public function configure()
20+
public function configure(): void
2121
{
2222
$this->requireBundleSet('default');
2323

@@ -39,7 +39,7 @@ public function configure()
3939
}
4040
}
4141

42-
public function registerContainerConfiguration(LoaderInterface $loader)
42+
public function registerContainerConfiguration(LoaderInterface $loader): void
4343
{
4444
$loader->load(__DIR__.'/config/config_'.$this->environment.'.php');
4545
}

tests/Functional/Doctrine/Orm/RedirectRouteTest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,21 @@
1414
use Symfony\Cmf\Bundle\RoutingBundle\Controller\RedirectController;
1515
use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Orm\RedirectRoute;
1616
use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Orm\Route;
17-
use Symfony\Component\HttpFoundation\RedirectResponse;
1817

1918
class RedirectRouteTest extends OrmTestCase
2019
{
21-
private $repository;
22-
23-
private $controller;
20+
private RedirectController $controller;
2421

2522
public function setUp(): void
2623
{
2724
parent::setUp();
2825
$this->clearDb(Route::class);
2926
$this->clearDb(RedirectRoute::class);
3027

31-
$this->repository = $this->getContainer()->get('cmf_routing.route_provider');
3228
$this->controller = new RedirectController($this->getContainer()->get('router'));
3329
}
3430

35-
public function testRedirectDoctrine()
31+
public function testRedirectDoctrine(): void
3632
{
3733
$route = $this->createRoute('route1', '/test');
3834

@@ -52,7 +48,6 @@ public function testRedirectDoctrine()
5248

5349
$response = $this->controller->redirectAction($redirectRoute->getContent());
5450

55-
$this->assertInstanceOf(RedirectResponse::class, $response);
5651
$this->assertSame(301, $response->getStatusCode());
5752
$this->assertSame('http://localhost/test', $response->getTargetUrl());
5853
}

0 commit comments

Comments
 (0)