symfony / orm-pack

A Symfony Pack for Doctrine ORM
MIT License
1.82k stars 18 forks source link

Creating a Symfony 5.4 LTS project with PHP 7.4 then installing a orm-pack results in errors #40

Closed Matt-PMCT closed 1 year ago

Matt-PMCT commented 1 year ago

If you create a brand new Symfony LTS 5.4 LTS project (I'm doing it on Windows) using this command: symfony new testSymfony --version=lts --php=7.4

Then you add the doctrine-orm pack using this command: composer require symfony/orm-pack

it will give you this error: The service "doctrine.orm.default_annotation_metadata_driver" has a dependency on a non-existent service "doctrine.orm.metadata.annotation_reader".

It seems to me that you should have all the requirements needed to have it function when you install the orm-pack. You can fix this by running this: composer require doctrine/annotations

jonny827 commented 1 year ago

The error also appears in the current latest version of Symphony 6.3.2 and PHP 8.2.8. I would submit a PR but adding one line of code and waiting for merge, it might just be fasterto ask @nicolas-grekas or @fabpot to please update this repository to work or fix whatever related issue since I use attributes for defining routes and security etc and do not use annotations.

nicolas-grekas commented 1 year ago

Fixed by https://github.com/symfony/orm-pack/commit/13b7bcec955f163e3cbf6b24773b9ad3127213e2, thanks for the details.