doctrine / DoctrineORMModule

Doctrine ORM Module for Laminas
https://www.doctrine-project.org/projects/doctrine-orm-module.html
MIT License
438 stars 229 forks source link

Add PHP 8.0 support, remove Annotation support #662

Closed Slamdunk closed 3 years ago

Slamdunk commented 3 years ago

Take place over https://github.com/doctrine/DoctrineORMModule/pull/661

Of course this is a BC Break for dropping the Annotation support, but that's the only way we can release PHP 8.0 support now without adding more code.

TomHAnderson commented 3 years ago

https://github.com/doctrine/DoctrineORMModule/releases/tag/4.0.0

smozgur commented 3 years ago

I have projects using DoctrineORMModule\Form\Annotation that I would like to prepare for PHP7.4 (and PHP8.0 as the next step) upgrade (I require php ^7.4 in my composer.json). When I run composer install, I realized that I have no AnnotationBuilder anymore. Do I basically have to remove AnnotationBuilder from my existing projects and change it with, let's say, Laminas\Form? I loved Doctrine AnnotationBuilder, sorry to lose it. Thank you.

TomHAnderson commented 3 years ago

@smozgur what version of this repository are you using? That would dictate whether there is an annotation builder.

smozgur commented 3 years ago

Thanks for the reply, @TomHAnderson .

I just realized that I am using 4.0. I rebuilt this project from scratch as it would be a chance for a clean-up as well, so it should have installed this version since I have php ^7.4 in composer. I see that the version 1.1 is installed in the original project. Is it going to work without problems when I downgrade the that version even in PHP8?

smozgur commented 3 years ago

Old composer.json:

        "php": "7.3",
        "doctrine/orm": "^2.5",
        "doctrine/doctrine-orm-module": "^1.1",

New composer.json:

        "php": "^7.4",
        "doctrine/orm": "^2.8",
        "doctrine/doctrine-orm-module": "^4.0",
TomHAnderson commented 3 years ago

OK, so if you want annotations why are you using v4.0 when that is the version which removes the annotations? Use the readme docs on versioning and stick to the 3.x series.

smozgur commented 3 years ago

Yes, I would do that.

Thank you for your help.