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

Require twig/extra-bundle ? #1021

Open
maximehuran opened this issue Sep 5, 2024 · 2 comments
Open

Require twig/extra-bundle ? #1021

maximehuran opened this issue Sep 5, 2024 · 2 comments

Comments

@maximehuran
Copy link

maximehuran commented Sep 5, 2024

Because when we require twig/extra-bundle we have this error :
Unable to register extension "Twig\Extra\Intl\IntlExtension" as it is already registered.

It is simple to correct by removing the line in config/packages/twig.yaml:

    Twig\Extra\Intl\IntlExtension: ~

But in context of Sylius Plugin it is complicated to say "Ok we will break your Sylius install, just change this file and it will be fine".

The issue could be solved by removing this line in YAML and add in composer json :

        "twig/extra-bundle": "^2.16|^3.12",

What do you think ?

Your solution works for Intl because the setup is simple :
https://twig.symfony.com/doc/3.x/functions/country_timezones.html

But other extension needs runtime loader like this one :
https://twig.symfony.com/doc/3.x/filters/markdown_to_html.html

@GSadee
Copy link
Member

GSadee commented Dec 5, 2024

Hi! Thank you for reporting the issue. Could you provide more details on how to reproduce the mentioned problem?

@maximehuran
Copy link
Author

Hi,

I think you need to run composer require twig/extra-bundle="^2.16|^3.12"

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

No branches or pull requests

2 participants