diff --git a/book/controller.rst b/book/controller.rst index 13a19afb334..e15d2225b92 100644 --- a/book/controller.rst +++ b/book/controller.rst @@ -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() @@ -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:: @@ -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 -------------- diff --git a/book/routing.rst b/book/routing.rst index 39d32735434..54cbd135be8 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -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: diff --git a/book/security.rst b/book/security.rst index f7ebdccb824..95cae07f881 100644 --- a/book/security.rst +++ b/book/security.rst @@ -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. @@ -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:: @@ -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``. diff --git a/book/service_container.rst b/book/service_container.rst index 4616b216056..f7b9de619b7 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -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 diff --git a/book/templating.rst b/book/templating.rst index da6a694f7c0..989d221e802 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -1269,12 +1269,6 @@ automatically:
Application Environment: getEnvironment() ?>
-.. 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 diff --git a/book/testing.rst b/book/testing.rst index 9dc85d4cba8..2bbbcd91c25 100644 --- a/book/testing.rst +++ b/book/testing.rst @@ -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 diff --git a/book/translation.rst b/book/translation.rst index 08fcc57d9d7..26e39ac2f1b 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -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 @@ -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 diff --git a/components/config/definition.rst b/components/config/definition.rst index f0291c5dfe0..89f4bdfa12d 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -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 ----------------- diff --git a/components/console/events.rst b/components/console/events.rst index e5b51c910a1..ecbe68c1e25 100644 --- a/components/console/events.rst +++ b/components/console/events.rst @@ -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 diff --git a/components/console/helpers/debug_formatter.rst b/components/console/helpers/debug_formatter.rst index b5af8bb9782..d48b6a9e060 100644 --- a/components/console/helpers/debug_formatter.rst +++ b/components/console/helpers/debug_formatter.rst @@ -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 diff --git a/components/console/helpers/processhelper.rst b/components/console/helpers/processhelper.rst index 5494ca0137f..6a4f7c6f6b5 100644 --- a/components/console/helpers/processhelper.rst +++ b/components/console/helpers/processhelper.rst @@ -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. diff --git a/components/console/helpers/progressbar.rst b/components/console/helpers/progressbar.rst index 3c97a53ec49..0e73aa91231 100644 --- a/components/console/helpers/progressbar.rst +++ b/components/console/helpers/progressbar.rst @@ -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 @@ -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:: @@ -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 ~~~~~~~~~~~~~~~ diff --git a/components/dependency_injection/factories.rst b/components/dependency_injection/factories.rst index e0a351e6dad..9fd0a5211f3 100644 --- a/components/dependency_injection/factories.rst +++ b/components/dependency_injection/factories.rst @@ -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:: diff --git a/components/dom_crawler.rst b/components/dom_crawler.rst index f9a3fe030f3..f99e382dbee 100644 --- a/components/dom_crawler.rst +++ b/components/dom_crawler.rst @@ -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 diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index 8a8654c8901..8a5b678cc95 100644 --- a/components/event_dispatcher/introduction.rst +++ b/components/event_dispatcher/introduction.rst @@ -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:: diff --git a/components/expression_language/extending.rst b/components/expression_language/extending.rst index fa90165014d..eeb9963c6c6 100644 --- a/components/expression_language/extending.rst +++ b/components/expression_language/extending.rst @@ -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 diff --git a/components/filesystem/lock_handler.rst b/components/filesystem/lock_handler.rst index 5d442e79547..90efe6b1033 100644 --- a/components/filesystem/lock_handler.rst +++ b/components/filesystem/lock_handler.rst @@ -1,9 +1,6 @@ LockHandler =========== -.. versionadded:: 2.6 - The lock handler feature was introduced in Symfony 2.6 - What is a Lock? --------------- diff --git a/components/http_foundation/introduction.rst b/components/http_foundation/introduction.rst index 8b9073a1749..b929a9d5fcb 100644 --- a/components/http_foundation/introduction.rst +++ b/components/http_foundation/introduction.rst @@ -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. diff --git a/components/options_resolver.rst b/components/options_resolver.rst index 436d54e5109..832734ba5d4 100644 --- a/components/options_resolver.rst +++ b/components/options_resolver.rst @@ -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 ----- @@ -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:: @@ -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 @@ -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` @@ -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 ~~~~~~~~~~~~~~~~ @@ -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 ~~~~~~~~~~~~~~~~~~~~ @@ -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:: @@ -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 @@ -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:: diff --git a/components/security/authentication.rst b/components/security/authentication.rst index e1d0834be67..3fd114b6b0d 100644 --- a/components/security/authentication.rst +++ b/components/security/authentication.rst @@ -4,11 +4,6 @@ Authentication ============== -.. versionadded:: 2.6 - The ``TokenStorageInterface`` was introduced in Symfony 2.6. Prior, you - had to use the ``getToken()`` method of the - :class:`Symfony\\Component\\Security\\Core\\SecurityContextInterface`. - When a request points to a secured area, and one of the listeners from the firewall map is able to extract the user's credentials from the current :class:`Symfony\\Component\\HttpFoundation\\Request` object, it should create diff --git a/components/security/authorization.rst b/components/security/authorization.rst index 7c613ef0c33..eb24034b1e5 100644 --- a/components/security/authorization.rst +++ b/components/security/authorization.rst @@ -29,11 +29,6 @@ An authorization decision will always be based on a few things: Any object for which access control needs to be checked, like an article or a comment object. -.. versionadded:: 2.6 - The ``TokenStorageInterface`` was introduced in Symfony 2.6. Prior, you - had to use the ``setToken()`` method of the - :class:`Symfony\\Component\\Security\\Core\\SecurityContextInterface`. - .. _components-security-access-decision-manager: Access Decision Manager diff --git a/components/security/firewall.rst b/components/security/firewall.rst index 64603efb319..c3fe82f4c49 100644 --- a/components/security/firewall.rst +++ b/components/security/firewall.rst @@ -34,11 +34,6 @@ certain action or resource of the application:: throw new AccessDeniedException(); } -.. versionadded:: 2.6 - As of Symfony 2.6, the :class:`Symfony\\Component\\Security\\Core\\SecurityContext` class was split - in the :class:`Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationChecker` and - :class:`Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorage` classes. - .. note:: Read the dedicated sections to learn more about :doc:`/components/security/authentication` diff --git a/components/serializer.rst b/components/serializer.rst index d2ff3066263..8f014238475 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -529,10 +529,6 @@ There are several types of normalizers available: Objects are normalized to a map of property names to property values. -.. versionadded:: 2.6 - The :class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer` - class was introduced in Symfony 2.6. - .. versionadded:: 2.7 The :class:`Symfony\\Component\\Serializer\\Normalizer\\ObjectNormalizer` class was introduced in Symfony 2.7. @@ -540,10 +536,6 @@ There are several types of normalizers available: Handling Circular References ---------------------------- -.. versionadded:: 2.6 - Handling of circular references was introduced in Symfony 2.6. In previous - versions of Symfony, circular references led to infinite loops. - Circular references are common when dealing with entity relations:: class Organization diff --git a/components/var_dumper/introduction.rst b/components/var_dumper/introduction.rst index 8f11a198c4d..0083cf3c6fc 100644 --- a/components/var_dumper/introduction.rst +++ b/components/var_dumper/introduction.rst @@ -9,9 +9,6 @@ The VarDumper Component arbitrary PHP variable. Built on top, it provides a better ``dump()`` function that you can use instead of :phpfunction:`var_dump`. -.. versionadded:: 2.6 - The VarDumper component was introduced in Symfony 2.6. - Installation ------------ @@ -79,7 +76,7 @@ DebugBundle and Twig Integration The DebugBundle allows greater integration of the component into the Symfony full-stack framework. It is enabled by default in the *dev* and *test* -environment of the standard edition since version 2.6. +environment of the Symfony Standard Edition. Since generating (even debug) output in the controller or in the model of your application may just break it by e.g. sending HTTP headers or diff --git a/cookbook/controller/error_pages.rst b/cookbook/controller/error_pages.rst index e516976128a..61c7769a5dc 100644 --- a/cookbook/controller/error_pages.rst +++ b/cookbook/controller/error_pages.rst @@ -136,10 +136,6 @@ what it looks like and debug it? Fortunately, the default ``ExceptionController`` allows you to preview your *error* pages during development. -.. versionadded:: 2.6 - This feature was introduced in Symfony 2.6. Before, the third-party - `WebfactoryExceptionsBundle`_ could be used for the same purpose. - To use this feature, you need to have a definition in your ``routing_dev.yml`` file like so: diff --git a/cookbook/controller/service.rst b/cookbook/controller/service.rst index 05c812df270..44ee81ab9f6 100644 --- a/cookbook/controller/service.rst +++ b/cookbook/controller/service.rst @@ -127,9 +127,6 @@ the route ``_controller`` value: If your controller implements the ``__invoke()`` method, you can simply refer to the service id (``app.hello_controller``). - .. versionadded:: 2.6 - Support for ``__invoke()`` was introduced in Symfony 2.6. - Alternatives to base Controller Methods --------------------------------------- diff --git a/cookbook/doctrine/mapping_model_classes.rst b/cookbook/doctrine/mapping_model_classes.rst index acace8725f2..6cbb748c1a6 100644 --- a/cookbook/doctrine/mapping_model_classes.rst +++ b/cookbook/doctrine/mapping_model_classes.rst @@ -23,12 +23,6 @@ register the mappings for your model classes. compiler pass since the `CouchDB Mapping Compiler Pass pull request`_ was merged. -.. versionadded:: 2.6 - Support for defining namespace aliases was introduced in Symfony 2.6. - It is safe to define the aliases with older versions of Symfony as - the aliases are the last argument to ``createXmlMappingDriver`` and - are ignored by PHP if that argument doesn't exist. - In your bundle class, write the following code to register the compiler pass. This one is written for the CmfRoutingBundle, so parts of it will need to be adapted for your case:: diff --git a/cookbook/doctrine/pdo_session_storage.rst b/cookbook/doctrine/pdo_session_storage.rst index fd088a4dec7..0e2c923d5d9 100644 --- a/cookbook/doctrine/pdo_session_storage.rst +++ b/cookbook/doctrine/pdo_session_storage.rst @@ -4,12 +4,6 @@ How to Use PdoSessionHandler to Store Sessions in the Database ============================================================== -.. caution:: - - There was a backwards-compatibility break in Symfony 2.6: the database - schema changed slightly. See :ref:`Symfony 2.6 Changes