From 240e967c6100f857784b8da9220af4ae0d364b41 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 15 Nov 2019 16:44:44 +0100 Subject: [PATCH 1/2] Remove usage of the old Autoloader class in the docs --- doc/api.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index b96b0d4e7..36032af8d 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -19,8 +19,7 @@ to have multiple environments side by side, with different configurations. The typical way to configure Twig to load templates for an application looks roughly like this:: - require_once '/path/to/lib/Twig/Autoloader.php'; - Twig_Autoloader::register(); + require_once '/path/to/vendor/autoload.php'; $loader = new \Twig\Loader\FilesystemLoader('/path/to/templates'); $twig = new \Twig\Environment($loader, [ From 7f48a181cdc90095202a30dfe02e071a43b9fcb2 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 18 Nov 2019 18:27:43 +0100 Subject: [PATCH 2/2] Remove mention of the obsolete twig-extensions repository --- doc/advanced.rst | 5 ----- doc/advanced_legacy.rst | 5 ----- doc/templates.rst | 8 ++------ 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/doc/advanced.rst b/doc/advanced.rst index e25329419..b9c7829e9 100644 --- a/doc/advanced.rst +++ b/doc/advanced.rst @@ -584,11 +584,6 @@ to host all the specific tags and filters you want to add to Twig. recompile your templates whenever you make a change to it (when ``auto_reload`` is enabled). -.. note:: - - Before writing your own extensions, have a look at the Twig official - extension repository: https://github.com/twigphp/Twig-extensions. - An extension is a class that implements the following interface:: interface Twig_ExtensionInterface diff --git a/doc/advanced_legacy.rst b/doc/advanced_legacy.rst index cc87b9c9e..409b91440 100644 --- a/doc/advanced_legacy.rst +++ b/doc/advanced_legacy.rst @@ -524,11 +524,6 @@ to host all the specific tags and filters you want to add to Twig. recompile your templates whenever you make a change to it (when the ``auto_reload`` is enabled). -.. note:: - - Before writing your own extensions, have a look at the Twig official - extension repository: https://github.com/twigphp/Twig-extensions. - An extension is a class that implements the following interface:: interface Twig_ExtensionInterface diff --git a/doc/templates.rst b/doc/templates.rst index 168a8f708..adf2b5395 100644 --- a/doc/templates.rst +++ b/doc/templates.rst @@ -865,11 +865,8 @@ the modifiers on one side of a tag or on both sides: Extensions ---------- -Twig can be extended. If you are looking for new tags, filters, or functions, -have a look at the Twig official `extension repository`_. - -If you want to create your own, read the :ref:`Creating an -Extension` chapter. +Twig can be extended. If you want to create your own extensions, read the +:ref:`Creating an Extension ` chapter. .. _`Twig bundle`: https://github.com/Anomareh/PHP-Twig.tmbundle .. _`Jinja syntax plugin`: http://jinja.pocoo.org/docs/integration/#vim @@ -877,7 +874,6 @@ Extension` chapter. .. _`Twig syntax plugin`: http://plugins.netbeans.org/plugin/37069/php-twig .. _`Twig plugin`: https://github.com/pulse00/Twig-Eclipse-Plugin .. _`Twig language definition`: https://github.com/gabrielcorpse/gedit-twig-template-language -.. _`extension repository`: https://github.com/twigphp/Twig-extensions .. _`Twig syntax mode`: https://github.com/bobthecow/Twig-HTML.mode .. _`other Twig syntax mode`: https://github.com/muxx/Twig-HTML.mode .. _`Notepad++ Twig Highlighter`: https://github.com/Banane9/notepadplusplus-twig