theofidry / AliceDataFixtures

Nelmio Alice extension to persist the loaded fixtures.
MIT License
311 stars 71 forks source link

Require doctrine/annotations #204

Closed alexislefebvre closed 2 years ago

alexislefebvre commented 2 years ago

I saw this error on CI :

PHP Fatal error: Uncaught Error: Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in /home/runner/work/AliceDataFixtures/AliceDataFixtures/vendor-bin/doctrine/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php:165

doctrine/annotations was a dependency of doctrine/persistence until https://github.com/doctrine/persistence/pull/197/files

It has to be a strong dependency now.

theofidry commented 2 years ago

it looks to be coming from Doctrine\Common though no?

alexislefebvre commented 2 years ago

In another bundle, I only had to require doctrine/annotations: https://github.com/liip/LiipTestFixturesBundle/pull/170

And the namespace of annotations is Doctrine\Common\Annotations: https://github.com/doctrine/annotations/blob/1.13.2/lib/Doctrine/Common/Annotations/AnnotationReader.php

I will try with doctrine/common though.

alexislefebvre commented 2 years ago

I fixed the make test_doctrine_bridge by adding doctrine/annotations in vendor-bin/doctrine/composer.json.

Now there's another error:

1) Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundleTest::testServiceRegistration LogicException: "enable_annotations" on the validator cannot be set as the PHP version is lower than 8 and Doctrine Annotations support is disabled. Consider upgrading PHP.

alexislefebvre commented 2 years ago

I skipped the tests in PhpcrLoaderIntegrationTest, that's the best I can do right now.

alexislefebvre commented 2 years ago

I forgot about this PR. Can we skip the tests of PHPCR too?

alexislefebvre commented 2 years ago

I skipped more tests of PHPCR and the CI is green, I think it's better to have a partially green CI that a broken one.

alexislefebvre commented 2 years ago

Hello @theofidry, could you please review this PR?

theofidry commented 2 years ago

Thank you @alexislefebvre