Skip to content

Commit

Permalink
minor #5586 [2.8] Remove 2.6 versionaddeds as version reached eom (Wo…
Browse files Browse the repository at this point in the history
…uterJ)

This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] Remove 2.6 versionaddeds as version reached eom

2.6 has reached eom today, so 2.8 should no longer contain the versionadded directives for 2.6 according to our upgrade process.

| Q | A
| --- | ---
| Doc fix? | no
| New docs? | no
| Applies to | 2.8+
| Fixed tickets | -

Commits
-------

691616c Remove 2.6 versionaddeds as version reached eom
  • Loading branch information
xabbuh committed Dec 31, 2015
2 parents 83e73c2 + 691616c commit 3a7624f
Show file tree
Hide file tree
Showing 54 changed files with 8 additions and 352 deletions.
21 changes: 4 additions & 17 deletions book/controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,6 @@ If you want to redirect the user to another page, use the ``redirectToRoute()``
// return $this->redirect($this->generateUrl('homepage'), 301);
}

.. versionadded:: 2.6
The ``redirectToRoute()`` method was introduced in Symfony 2.6. Previously (and still now), you
could use ``redirect()`` and ``generateUrl()`` together for this (see the example above).

Or, if you want to redirect externally, just use ``redirect()`` and pass it the URL::

public function indexAction()
Expand Down Expand Up @@ -536,9 +532,6 @@ console command:
$ php app/console debug:container
.. versionadded:: 2.6
Prior to Symfony 2.6, this command was called ``container:debug``.

For more information, see the :doc:`/book/service_container` chapter.

.. index::
Expand Down Expand Up @@ -825,16 +818,10 @@ method to check the CSRF token::
// ... do something, like deleting an object
}

.. versionadded:: 2.6
The ``isCsrfTokenValid()`` shortcut method was introduced in Symfony 2.6.
It is equivalent to executing the following code:

.. code-block:: php
use Symfony\Component\Security\Csrf\CsrfToken;
$this->get('security.csrf.token_manager')
->isTokenValid(new CsrfToken('token_id', 'TOKEN'));
// isCsrfTokenValid() is equivalent to:
// $this->get('security.csrf.token_manager')->isTokenValid()
// new \Symfony\Component\Security\Csrf\CsrfToken\CsrfToken('token_id', $token)
// );

Final Thoughts
--------------
Expand Down
3 changes: 0 additions & 3 deletions book/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1403,9 +1403,6 @@ the command by running the following from the root of your project.
$ php app/console debug:router
.. versionadded:: 2.6
Prior to Symfony 2.6, this command was called ``router:debug``.

This command will print a helpful list of *all* the configured routes in
your application:

Expand Down
16 changes: 0 additions & 16 deletions book/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -846,15 +846,6 @@ You can easily deny access from inside a controller::
// ...
}

.. versionadded:: 2.6
The ``denyAccessUnlessGranted()`` method was introduced in Symfony 2.6. Previously (and
still now), you could check access directly and throw the ``AccessDeniedException`` as shown
in the example above).

.. versionadded:: 2.6
The ``security.authorization_checker`` service was introduced in Symfony 2.6. Prior
to Symfony 2.6, you had to use the ``isGranted()`` method of the ``security.context`` service.

In both cases, a special
:class:`Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException`
is thrown, which ultimately triggers a 403 HTTP response inside Symfony.
Expand Down Expand Up @@ -1019,10 +1010,6 @@ shown above.
Retrieving the User Object
--------------------------

.. versionadded:: 2.6
The ``security.token_storage`` service was introduced in Symfony 2.6. Prior
to Symfony 2.6, you had to use the ``getToken()`` method of the ``security.context`` service.

After authentication, the ``User`` object of the current user can be accessed
via the ``security.token_storage`` service. From inside a controller, this will
look like::
Expand Down Expand Up @@ -1223,9 +1210,6 @@ in the following way from a controller::

$user->setPassword($encoded);

.. versionadded:: 2.6
The ``security.password_encoder`` service was introduced in Symfony 2.6.

In order for this to work, just make sure that you have the encoder for your
user class (e.g. ``AppBundle\Entity\User``) configured under the ``encoders``
key in ``app/config/security.yml``.
Expand Down
3 changes: 0 additions & 3 deletions book/service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1150,9 +1150,6 @@ console. To show all services and the class for each service, run:
$ php app/console debug:container
.. versionadded:: 2.6
Prior to Symfony 2.6, this command was called ``container:debug``.

By default, only public services are shown, but you can also view private services:

.. code-block:: bash
Expand Down
6 changes: 0 additions & 6 deletions book/templating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1269,12 +1269,6 @@ automatically:
<p>Application Environment: <?php echo $app->getEnvironment() ?></p>
<?php endif ?>

.. versionadded:: 2.6
The global ``app.security`` variable (or the ``$app->getSecurity()``
method in PHP templates) is deprecated as of Symfony 2.6. Use ``app.user``
(``$app->getUser()``) and ``is_granted()`` (``$view['security']->isGranted()``)
instead.

.. tip::

You can add your own global template variables. See the cookbook example
Expand Down
3 changes: 0 additions & 3 deletions book/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,6 @@ Be warned that this does not work if you insulate the client or if you use an
HTTP layer. For a list of services available in your application, use the
``debug:container`` console task.

.. versionadded:: 2.6
Prior to Symfony 2.6, this command was called ``container:debug``.

.. tip::

If the information you need to check is available from the profiler, use
Expand Down
6 changes: 0 additions & 6 deletions book/translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,6 @@ checks translation resources for several locales:
#. If the translation still isn't found, Symfony uses the ``fallbacks`` configuration
parameter, which defaults to ``en`` (see `Configuration`_).

.. versionadded:: 2.6
The ability to log missing translations was introduced in Symfony 2.6.

.. note::

When Symfony doesn't find a translation in the given locale, it will
Expand Down Expand Up @@ -746,9 +743,6 @@ For more information, see the documentation for these libraries.
Debugging Translations
----------------------

.. versionadded:: 2.6
Prior to Symfony 2.6, this command was called ``translation:debug``.

When maintaining a bundle, you may use or remove the usage of a translation
message without updating all message catalogues. The ``debug:translation``
command helps you to find these missing or unused translation messages for a
Expand Down
4 changes: 0 additions & 4 deletions components/config/definition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,6 @@ method.
The info will be printed as a comment when dumping the configuration tree
with the ``config:dump-reference`` command.

.. versionadded:: 2.6
Since Symfony 2.6, the info will also be added to the exception message
when an invalid type is given.

Optional Sections
-----------------

Expand Down
3 changes: 0 additions & 3 deletions components/console/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ dispatched. Listeners receive a
Disable Commands inside Listeners
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.6
Disabling commands inside listeners was introduced in Symfony 2.6.

Using the
:method:`Symfony\\Component\\Console\\Event\\ConsoleCommandEvent::disableCommand`
method, you can disable a command inside a listener. The application
Expand Down
3 changes: 0 additions & 3 deletions components/console/helpers/debug_formatter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
Debug Formatter Helper
======================

.. versionadded:: 2.6
The Debug Formatter helper was introduced in Symfony 2.6.

The :class:`Symfony\\Component\\Console\\Helper\\DebugFormatterHelper` provides
functions to output debug information when running an external program, for
instance a process or HTTP request. For example, if you used it to output
Expand Down
3 changes: 0 additions & 3 deletions components/console/helpers/processhelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
Process Helper
==============

.. versionadded:: 2.6
The Process Helper was introduced in Symfony 2.6.

The Process Helper shows processes as they're running and reports
useful information about process status.

Expand Down
14 changes: 0 additions & 14 deletions components/console/helpers/progressbar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ Instead of advancing the bar by a number of steps (with the
you can also set the current progress by calling the
:method:`Symfony\\Component\\Console\\Helper\\ProgressBar::setProgress` method.

.. versionadded:: 2.6
The ``setProgress()`` method was called ``setCurrent()`` prior to Symfony 2.6.

.. caution::

Prior to version 2.6, the progress bar only works if your platform
supports ANSI codes; on other platforms, no output is generated.

.. tip::

If your platform doesn't support ANSI codes, updates to the progress
Expand All @@ -57,9 +49,6 @@ you can also set the current progress by calling the
accordingly. By default, when using a ``max``, the redraw frequency
is set to *10%* of your ``max``.

.. versionadded:: 2.6
The ``setRedrawFrequency()`` method was introduced in Symfony 2.6.

If you don't know the number of steps in advance, just omit the steps argument
when creating the :class:`Symfony\\Component\\Console\\Helper\\ProgressBar`
instance::
Expand Down Expand Up @@ -307,9 +296,6 @@ that displays the number of remaining steps::
}
);

.. versionadded:: 2.6
The ``getProgress()`` method was called ``getStep()`` prior to Symfony 2.6.

Custom Messages
~~~~~~~~~~~~~~~

Expand Down
5 changes: 0 additions & 5 deletions components/dependency_injection/factories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ For this situation, you can use a factory to create the object and tell
the service container to call a method on the factory rather than directly
instantiating the class.

.. versionadded:: 2.6
The new :method:`Symfony\\Component\\DependencyInjection\\Definition::setFactory`
method was introduced in Symfony 2.6. Refer to older versions for the
syntax for factories prior to 2.6.

Suppose you have a factory that configures and returns a new ``NewsletterManager``
object::

Expand Down
4 changes: 0 additions & 4 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@ Get all the child or parent nodes::
Accessing Node Values
~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.6
The :method:`Symfony\\Component\\DomCrawler\\Crawler::nodeName`
method was introduced in Symfony 2.6.

Access the node name (HTML tag name) of the first node of the current selection (eg. "p" or "div")::

// will return the node name (HTML tag name) of the first child element under <body>
Expand Down
4 changes: 0 additions & 4 deletions components/event_dispatcher/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -628,10 +628,6 @@ and so on...
Event Name Introspection
~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.4
Before Symfony 2.4, the event name and the event dispatcher had to be
requested from the ``Event`` instance. These methods are now deprecated.

The ``EventDispatcher`` instance, as well as the name of the event that
is dispatched, are passed as arguments to the listener::

Expand Down
3 changes: 0 additions & 3 deletions components/expression_language/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ evaluating or the "names" if compiling).
Using Expression Providers
--------------------------

.. versionadded:: 2.6
Expression providers were introduced in Symfony 2.6.

When you use the ``ExpressionLanguage`` class in your library, you often want
to add custom functions. To do so, you can create a new expression provider by
creating a class that implements
Expand Down
3 changes: 0 additions & 3 deletions components/filesystem/lock_handler.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
LockHandler
===========

.. versionadded:: 2.6
The lock handler feature was introduced in Symfony 2.6

What is a Lock?
---------------

Expand Down
3 changes: 0 additions & 3 deletions components/http_foundation/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,6 @@ You can still set the ``Content-Type`` of the sent file, or change its ``Content
'filename.txt'
);

.. versionadded:: 2.6
The ``deleteFileAfterSend()`` method was introduced in Symfony 2.6.

It is possible to delete the file after the request is sent with the
:method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::deleteFileAfterSend` method.
Please note that this will not work when the ``X-Sendfile`` header is set.
Expand Down
44 changes: 0 additions & 44 deletions components/options_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ You can install the component in 2 different ways:
Notes on Previous Versions
--------------------------

.. versionadded:: 2.6
This documentation was written for Symfony 2.6 and later. If you use an older
version, please `read the Symfony 2.5 documentation`_. For a list of changes,
see the `CHANGELOG`_.

Usage
-----

Expand Down Expand Up @@ -222,10 +217,6 @@ For example, to make the ``host`` option required, you can do::
}
}

.. versionadded:: 2.6
As of Symfony 2.6, ``setRequired()`` accepts both an array of options or a
single option. Prior to 2.6, you could only pass arrays.

If you omit a required option, a
:class:`Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException`
will be thrown::
Expand All @@ -250,11 +241,6 @@ one required option::
}
}

.. versionadded:: 2.6
The methods :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::isRequired`
and :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::getRequiredOptions`
were introduced in Symfony 2.6.

Use :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::isRequired` to find
out if an option is required. You can use
:method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::getRequiredOptions` to
Expand All @@ -275,11 +261,6 @@ retrieve the names of all required options::
}
}

.. versionadded:: 2.6
The methods :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::isMissing`
and :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::getMissingOptions`
were introduced in Symfony 2.6.

If you want to check whether a required option is still missing from the default
options, you can use :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::isMissing`.
The difference between this and :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::isRequired`
Expand Down Expand Up @@ -362,11 +343,6 @@ is thrown::
In sub-classes, you can use :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::addAllowedTypes`
to add additional allowed types without erasing the ones already set.

.. versionadded:: 2.6
Before Symfony 2.6, ``setAllowedTypes()`` and ``addAllowedTypes()`` expected
the values to be given as an array mapping option names to allowed types:
``$resolver->setAllowedTypes(array('port' => array('null', 'int')));``

Value Validation
~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -413,11 +389,6 @@ returns ``true`` for acceptable values and ``false`` for invalid values::
In sub-classes, you can use :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::addAllowedValues`
to add additional allowed values without erasing the ones already set.

.. versionadded:: 2.6
Before Symfony 2.6, ``setAllowedValues()`` and ``addAllowedValues()`` expected
the values to be given as an array mapping option names to allowed values:
``$resolver->setAllowedValues(array('transport' => array('sendmail', 'mail', 'smtp')));``

Option Normalization
~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -448,11 +419,6 @@ option. You can configure a normalizer by calling
}
}

.. versionadded:: 2.6
The method :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::setNormalizer`
was introduced in Symfony 2.6. Before, you had to use
:method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::setNormalizers`.

The normalizer receives the actual ``$value`` and returns the normalized form.
You see that the closure also takes an ``$options`` parameter. This is useful
if you need to use other options during normalization::
Expand Down Expand Up @@ -587,11 +553,6 @@ comes from the default::
}
}

.. versionadded:: 2.6
The method :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::setDefined`
was introduced in Symfony 2.6. Before, you had to use
:method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::setOptional`.

You can use :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::setDefined`
to define an option without setting a default value. Then the option will only
be included in the resolved options if it was actually passed to
Expand Down Expand Up @@ -643,11 +604,6 @@ options in one go::
}
}

.. versionadded:: 2.6
The method :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::isDefined`
and :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::getDefinedOptions`
were introduced in Symfony 2.6.

The methods :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::isDefined`
and :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::getDefinedOptions`
let you find out which options are defined::
Expand Down
Loading

0 comments on commit 3a7624f

Please sign in to comment.