diff --git a/best_practices.rst b/best_practices.rst index 4928c79a6f9..51d3e61e2b7 100644 --- a/best_practices.rst +++ b/best_practices.rst @@ -368,7 +368,7 @@ Use the ``auto`` Password Hasher The :ref:`auto password hasher ` 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/cache.rst b/cache.rst index 632f5f4905f..6025593c386 100644 --- a/cache.rst +++ b/cache.rst @@ -107,10 +107,6 @@ The Cache component comes with a series of adapters pre-configured: * :doc:`cache.adapter.redis ` * :ref:`cache.adapter.redis_tag_aware ` (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]``. @@ -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`. diff --git a/components/asset.rst b/components/asset.rst index 5044ef2dab9..6cf0264dd3d 100644 --- a/components/asset.rst +++ b/components/asset.rst @@ -179,10 +179,6 @@ with the :doc:`HttpClient component `:: $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 ......................... diff --git a/components/browser_kit.rst b/components/browser_kit.rst index 475c84b9365..b93697f7bb9 100644 --- a/components/browser_kit.rst +++ b/components/browser_kit.rst @@ -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:: @@ -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_`` diff --git a/components/cache/adapters/array_cache_adapter.rst b/components/cache/adapters/array_cache_adapter.rst index c7b06f40753..baa7f840590 100644 --- a/components/cache/adapters/array_cache_adapter.rst +++ b/components/cache/adapters/array_cache_adapter.rst @@ -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. diff --git a/components/cache/adapters/couchbasebucket_adapter.rst b/components/cache/adapters/couchbasebucket_adapter.rst index 7043a7c3e95..2ebb42c5f9f 100644 --- a/components/cache/adapters/couchbasebucket_adapter.rst +++ b/components/cache/adapters/couchbasebucket_adapter.rst @@ -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 `, and similarly to the :ref:`Memcached adapter `, it is not limited to the current server's diff --git a/components/config/definition.rst b/components/config/definition.rst index dfe9f8e166a..bc57336391d 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -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:: diff --git a/components/console/helpers/cursor.rst b/components/console/helpers/cursor.rst index da450925fc3..deffbef9be9 100644 --- a/components/console/helpers/cursor.rst +++ b/components/console/helpers/cursor.rst @@ -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: diff --git a/components/console/helpers/questionhelper.rst b/components/console/helpers/questionhelper.rst index 96ed044d0bc..b1ae67dfd7f 100644 --- a/components/console/helpers/questionhelper.rst +++ b/components/console/helpers/questionhelper.rst @@ -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. @@ -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 diff --git a/components/console/helpers/table.rst b/components/console/helpers/table.rst index 5e1735ce1a4..ae16799c18c 100644 --- a/components/console/helpers/table.rst +++ b/components/console/helpers/table.rst @@ -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`:: diff --git a/components/console/single_command_tool.rst b/components/console/single_command_tool.rst index 500d679d1e1..d4e36d55492 100644 --- a/components/console/single_command_tool.rst +++ b/components/console/single_command_tool.rst @@ -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:: diff --git a/components/dependency_injection.rst b/components/dependency_injection.rst index b303e96d484..91aacc91b01 100644 --- a/components/dependency_injection.rst +++ b/components/dependency_injection.rst @@ -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')]) ; }; diff --git a/components/dom_crawler.rst b/components/dom_crawler.rst index 8df1b8c8f67..4a3eba6610b 100644 --- a/components/dom_crawler.rst +++ b/components/dom_crawler.rst @@ -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'); @@ -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:: diff --git a/components/filesystem.rst b/components/filesystem.rst index 447c95f7ff5..aa7cef95894 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -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`` ~~~~~~~~~~~~ diff --git a/components/http_foundation.rst b/components/http_foundation.rst index 9fa9ab6e33c..9553f417eda 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -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 ~~~~~~~~~~~~~~~~~~~~~ @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~ @@ -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` @@ -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()) { diff --git a/components/http_foundation/sessions.rst b/components/http_foundation/sessions.rst index 5756a38fc58..d6d32501966 100644 --- a/components/http_foundation/sessions.rst +++ b/components/http_foundation/sessions.rst @@ -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 @@ -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 ~~~~~~~~~~~~~~ diff --git a/components/intl.rst b/components/intl.rst index 217b9618bc2..304b0143bc6 100644 --- a/components/intl.rst +++ b/components/intl.rst @@ -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):: @@ -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 diff --git a/components/ldap.rst b/components/ldap.rst index 08caf52b3e8..21ef7a8bcfb 100644 --- a/components/ldap.rst +++ b/components/ldap.rst @@ -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 ______________ diff --git a/components/lock.rst b/components/lock.rst index 118c7015771..12e4aed8c83 100644 --- a/components/lock.rst +++ b/components/lock.rst @@ -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 -------------- @@ -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 @@ -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`_. @@ -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 diff --git a/components/options_resolver.rst b/components/options_resolver.rst index 5b32a612a51..0be9639814d 100644 --- a/components/options_resolver.rst +++ b/components/options_resolver.rst @@ -720,10 +720,6 @@ In same way, parent options can access to the nested options as normal arrays:: Prototype Options ~~~~~~~~~~~~~~~~~ -.. versionadded:: 5.3 - - Prototype options were introduced in Symfony 5.3. - There are situations where you will have to resolve and validate a set of options that may repeat many times within another option. Let's imagine a ``connections`` option that will accept an array of database connections @@ -769,13 +765,6 @@ connections. Deprecating the Option ~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 5.1 - - The signature of the ``setDeprecated()`` method changed from - ``setDeprecated(string $option, ?string $message)`` to - ``setDeprecated(string $option, string $package, string $version, $message)`` - in Symfony 5.1. - Once an option is outdated or you decided not to maintain it anymore, you can deprecate it using the :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::setDeprecated` method:: @@ -870,10 +859,6 @@ method:: } } -.. versionadded:: 5.1 - - The ``define()`` and ``info()`` methods were introduced in Symfony 5.1. - Performance Tweaks ~~~~~~~~~~~~~~~~~~ diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index adde598b1ec..bfbab0afdaf 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -313,11 +313,6 @@ Then, you can run the following command to use that file and ignore those deprec $ SYMFONY_DEPRECATIONS_HELPER='baselineFile=./tests/allowed.json' ./vendor/bin/simple-phpunit -.. versionadded:: 5.2 - - The ``baselineFile`` and ``generateBaseline`` options were introduced in - Symfony 5.2. - Disabling the Verbose Output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -329,10 +324,6 @@ It's also possible to change verbosity per deprecation type. For example, using ``quiet[]=indirect&quiet[]=other`` will hide details for deprecations of types "indirect" and "other". -.. versionadded:: 5.1 - - The ``quiet`` option was introduced in Symfony 5.1. - Disabling the Deprecation Helper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -375,20 +366,12 @@ the compiling and warming up of the container: $ php bin/console debug:container --deprecations -.. versionadded:: 5.1 - - The ``--deprecations`` option was introduced in Symfony 5.1. - Log Deprecations ~~~~~~~~~~~~~~~~ For turning the verbose output off and write it to a log file instead you can use ``SYMFONY_DEPRECATIONS_HELPER='logFile=/path/deprecations.log'``. -.. versionadded:: 5.3 - - The ``logFile`` option was introduced in Symfony 5.3. - Write Assertions about Deprecations ----------------------------------- @@ -424,11 +407,6 @@ times (order matters):: } } -.. deprecated:: 5.1 - - Symfony versions previous to 5.1 also included a ``@expectedDeprecation`` - annotation to test deprecations, but it was deprecated in favor of the method. - Display the Full Stack Trace ---------------------------- @@ -935,11 +913,6 @@ If you have installed the bridge through Composer, you can run it by calling e.g of PHPUnit to be considered. This is useful when testing a framework that does not support the latest version(s) of PHPUnit. -.. versionadded:: 5.2 - - The ``SYMFONY_MAX_PHPUNIT_VERSION`` env variable was introduced in - Symfony 5.2. - .. tip:: If you still need to use ``prophecy`` (but not ``symfony/yaml``), @@ -954,11 +927,6 @@ If you have installed the bridge through Composer, you can run it by calling e.g env variable. This is specially useful for installing PHPUnit plugins without having to add them to your main ``composer.json`` file. -.. versionadded:: 5.3 - - The ``SYMFONY_PHPUNIT_REQUIRE`` env variable was introduced in - Symfony 5.3. - Code Coverage Listener ---------------------- diff --git a/components/process.rst b/components/process.rst index 1182b1c32a1..f396c9760f7 100644 --- a/components/process.rst +++ b/components/process.rst @@ -105,10 +105,6 @@ with a non-zero code):: Configuring Process Options --------------------------- -.. versionadded:: 5.2 - - The feature to configure process options was introduced in Symfony 5.2. - Symfony uses the PHP :phpfunction:`proc_open` function to run the processes. You can configure the options passed to the ``other_options`` argument of ``proc_open()`` using the ``setOptions()`` method:: @@ -452,10 +448,6 @@ check regularly:: You can get the process start time using the ``getStartTime()`` method. - .. versionadded:: 5.1 - - The ``getStartTime()`` method was introduced in Symfony 5.1. - .. _reference-process-signal: Process Idle Timeout diff --git a/components/property_access.rst b/components/property_access.rst index c8b674293a1..0a474f061a4 100644 --- a/components/property_access.rst +++ b/components/property_access.rst @@ -215,10 +215,10 @@ The ``getValue()`` method can also use the magic ``__get()`` method:: var_dump($propertyAccessor->getValue($person, 'Wouter')); // [...] -.. versionadded:: 5.2 +.. note:: - The magic ``__get()`` method can be disabled since in Symfony 5.2. - see `Enable other Features`_. + The ``__get()`` method support is enabled by default. + See `Enable other Features`_ if you want to disable it. .. _components-property-access-magic-call: @@ -356,10 +356,10 @@ see `Enable other Features`_:: var_dump($person->getWouter()); // [...] -.. versionadded:: 5.2 +.. note:: - The magic ``__set()`` method can be disabled since in Symfony 5.2. - see `Enable other Features`_. + The ``__set()`` method support is enabled by default. + See `Enable other Features`_ if you want to disable it. Writing to Array Properties ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/components/property_info.rst b/components/property_info.rst index 5a4e62b6cd2..0e50679c366 100644 --- a/components/property_info.rst +++ b/components/property_info.rst @@ -441,10 +441,6 @@ If ``serializer_groups`` is set to ``null``, serializer groups metadata won't be checked but you will get only the properties considered by the Serializer Component (notably the ``@Ignore`` annotation is taken into account). -.. versionadded:: 5.2 - - Support for the ``null`` value in ``serializer_groups`` was introduced in Symfony 5.2. - DoctrineExtractor ~~~~~~~~~~~~~~~~~ diff --git a/components/runtime.rst b/components/runtime.rst index e716ec6eb38..345d8f8cbc5 100644 --- a/components/runtime.rst +++ b/components/runtime.rst @@ -9,10 +9,6 @@ The Runtime Component to make sure the application can run with runtimes like PHP-FPM, ReactPHP, Swoole, etc. without any changes. -.. versionadded:: 5.3 - - The Runtime component was introduced in Symfony 5.3. - Installation ------------ @@ -362,12 +358,6 @@ logic could be versioned as a part of a normal package. If the application author decides to use this component, the package maintainer of the Runtime class will have more control and can fix bugs and add features. -.. note:: - - Before Symfony 5.3, the Symfony bootstrap logic was part of a Flex recipe. - Since recipes are rarely updated by users, bug patches would rarely be - installed. - The Runtime component is designed to be totally generic and able to run any application outside of the global state in 6 steps: diff --git a/components/security/authentication.rst b/components/security/authentication.rst index 9cca9f18d9f..629012a748c 100644 --- a/components/security/authentication.rst +++ b/components/security/authentication.rst @@ -130,8 +130,6 @@ password was valid:: use Symfony\Component\Security\Core\User\InMemoryUserProvider; use Symfony\Component\Security\Core\User\UserChecker; - // The 'InMemoryUser' class was introduced in Symfony 5.3. - // In previous versions it was called 'User' $userProvider = new InMemoryUserProvider( [ 'admin' => [ diff --git a/components/security/authorization.rst b/components/security/authorization.rst index ffc4edc278a..bc5906a5342 100644 --- a/components/security/authorization.rst +++ b/components/security/authorization.rst @@ -54,10 +54,6 @@ recognizes several strategies: ``priority`` grants or denies access by the first voter that does not abstain; - .. versionadded:: 5.1 - - The ``priority`` version strategy was introduced in Symfony 5.1. - Usage of the available options in detail:: use Symfony\Component\Security\Core\Authorization\AccessDecisionManager; @@ -117,11 +113,6 @@ It also supports the attributes ``IS_ANONYMOUS``, ``IS_REMEMBERED``, ``IS_IMPERSONATOR`` to grant access based on a specific state of authentication. -.. versionadded:: 5.1 - - The ``IS_ANONYMOUS``, ``IS_REMEMBERED`` and ``IS_IMPERSONATOR`` - attributes were introduced in Symfony 5.1. - :: use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver; diff --git a/components/security/secure_tools.rst b/components/security/secure_tools.rst index a9d6e0fec3a..47c17e09380 100644 --- a/components/security/secure_tools.rst +++ b/components/security/secure_tools.rst @@ -7,9 +7,9 @@ also use them if you want to solve the problem they address. .. note:: - The functions described in this article were introduced in PHP 5.6 or 7. - For older PHP versions, a polyfill is provided by the - `Symfony Polyfill Component`_. + The functions described in this article are available in modern PHP versions. + If your project uses a legacy PHP version, you can use them thanks to some + of the polyfills provided by the `Symfony Polyfill Component`_. Comparing Strings ~~~~~~~~~~~~~~~~~ diff --git a/components/semaphore.rst b/components/semaphore.rst index ebae3df89e8..82d97c27977 100644 --- a/components/semaphore.rst +++ b/components/semaphore.rst @@ -8,10 +8,6 @@ The Semaphore Component The Semaphore Component manages `semaphores`_, a mechanism to provide exclusive access to a shared resource. -.. versionadded:: 5.2 - - The Semaphore Component was introduced in Symfony 5.2. - Installation ------------ diff --git a/components/serializer.rst b/components/serializer.rst index 9c8b73a04a1..78fbdf9284e 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -899,14 +899,6 @@ The Serializer component provides several built-in normalizers: Also it can denormalize ``uuid`` or ``ulid`` strings to :class:`Symfony\\Component\\Uid\\Uuid` or :class:`Symfony\\Component\\Uid\\Ulid`. The format does not matter. -.. versionadded:: 5.2 - - The ``UidNormalizer`` was introduced in Symfony 5.2. - -.. versionadded:: 5.3 - - The ``UidNormalizer`` normalization formats were introduced in Symfony 5.3. - .. _component-serializer-encoders: Encoders @@ -1004,10 +996,6 @@ Option Description D ``output_utf8_bom`` Outputs special `UTF-8 BOM`_ along with encoded data ``false`` ======================= ===================================================== ========================== -.. versionadded:: 5.3 - - The ``csv_end_of_line`` option was introduced in Symfony 5.3. - The ``XmlEncoder`` ~~~~~~~~~~~~~~~~~~ diff --git a/components/string.rst b/components/string.rst index 48f17f0b3e9..1c9d4245076 100644 --- a/components/string.rst +++ b/components/string.rst @@ -8,10 +8,6 @@ The String Component The String component provides a single object-oriented API to work with three "unit systems" of strings: bytes, code points and grapheme clusters. -.. versionadded:: 5.0 - - The String component was introduced in Symfony 5.0. - Installation ------------ @@ -129,10 +125,6 @@ to make your code more concise:: // creates a UnicodeString object $foo = s('अनुच्छेद'); -.. versionadded:: 5.1 - - The ``s()`` function was introduced in Symfony 5.1. - There are also some specialized constructors:: // ByteString can create a random string of the given length @@ -146,10 +138,6 @@ There are also some specialized constructors:: $foo = UnicodeString::fromCodePoints(0x928, 0x92E, 0x938, 0x94D, 0x924, 0x947); // equivalent to: $foo = new UnicodeString('नमस्ते'); -.. versionadded:: 5.1 - - The second argument of ``ByteString::fromRandom()`` was introduced in Symfony 5.1. - Methods to Transform String Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -354,10 +342,6 @@ Methods to Search and Replace return '['.$match[0].']'; }); // result = '[1][2][3]' -.. versionadded:: 5.1 - - The ``containsAny()`` method was introduced in Symfony 5.1. - Methods to Join, Split, Truncate and Reverse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -388,10 +372,6 @@ Methods to Join, Split, Truncate and Reverse // even if that generates a string longer than the desired length u('Lorem Ipsum')->truncate(8, '…', false); // 'Lorem Ipsum' -.. versionadded:: 5.1 - - The third argument of ``truncate()`` was introduced in Symfony 5.1. - :: // breaks the string into lines of the given length @@ -414,10 +394,6 @@ Methods to Join, Split, Truncate and Reverse u('foo bar')->reverse(); // 'rab oof' u('さよなら')->reverse(); // 'らなよさ' -.. versionadded:: 5.1 - - The ``reverse()`` method was introduced in Symfony 5.1. - Methods Added by ByteString ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -488,18 +464,6 @@ that only includes safe ASCII characters:: return str_replace('❤️', 'love', $string); }); -.. versionadded:: 5.1 - - The feature to define additional substitutions was introduced in Symfony 5.1. - -.. versionadded:: 5.2 - - The feature to use a PHP closure to define substitutions was introduced in Symfony 5.2. - -.. versionadded:: 5.3 - - The feature to fallback to the parent locale's symbols map was introduced in Symfony 5.3. - The separator between words is a dash (``-``) by default, but you can define another separator as the second argument:: @@ -544,10 +508,6 @@ the injected slugger is the same as the request locale:: Inflector --------- -.. versionadded:: 5.1 - - The inflector feature was introduced in Symfony 5.1. - In some scenarios such as code generation and code introspection, you need to convert words from/to singular/plural. For example, to know the property associated with an *adder* method, you must convert from plural diff --git a/components/uid.rst b/components/uid.rst index d6b3692be45..8a5c9d8cd7a 100644 --- a/components/uid.rst +++ b/components/uid.rst @@ -8,10 +8,6 @@ The UID Component The UID component provides utilities to work with `unique identifiers`_ (UIDs) such as UUIDs and ULIDs. -.. versionadded:: 5.1 - - The UID component was introduced in Symfony 5.1. - Installation ------------ @@ -67,11 +63,6 @@ to create each type of UUID:: // It's defined in http://gh.peabody.io/uuidv6/ $uuid = Uuid::v6(); // $uuid is an instance of Symfony\Component\Uid\UuidV6 -.. versionadded:: 5.3 - - The ``Uuid::NAMESPACE_*`` constants and the namespace string values (``'dns'``, - ``'url'``, etc.) were introduced in Symfony 5.3. - If your UUID value is already generated in another format, use any of the following methods to create a ``Uuid`` object from it:: @@ -82,11 +73,6 @@ following methods to create a ``Uuid`` object from it:: $uuid = Uuid::fromBase58('TuetYWNHhmuSQ3xPoVLv9M'); $uuid = Uuid::fromRfc4122('d9e7a184-5d5b-11ea-a62a-3499710062d0'); -.. versionadded:: 5.3 - - The ``fromBinary()``, ``fromBase32()``, ``fromBase58()`` and ``fromRfc4122()`` - methods were introduced in Symfony 5.3. - Converting UUIDs ~~~~~~~~~~~~~~~~ @@ -133,11 +119,6 @@ UUID objects created with the ``Uuid`` class can use the following methods // * int < 0 if $uuid1 is less than $uuid4 $uuid1->compare($uuid4); // e.g. int(4) -.. versionadded:: 5.3 - - The ``getDateTime()`` method was introduced in Symfony 5.3. In previous - versions it was called ``getTime()``. - Storing UUIDs in Databases ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -162,10 +143,6 @@ type, which converts to/from UUID objects automatically:: // ... } -.. versionadded:: 5.2 - - The UUID type was introduced in Symfony 5.2. - There is no generator to assign UUIDs automatically as the value of your entity primary keys, but you can use the following:: @@ -264,11 +241,6 @@ following methods to create a ``Ulid`` object from it:: $ulid = Ulid::fromBase58('1BKocMc5BnrVcuq2ti4Eqm'); $ulid = Ulid::fromRfc4122('0171069d-593d-97d3-8b3e-23d06de5b308'); -.. versionadded:: 5.3 - - The ``fromBinary()``, ``fromBase32()``, ``fromBase58()`` and ``fromRfc4122()`` - methods were introduced in Symfony 5.3. - Converting ULIDs ~~~~~~~~~~~~~~~~ @@ -302,11 +274,6 @@ ULID objects created with the ``Ulid`` class can use the following methods:: // this method returns $ulid1 <=> $ulid2 $ulid1->compare($ulid2); // e.g. int(-1) -.. versionadded:: 5.3 - - The ``getDateTime()`` method was introduced in Symfony 5.3. In previous - versions it was called ``getTime()``. - Storing ULIDs in Databases ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -361,10 +328,6 @@ entity primary keys:: } -.. versionadded:: 5.2 - - The ULID type and generator were introduced in Symfony 5.2. - When using built-in Doctrine repository methods (e.g. ``findOneBy()``), Doctrine knows how to convert these ULID types to build the SQL query (e.g. ``->findOneBy(['user' => $user->getUlid()])``). However, when using DQL @@ -397,10 +360,6 @@ of the ULID parameters:: Generating and Inspecting UUIDs/ULIDs in the Console ---------------------------------------------------- -.. versionadded:: 5.3 - - The commands to inspect and generate UUIDs/ULIDs were introduced in Symfony 5.3. - This component provides several commands to generate and inspect UUIDs/ULIDs in the console. They are not enabled by default, so you must add the following configuration in your application before using these commands: diff --git a/components/var_dumper.rst b/components/var_dumper.rst index b661bd7a44a..76a20c289be 100644 --- a/components/var_dumper.rst +++ b/components/var_dumper.rst @@ -191,10 +191,6 @@ Then you can use the following command to start a server out-of-the-box: Configuring the Dump Server with Environment Variables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 5.2 - - The ``VAR_DUMPER_FORMAT=server`` feature was introduced in Symfony 5.2. - If you prefer to not modify the application configuration (e.g. to quickly debug a project given to you) use the ``VAR_DUMPER_FORMAT`` env var. diff --git a/components/yaml/yaml_format.rst b/components/yaml/yaml_format.rst index 0cca9901836..f38addb8281 100644 --- a/components/yaml/yaml_format.rst +++ b/components/yaml/yaml_format.rst @@ -124,12 +124,6 @@ Numbers # an octal 0o14 -.. deprecated:: 5.1 - - In YAML 1.1, octal numbers use the notation ``0...``, whereas in YAML 1.2 - the notation changes to ``0o...``. Symfony 5.1 added support for YAML 1.2 - notation and deprecated support for YAML 1.1 notation. - .. code-block:: yaml # an hexadecimal diff --git a/configuration.rst b/configuration.rst index 3a42a45680f..f44344fed89 100644 --- a/configuration.rst +++ b/configuration.rst @@ -919,11 +919,6 @@ parameters at once by type-hinting any of its constructor arguments with the Using PHP ConfigBuilders ------------------------ -.. versionadded:: 5.3 - - The "ConfigBuilders" feature was introduced in Symfony 5.3 as an - :doc:`experimental feature `. - Writing PHP config is sometimes difficult because you end up with large nested arrays and you have no autocompletion help from your favorite IDE. A way to address this is to use "ConfigBuilders". They are objects that will help you diff --git a/configuration/env_var_processors.rst b/configuration/env_var_processors.rst index a12b63a7a3e..1895a01b7cc 100644 --- a/configuration/env_var_processors.rst +++ b/configuration/env_var_processors.rst @@ -151,11 +151,6 @@ Symfony provides the following env var processors: }; ``env(not:FOO)`` - - .. versionadded:: 5.3 - - The ``not:`` env var processor was introduced in Symfony 5.3. - Casts ``FOO`` to a bool (just as ``env(bool:...)`` does) except it returns the inverted value (falsy values are returned as ``true``, truthy values are returned as ``false``): diff --git a/console.rst b/console.rst index 80ae5fd7cd5..40793b89b09 100644 --- a/console.rst +++ b/console.rst @@ -64,15 +64,6 @@ want a command to create a user:: } } -.. versionadded:: 5.1 - - The ``Command::SUCCESS`` and ``Command::FAILURE`` constants were introduced - in Symfony 5.1. - -.. versionadded:: 5.3 - - The ``Command::INVALID`` constant was introduced in Symfony 5.3 - Configuring the Command ----------------------- @@ -397,15 +388,6 @@ console:: If you are using a :doc:`single-command application `, call ``setAutoExit(false)`` on it to get the command result in ``CommandTester``. -.. versionadded:: 5.2 - - The ``setAutoExit()`` method for single-command applications was introduced - in Symfony 5.2. - -.. versionadded:: 5.4 - - The ``assertCommandIsSuccessful()`` method was introduced in Symfony 5.4. - .. tip:: You can also test a whole console application by using diff --git a/console/coloring.rst b/console/coloring.rst index 7e77a090b25..32d86087ebb 100644 --- a/console/coloring.rst +++ b/console/coloring.rst @@ -50,14 +50,6 @@ Any hex color is supported for foreground and background colors. Besides that, t ``gray``, ``bright-red``, ``bright-green``, ``bright-yellow``, ``bright-blue``, ``bright-magenta``, ``bright-cyan`` and ``bright-white``. -.. versionadded:: 5.2 - - True (hex) color support was introduced in Symfony 5.2 - -.. versionadded:: 5.3 - - Support for bright colors was introduced in Symfony 5.3. - .. note:: If the terminal doesn't support true colors, the nearest named color is used. diff --git a/console/input.rst b/console/input.rst index 3bbba7e5fce..fa0ae899c0e 100644 --- a/console/input.rst +++ b/console/input.rst @@ -221,10 +221,6 @@ There are five option variants you can use: Accept either the flag (e.g. ``--yell``) or its negation (e.g. ``--no-yell``). -.. versionadded:: 5.3 - - The ``InputOption::VALUE_NEGATABLE`` constant was introduced in Symfony 5.3. - You can combine ``VALUE_IS_ARRAY`` with ``VALUE_REQUIRED`` or ``VALUE_OPTIONAL`` like this:: diff --git a/console/lockable_trait.rst b/console/lockable_trait.rst index e3c26372cfe..02f635f5788 100644 --- a/console/lockable_trait.rst +++ b/console/lockable_trait.rst @@ -43,8 +43,4 @@ that adds two convenient methods to lock and release commands:: } } -.. versionadded:: 5.1 - - The ``Command::SUCCESS`` constant was introduced in Symfony 5.1. - .. _`locks`: https://en.wikipedia.org/wiki/Lock_(computer_science) diff --git a/console/style.rst b/console/style.rst index c680e3703df..b4bf70e2820 100644 --- a/console/style.rst +++ b/console/style.rst @@ -342,10 +342,6 @@ Result Methods 'Consectetur adipiscing elit', ]); -.. versionadded:: 5.2 - - The ``info()`` method was introduced in Symfony 5.2. - :method:`Symfony\\Component\\Console\\Style\\SymfonyStyle::warning` It displays the given string or array of strings highlighted as a warning message (with a red background and the ``[WARNING]`` label). It's meant to be diff --git a/contributing/documentation/format.rst b/contributing/documentation/format.rst index 2c465096f0b..c2b6d16fba3 100644 --- a/contributing/documentation/format.rst +++ b/contributing/documentation/format.rst @@ -174,32 +174,32 @@ If you are documenting a brand new feature, a change or a deprecation that's been made in Symfony, you should precede your description of the change with the corresponding directive and a short description: -For a new feature or a behavior change use the ``.. versionadded:: 5.x`` +For a new feature or a behavior change use the ``.. versionadded:: 6.x`` directive: .. code-block:: rst - .. versionadded:: 5.2 + .. versionadded:: 6.2 - ... ... ... was introduced in Symfony 5.2. + ... ... ... was introduced in Symfony 6.2. If you are documenting a behavior change, it may be helpful to *briefly* describe how the behavior has changed: .. code-block:: rst - .. versionadded:: 5.2 + .. versionadded:: 6.2 - ... ... ... was introduced in Symfony 5.2. Prior to this, + ... ... ... was introduced in Symfony 6.2. Prior to this, ... ... ... ... ... ... ... ... . -For a deprecation use the ``.. deprecated:: 5.x`` directive: +For a deprecation use the ``.. deprecated:: 6.x`` directive: .. code-block:: rst - .. deprecated:: 5.2 + .. deprecated:: 6.2 - ... ... ... was deprecated in Symfony 5.2. + ... ... ... was deprecated in Symfony 6.2. Whenever a new major version of Symfony is released (e.g. 6.0, 7.0, etc), a new branch of the documentation is created from the ``master`` branch. diff --git a/deployment/proxies.rst b/deployment/proxies.rst index 62d5c182c1e..065044a1b24 100644 --- a/deployment/proxies.rst +++ b/deployment/proxies.rst @@ -81,12 +81,6 @@ and what headers your reverse proxy uses to send information: ; }; -.. deprecated:: 5.2 - - In previous Symfony versions, the above example used ``HEADER_X_FORWARDED_ALL`` - to trust all "X-Forwarded-" headers, but that constant is deprecated since - Symfony 5.2 in favor of the individual ``HEADER_X_FORWARDED_*`` constants. - .. caution:: Enabling the ``Request::HEADER_X_FORWARDED_HOST`` option exposes the @@ -97,13 +91,6 @@ The Request object has several ``Request::HEADER_*`` constants that control exac *which* headers from your reverse proxy are trusted. The argument is a bit field, so you can also pass your own value (e.g. ``0b00110``). -.. versionadded:: 5.2 - - The feature to configure trusted proxies and headers with ``trusted_proxies`` - and ``trusted_headers`` options was introduced in Symfony 5.2. In earlier - Symfony versions you needed to use the ``Request::setTrustedProxies()`` - method in the ``public/index.php`` file. - .. caution:: The "trusted proxies" feature does not work as expected when using the diff --git a/doctrine/events.rst b/doctrine/events.rst index abe574a1867..f8029b3fe2b 100644 --- a/doctrine/events.rst +++ b/doctrine/events.rst @@ -524,10 +524,6 @@ can do it in the service configuration: ; }; -.. versionadded:: 5.3 - - Subscriber priority was introduced in Symfony 5.3. - .. tip:: Symfony loads (and instantiates) Doctrine subscribers whenever the diff --git a/event_dispatcher.rst b/event_dispatcher.rst index 794a09bb83b..62880a973af 100644 --- a/event_dispatcher.rst +++ b/event_dispatcher.rst @@ -220,8 +220,6 @@ a "main" request or a "sub request":: { public function onKernelRequest(RequestEvent $event) { - // The isMainRequest() method was introduced in Symfony 5.3. - // In previous versions it was called isMasterRequest() if (!$event->isMainRequest()) { // don't do anything if it's not the main request return; @@ -331,10 +329,6 @@ or can get everything which partial matches the event name: $ php bin/console debug:event-dispatcher kernel // matches "kernel.exception", "kernel.response" etc. $ php bin/console debug:event-dispatcher Security // matches "Symfony\Component\Security\Http\Event\CheckPassportEvent" -.. versionadded:: 5.3 - - The ability to match partial event names was introduced in Symfony 5.3. - The :doc:`new authenticator-based Security ` system adds an event dispatcher per firewall. Use the ``--dispatcher`` option to get the registered listeners for a particular event dispatcher: @@ -343,10 +337,6 @@ get the registered listeners for a particular event dispatcher: $ php bin/console debug:event-dispatcher --dispatcher=security.event_dispatcher.main -.. versionadded:: 5.3 - - The ``dispatcher`` option was introduced in Symfony 5.3. - Learn more ---------- diff --git a/form/bootstrap5.rst b/form/bootstrap5.rst index 599f49bcb47..7b758794d57 100644 --- a/form/bootstrap5.rst +++ b/form/bootstrap5.rst @@ -1,10 +1,6 @@ Bootstrap 5 Form Theme ====================== -.. versionadded:: 5.3 - - The Bootstrap 5 Form Theme was introduced in Symfony 5.3. - Symfony provides several ways of integrating Bootstrap into your application. The most straightforward way is to add the required ```` and ``