Skip to content

Commit 68dcc69

Browse files
committed
minor #11775 Removed old deprecated directives. (OskarStark)
This PR was merged into the master branch. Discussion ---------- Removed old deprecated directives. @wouterj please check the translation parts of this PR, thank you! Commits ------- 25b70a3 Removed old deprecated directives.
2 parents acfecd4 + 25b70a3 commit 68dcc69

File tree

5 files changed

+3
-116
lines changed

5 files changed

+3
-116
lines changed

components/serializer.rst

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -660,11 +660,6 @@ When serializing, you can set a callback to format a specific object property::
660660
$serializer->serialize($person, 'json');
661661
// Output: {"name":"cordoval", "age": 34, "createdAt": "2014-03-22T09:43:12-0500"}
662662

663-
.. deprecated:: 4.2
664-
665-
The :method:`Symfony\\Component\\Serializer\\Normalizer\\AbstractNormalizer::setCallbacks` is deprecated since
666-
Symfony 4.2, use the "callbacks" key of the context instead.
667-
668663
.. _component-serializer-normalizers:
669664

670665
Normalizers
@@ -951,12 +946,6 @@ having unique identifiers::
951946
var_dump($serializer->serialize($org, 'json'));
952947
// {"name":"Les-Tilleuls.coop","members":[{"name":"K\u00e9vin", organization: "Les-Tilleuls.coop"}]}
953948

954-
.. deprecated:: 4.2
955-
956-
The :method:`Symfony\\Component\\Serializer\\Normalizer\\AbstractNormalizer::setCircularReferenceHandler`
957-
method is deprecated since Symfony 4.2. Use the ``circular_reference_handler``
958-
key of the context instead.
959-
960949
Handling Serialization Depth
961950
----------------------------
962951

@@ -1108,12 +1097,6 @@ having unique identifiers::
11081097
];
11091098
*/
11101099

1111-
.. deprecated:: 4.2
1112-
1113-
The :method:`Symfony\\Component\\Serializer\\Normalizer\\AbstractNormalizer::setMaxDepthHandler`
1114-
method is deprecated since Symfony 4.2. Use the ``max_depth_handler``
1115-
key of the context instead.
1116-
11171100
Handling Arrays
11181101
---------------
11191102

configuration.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,6 @@ can override it for commands by setting the ``APP_ENV`` value before running the
325325
# Ignore the .env file and run this command in production
326326
$ APP_ENV=prod php bin/console command_name
327327
328-
.. deprecated:: 4.2
329-
330-
In previous Symfony versions you could configure the environment with the
331-
``--env`` command option, which was deprecated in Symfony 4.2.
332-
333328
Creating a New Environment
334329
~~~~~~~~~~~~~~~~~~~~~~~~~~
335330

configuration/front_controllers_and_kernel.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,6 @@ before running them:
156156
# Ignore the .env file and enable the debug mode for this command
157157
$ APP_DEBUG=1 php bin/console command_name
158158
159-
.. deprecated:: 4.2
160-
161-
In previous Symfony versions you could configure the debug mode with the
162-
``--no-debug`` command option, which was deprecated in Symfony 4.2.
163-
164159
Internally, the value of the debug mode becomes the ``kernel.debug``
165160
parameter used inside the :doc:`service container </service_container>`.
166161
If you look inside the application configuration file, you'll see the

reference/twig_reference.rst

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -356,33 +356,6 @@ trans
356356
Translates the text into the current language. More information in
357357
:ref:`Translation Filters <translation-filters>`.
358358

359-
transchoice
360-
~~~~~~~~~~~
361-
362-
.. deprecated:: 4.2
363-
364-
The ``transchoice`` filter is deprecated since Symfony 4.2 and will be
365-
removed in 5.0. Use the :doc:`ICU MessageFormat </translation/message_format>` with
366-
the ``trans`` filter instead.
367-
368-
.. code-block:: twig
369-
370-
{{ message|transchoice(count, arguments = [], domain = null, locale = null) }}
371-
372-
``message``
373-
**type**: ``string``
374-
``count``
375-
**type**: ``integer``
376-
``arguments`` *(optional)*
377-
**type**: ``array`` **default**: ``[]``
378-
``domain`` *(optional)*
379-
**type**: ``string`` **default**: ``null``
380-
``locale`` *(optional)*
381-
**type**: ``string`` **default**: ``null``
382-
383-
Translates the text with pluralization support. More information in
384-
:ref:`Translation Filters <translation-filters>`.
385-
386359
yaml_encode
387360
~~~~~~~~~~~
388361

@@ -591,31 +564,6 @@ trans
591564

592565
Renders the translation of the content. More information in :ref:`translation-tags`.
593566

594-
transchoice
595-
~~~~~~~~~~~
596-
597-
.. deprecated:: 4.2
598-
599-
The ``transchoice`` tag is deprecated since Symfony 4.2 and will be
600-
removed in 5.0. Use the :doc:`ICU MessageFormat </translation/message_format>` with
601-
the ``trans`` tag instead.
602-
603-
.. code-block:: twig
604-
605-
{% transchoice count with vars from domain into locale %}{% endtranschoice %}
606-
607-
``count``
608-
**type**: ``integer``
609-
``vars`` *(optional)*
610-
**type**: ``array`` **default**: ``[]``
611-
``domain`` *(optional)*
612-
**type**: ``string`` **default**: ``null``
613-
``locale`` *(optional)*
614-
**type**: ``string`` **default**: ``null``
615-
616-
Renders the translation of the content with pluralization support, more
617-
information in :ref:`translation-tags`.
618-
619567
trans_default_domain
620568
~~~~~~~~~~~~~~~~~~~~
621569

translation/templates.rst

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,13 @@ Twig Templates
99
Using Twig Tags
1010
~~~~~~~~~~~~~~~
1111

12-
Symfony provides specialized Twig tags (``trans`` and ``transchoice``) to
13-
help with message translation of *static blocks of text*:
12+
Symfony provides a specialized Twig tag ``trans`` to help with message
13+
translation of *static blocks of text*:
1414

1515
.. code-block:: twig
1616
1717
{% trans %}Hello %name%{% endtrans %}
1818
19-
{% transchoice count %}
20-
{0} There are no apples|{1} There is one apple|]1,Inf[ There are %count% apples
21-
{% endtranschoice %}
22-
23-
The ``transchoice`` tag automatically gets the ``%count%`` variable from
24-
the current context and passes it to the translator. This mechanism only
25-
works when you use a placeholder following the ``%var%`` pattern.
26-
27-
.. deprecated:: 4.2
28-
29-
The ``transchoice`` tag is deprecated since Symfony 4.2 and will be
30-
removed in 5.0. Use the :doc:`ICU MessageFormat </translation/message_format>` with
31-
the ``trans`` tag instead.
32-
3319
.. caution::
3420

3521
The ``%var%`` notation of placeholders is required when translating in
@@ -48,34 +34,19 @@ You can also specify the message domain and pass some additional variables:
4834
4935
{% trans with {'%name%': 'Fabien'} from 'app' into 'fr' %}Hello %name%{% endtrans %}
5036
51-
{% transchoice count with {'%name%': 'Fabien'} from 'app' %}
52-
{0} %name%, there are no apples|{1} %name%, there is one apple|]1,Inf[ %name%, there are %count% apples
53-
{% endtranschoice %}
54-
5537
.. _translation-filters:
5638

5739
Using Twig Filters
5840
~~~~~~~~~~~~~~~~~~
5941

60-
The ``trans`` and ``transchoice`` filters can be used to translate *variable
61-
texts* and complex expressions:
42+
The ``trans`` filter can be used to translate *variable texts* and complex expressions:
6243

6344
.. code-block:: twig
6445
6546
{{ message|trans }}
6647
67-
{{ message|transchoice(5) }}
68-
6948
{{ message|trans({'%name%': 'Fabien'}, 'app') }}
7049
71-
{{ message|transchoice(5, {'%name%': 'Fabien'}, 'app') }}
72-
73-
.. deprecated:: 4.2
74-
75-
The ``transchoice`` filter is deprecated since Symfony 4.2 and will be
76-
removed in 5.0. Use the :doc:`ICU MessageFormat </translation/message_format>` with
77-
the ``trans`` filter instead.
78-
7950
.. tip::
8051

8152
Using the translation tags or filters have the same effect, but with
@@ -116,8 +87,3 @@ The translator service is accessible in PHP templates through the
11687

11788
<?= $view['translator']->trans('Symfony is great') ?>
11889

119-
<?= $view['translator']->transChoice(
120-
'{0} There are no apples|{1} There is one apple|]1,Inf[ There are %count% apples',
121-
10,
122-
['%count%' => 10]
123-
) ?>

0 commit comments

Comments
 (0)