From 3c78768bd89ed84644c2dd18d7a6975807cf94e8 Mon Sep 17 00:00:00 2001 From: Jan Lam Date: Thu, 6 Jun 2024 11:27:27 +0200 Subject: [PATCH 1/4] Support php:^8.1 --- .github/workflows/main.yaml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6a0941d..729ebc3 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - php-versions: ['7.3', '7.4', '8.0'] + php-versions: ['8.1', '8.2', '8.3'] name: PHP ${{ matrix.php-versions }} steps: - uses: actions/checkout@v2 diff --git a/composer.json b/composer.json index a73ae1e..184646a 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "A simple Symfony Bundle that contains twig extensions for displaying financial information.", "license": "MIT", "require": { - "php": "^7.3||^8.0", + "php": "^8.1", "ronanguilloux/isocodes": "^2.1", "symfony/http-kernel": "^4.4||^5.0" }, From be7105f36a158ff73f2e33148e0a73ca71629ee8 Mon Sep 17 00:00:00 2001 From: Jan Lam Date: Thu, 6 Jun 2024 11:28:47 +0200 Subject: [PATCH 2/4] Add symfony 6 support, dropping 4 --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 184646a..cf00dfa 100644 --- a/composer.json +++ b/composer.json @@ -6,14 +6,14 @@ "require": { "php": "^8.1", "ronanguilloux/isocodes": "^2.1", - "symfony/http-kernel": "^4.4||^5.0" + "symfony/http-kernel": "^5.4||^6.0" }, "require-dev": { "hostnet/phpcs-tool": "^9.1.0", "phpunit/phpunit": "^9.5.6", - "symfony/framework-bundle": "^4.4||^5.0", - "symfony/twig-bundle": "^4.4||^5.0", - "symfony/yaml": "^4.4||^5.0", + "symfony/framework-bundle": "^5.4||^6.0", + "symfony/twig-bundle": "^5.4||^6.0", + "symfony/yaml": "^5.4||^6.0", "twig/twig": "^2.7.2||^3.0" }, "autoload": { From 717d275e5d51690833ed064458c1ea2ca4a6a875 Mon Sep 17 00:00:00 2001 From: Jan Lam Date: Thu, 6 Jun 2024 11:29:05 +0200 Subject: [PATCH 3/4] Drop twig 2 support --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cf00dfa..1c5901b 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "symfony/framework-bundle": "^5.4||^6.0", "symfony/twig-bundle": "^5.4||^6.0", "symfony/yaml": "^5.4||^6.0", - "twig/twig": "^2.7.2||^3.0" + "twig/twig": "^3.0" }, "autoload": { "psr-4": { From 1fe091d3a5e0ce959bf6f7fca74314779fb6636d Mon Sep 17 00:00:00 2001 From: Jan Lam Date: Thu, 6 Jun 2024 12:29:30 +0200 Subject: [PATCH 4/4] Update unittest --- test/Functional/ConfigurationTest.php | 6 ++++-- test/Functional/Fixtures/TestKernel.php | 2 +- test/Functional/Fixtures/config/config.yml | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/Functional/ConfigurationTest.php b/test/Functional/ConfigurationTest.php index 093e31a..f460c0a 100644 --- a/test/Functional/ConfigurationTest.php +++ b/test/Functional/ConfigurationTest.php @@ -7,6 +7,7 @@ namespace Hostnet\Bundle\FinancialTwigExtensionBundle\Functional; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; +use Twig\Environment; /** * @coversNothing @@ -23,8 +24,9 @@ protected function setUp(): void */ public function testFormatIban(string $unformatted_iban, string $expected): void { - $container = static::$kernel->getContainer(); - $twig = $container->get('twig'); + static::bootKernel(); + $container = self::getContainer(); + $twig = $container->get(Environment::class); self::assertSame( $expected, diff --git a/test/Functional/Fixtures/TestKernel.php b/test/Functional/Fixtures/TestKernel.php index 01f8c63..6f9eae8 100644 --- a/test/Functional/Fixtures/TestKernel.php +++ b/test/Functional/Fixtures/TestKernel.php @@ -14,7 +14,7 @@ class TestKernel extends Kernel /** * {@inheritdoc} */ - public function registerBundles() + public function registerBundles(): iterable { return [ new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(), diff --git a/test/Functional/Fixtures/config/config.yml b/test/Functional/Fixtures/config/config.yml index 10e9ad3..3f67c29 100644 --- a/test/Functional/Fixtures/config/config.yml +++ b/test/Functional/Fixtures/config/config.yml @@ -1,5 +1,6 @@ framework: secret: test + test: true twig: paths: