From a50400d8ec27fd994b29fef36d91c1362d110eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <7372f2bda@mozmail.com> Date: Sun, 3 Jul 2022 16:54:05 +0200 Subject: [PATCH] Remove support for PHP 7.4 & 8.0 (#24) --- .github/workflows/ci.yaml | 13 ++++++------ composer.json | 2 +- fixtures/Functional/config/config.yaml | 1 + .../config/config_without_doctrine.yaml | 1 + fixtures/Functional/config/test/config.yaml | 1 + .../HautelookAliceBundleTest.php | 20 ++++++++----------- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f77e174..90c6a7b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -43,19 +43,14 @@ jobs: strategy: matrix: php: - - '7.4' - - '8.0' - '8.1' variant: ['normal'] dependencies: ['highest'] include: - - php: '7.4' + - php: '8.1' variant: 'symfony/symfony:"^5.4"' dependencies: 'highest' composer-flags: '' - - php: '7.4' - variant: 'symfony/symfony:"^5.4"' - dependencies: 'lowest' fail-fast: false services: @@ -90,5 +85,11 @@ jobs: dependency-versions: ${{ matrix.dependencies }} composer-options: "--prefer-dist" + - name: Wait for MySQL + run: | + while ! mysqladmin ping --host=$MYSQL_HOST --user=root --password=$MYSQL_ROOT_PASSWORD --port=3307; do + sleep 1 + done + - name: Run tests run: vendor/bin/phpunit --verbose --stop-on-failure diff --git a/composer.json b/composer.json index 442ff95..77b6754 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ }, "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "doctrine/doctrine-bundle": "^2.5", "doctrine/data-fixtures": "^1.5", "doctrine/orm": "^2.10.0", diff --git a/fixtures/Functional/config/config.yaml b/fixtures/Functional/config/config.yaml index e5b1cf9..0e133c6 100644 --- a/fixtures/Functional/config/config.yaml +++ b/fixtures/Functional/config/config.yaml @@ -4,6 +4,7 @@ parameters: framework: secret: test test: ~ + http_method_override: false services: data_fixtures.faker.provider.foo: diff --git a/fixtures/Functional/config/config_without_doctrine.yaml b/fixtures/Functional/config/config_without_doctrine.yaml index 6e81af4..3110435 100644 --- a/fixtures/Functional/config/config_without_doctrine.yaml +++ b/fixtures/Functional/config/config_without_doctrine.yaml @@ -4,6 +4,7 @@ parameters: framework: secret: test test: ~ + http_method_override: false services: _defaults: diff --git a/fixtures/Functional/config/test/config.yaml b/fixtures/Functional/config/test/config.yaml index 5221a3c..09c496c 100644 --- a/fixtures/Functional/config/test/config.yaml +++ b/fixtures/Functional/config/test/config.yaml @@ -6,6 +6,7 @@ framework: test: ~ annotations: cache: file + http_method_override: false services: _defaults: diff --git a/tests/DependencyInjection/HautelookAliceBundleTest.php b/tests/DependencyInjection/HautelookAliceBundleTest.php index e4dd757..86995ea 100644 --- a/tests/DependencyInjection/HautelookAliceBundleTest.php +++ b/tests/DependencyInjection/HautelookAliceBundleTest.php @@ -39,30 +39,26 @@ */ class HautelookAliceBundleTest extends KernelTestCase { - protected function tearDown(): void - { - parent::tearDown(); - static::$class = null; - } - public function testCannotBootIfFidryAliceDataFixturesBundleIsNotRegistered(): void { + $kernel = new ConfigurableKernel('ConfigurableKernel0', true); + $this->expectException(LogicException::class); $this->expectExceptionMessage('To register "Hautelook\AliceBundle\HautelookAliceBundle", you also need: "Doctrine\Bundle\DoctrineBundle\DoctrineBundle", "Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle".'); - self::$kernel = new ConfigurableKernel('ConfigurableKernel0', true); - self::$kernel->boot(); + $kernel->boot(); } public function testWillReplaceFixtureLoadCommandWithErrorInformationCommandIfDoctrineBundleIsNotRegistered(): void { + $kernel = new WithoutDoctrineKernel('ConfigurableKernel1', true); + $kernel->addBundle(new FidryAliceDataFixturesBundle()); + $kernel->addBundle(new NelmioAliceBundle()); + $this->expectException(LogicException::class); $this->expectExceptionMessage('To register "Hautelook\AliceBundle\HautelookAliceBundle", you also need: "Doctrine\Bundle\DoctrineBundle\DoctrineBundle".'); - self::$kernel = new WithoutDoctrineKernel('ConfigurableKernel1', true); - self::$kernel->addBundle(new FidryAliceDataFixturesBundle()); - self::$kernel->addBundle(new NelmioAliceBundle()); - self::$kernel->boot(); + $kernel->boot(); } public function testServiceRegistration(): void