Skip to content

Commit

Permalink
Merge pull request #280 from alexislefebvre/chore-remove-support-of-p…
Browse files Browse the repository at this point in the history
…hp-7.4-and-8.0-3.x

[3.x] chore: remove support of PHP 7.4 and 8.0
  • Loading branch information
alexislefebvre authored Mar 10, 2024
2 parents fba8c06 + 1f24a9f commit 9254cf9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,14 @@ jobs:
strategy:
fail-fast: false
matrix:
# Symfony 5.4 requires PHP >= 7.2, it will be installed on PHP 7.4
# Symfony 6.4 requires PHP >= 8.0, it will be installed on PHP >= 8.0
# Symfony 7.0 requires PHP >= 8.2, it will be installed on PHP >= 8.2
php-version: ['8.2']
php-version: ['']
composer-flags: ['']
symfony-version: ['']
mysql-client: [ "default-mysql-client" ]
include:
- php-version: 7.4
- php-version: 8.1
# Use "update" instead of "install" since it allows using the "--prefer-lowest" option
composer-flags: "update --prefer-lowest"
- php-version: 7.4
# add a specific job to test 5.4 for all Symfony packages
symfony-version: "^5.4"
- php-version: 8.1
# add a specific job to test ^5.4 for all Symfony packages
symfony-version: "^5.4"
Expand All @@ -34,7 +28,6 @@ jobs:
- php-version: 8.2
# add a specific job to test ^6.4 for all Symfony packages
symfony-version: "^6.4"
- php-version: 8.2
- php-version: 8.2
symfony-version: "^7.0"
- php-version: 8.3
Expand Down Expand Up @@ -124,5 +117,5 @@ jobs:
- name: Run tests
# Run tests twice to ensure that tests are idempotent even if database caching is enabled
run: |
php ./vendor/bin/phpunit --testdox
php ./vendor/bin/phpunit --testdox
php ./vendor/bin/phpunit --testdox --process-isolation
php ./vendor/bin/phpunit --testdox --process-isolation
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.1",
"doctrine/common": "^2.13 || ^3.0",
"doctrine/persistence": "^1.3.3 || ^2.0 || ^3.0",
"symfony/deprecation-contracts": "^2.1 || ^3.0",
Expand All @@ -28,14 +28,14 @@
"doctrine/data-fixtures": "^1.7",
"doctrine/doctrine-bundle": "^2.11",
"doctrine/doctrine-fixtures-bundle": "^3.5.1 || ^4.0",
"doctrine/mongodb-odm-bundle": "^4.2 || ^5.0",
"doctrine/mongodb-odm-bundle": "^4.4 || ^5.0",
"doctrine/orm": "^2.7",
"doctrine/mongodb-odm": "^2.5",
"monolog/monolog": "^1.25.1 || ^2.0 || ^3.0",
"phpunit/phpunit": "^9.6.17 || ^10.5.11 || ^11.0.4",
"phpunit/phpunit": "^10.5.11 || ^11.0.4",
"symfony/doctrine-bridge": "^5.4 || ^6.3 || ^7.0",
"symfony/monolog-bridge": "^5.4 || ^6.3 || ^7.0",
"symfony/monolog-bundle": "^3.2",
"symfony/phpunit-bridge": "^7.0",
"theofidry/alice-data-fixtures": "^1.5.2"
},
"conflict": {
Expand Down
8 changes: 7 additions & 1 deletion doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ docker-compose exec php-fpm composer update --prefer-lowest
Now you can execute the tests with the following command:

```bash
docker-compose exec php-fpm ./vendor/bin/phpunit
docker-compose exec php-fpm ./vendor/bin/phpunit --process-isolation
```

If one test fails, run it without the `--process-isolation` option

```bash
docker-compose exec php-fpm ./vendor/bin/phpunit tests/Test/ConfigMongodbTest.php
```

## Delete the cache
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
beStrictAboutOutputDuringTests="true"
processIsolation="true"
>

<php>
Expand Down
3 changes: 0 additions & 3 deletions tests/Test/ConfigMongodbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ protected function setUp(): void
if (!class_exists(DoctrineMongoDBBundle::class)) {
$this->markTestSkipped('Need doctrine/mongodb-odm-bundle package.');
}
if (version_compare(\PHP_VERSION, '8.1.0') < 0) {
$this->markTestSkipped('MongoDB Tests doesn\'t support Outdated PHP Version. <8.1.0');
}

parent::setUp();

Expand Down

0 comments on commit 9254cf9

Please sign in to comment.