Skip to content

Commit 4e6bcb0

Browse files
authored
Add symfony 6 support (#19)
* Add symfony 6 compatibility, dropping 4 * Allow php:^8.1 * Add twig 3 compatibility, dropping 2 * Update unit tests
1 parent db98dde commit 4e6bcb0

4 files changed

Lines changed: 13 additions & 12 deletions

File tree

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
php-versions: ['7.3', '7.4', '8.0']
11+
php-versions: ['8.1','8.2','8.3']
1212
name: PHP ${{ matrix.php-versions }}
1313
steps:
1414
- uses: actions/checkout@v2

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.3|^8.0",
20-
"symfony/config": "^4.2||^5.0",
21-
"symfony/dependency-injection": "^4.2||^5.0",
22-
"symfony/finder": "^4.2||^5.0",
23-
"symfony/framework-bundle": "^4.2||^5.0",
24-
"symfony/http-kernel": "^4.2||^5.0"
19+
"php": "^8.1",
20+
"symfony/config": "^5.4||^6.0",
21+
"symfony/dependency-injection": "^5.4||^6.0",
22+
"symfony/finder": "^5.4||^6.0",
23+
"symfony/framework-bundle": "^5.4||^6.0",
24+
"symfony/http-kernel": "^5.4||^6.0"
2525
},
2626
"require-dev": {
2727
"phpspec/prophecy-phpunit": "^2.0",
2828
"phpunit/phpunit": "^9.5.8",
29-
"symfony/twig-bundle": "^4.2||^5.0",
30-
"symfony/yaml": "^4.2||^5.0",
31-
"twig/twig": "^2.12.1"
29+
"symfony/twig-bundle": "^5.4||^6.0",
30+
"symfony/yaml": "^5.4||^6.0",
31+
"twig/twig": "^3.4.3"
3232
},
3333
"suggest": {
3434
"twig/twig": "Allows use of features in twig templates through the FeaturesExtension"

test/Functional/ConfigurationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ protected function setUp(): void
1818

1919
public function testFeatures(): void
2020
{
21-
$container = static::$kernel->getContainer();
21+
$container = self::getContainer();
2222
$features = $container->get(FeatureContainer::class);
2323

2424
// check if all the feature services are correcly configured
@@ -57,7 +57,7 @@ public function testFeatures(): void
5757

5858
public function testTwigFeature(): void
5959
{
60-
$container = static::$kernel->getContainer();
60+
$container = self::getContainer();
6161

6262
self::assertEquals(
6363
"feature is off",

test/Functional/Fixtures/config/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ services:
4141

4242
framework:
4343
secret: test
44+
test: true
4445

4546
twig:
4647
debug: '%kernel.debug%'

0 commit comments

Comments
 (0)