8000 minor #12505 Showing new -extra Twig extension repos (weaverryan) · symfony/symfony-docs@381c264 · GitHub
[go: up one dir, main page]

Skip to content

Commit 381c264

Browse files
committed
minor #12505 Showing new -extra Twig extension repos (weaverryan)
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
2 parents 9c7f56a + 6db1feb commit 381c264

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

mailer.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,9 @@ it with:
395395

396396
.. code-block:: terminal
397397
398-
$ composer require twig/cssinliner-extension
398+
$ composer require twig/extra-bundle twig/cssinliner-extra
399399
400-
The extension is enabled automatically. To use this, wrap the entire template
400+
The extension is enabled automatically. To use it, wrap the entire template
401401
with the ``inline_css`` filter:
402402

403403
.. code-block:: html+twig
@@ -497,14 +497,14 @@ the extension in your application:
497497

498498
.. code-block:: terminal
499499
500-
$ composer require twig/inky-extension
500+
$ composer require twig/extra-bundle twig/inky-extra
501501
502-
The extension adds an ``inky`` filter, which can be used to convert parts or the
503-
entire email contents from Inky to HTML:
502+
The extension adds an ``inky_to_html`` filter, which can be used to convert parts
503+
or the entire email contents from Inky to HTML:
504504

505505
.. code-block:: html+twig
506506

507-
{% apply inky %}
507+
{% apply inky_to_html %}
508508
<container>
509509
<row class="header">
510510
<columns>
@@ -521,7 +521,7 @@ You can combine all filters to create complex email messages:
521521

522522
.. code-block:: twig
523523
524-
{% apply inky|inline_css(source('@css/foundation-emails.css')) %}
524+
{% apply inky_to_html|inline_css(source('@css/foundation-emails.css')) %}
525525
{# ... #}
526526
{% endapply %}
527527

0 commit comments

Comments
 (0)
0