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 16 forks source link

CookieConsentLog entity not visible in database #63

Closed SolvIT2800 closed 4 years ago

SolvIT2800 commented 4 years ago

Hi, I came across this bundle yesterday when I was looking to implement cookie consent for a client and I managed to get almost everything to work as I need it to, for which I thank you. However I cannot seem to get the logging of cookie consent choices to work. When I did a doctrine migration after enabling the bundle, the CookieConsentLog entity (with tablename: ch_cookieconsent_log) was not automatically added to my database. In the documentation it said to set 'use_logger' to true in the config file, which I did, but unfortunately this also did not have the desired effect.

I would greatly appreciate it if you could help me out with this. Thanks!

SolvIT2800 commented 4 years ago

I finally got it to work by adding the following lines under 'mappings' in my doctrine file:

ch_cookie_consent_bundle:
            is_bundle: false
            type: annotation
            dir: '%kernel.project_dir%/vendor/connectholland/cookie-consent-bundle/Entity'
            prefix: 'ConnectHolland\CookieConsentBundle\Entity'
            alias: ch_cookie_consent_bundle