Skip to content

Commit

Permalink
Support Symfony 7 (#282)
Browse files Browse the repository at this point in the history
* Support Symfony 7

* add php 8.2 to ci
  • Loading branch information
RobinDev authored Dec 18, 2023
1 parent fd88cc3 commit 910a16c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.4', '8.0', '8.1']
php: ['7.4', '8.0', '8.1', '8.2']
steps:
- uses: actions/checkout@v2

Expand Down
8 changes: 1 addition & 7 deletions DependencyInjection/FactoryConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ class FactoryConfiguration implements ConfigurationInterface
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('knp_gaufrette');
if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC for symfony/config < 4.2
$rootNode = $treeBuilder->root('knp_gaufrette');
}

$rootNode = $treeBuilder->getRootNode();
$rootNode
->ignoreExtraKeys()
->fixXmlConfig('factory', 'factories')
Expand Down
8 changes: 1 addition & 7 deletions DependencyInjection/MainConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ public function __construct(array $factories)
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('knp_gaufrette');
if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC for symfony/config < 4.2
$rootNode = $treeBuilder->root('knp_gaufrette');
}

$rootNode = $treeBuilder->getRootNode();
$this->addAdaptersSection($rootNode, $this->factories);
$this->addFilesystemsSection($rootNode);
$this->addStreamWrapperSection($rootNode);
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
}
],
"require": {
"php": ">=7.1",
"php": "^7.4 || ^8.0",
"knplabs/gaufrette": "^0.11",
"symfony/config": "^4.4|^5.0|^6.0",
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
"symfony/http-kernel": "^4.4|^5.0|^6.0"
"symfony/config": "^5.0|^6.0|^7.0",
"symfony/dependency-injection": "^5.0|^6.0|^7.0",
"symfony/http-kernel": "^5.0|^6.0|^7.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^5.4",
"symfony/console": "^4.4|^5.0|^6.0",
"symfony/filesystem": "^4.0|^5.0|^6.0",
"symfony/yaml": "^4.0|^5.0|^6.0"
"symfony/phpunit-bridge": "^7.0",
"symfony/console": "^5.0|^6.0|^7.0",
"symfony/filesystem": "^5.0|^6.0|^7.0",
"symfony/yaml": "^5.0|^6.0|^7.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 910a16c

Please sign in to comment.