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

fix deprecated annotation symfony 6.4 #123

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

robinsaillard
Copy link

@robinsaillard robinsaillard commented Feb 20, 2024

User Deprecated: The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver.

Fix : The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0 for symfony 6.4
@robinsaillard robinsaillard changed the title Robinsaillard patch 1 fix deprecated annotation symfony 6.4 Feb 20, 2024
@NiklasBr
Copy link
Contributor

Thanks! This helped us, would be nice if it could be merged.

@davidromani
Copy link
Contributor

Is there any plan to merge this PR and make a new release?

@davidromani
Copy link
Contributor

davidromani commented Jun 13, 2024

without this PR merged, it can be impossible to require (install) this dependency in Symfony 6.4 projects if you have the annotations setting flag to false:

# config/packages/framework.yaml
framework:
    secret: '%env(APP_SECRET)%'
    esi: true
    annotations: false

because composer require connectholland/cookie-consent-bundle ends with the following error:

Script cache:clear returned with error code 1
!!  
!!  In CheckExceptionOnInvalidReferenceBehaviorPass.php line 119:
!!                                                                                 
!!    The service "doctrine.orm.default_annotation_metadata_driver" has a depende  
!!    ncy on a non-existent service "annotation_reader".

@davidromani
Copy link
Contributor

davidromani commented Aug 19, 2024

@robinsaillard maybe will be interesting to remove "doctrine/annotations": "^1.6|^2.0" dependency from composer.json too.

Furthermore, enable Doctrine ORM 3.0 Composer requirement it can help to push forward compatibility with Symfony 6 & 7 projects.

"doctrine/orm": "^2.5 || ^3.0",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants