Skip to content

Commit 5def977

Browse files
committed
minor #11178 Use the ".. deprecated::" directive for deprecations (OskarStark)
This PR was squashed before being merged into the 3.4 branch (closes #11178). Discussion ---------- Use the ".. deprecated::" directive for deprecations Refs #11154 ## Todo: - [ ] We need no ensure the correct html markup - [ ] @symfony/docs-team please review the new documentation about "[how/when to use this new directive](2b0504d)" Commits ------- b48d0c7 Use the \".. deprecated::\" directive for deprecations
2 parents 0097c05 + b48d0c7 commit 5def977

File tree

14 files changed

+36
-24
lines changed

14 files changed

+36
-24
lines changed

bundles/extension.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ read more about it, see the ":doc:`/bundles/configuration`" article.
130130
Adding Classes to Compile
131131
-------------------------
132132

133-
.. versionadded:: 3.3
133+
.. deprecated:: 3.3
134134

135135
This technique is discouraged and the ``addClassesToCompile()`` method was
136136
deprecated in Symfony 3.3 because modern PHP versions make it unnecessary.

components/console/events.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ C/C++ standard.::
8686
The ``ConsoleEvents::EXCEPTION`` Event
8787
--------------------------------------
8888

89-
.. versionadded:: 3.3
89+
.. deprecated:: 3.3
9090

9191
The ``ConsoleEvents::EXCEPTION`` event was deprecated in Symfony 3.3. Use
9292
the ``ConsoleEvents::ERROR`` event instead.

components/event_dispatcher/container_aware_dispatcher.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
The Container Aware Event Dispatcher
55
====================================
66

7-
.. versionadded:: 3.3
7+
.. deprecated:: 3.3
88

99
The ``ContainerAwareEventDispatcher`` class has been deprecated in Symfony 3.3
1010
and it will be removed in Symfony 4.0. Use ``EventDispatcher`` with

components/filesystem/lock_handler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
LockHandler
22
===========
33

4-
.. versionadded:: 3.4
4+
.. deprecated:: 3.4
55

66
The ``LockHandler`` class was deprecated in Symfony 3.4 and it will be
77
removed in Symfony 4.0. Use :ref:`SemaphoreStore <lock-store-semaphore>`

configuration/external_parameters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ of the following:
122122
123123
.. tip::
124124

125-
.. versionadded:: 3.3
125+
.. deprecated:: 3.3
126126

127127
The support of the special ``SYMFONY__`` environment variables was
128128
deprecated in Symfony 3.3 and it will be removed in 4.0. Instead of

contributing/documentation/format.rst

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,21 +168,24 @@ of the linked resource (``namespace``, ``class`` or ``method``):
168168
169169
:phpfunction:`iterator_to_array`
170170
171-
New Features or Behavior Changes
172-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
171+
New Features, Behavior Changes or Deprecations
172+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
173173

174-
If you're documenting a brand new feature or a change that's been made in
175-
Symfony, you should precede your description of the change with a
176-
``.. versionadded:: 3.x`` directive and a short description:
174+
If you are documenting a brand new feature, a change or a deprecation that's
175+
been made in Symfony, you should precede your description of the change with
176+
the corresponding directive and a short description:
177+
178+
For a new feature or a behaviour change use the ``.. versionadded:: 3.x``
179+
directive:
177180

178181
.. code-block:: rst
179182
180183
.. versionadded:: 3.4
181184
182185
The special ``!`` template prefix was introduced in Symfony 3.4.
183186
184-
If you're documenting a behavior change, it may be helpful to *briefly* describe
185-
how the behavior has changed:
187+
If you are documenting a behavior change, it may be helpful to *briefly*
188+
describe how the behavior has changed:
186189

187190
.. code-block:: rst
188191
@@ -191,12 +194,21 @@ how the behavior has changed:
191194
Support for annotation routing without an external bundle was added in
192195
Symfony 3.4. Prior, you needed to install the SensioFrameworkExtraBundle.
193196
197+
For a deprecation use the ``.. deprecated:: 3.X`` directive:
198+
199+
.. code-block:: rst
200+
201+
.. deprecated:: 3.3
202+
203+
This technique is discouraged and the ``addClassesToCompile()`` method was
204+
deprecated in Symfony 3.3 because modern PHP versions make it unnecessary.
205+
194206
Whenever a new major version of Symfony is released (e.g. 3.0, 4.0, etc),
195207
a new branch of the documentation is created from the ``master`` branch.
196-
At this point, all the ``versionadded`` tags for Symfony versions that have
197-
a lower major version will be removed. For example, if Symfony 4.0 were
198-
released today, 3.0 to 3.4 ``versionadded`` tags would be removed from the new
199-
``4.0`` branch.
208+
At this point, all the ``versionadded`` and ``deprecated`` tags for Symfony
209+
versions that have a lower major version will be removed. For example, if
210+
Symfony 4.0 were released today, 3.0 to 3.4 ``versionadded`` and ``deprecated``
211+
tags would be removed from the new ``4.0`` branch.
200212

201213
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
202214
.. _Sphinx: http://sphinx-doc.org/

debug/debugging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ cache files, or you can change the extension used by Symfony for these files::
6161

6262
$kernel->loadClassCache('classes', '.php.cache');
6363

64-
.. versionadded:: 3.3
64+
.. deprecated:: 3.3
6565

6666
The ``loadClassCache()`` was deprecated in Symfony 3.3 and removed in
6767
Symfony 4.0. No alternative is provided because this feature is useless

reference/configuration/kernel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ directory and rename it to something else (e.g. ``foo``).
5656
Root Directory
5757
~~~~~~~~~~~~~~
5858

59-
.. versionadded:: 3.3
59+
.. deprecated:: 3.3
6060

6161
The ``getRootDir()`` method is deprecated since Symfony 3.3. Use the new
6262
``getProjectDir()`` method instead.

reference/configuration/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ Learn more about user checkers in :doc:`/security/user_checkers`.
500500
HTTP-Digest Authentication
501501
--------------------------
502502

503-
.. versionadded:: 3.4
503+
.. deprecated:: 3.4
504504

505505
HTTP-Digest Authentication was deprecated in Symfony 3.4 and it will be
506506
removed in Symfony 4.0.

reference/configuration/web_profiler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ environment.
5050
position
5151
~~~~~~~~
5252

53-
.. versionadded:: 3.4
53+
.. deprecated:: 3.4
5454

5555
The ``position`` option was deprecated in Symfony 3.4 and it will be removed
5656
in Symfony 4.0, where the toolbar is always displayed in the ``bottom`` position.

security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ For more details on expressions and security, see :doc:`/security/expressions`.
963963
Access Control Lists (ACLs): Securing individual Database Objects
964964
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
965965

966-
.. versionadded:: 3.4
966+
.. deprecated:: 3.4
967967

968968
ACL support was deprecated in Symfony 3.4 and will be removed in 4.0. Install
969969
the `Symfony ACL bundle`_ if you want to keep using ACL.

security/acl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
How to Use Access Control Lists (ACLs)
55
======================================
66

7-
.. versionadded:: 3.4
7+
.. deprecated:: 3.4
88

99
ACL support was deprecated in Symfony 3.4 and will be removed in 4.0. Install
1010
the `Symfony ACL bundle`_ if you want to keep using ACL.

security/acl_advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
How to Use advanced ACL Concepts
55
================================
66

7-
.. versionadded:: 3.4
7+
.. deprecated:: 3.4
88

99
ACL support was deprecated in Symfony 3.4 and will be removed in 4.0. Install
1010
the `Symfony ACL bundle`_ if you want to keep using ACL.

security/multiple_user_providers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Now, all firewalls that explicitly define ``chain_provider`` as their user
9292
provider will, in turn, try to load the user from both the ``in_memory`` and
9393
``user_db`` providers.
9494

95-
.. versionadded:: 3.4
95+
.. deprecated:: 3.4
9696

9797
In previous Symfony versions, firewalls that didn't define their user provider
9898
explicitly, used the first existing provider (``chain_provider`` in this

0 commit comments

Comments
 (0)