8000 Showing new -extra Twig extension repos by weaverryan · Pull Request #12505 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Showing new -extra Twig extension repos #12505

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

Merged
merged 1 commit into from
Oct 18, 2019

Conversation

weaverryan
Copy link
Member

Recently, the old Twig extension repositories were deprecated and new (and mostly identical) -extra repos were added. So, mostly people just need to use the new library name. However, to get the new extensions to be loaded automatically, the user must also have the new twig/extra-bundle installed (this detects the -extra libraries and registers the extensions).

Knowing this, the diff is self-explanatory. However, the workflow for new users will be simpler. Starting yesterday, when you run composer require twig, you get a twig-pack which contains TwigBundle AND twig/extra-bundle. That means that new users will only need to composer require twig/cssinliner-extra, they will not also need to install twig/extra-bundle. But, to be safe, I've added it here so that it works for everyone. Maybe someday we'll remove that part.

Also, For Inky, when the repository was moved, the filter was also changed from inky to inky_to_html: https://twig.symfony.com/doc/2.x/filters/inky_to_html.html

Finally, all of this requires Twig 2.12. I did not mention that. We could, but if you try to install twig/extra-bundle on a lower version, you'll get a composer error about the version problem.

Now that my PR description is longer than my patch... I'll stop ;)

@javiereguiluz
Copy link
Member

Perfectly explained! Thanks Ryan.

javiereguiluz added a commit that referenced this pull request Oct 18, 2019
This PR was merged into the 4.3 branch.

Discussion
----------

Showing new -extra Twig extension repos

Recently, the old Twig extension repositories were deprecated and new (and mostly identical) `-extra` repos were added. So, mostly people just need to use the new library name. However, to get the new extensions to be loaded automatically, the user must also have the new `twig/extra-bundle` installed (this detects the `-extra` libraries and registers the extensions).

Knowing this, the diff is self-explanatory. However, the workflow for *new* users will be simpler. Starting yesterday, when you run `composer require twig`, you get a `twig-pack` which contains TwigBundle AND `twig/extra-bundle`. That means that new users will *only* need to `composer require twig/cssinliner-extra`, they will not also need to install `twig/extra-bundle`. But, to be safe, I've added it here so that it works for everyone. Maybe someday we'll remove that part.

Also, For Inky, when the repository was moved, the filter was also changed from `inky` to `inky_to_html`: https://twig.symfony.com/doc/2.x/filters/inky_to_html.html

Finally, all of this requires Twig 2.12. I did not mention that. We *could*, but if you try to install `twig/extra-bundle` on a lower version, you'll get a composer error about the version problem.

Now that my PR description is longer than my patch... I'll stop ;)

Commits
-------

6db1feb Showing new -extra Twig extension repos
@javiereguiluz javiereguiluz merged commit 6db1feb into symfony:4.3 Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0