I installed the twig/extensions by typing:
composer require twig/extensions
I then added it as a service in the services.yaml file as follows:
twig.extension.intl:
class: Twig_Extensions_Extension_Intl
tags:
- { name: twig.extension }
My Twig code is:
{{ request.createdAt | localizeddate('full', 'none', 'fr' ) }}
But I'm getting this error:
Attempted to load class "IntlTimeZone" from the global namespace. Did you forget a "use" statement?
Any hints ?