Skip to content

Commit f01ef85

Browse files
authored
Merge pull request #50 from chives/dev
Allowed symfony ^6.0 components
2 parents 64eed88 + 75a3053 commit f01ef85

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ matrix:
77
- php: 7.4
88
env:
99
- COMPOSER_FLAGS="--prefer-lowest"
10+
- php: 7.4
1011
- php: 8.0
1112
- php: 8.1
1213
- php: 8.2
14+
- php: 8.3
1315

1416
env:
1517
global:

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"twig/twig": "^3.3",
1616
"symfony/asset": "^4.4|^5.4|^6.0",
1717
"symfony/options-resolver": "^4.4|^5.4|^6.0",
18-
"symfony/framework-bundle" : "^4.4|^5.4",
18+
"symfony/framework-bundle" : "^4.4|^5.4|^6.0",
1919
"symfony/twig-bundle": "^4.4|^5.4|^6.0",
2020
"symfony/form" : "^4.4|^5.4|^6.0",
2121
"symfony/validator": "^4.4|^5.4|^6.0"
@@ -26,7 +26,6 @@
2626
"behat/mink-selenium2-driver": "^1.4",
2727
"friends-of-behat/mink-browserkit-driver": "^1.6.1",
2828
"friends-of-behat/mink-debug-extension": "^2.1",
29-
"friends-of-behat/mink-browserkit-driver": "^1.5",
3029
"friends-of-behat/mink-extension": "^2.6",
3130
"friends-of-behat/symfony-extension": "^2.2",
3231
"phpspec/phpspec": "^7.1",
@@ -39,7 +38,7 @@
3938
"symfony/css-selector": "^4.4|^5.4|^6.0",
4039
"symfony/debug-bundle": "^4.4|^5.4|^6.0",
4140
"symfony/http-foundation": "^4.4|^5.4|^6.0",
42-
"symfony/routing": "^4.4|^5.4",
41+
"symfony/routing": "^4.4|^5.4|^6.0",
4342
"symfony/var-dumper": "^4.4|^5.4|^6.0",
4443
"symfony/phpunit-bridge": "^6.3"
4544
},

features/fixtures/project/src/Kernel.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Symfony\Component\HttpFoundation\Session\SessionFactoryInterface;
1919
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
2020
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
21+
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
2122
use Symfony\Component\Routing\RouteCollectionBuilder;
2223

2324
use function dirname;
@@ -68,12 +69,21 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
6869
}
6970
}
7071

71-
protected function configureRoutes(RouteCollectionBuilder $routes): void
72+
/**
73+
* @param RoutingConfigurator|RouteCollectionBuilder $routes
74+
*/
75+
protected function configureRoutes($routes): void
7276
{
7377
$confDir = $this->getProjectDir() . '/config';
7478

75-
$routes->import($confDir . '/{routes}/' . $this->environment . '/*' . self::CONFIG_EXTS, '/', 'glob');
76-
$routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS, '/', 'glob');
77-
$routes->import($confDir . '/{routes}' . self::CONFIG_EXTS, '/', 'glob');
79+
if (true === $routes instanceof RoutingConfigurator) {
80+
$routes->import($confDir . '/{routes}/' . $this->environment . '/*' . self::CONFIG_EXTS, 'glob');
81+
$routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS, 'glob');
82+
$routes->import($confDir . '/{routes}' . self::CONFIG_EXTS, 'glob');
83+
} elseif (true === $routes instanceof RouteCollectionBuilder) {
84+
$routes->import($confDir . '/{routes}/' . $this->environment . '/*' . self::CONFIG_EXTS, '/', 'glob');
85+
$routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS, '/', 'glob');
86+
$routes->import($confDir . '/{routes}' . self::CONFIG_EXTS, '/', 'glob');
87+
}
7888
}
7989
}

phpstan.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ parameters:
1111
- '%currentWorkingDirectory%/spec'
1212
- '%currentWorkingDirectory%/vendor'
1313
- '%currentWorkingDirectory%/features/fixtures/project/var/cache'
14+
reportUnmatchedIgnoredErrors: false
15+
ignoreErrors:
16+
-
17+
message: '#.*Symfony\\Component\\Routing\\RouteCollectionBuilder.*#'
18+
path: '%currentWorkingDirectory%/features/fixtures/project/src/Kernel.php'

0 commit comments

Comments
 (0)