doctrine / DoctrineMongoDBBundle

Integrates Doctrine MongoDB ODM with Symfony
http://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/index.html
MIT License
382 stars 230 forks source link

Add support for PHP 8 #662

Closed lepiaf closed 3 years ago

lepiaf commented 3 years ago

waiting for merge of PR https://github.com/doctrine/mongodb-odm/pull/2248

malarzm commented 3 years ago

@lepiaf thanks for the initial work! This will need to wait until we release 2.2, but in the meantime maybe you could change ODM to require @alcaeus branch if it's in green-ish state? That could allow you to check if any further work is required

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

franmomu commented 3 years ago

So there has been a release: https://github.com/doctrine/mongodb-odm/releases/tag/2.2.0 😬

franmomu commented 3 years ago

Just in case, I created yesterday https://github.com/doctrine/DoctrineMongoDBBundle/pull/666.

lepiaf commented 3 years ago

I have this error in phpunit for PHP 8.

Generating code coverage report in Clover XML format ... failed [00:01.648]
Cannot parse /home/runner/work/DoctrineMongoDBBundle/DoctrineMongoDBBundle/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Aggregation/Stage/GraphLookup/Match.php: Syntax error, unexpected T_MATCH, expecting T_STRING on line 15

In PHP 8, Match is a reserved keyword. This error comes from doctrine/mongodb-odm library. There is already a deprecation error on it https://github.com/doctrine/mongodb-odm/blob/2.2.0/UPGRADE-2.2.md#aggregation.

This error is raised on code coverage.

malarzm commented 3 years ago

Thanks a lot @lepiaf!