Skip to content

Commit 2b0504d

Browse files
committed
document how to use the new deprecated directive
1 parent cebd549 commit 2b0504d

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

contributing/documentation/format.rst

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,35 +168,47 @@ 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
189-
.. versionadded:: 3.4
192+
.. versionadded:: 3.4
190193
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/

0 commit comments

Comments
 (0)