Harborn-digital / cookie-consent-bundle

Symfony bundle to append Cookie Consent to your website to comply to AVG/GDPR for cookies.
MIT License
18 stars 18 forks source link

fix deprecated annotation symfony 6.4 #123

Open robinsaillard opened 9 months ago

robinsaillard commented 9 months ago

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.

NiklasBr commented 8 months ago

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

davidromani commented 5 months ago

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

davidromani commented 5 months ago

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 commented 3 months ago

@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",