Skip to content

Commit 910a16c

Browse files
authored
Support Symfony 7 (#282)
* Support Symfony 7 * add php 8.2 to ci
1 parent fd88cc3 commit 910a16c

File tree

4 files changed

+11
-23
lines changed

4 files changed

+11
-23
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
php: ['7.4', '8.0', '8.1']
17+
php: ['7.4', '8.0', '8.1', '8.2']
1818
steps:
1919
- uses: actions/checkout@v2
2020

DependencyInjection/FactoryConfiguration.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@ class FactoryConfiguration implements ConfigurationInterface
1818
public function getConfigTreeBuilder(): TreeBuilder
1919
{
2020
$treeBuilder = new TreeBuilder('knp_gaufrette');
21-
if (method_exists($treeBuilder, 'getRootNode')) {
22-
$rootNode = $treeBuilder->getRootNode();
23-
} else {
24-
// BC for symfony/config < 4.2
25-
$rootNode = $treeBuilder->root('knp_gaufrette');
26-
}
27-
21+
$rootNode = $treeBuilder->getRootNode();
2822
$rootNode
2923
->ignoreExtraKeys()
3024
->fixXmlConfig('factory', 'factories')

DependencyInjection/MainConfiguration.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,7 @@ public function __construct(array $factories)
3333
public function getConfigTreeBuilder(): TreeBuilder
3434
{
3535
$treeBuilder = new TreeBuilder('knp_gaufrette');
36-
if (method_exists($treeBuilder, 'getRootNode')) {
37-
$rootNode = $treeBuilder->getRootNode();
38-
} else {
39-
// BC for symfony/config < 4.2
40-
$rootNode = $treeBuilder->root('knp_gaufrette');
41-
}
42-
36+
$rootNode = $treeBuilder->getRootNode();
4337
$this->addAdaptersSection($rootNode, $this->factories);
4438
$this->addFilesystemsSection($rootNode);
4539
$this->addStreamWrapperSection($rootNode);

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=7.1",
19+
"php": "^7.4 || ^8.0",
2020
"knplabs/gaufrette": "^0.11",
21-
"symfony/config": "^4.4|^5.0|^6.0",
22-
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
23-
"symfony/http-kernel": "^4.4|^5.0|^6.0"
21+
"symfony/config": "^5.0|^6.0|^7.0",
22+
"symfony/dependency-injection": "^5.0|^6.0|^7.0",
23+
"symfony/http-kernel": "^5.0|^6.0|^7.0"
2424
},
2525
"require-dev": {
26-
"symfony/phpunit-bridge": "^5.4",
27-
"symfony/console": "^4.4|^5.0|^6.0",
28-
"symfony/filesystem": "^4.0|^5.0|^6.0",
29-
"symfony/yaml": "^4.0|^5.0|^6.0"
26+
"symfony/phpunit-bridge": "^7.0",
27+
"symfony/console": "^5.0|^6.0|^7.0",
28+
"symfony/filesystem": "^5.0|^6.0|^7.0",
29+
"symfony/yaml": "^5.0|^6.0|^7.0"
3030
},
3131
"autoload": {
3232
"psr-4": {

0 commit comments

Comments
 (0)