Skip to content

Remove 5.x versionadded directives #15518

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
Jul 16, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ Use the ``auto`` Password Hasher

The :ref:`auto password hasher <reference-security-encoder-auto>` automatically
selects the best possible encoder/hasher depending on your PHP installation.
Starting from Symfony 5.3, the default auto hasher is ``bcrypt``.
Currently, the default auto hasher is ``bcrypt``.

Use Voters to Implement Fine-grained Security Restrictions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
9 changes: 0 additions & 9 deletions cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ The Cache component comes with a series of adapters pre-configured:
* :doc:`cache.adapter.redis </components/cache/adapters/redis_adapter>`
* :ref:`cache.adapter.redis_tag_aware <redis-tag-aware-adapter>` (Redis adapter optimized to work with tags)

.. versionadded:: 5.2

``cache.adapter.redis_tag_aware`` has been introduced in Symfony 5.2.

Some of these adapters could be configured via shortcuts. Using these shortcuts
will create pools with service IDs that follow the pattern ``cache.[type]``.

Expand Down Expand Up @@ -725,11 +721,6 @@ Clear all caches everywhere:
Encrypting the Cache
--------------------

.. versionadded:: 5.1

The :class:`Symfony\\Component\\Cache\\Marshaller\\SodiumMarshaller`
class was introduced in Symfony 5.1.

To encrypt the cache using ``libsodium``, you can use the
:class:`Symfony\\Component\\Cache\\Marshaller\\SodiumMarshaller`.

Expand Down
4 changes: 0 additions & 4 deletions components/asset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,6 @@ with the :doc:`HttpClient component </http_client>`::
$manifestUrl = 'https://cdn.example.com/rev-manifest.json';
$package = new Package(new RemoteJsonManifestVersionStrategy($manifestUrl, $httpClient));

.. versionadded:: 5.1

The ``RemoteJsonManifestVersionStrategy`` was introduced in Symfony 5.1.

Custom Version Strategies
.........................

Expand Down
8 changes: 0 additions & 8 deletions components/browser_kit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ convert the request parameters into a JSON string and set the needed HTTP header
// this encodes parameters as JSON and sets the required CONTENT_TYPE and HTTP_ACCEPT headers
$crawler = $client->jsonRequest('GET', '/', ['some_parameter' => 'some_value']);

.. versionadded:: 5.3

The ``jsonRequest()`` method was introduced in Symfony 5.3.

The :method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::xmlHttpRequest` method,
which defines the same arguments as the ``request()`` method, is a shortcut to
make AJAX requests::
Expand Down Expand Up @@ -178,10 +174,6 @@ provides access to the form properties (e.g. ``$form->getUri()``,
Custom Header Handling
~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 5.2

The ``getHeaders()`` method was introduced in Symfony 5.2.

The optional HTTP headers passed to the ``request()`` method follows the FastCGI
request format (uppercase, underscores instead of dashes and prefixed with ``HTTP_``).
Before saving those headers to the request, they are lower-cased, with ``HTTP_``
Expand Down
4 changes: 0 additions & 4 deletions components/cache/adapters/array_cache_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,3 @@ method::
// is reached, cache follows the LRU model (least recently used items are deleted)
$maxItems = 0
);

.. versionadded:: 5.1

The ``maxLifetime`` and ``maxItems`` options were introduced in Symfony 5.1.
4 changes: 0 additions & 4 deletions components/cache/adapters/couchbasebucket_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
Couchbase Cache Adapter
=======================

.. versionadded:: 5.1

The CouchbaseBucketAdapter was introduced in Symfony 5.1.

This adapter stores the values in-memory using one (or more) `Couchbase server`_
instances. Unlike the :ref:`APCu adapter <apcu-adapter>`, and similarly to the
:ref:`Memcached adapter <memcached-adapter>`, it is not limited to the current server's
Expand Down
7 changes: 0 additions & 7 deletions components/config/definition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,6 @@ The following example shows these methods in practice::
Deprecating the Option
----------------------

.. versionadded:: 5.1

The signature of the ``setDeprecated()`` method changed from
``setDeprecated(?string $message)`` to
``setDeprecated(string $package, string $version, ?string $message)``
in Symfony 5.1.

You can deprecate options using the
:method:`Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::setDeprecated`
method::
Expand Down
5 changes: 0 additions & 5 deletions components/console/helpers/cursor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
Cursor Helper
=============

.. versionadded:: 5.1

The :class:`Symfony\\Component\\Console\\Cursor` class was introduced
in Symfony 5.1.

The :class:`Symfony\\Component\\Console\\Cursor` allows you to change the
cursor position in a console command. This allows you to write on any position
of the output:
Expand Down
9 changes: 0 additions & 9 deletions components/console/helpers/questionhelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ from a predefined list::
// ... do something with the color
}

.. versionadded:: 5.2

Support for using PHP objects as choice values was introduced in Symfony 5.2.

The option which should be selected by default is provided with the third
argument of the constructor. The default is ``null``, which means that no
option is the default one.
Expand Down Expand Up @@ -242,11 +238,6 @@ You can also specify if you want to not trim the answer by setting it directly w
Accept Multiline Answers
~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 5.2

The ``setMultiline()`` and ``isMultiline()`` methods were introduced in
Symfony 5.2.

By default, the question helper stops reading user input when it receives a newline
character (i.e., when the user hits ``ENTER`` once). However, you may specify that
the response to a question should allow multiline answers by passing ``true`` to
Expand Down
4 changes: 0 additions & 4 deletions components/console/helpers/table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,6 @@ Here is a full list of things you can customize:

This method can also be used to override a built-in style.

.. versionadded:: 5.2

The option to style table cells was introduced in Symfony 5.2.

In addition to the built-in table styles, you can also apply different styles
to each table cell via :class:`Symfony\\Component\\Console\\Helper\\TableCellStyle`::

Expand Down
5 changes: 0 additions & 5 deletions components/console/single_command_tool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ Building a single Command Application
When building a command line tool, you may not need to provide several commands.
In such case, having to pass the command name each time is tedious.

.. versionadded:: 5.1

The :class:`Symfony\\Component\\Console\\SingleCommandApplication` class was
introduced in Symfony 5.1.

Fortunately, it is possible to remove this need by declaring a single command
application::

Expand Down
2 changes: 0 additions & 2 deletions components/dependency_injection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,10 @@ config files:
$services = $configurator->services();

$services->set('mailer', 'Mailer')
// the param() method was introduced in Symfony 5.2.
->args([param('mailer.transport')])
;

$services->set('newsletter_manager', 'NewsletterManager')
// In versions earlier to Symfony 5.1 the service() function was called ref()
->call('setMailer', [service('mailer')])
;
};
Expand Down
8 changes: 0 additions & 8 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,6 @@ Get all the child or ancestor nodes::
$crawler->filter('body')->children();
$crawler->filter('body > p')->ancestors();

.. versionadded:: 5.3

The ``ancestors()`` method was introduced in Symfony 5.3.

Get all the direct child nodes matching a CSS selector::

$crawler->filter('body')->children('p.lorem');
Expand Down Expand Up @@ -633,10 +629,6 @@ the whole form or specific field(s)::
Resolving a URI
~~~~~~~~~~~~~~~

.. versionadded:: 5.1

The :class:`Symfony\\Component\\DomCrawler\\UriResolver` helper class was added in Symfony 5.1.

The :class:`Symfony\\Component\\DomCrawler\\UriResolver` class takes an URI
(relative, absolute, fragment, etc.) and turns it into an absolute URI against
another given base URI::
Expand Down
4 changes: 0 additions & 4 deletions components/filesystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,6 @@ exception on failure::
// returns a path like : /tmp/prefix_wyjgtF.png
$filesystem->tempnam('/tmp', 'prefix_', '.png');

.. versionadded:: 5.1

The option to set a suffix in ``tempnam()`` was introduced in Symfony 5.1.

``dumpFile``
~~~~~~~~~~~~

Expand Down
22 changes: 0 additions & 22 deletions components/http_foundation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,6 @@ If the request body is a JSON string, it can be accessed using

$data = $request->toArray();

.. versionadded:: 5.2

The ``toArray()`` method was introduced in Symfony 5.2.

Identifying a Request
~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -288,10 +284,6 @@ this complexity and defines some methods for the most common tasks::
HeaderUtils::parseQuery('foo[bar.baz]=qux');
// => ['foo' => ['bar.baz' => 'qux']]

.. versionadded:: 5.2

The ``parseQuery()`` method was introduced in Symfony 5.2.

Accessing ``Accept-*`` Headers Data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -475,10 +467,6 @@ a new object with the modified property::
->withDomain('.example.com')
->withSecure(true);

.. versionadded:: 5.1

The ``with*()`` methods were introduced in Symfony 5.1.

Managing the HTTP Cache
~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -523,11 +511,6 @@ call::
'etag' => 'abcdef',
]);

.. versionadded:: 5.1

The ``must_revalidate``, ``no_cache``, ``no_store``, ``no_transform`` and
``proxy_revalidate`` directives were introduced in Symfony 5.1.

To check if the Response validators (``ETag``, ``Last-Modified``) match a
conditional value specified in the client Request, use the
:method:`Symfony\\Component\\HttpFoundation\\Response::isNotModified`
Expand Down Expand Up @@ -766,11 +749,6 @@ Symfony offers two methods to interact with this preference:
* :method:`Symfony\\Component\\HttpFoundation\\Request::preferSafeContent`;
* :method:`Symfony\\Component\\HttpFoundation\\Response::setContentSafe`;

.. versionadded:: 5.1

The ``preferSafeContent()`` and ``setContentSafe()`` methods were introduced
in Symfony 5.1.

The following example shows how to detect if the user agent prefers "safe" content::

if ($request->preferSafeContent()) {
Expand Down
22 changes: 0 additions & 22 deletions components/http_foundation/sessions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,6 @@ and "Remember Me" login settings or other user based state information.
:class:`Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag`
This is the standard default implementation.

:class:`Symfony\\Component\\HttpFoundation\\Session\\Attribute\\NamespacedAttributeBag`
This implementation allows for attributes to be stored in a structured namespace.

.. deprecated:: 5.3

The ``NamespacedAttributeBag`` class is deprecated since Symfony 5.3.
If you need this feature, you will have to implement the class yourself.

:class:`Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface`
has the API

Expand Down Expand Up @@ -242,20 +234,6 @@ So any processing of this might quickly get ugly, even adding a token to the arr
$tokens['c'] = $value;
$session->set('tokens', $tokens);

.. deprecated:: 5.3

The ``NamespacedAttributeBag`` class is deprecated since Symfony 5.3.
If you need this feature, you will have to implement the class yourself.

With structured namespacing, the key can be translated to the array
structure like this using a namespace character (which defaults to ``/``)::

// ...
use Symfony\Component\HttpFoundation\Session\Attribute\NamespacedAttributeBag;

$session = new Session(new NativeSessionStorage(), new NamespacedAttributeBag());
$session->set('tokens/c', $value);

Flash Messages
~~~~~~~~~~~~~~

Expand Down
8 changes: 0 additions & 8 deletions components/intl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,6 @@ can change if the number is used in cash transactions or in other scenarios
$fractionDigits = Currencies::getFractionDigits('SEK'); // returns: 2
$cashFractionDigits = Currencies::getCashFractionDigits('SEK'); // returns: 0

.. versionadded:: 5.3

The ``getCashFractionDigits()`` method was introduced in Symfony 5.3.

Some currencies require to round numbers to the nearest increment of some value
(e.g. 5 cents). This increment might be different if numbers are formatted for
cash transactions or other scenarios (e.g. accounting)::
Expand All @@ -268,10 +264,6 @@ cash transactions or other scenarios (e.g. accounting)::
$roundingIncrement = Currencies::getRoundingIncrement('CAD'); // returns: 0
$cashRoundingIncrement = Currencies::getCashRoundingIncrement('CAD'); // returns: 5

.. versionadded:: 5.3

The ``getCashRoundingIncrement()`` method was introduced in Symfony 5.3.

All methods (except for ``getFractionDigits()``, ``getCashFractionDigits()``,
``getRoundingIncrement()`` and ``getCashRoundingIncrement()``) accept the
translation locale as the last, optional parameter, which defaults to the
Expand Down
5 changes: 0 additions & 5 deletions components/ldap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,6 @@ delete existing ones::
// Removing an existing entry
$entryManager->remove(new Entry('cn=Test User,dc=symfony,dc=com'));

.. versionadded:: 5.3

The option to make attribute names case-insensitive in ``getAttribute()``
and ``hasAttribute()`` was introduced in Symfony 5.3.

Batch Updating
______________

Expand Down
24 changes: 3 additions & 21 deletions components/lock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,9 @@ they can be decorated with the ``RetryTillSaveStore`` class::
When the provided store does not implement the
:class:`Symfony\\Component\\Lock\\BlockingStoreInterface` interface, the
``Lock`` class will retry to acquire the lock in a non-blocking way until the
lock is acquired.

.. deprecated:: 5.2

As of Symfony 5.2, you don't need to use the ``RetryTillSaveStore`` class
anymore. The ``Lock`` class now provides the default logic to acquire locks
in blocking mode when the store does not implement the
``BlockingStoreInterface`` interface.
lock is acquired. However, the ``Lock`` class also provides the default logic to
acquire locks in blocking mode when the store does not implement the
``BlockingStoreInterface`` interface.

Expiring Locks
--------------
Expand Down Expand Up @@ -242,11 +237,6 @@ or until ``Lock::release()`` is called.
Shared Locks
------------

.. versionadded:: 5.2

Shared locks (and the associated ``acquireRead()`` method and
``SharedLockStoreInterface``) were introduced in Symfony 5.2.

A shared or `readers–writer lock`_ is a synchronization primitive that allows
concurrent access for read-only operations, while write operations require
exclusive access. This means that multiple threads can read the data in parallel
Expand Down Expand Up @@ -410,10 +400,6 @@ support blocking, and expects a TTL to avoid stalled locks::
MongoDbStore
~~~~~~~~~~~~

.. versionadded:: 5.1

The ``MongoDbStore`` was introduced in Symfony 5.1.

The MongoDbStore saves locks on a MongoDB server ``>=2.2``, it requires a
``\MongoDB\Collection`` or ``\MongoDB\Client`` from `mongodb/mongodb`_ or a
`MongoDB Connection String`_.
Expand Down Expand Up @@ -510,10 +496,6 @@ locks::
In opposite to the ``PdoStore``, the ``PostgreSqlStore`` does not need a table to
store locks and does not expire.

.. versionadded:: 5.2

The ``PostgreSqlStore`` was introduced in Symfony 5.2.

.. _lock-store-redis:

RedisStore
Expand Down
Loading