Skip to content

Commit

Permalink
Support PHP 8.0 (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexislefebvre authored Jan 25, 2021
1 parent c35eec1 commit bcfdf64
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
php-version:
- '7.3'
- '7.4'
- '8.0'
dependencies: [ highest ]
variant: [ normal ]
include:
Expand Down Expand Up @@ -61,5 +62,11 @@ jobs:
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable"

- name: Remove dependencies not compatible with PHP 8
if: matrix.php-version == '8.0'
run: |
cd vendor-bin/proxy-manager && composer remove --dev --no-update doctrine/mongodb-odm-bundle && cd -
cd vendor-bin/symfony && composer remove --dev --no-update doctrine/mongodb-odm-bundle && cd -
- name: Run Tests
run: make start_databases && make test
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
],
"require": {
"php": "^7.3",
"php": "^7.3 | ^8.0",
"nelmio/alice": "^3.5",
"psr/log": "^1.0"
},
Expand Down
5 changes: 4 additions & 1 deletion fixtures/Bridge/Symfony/SymfonyApp/DoctrineMongodbKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ public function registerBundles()
new FrameworkBundle(),
new NelmioAliceBundle(),
new FidryAliceDataFixturesBundle(),
new DoctrineMongoDBBundle(),
];

if (class_exists(PsyshBundle::class)) {
$bundles[] = new PsyshBundle();
}

if (class_exists(DoctrineMongoDBBundle::class)) {
$bundles[] = new DoctrineMongoDBBundle();
}

return $bundles;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace Fidry\AlicePersistence\Bridge\Symfony\Doctrine;

use Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle;
use Doctrine\Common\DataFixtures\Purger\MongoDBPurger;
use Doctrine\Persistence\ManagerRegistry;
use Fidry\AliceDataFixtures\Bridge\Symfony\MongoDocument\Dummy;
Expand Down Expand Up @@ -64,6 +65,10 @@ public static function setUpBeforeClass(): void
*/
public function setUp(): void
{
if (!class_exists(DoctrineMongoDBBundle::class)) {
$this->markTestSkipped('Need doctrine/mongodb-odm-bundle package.');
}

$this->kernel = new DoctrineMongodbKernel(static::$seed, true);
$this->kernel->boot();

Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/covers-validator/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require-dev": {
"ockcyp/covers-validator": "^0.6.1",
"ockcyp/covers-validator": "^0.6.1|^1.3.3",
"phpspec/prophecy-phpunit": "^1.0|^2.0"
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/doctrine/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"doctrine/data-fixtures": "^1.2",
"doctrine/orm": "^2.5",
"doctrine/persistence": "^1.3.4 || ^2.0",
"theofidry/composer-inheritance-plugin": "^1.0"
"theofidry/composer-inheritance-plugin": "^1.1"
},
"config": {
"bin-dir": "bin",
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/doctrine_mongodb/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"alcaeus/mongo-php-adapter": "^1.1.3",
"doctrine/data-fixtures": "^1.2",
"doctrine/mongodb-odm": "^2.1.2",
"theofidry/composer-inheritance-plugin": "^1.0"
"theofidry/composer-inheritance-plugin": "^1.1"
},
"config": {
"bin-dir": "bin",
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/doctrine_phpcr/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"doctrine/phpcr-odm": "^1.4",
"jackalope/jackalope-doctrine-dbal": "^1.2",
"symfony/console": "^3.4 || ^4.0 || ^5.0",
"theofidry/composer-inheritance-plugin": "^1.0"
"theofidry/composer-inheritance-plugin": "^1.1"
},
"config": {
"bin-dir": "bin",
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/eloquent/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"require-dev": {
"illuminate/database": "~5.5.0 || ~6.20.0 || ~7.29.0",
"illuminate/filesystem": "~5.5.0 || ~6.20.0 || ~7.29.0",
"theofidry/composer-inheritance-plugin": "^1.0"
"theofidry/composer-inheritance-plugin": "^1.1"
},
"config": {
"bin-dir": "bin",
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/propel2/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"require-dev": {
"propel/propel": "^2.0@alpha",
"theofidry/composer-inheritance-plugin": "^1.0"
"theofidry/composer-inheritance-plugin": "^1.1"
},
"config": {
"bin-dir": "bin",
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/proxy-manager/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"ocramius/proxy-manager": "^2.1",
"psy/psysh": "^0.9 || ^0.10",
"symfony/symfony": "^3.4 || ^4.0 || ^5.0",
"theofidry/composer-inheritance-plugin": "^1.0",
"theofidry/composer-inheritance-plugin": "^1.1",
"theofidry/psysh-bundle": "^3.5 || dev-master"
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/symfony/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"doctrine/phpcr-odm": "^1.4",
"jackalope/jackalope-doctrine-dbal": "^1.2",
"symfony/symfony": "^3.4 || ^4.0 || ^5.0",
"theofidry/composer-inheritance-plugin": "^1.0"
"theofidry/composer-inheritance-plugin": "^1.1"
},
"config": {
"bin-dir": "bin",
Expand Down

0 comments on commit bcfdf64

Please sign in to comment.