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

Add support for Symfony v4.4 #43

Closed crabnky closed 4 years ago

crabnky commented 4 years ago

Cannot autowire service "ConnectHolland\CookieConsentBundle\Cookie\CookieLogger": argument "$registry" of method "__construct()" references interface "Symfony\Bridge\Doctrine\RegistryInterface" but no such service exists. Try changing the type-hint to "Doctrine\Common\Persistence\ManagerRegistry" instead.

See symfony/symfony#32394

oliverfehmel commented 4 years ago

Same problem here. Can be adjusted by changing use of RegistryInterface to ManagerRegistry shown in this upgrade file for doctrine: [https://github.com/doctrine/DoctrineBundle/blob/master/UPGRADE-2.0.md]

matthijsch commented 4 years ago

Thank you for submitting your issue. It should be fixed with #44

matthijsch commented 4 years ago

A new release has been created which should fix any issues with Symfony 4.4 and 5

oliverfehmel commented 4 years ago

Thanks for this quick support, but unfortenatly it wasn't successful for the CookieConsentController. This error message appears:

Cannot autowire service "ConnectHolland\CookieConsentBundle\Controller\CookieConsentController": argument "$translator" of method "__construct()" references class "Symfony\Component\Translation\Translator" but no such service exists. Try changing the type-hint to one of its parents: interface "Symfony\Component\Translation\TranslatorInterface", or interface "Symfony\Contracts\Translation\TranslatorInterface".

crabnky commented 4 years ago

Same here.

oliverfehmel commented 4 years ago

PR is open #45

kaamui commented 4 years ago

Hello,

I think the last commit breaks compatibility with Symfony 3.4 :

composer require connectholland/cookie-consent-bundle

image

I tried to add this using composer before reinstalling ch-cookie-consent :

"symfony/translation": "3.4.*"

but same issue as you can see in the image above...

kaamui commented 4 years ago

By using the 0.8.2 version, I end in a totally different error (without the last commit, so), but not sure what's the reason :

image

Did you already encounter it ?

epoplive commented 4 years ago

Hello,

I think the last commit breaks compatibility with Symfony 3.4 :

composer require connectholland/cookie-consent-bundle

image

I tried to add this using composer before reinstalling ch-cookie-consent :

"symfony/translation": "3.4.*"

but same issue as you can see in the image above...

I am also having this same issue... :(

edezacas commented 3 years ago

@kaamui @epoplive I've resolved this issue adding to services.yml the relation between TranslatorInterface and its service id:

Symfony\Contracts\Translation\TranslatorInterface: '@translator'

Now Symfony knows which service identifies TranslatorIntercace.

I hope this will help you.

clement66000 commented 3 years ago

@edezacas it's works thks