Skip to content

Commit

Permalink
Remove support for PHP 7.4 & 8.0 (theofidry#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Jul 3, 2022
1 parent 67e5773 commit a50400d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions fixtures/Functional/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ parameters:
framework:
secret: test
test: ~
http_method_override: false

services:
data_fixtures.faker.provider.foo:
Expand Down
1 change: 1 addition & 0 deletions fixtures/Functional/config/config_without_doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ parameters:
framework:
secret: test
test: ~
http_method_override: false

services:
_defaults:
Expand Down
1 change: 1 addition & 0 deletions fixtures/Functional/config/test/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ framework:
test: ~
annotations:
cache: file
http_method_override: false

services:
_defaults:
Expand Down
20 changes: 8 additions & 12 deletions tests/DependencyInjection/HautelookAliceBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a50400d

Please sign in to comment.