Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropped PHP 7.2, added PHP 8.0 #241

Merged
merged 4 commits into from
Nov 15, 2021
Merged

Conversation

driehle
Copy link
Member

@driehle driehle commented Nov 12, 2021

PHP 7.2 is dropped because it is not support by our upstream dependencies anymore. For instance, many laminas componets have already dropped PHP 7.2 a while ago and recently we also dropped PHP 7.2 in DoctrineModule.

@driehle driehle changed the title Dropped PHP 7.1, added PHP 8.0 and PHP 8.1 Dropped PHP 7.2, added PHP 8.0 Nov 12, 2021
@driehle driehle force-pushed the feature/php8 branch 7 times, most recently from 195d68f to 75d21f5 Compare November 12, 2021 14:37
@driehle driehle marked this pull request as ready for review November 12, 2021 15:00
@driehle driehle self-assigned this Nov 12, 2021
@driehle driehle added the Enhancement New feature or request label Nov 12, 2021
@driehle driehle added this to the 3.1.0 milestone Nov 12, 2021
@driehle
Copy link
Member Author

driehle commented Nov 12, 2021

Somehow, this project doesn't run yet with PHP 8.1. I tried that, but CI fails for (only) PHP 8.1 with the following error:

[Semantical Error] The annotation "@ODM\Document" in class DoctrineMongoODMModuleTest\Assets\Document\Annotation 
was never imported. Did you maybe forget to add a "use" statement for this annotation?

See https://github.com/doctrine/DoctrineMongoODMModule/actions/runs/1452450213 for the full CI run.

I tried tackeling this issue down, but wasn't successful yet. As I cannot spend any further time on this right now, I suggest that we merge this with support for PHP 8.0 only, i.e. without support for PHP 8.1. This will still be a benefit for users and we can look at PHP 8.1 later again.

@@ -6,7 +6,7 @@

use Doctrine\Laminas\Hydrator\DoctrineObject;
use Doctrine\ODM\MongoDB\DocumentManager;
use Psr\Container\ContainerInterface;
use Interop\Container\ContainerInterface;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the benefit of this change?

Starting Feb. 13th 2017, container-interop is officially deprecated in favor of PSR-11.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FactoryInterface from the latest Laminas ServiceManager still uses Interop\Container\ContainerInterface. Hence, whenever implementing the Laminas interfaces, we are using Interop's ContainerInterface.

I wanted to keep this consistent so that we only need to require one of container-interop/container-interop and psr/container. Otherwise, we'd need to require both.

@driehle driehle merged commit 8b544f7 into doctrine:3.1.x Nov 15, 2021
@driehle driehle deleted the feature/php8 branch November 15, 2021 07:42
@driehle driehle mentioned this pull request Nov 15, 2021
@rieschl
Copy link
Contributor

rieschl commented Nov 16, 2021

thanks, @driehle for picking this up! 🙏

@driehle
Copy link
Member Author

driehle commented Nov 16, 2021

@rieschl You're welcome! PHP 8.1 didn't work right away, you may look into #249 if you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
4 participants