Remove obsolete docs

This commit is contained in:
Fabien Potencier
2023-10-07 17:45:23 +02:00
parent 5dc2ba921f
commit bcfe41efff
11 changed files with 4 additions and 60 deletions
+3 -7
View File
@@ -24,13 +24,9 @@ You can tweak the output for the date part and the time part:
{# mercredi 7 août 2019 23:39:12 UTC #}
{{ '2019-08-07 23:39:12'|format_datetime('full', 'full', locale='fr') }}
Supported values are: ``none``, ``short``, ``medium``, ``long``, and ``full``.
.. versionadded:: 3.6
``relative_short``, ``relative_medium``, ``relative_long``, and ``relative_full`` are also supported when running on
PHP 8.0 and superior or when using a polyfill that define the ``IntlDateFormatter::RELATIVE_*`` constants and
associated behavior.
Supported values are: ``none``, ``short``, ``medium``, ``long``, ``full``,
``relative_short``, ``relative_medium``, ``relative_long``, and
``relative_full``.
For greater flexibility, you can even define your own pattern
(see the `ICU user guide`_ for supported patterns).
-4
View File
@@ -1,10 +1,6 @@
``country_names``
=================
.. versionadded:: 3.5
The ``country_names`` function was added in Twig 3.5.
The ``country_names`` function returns the names of the countries:
.. code-block:: twig
-4
View File
@@ -1,10 +1,6 @@
``currency_names``
==================
.. versionadded:: 3.5
The ``currency_names`` function was added in Twig 3.5.
The ``currency_names`` function returns the names of the currencies:
.. code-block:: twig
-4
View File
@@ -1,10 +1,6 @@
``language_names``
==================
.. versionadded:: 3.5
The ``language_names`` function was added in Twig 3.5.
The ``language_names`` function returns the names of the languages:
.. code-block:: twig
-4
View File
@@ -1,10 +1,6 @@
``locale_names``
================
.. versionadded:: 3.5
The ``locale_names`` function was added in Twig 3.5.
The ``locale_names`` function returns the names of the locales:
.. code-block:: twig
-4
View File
@@ -1,10 +1,6 @@
``script_names``
================
.. versionadded:: 3.5
The ``script_names`` function was added in Twig 3.5.
The ``script_names`` function returns the names of the scripts:
.. code-block:: twig
-4
View File
@@ -1,10 +1,6 @@
``timezone_names``
==================
.. versionadded:: 3.5
The ``timezone_names`` function was added in Twig 3.5.
The ``timezone_names`` function returns the names of the timezones:
.. code-block:: twig
+1 -1
View File
@@ -30,7 +30,7 @@ Slim, Yii, Laravel, and Codeigniter — just to name a few.
Prerequisites
-------------
Twig 4.x needs at least **PHP 8.0.0** to run.
Twig 4.x needs at least **PHP 8.2.0** to run.
Installation
------------
-5
View File
@@ -266,11 +266,6 @@ is accessible via the ``loop.parent.loop.index`` variable.
Defining undefined Functions, Filters, and Tags on the Fly
----------------------------------------------------------
.. versionadded:: 3.2
The ``registerUndefinedTokenParserCallback()`` method was added in Twig
3.2.
When a function/filter/tag is not defined, Twig defaults to throw a
``\Twig\Error\SyntaxError`` exception. However, it can also call a `callback`_
(any valid PHP callable) which should return a function/filter/tag.
-4
View File
@@ -1,10 +1,6 @@
``cache``
=========
.. versionadded:: 3.2
The ``cache`` tag was added in Twig 3.2.
The ``cache`` tag tells Twig to cache a template fragment:
.. code-block:: twig
@@ -1,19 +0,0 @@
--TEST--
Twig is able to deal with SimpleXMLElement instances as variables
--CONDITION--
version_compare(phpversion(), '8.0', '<')
--TEMPLATE--
Hello '{{ images.image.0.group }}'!
{{ images.image.0.group.attributes.myattr }}
{{ images.children().image.count() }}
{% for image in images %}
- {{ image.group }}
{% endfor %}
--DATA--
return ['images' => new \SimpleXMLElement('<images><image><group myattr="example">foo</group></image><image><group>bar</group></image></images>')]
--EXPECT--
Hello 'foo'!
example
2
- foo
- bar