Skip to content

Documenting how we should use the versionadded tag - see https://groups.... #2138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions contributing/documentation/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,36 @@ GitHub covers the topic of `pull requests`_ in detail.
by going to the `Documentation Build Errors`_ page (it is updated each French
night at 3AM when the server rebuilds the documentation).

Documenting new Features or Behavior Changes
--------------------------------------------

If you're documenting a brand new feature or a change that's been made in
Symfony2, you should precede your description of the change with a ``.. versionadded:: 2.X``
tag and a short description:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We maybe should add a .. caution:: (not warning ;-)) block that you must not put a space between the tag and the content? (which is different from all other blocks).

PS: is it 'we maybe should add' or 'we should maybe add'?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) it's "we should maybe add" - but I can't tell you why. Let's let the example be enough for now - notes/cautions take away from readability, so we want to balance it. It's also an easy thing for us to fix if we have to :).


.. code-block:: text

.. versionadded:: 2.2
The ``askHiddenResponse`` method was added in Symfony 2.2.

You can also ask a question and hide the response. This is particularly...

If you're documenting a behavior change, it may be helpful to *briefly* describe
how the behavior has changed.

.. code-block:: text

.. versionadded:: 2.2
The ``include()`` function is a new Twig feature that's available in
Symfony 2.2. Prior, the ``{% include %}`` tag was used.

Whenever a new version of minor of Symfony2 is released (e.g. 2.3, 2.4, etc),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a new minor version

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, thanks! sha: a3043db

a new branch of the documentation is created from the ``master`` branch.
At this point, all the ``versionadded`` tags for Symfony2 versions that have
reached end-of-life will be removed. For example, if Symfony 2.5 were released
today, and 2.2 had recently reached its end-of-life, the 2.2 ``versionadded``
tags would be removed from the new 2.5 branch.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be ... the new master branch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is that 2.5 is master today, but tomorrow, when 2.5.0 is released, we create a new "2.5" branch, and "master" now really becomes "2.6". So, we would actually remove the versionadded stuff from that new 2.5 branch. We could also do it in the other order, but typically Fabien would create the new branches, then we would go to work to update things on those new branches.


Standards
---------

Expand Down