diff --git a/.doctor-rst.yaml b/.doctor-rst.yaml index dfb85021586..6200a29310d 100644 --- a/.doctor-rst.yaml +++ b/.doctor-rst.yaml @@ -75,16 +75,16 @@ rules: yaml_instead_of_yml_suffix: ~ versionadded_directive_major_version: - major_version: 7 + major_version: 8 versionadded_directive_min_version: - min_version: '7.0' + min_version: '8.0' deprecated_directive_major_version: - major_version: 7 + major_version: 8 deprecated_directive_min_version: - min_version: '7.0' + min_version: '8.0' exclude_rule_for_file: - path: configuration/multiple_kernels.rst diff --git a/bundles/extension.rst b/bundles/extension.rst index d2792efc477..f3cc943e515 100644 --- a/bundles/extension.rst +++ b/bundles/extension.rst @@ -169,40 +169,3 @@ Using Configuration to Change the Services The Extension is also the class that handles the configuration for that particular bundle (e.g. the configuration in ``config/packages/.yaml``). To read more about it, see the ":doc:`/bundles/configuration`" article. - -Adding Classes to Compile -------------------------- - -Bundles can hint Symfony about which of their classes contain annotations so -they are compiled when generating the application cache to improve the overall -performance. Define the list of annotated classes to compile in the -``addAnnotatedClassesToCompile()`` method:: - - public function load(array $configs, ContainerBuilder $container): void - { - // ... - - $this->addAnnotatedClassesToCompile([ - // you can define the fully qualified class names... - 'Acme\\BlogBundle\\Controller\\AuthorController', - // ... but glob patterns are also supported: - 'Acme\\BlogBundle\\Form\\**', - - // ... - ]); - } - -.. note:: - - If some class extends from other classes, all its parents are automatically - included in the list of classes to compile. - -Patterns are transformed into the actual class namespaces using the classmap -generated by Composer. Therefore, before using these patterns, you must generate -the full classmap executing the ``dump-autoload`` command of Composer. - -.. warning:: - - This technique can't be used when the classes to compile use the ``__DIR__`` - or ``__FILE__`` constants, because their values will change when loading - these classes from the ``classes.php`` file. diff --git a/bundles/prepend_extension.rst b/bundles/prepend_extension.rst index e4099d9f81a..7425adedaf1 100644 --- a/bundles/prepend_extension.rst +++ b/bundles/prepend_extension.rst @@ -181,12 +181,6 @@ method:: The ``prependExtension()`` method, like ``prepend()``, is called only at compile time. -.. versionadded:: 7.1 - - Starting from Symfony 7.1, calling the :method:`Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator::import` - method inside ``prependExtension()`` will prepend the given configuration. - In previous Symfony versions, this method appended the configuration. - Alternatively, you can use the ``prepend`` parameter of the :method:`Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator::extension` method:: @@ -209,12 +203,6 @@ method:: } } -.. versionadded:: 7.1 - - The ``prepend`` parameter of the - :method:`Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator::extension` - method was added in Symfony 7.1. - More than one Bundle using PrependExtensionInterface ---------------------------------------------------- diff --git a/cache.rst b/cache.rst index 5687d3544b6..bbe401c8cd5 100644 --- a/cache.rst +++ b/cache.rst @@ -177,10 +177,6 @@ Some of these adapters could be configured via shortcuts. ; }; -.. versionadded:: 7.1 - - Using a DSN as the provider for the PDO adapter was introduced in Symfony 7.1. - .. _cache-create-pools: Creating Custom (Namespaced) Pools diff --git a/components/browser_kit.rst b/components/browser_kit.rst index 8cf0772298c..c6b3d703990 100644 --- a/components/browser_kit.rst +++ b/components/browser_kit.rst @@ -329,6 +329,16 @@ history:: // go forward to documentation page $crawler = $client->forward(); + // check if the history position is on the first page + if (!$client->getHistory()->isFirstPage()) { + $crawler = $client->back(); + } + + // check if the history position is on the last page + if (!$client->getHistory()->isLastPage()) { + $crawler = $client->forward(); + } + You can delete the client's history with the ``restart()`` method. This will also delete all the cookies:: diff --git a/components/cache.rst b/components/cache.rst index 44ba8b5c151..80024e6a65d 100644 --- a/components/cache.rst +++ b/components/cache.rst @@ -87,10 +87,6 @@ generate and return the value:: Creating Sub-Namespaces ----------------------- -.. versionadded:: 7.3 - - Cache sub-namespaces were introduced in Symfony 7.3. - Sometimes you need to create context-dependent variations of data that should be cached. For example, the data used to render a dashboard page may be expensive to generate and unique per user, so you can't cache the same data for everyone. @@ -286,12 +282,6 @@ function from the `Igbinary extension`_:: There are other *marshallers* that can encrypt or compress the data before storing it. -.. versionadded:: 7.2 - - In Symfony versions prior to 7.2, the ``igbinary_serialize()`` function was - used by default when the Igbinary extension was installed. Starting from - Symfony 7.2, you have to enable Igbinary support explicitly. - Advanced Usage -------------- diff --git a/components/cache/adapters/array_cache_adapter.rst b/components/cache/adapters/array_cache_adapter.rst index 08f8276db3d..abee5a5486a 100644 --- a/components/cache/adapters/array_cache_adapter.rst +++ b/components/cache/adapters/array_cache_adapter.rst @@ -31,7 +31,3 @@ method:: // lifetimes in tests) $clock = null, ); - -.. versionadded:: 7.2 - - The optional ``$clock`` argument was introduced in Symfony 7.2. diff --git a/components/cache/adapters/couchbasebucket_adapter.rst b/components/cache/adapters/couchbasebucket_adapter.rst deleted file mode 100644 index 29c9e26f83c..00000000000 --- a/components/cache/adapters/couchbasebucket_adapter.rst +++ /dev/null @@ -1,144 +0,0 @@ -Couchbase Bucket Cache Adapter -============================== - -.. deprecated:: 7.1 - - The ``CouchbaseBucketAdapter`` is deprecated since Symfony 7.1, use the - :doc:`CouchbaseCollectionAdapter ` - instead. - -This adapter stores the values in-memory using one (or more) `Couchbase server`_ -instances. Unlike the :doc:`APCu adapter `, and similarly to the -:doc:`Memcached adapter `, it is not limited to the current server's -shared memory; you can store contents independent of your PHP environment. -The ability to utilize a cluster of servers to provide redundancy and/or fail-over -is also available. - -.. warning:: - - **Requirements:** The `Couchbase PHP extension`_ as well as a `Couchbase server`_ - must be installed, active, and running to use this adapter. Version ``2.6`` or - less than 3.0 of the `Couchbase PHP extension`_ is required for this adapter. - -This adapter expects a `Couchbase Bucket`_ instance to be passed as the first -parameter. A namespace and default cache lifetime can optionally be passed as -the second and third parameters:: - - use Symfony\Component\Cache\Adapter\CouchbaseBucketAdapter; - - $cache = new CouchbaseBucketAdapter( - // the client object that sets options and adds the server instance(s) - $client, - - // the name of bucket - $bucket, - - // a string prefixed to the keys of the items stored in this cache - $namespace, - - // the default lifetime (in seconds) for cache items that do not define their - // own lifetime, with a value 0 causing items to be stored indefinitely - $defaultLifetime - ); - -Configure the Connection ------------------------- - -The :method:`Symfony\\Component\\Cache\\Adapter\\CouchbaseBucketAdapter::createConnection` -helper method allows creating and configuring a `Couchbase Bucket`_ class instance using a -`Data Source Name (DSN)`_ or an array of DSNs:: - - use Symfony\Component\Cache\Adapter\CouchbaseBucketAdapter; - - // pass a single DSN string to register a single server with the client - $client = CouchbaseBucketAdapter::createConnection( - 'couchbase://localhost' - // the DSN can include config options (pass them as a query string): - // 'couchbase://localhost:11210?operationTimeout=10' - // 'couchbase://localhost:11210?operationTimeout=10&configTimeout=20' - ); - - // pass an array of DSN strings to register multiple servers with the client - $client = CouchbaseBucketAdapter::createConnection([ - 'couchbase://10.0.0.100', - 'couchbase://10.0.0.101', - 'couchbase://10.0.0.102', - // etc... - ]); - - // a single DSN can define multiple servers using the following syntax: - // host[hostname-or-IP:port] (where port is optional). Sockets must include a trailing ':' - $client = CouchbaseBucketAdapter::createConnection( - 'couchbase:?host[localhost]&host[localhost:12345]' - ); - -Configure the Options ---------------------- - -The :method:`Symfony\\Component\\Cache\\Adapter\\CouchbaseBucketAdapter::createConnection` -helper method also accepts an array of options as its second argument. The -expected format is an associative array of ``key => value`` pairs representing -option names and their respective values:: - - use Symfony\Component\Cache\Adapter\CouchbaseBucketAdapter; - - $client = CouchbaseBucketAdapter::createConnection( - // a DSN string or an array of DSN strings - [], - - // associative array of configuration options - [ - 'username' => 'xxxxxx', - 'password' => 'yyyyyy', - 'configTimeout' => '100', - ] - ); - -Available Options -~~~~~~~~~~~~~~~~~ - -``username`` (type: ``string``) - Username for connection ``CouchbaseCluster``. - -``password`` (type: ``string``) - Password of connection ``CouchbaseCluster``. - -``operationTimeout`` (type: ``int``, default: ``2500000``) - The operation timeout (in microseconds) is the maximum amount of time the library will - wait for an operation to receive a response before invoking its callback with a failure status. - -``configTimeout`` (type: ``int``, default: ``5000000``) - How long (in microseconds) the client will wait to obtain the initial configuration. - -``configNodeTimeout`` (type: ``int``, default: ``2000000``) - Per-node configuration timeout (in microseconds). - -``viewTimeout`` (type: ``int``, default: ``75000000``) - The I/O timeout (in microseconds) for HTTP requests to Couchbase Views API. - -``httpTimeout`` (type: ``int``, default: ``75000000``) - The I/O timeout (in microseconds) for HTTP queries (management API). - -``configDelay`` (type: ``int``, default: ``10000``) - Config refresh throttling - Modify the amount of time (in microseconds) before the configuration error threshold will forcefully be set to its maximum number forcing a configuration refresh. - -``htconfigIdleTimeout`` (type: ``int``, default: ``4294967295``) - Idling/Persistence for HTTP bootstrap (in microseconds). - -``durabilityInterval`` (type: ``int``, default: ``100000``) - The time (in microseconds) the client will wait between repeated probes to a given server. - -``durabilityTimeout`` (type: ``int``, default: ``5000000``) - The time (in microseconds) the client will spend sending repeated probes to a given key's vBucket masters and replicas before they are deemed not to have satisfied the durability requirements. - -.. tip:: - - Reference the `Couchbase Bucket`_ extension's `predefined constants`_ documentation - for additional information about the available options. - -.. _`Couchbase PHP extension`: https://docs.couchbase.com/sdk-api/couchbase-php-client-2.6.0/files/couchbase.html -.. _`predefined constants`: https://docs.couchbase.com/sdk-api/couchbase-php-client-2.6.0/classes/Couchbase.Bucket.html -.. _`Couchbase server`: https://couchbase.com/ -.. _`Couchbase Bucket`: https://docs.couchbase.com/sdk-api/couchbase-php-client-2.6.0/classes/Couchbase.Bucket.html -.. _`Data Source Name (DSN)`: https://en.wikipedia.org/wiki/Data_source_name diff --git a/components/cache/adapters/redis_adapter.rst b/components/cache/adapters/redis_adapter.rst index c0295b487a0..541824c808c 100644 --- a/components/cache/adapters/redis_adapter.rst +++ b/components/cache/adapters/redis_adapter.rst @@ -48,10 +48,6 @@ as the second and third parameters:: ?MarshallerInterface $marshaller = null ); -.. versionadded:: 7.3 - - Support for ``Relay\Cluster`` was introduced in Symfony 7.3. - Configure the Connection ------------------------ @@ -66,11 +62,6 @@ helper method allows creating and configuring the Redis client class instance us 'redis://localhost' ); -.. versionadded:: 7.3 - - Starting in Symfony 7.3, when using Valkey servers you can use the - ``valkey[s]:`` scheme instead of the ``redis[s]:`` one in your DSNs. - The DSN can specify either an IP/host (and an optional port) or a socket path, as well as a password and a database index. To enable TLS for connections, the scheme ``redis`` must be replaced by ``rediss`` (the second ``s`` means "secure"). @@ -249,15 +240,6 @@ Available Options ], ]; -.. versionadded:: 7.1 - - The option ``sentinel_master`` as an alias for ``redis_sentinel`` was introduced - in Symfony 7.1. - -.. versionadded:: 7.3 - - The ``relay_cluster_context`` option was introduced in Symfony 7.3. - .. note:: When using the `Predis`_ library some additional Predis-specific options are available. diff --git a/components/clock.rst b/components/clock.rst index c4ac88e9092..c077d55daf9 100644 --- a/components/clock.rst +++ b/components/clock.rst @@ -240,10 +240,6 @@ timestamps:: // (for high precision sub-second datetimes) are also supported $dateOfFirstMoonLanding = DatePoint::createFromTimestamp(-14182940); -.. versionadded:: 7.1 - - The ``createFromTimestamp()`` method was introduced in Symfony 7.1. - .. note:: In addition ``DatePoint`` offers stricter return types and provides consistent @@ -261,12 +257,6 @@ timestamps:: This feature polyfills PHP 8.4's behavior on the topic, as microseconds manipulation is not available in previous versions of PHP. -.. versionadded:: 7.1 - - The :method:`Symfony\\Component\\Clock\\DatePoint::setMicrosecond` and - :method:`Symfony\\Component\\Clock\\DatePoint::getMicrosecond` methods were - introduced in Symfony 7.1. - Storing DatePoints in the Database ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -293,10 +283,6 @@ If you :doc:`use Doctrine ` to work with databases, consider using th // ... } -.. versionadded:: 7.3 - - The ``DatePointType`` was introduced in Symfony 7.3. - .. _clock_writing-tests: Writing Time-Sensitive Tests diff --git a/components/config/caching.rst b/components/config/caching.rst index 80e23a4fdfb..fa6aaad987a 100644 --- a/components/config/caching.rst +++ b/components/config/caching.rst @@ -65,7 +65,3 @@ You can explicitly define the absolute path to the meta file:: // the third optional argument indicates the absolute path to the meta file $userMatcherCache = new ConfigCache($cachePath, true, '/my/absolute/path/to/cache.meta'); - -.. versionadded:: 7.1 - - The argument to customize the meta file path was introduced in Symfony 7.1. diff --git a/components/config/definition.rst b/components/config/definition.rst index 4848af33ffe..69cd5c531cd 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -92,10 +92,6 @@ reflect the real structure of the configuration values:: ->end() ; -.. versionadded:: 7.2 - - The ``stringNode()`` method was introduced in Symfony 7.2. - The root node itself is an array node, and has children, like the boolean node ``auto_connect`` and the scalar node ``default_connection``. In general: after defining a node, a call to ``end()`` takes you one step up in the @@ -120,10 +116,6 @@ node definition. Node types are available for: and are created with ``node($name, $type)`` or their associated shortcut ``xxxxNode($name)`` method. -.. versionadded:: 7.2 - - Support for the ``string`` type was introduced in Symfony 7.2. - Numeric Node Constraints ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -201,10 +193,6 @@ the cases of the enum:: When using a backed enum, the values provided to the node will be cast to one of the enum cases if possible. -.. versionadded:: 7.3 - - The ``enumClass()`` method was introduced in Symfony 7.3. - Array Nodes ~~~~~~~~~~~ @@ -566,10 +554,6 @@ A few placeholders are available to customize the URL: The placeholders will be replaced when printing the configuration tree with the ``config:dump-reference`` command. -.. versionadded:: 7.3 - - The ``docUrl()`` method was introduced in Symfony 7.3. - Optional Sections ----------------- @@ -877,10 +861,6 @@ A validation rule also requires a "then" part: Usually, "then" is a closure. Its return value will be used as a new value for the node, instead of the node's original value. -.. versionadded:: 7.3 - - The ``ifFalse()`` method was introduced in Symfony 7.3. - Configuring the Node Path Separator ----------------------------------- diff --git a/components/console/helpers/formatterhelper.rst b/components/console/helpers/formatterhelper.rst index cf9bacdeb9c..fa02cc7234b 100644 --- a/components/console/helpers/formatterhelper.rst +++ b/components/console/helpers/formatterhelper.rst @@ -132,10 +132,6 @@ precision (default ``1``) of the result:: Helper::formatTime(172799, 4); // 1 d, 23 h, 59 min, 59 s Helper::formatTime(172799.056, 5); // 1 d, 23 h, 59 min, 59 s, 56 ms -.. versionadded:: 7.3 - - Support for formatting up to milliseconds was introduced in Symfony 7.3. - Formatting Memory ----------------- diff --git a/components/console/helpers/progressindicator.rst b/components/console/helpers/progressindicator.rst index 0defe7c83fd..da93eb7a056 100644 --- a/components/console/helpers/progressindicator.rst +++ b/components/console/helpers/progressindicator.rst @@ -103,7 +103,7 @@ Once the progress finishes, it displays a special finished indicator (which defa to ✔). You can replace it with your own:: $progressIndicator = new ProgressIndicator($output, finishedIndicatorValue: '🎉'); - + try { /* do something */ $progressIndicator->finish('Finished'); @@ -121,11 +121,6 @@ The progress indicator will now look like this: - Processing... 🎉 Finished -.. versionadded:: 7.2 - - The ``finishedIndicator`` parameter for the constructor was introduced in Symfony 7.2. - The ``finishedIndicator`` parameter for method ``finish()`` was introduced in Symfony 7.2. - Customize Placeholders ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/components/console/helpers/table.rst b/components/console/helpers/table.rst index e36b1570b70..8fd9ba48486 100644 --- a/components/console/helpers/table.rst +++ b/components/console/helpers/table.rst @@ -290,10 +290,6 @@ This outputs: | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | | 80-902734-1-6 | And Then There Were None | Agatha Christie | -.. versionadded:: 7.3 - - The ``markdown`` style was introduced in Symfony 7.3. - Making a Custom Table Style ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/components/console/helpers/tree.rst b/components/console/helpers/tree.rst index 5e08e684e51..36314bab440 100644 --- a/components/console/helpers/tree.rst +++ b/components/console/helpers/tree.rst @@ -5,10 +5,6 @@ The Tree Helper allows you to build and display tree structures in the console. It's commonly used to render directory hierarchies, but you can also use it to render any tree-like content, such us organizational charts, product category trees, taxonomies, etc. -.. versionadded:: 7.3 - - The ``TreeHelper`` class was introduced in Symfony 7.3. - Rendering a Tree ---------------- diff --git a/components/console/usage.rst b/components/console/usage.rst index 591994948b8..20ed0e99abc 100644 --- a/components/console/usage.rst +++ b/components/console/usage.rst @@ -72,10 +72,6 @@ You can suppress output with: $ php application.php list --quiet $ php application.php list -q -.. versionadded:: 7.2 - - The ``--silent`` option was introduced in Symfony 7.2. - You can get more verbose messages (if this is supported for a command) with: diff --git a/components/css_selector.rst b/components/css_selector.rst index 1331a11e616..01e264dbbd1 100644 --- a/components/css_selector.rst +++ b/components/css_selector.rst @@ -94,10 +94,6 @@ Pseudo-classes are partially supported: ``li:first-of-type``) but not with the ``*`` selector). * Supported: ``*:only-of-type``, ``*:scope``, ``*:is`` and ``*:where``. -.. versionadded:: 7.1 - - The support for ``*:is`` and ``*:where`` was introduced in Symfony 7.1. - Learn more ---------- diff --git a/components/expression_language.rst b/components/expression_language.rst index b0dd10b0f42..41a9675f5c7 100644 --- a/components/expression_language.rst +++ b/components/expression_language.rst @@ -128,11 +128,6 @@ This is how you can use these flags:: // does not throw a SyntaxError because the unknown variables and functions are ignored $expressionLanguage->lint('unknown_var + unknown_function()', [], Parser::IGNORE_UNKNOWN_VARIABLES | Parser::IGNORE_UNKNOWN_FUNCTIONS); -.. versionadded:: 7.1 - - The support for flags in the ``parse()`` and ``lint()`` methods - was introduced in Symfony 7.1. - Passing in Variables -------------------- diff --git a/components/filesystem.rst b/components/filesystem.rst index 4eae6aaad27..a8ec9ebd876 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -316,10 +316,6 @@ creates them before appending the contents. ``readFile`` ~~~~~~~~~~~~ -.. versionadded:: 7.1 - - The ``readFile()`` method was introduced in Symfony 7.1. - :method:`Symfony\\Component\\Filesystem\\Filesystem::readFile` returns all the contents of a file as a string. Unlike the :phpfunction:`file_get_contents` function from PHP, it throws an exception when the given file path is not readable and diff --git a/components/form.rst b/components/form.rst index 44f407e4c8e..751349b17f1 100644 --- a/components/form.rst +++ b/components/form.rst @@ -134,11 +134,6 @@ The following snippet adds CSRF protection to the form factory:: ->addExtension(new CsrfExtension($csrfManager)) ->getFormFactory(); -.. versionadded:: 7.2 - - Support for passing requests to the constructor of the ``RequestStack`` - class was introduced in Symfony 7.2. - Internally, this extension will automatically add a hidden field to every form (called ``_token`` by default) whose value is automatically generated by the CSRF generator and validated when binding the form. diff --git a/components/http_foundation.rst b/components/http_foundation.rst index 1cb87aafb24..15da88c8561 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -376,11 +376,6 @@ anonymized depending on the IP address format:: $anonymousIpv6 = IpUtils::anonymize($ipv6, 3, 10); // $anonymousIpv6 = '2a01:198:603::' -.. versionadded:: 7.2 - - The ``v4Bytes`` and ``v6Bytes`` parameters of the ``anonymize()`` method - were introduced in Symfony 7.2. - Check If an IP Belongs to a CIDR Subnet ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -459,11 +454,6 @@ You can use them individually or combine them using the // ... } -.. versionadded:: 7.1 - - The ``HeaderRequestMatcher`` and ``QueryParameterRequestMatcher`` were - introduced in Symfony 7.1. - Accessing other Data ~~~~~~~~~~~~~~~~~~~~ @@ -721,10 +711,6 @@ a PHP callable:: // disables FastCGI buffering in nginx only for this response $response->headers->set('X-Accel-Buffering', 'no'); -.. versionadded:: 7.3 - - Support for using string iterables was introduced in Symfony 7.3. - Streaming a JSON Response ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -906,11 +892,6 @@ and that will be automatically deleted after the response is sent:: $response = new BinaryFileResponse($file); -.. versionadded:: 7.1 - - The support for ``\SplTempFileObject`` in ``BinaryFileResponse`` - was introduced in Symfony 7.1. - If the size of the served file is unknown (e.g. because it's being generated on the fly, or because a PHP stream filter is registered on it, etc.), you can pass a ``Stream`` instance to ``BinaryFileResponse``. This will disable ``Range`` and ``Content-Length`` diff --git a/components/http_kernel.rst b/components/http_kernel.rst index 62d1e92d89b..2ce31257848 100644 --- a/components/http_kernel.rst +++ b/components/http_kernel.rst @@ -525,12 +525,6 @@ The :class:`Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent` exposes the method, which you can use to determine if the kernel is currently terminating at the moment the exception was thrown. -.. versionadded:: 7.1 - - The - :method:`Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent::isKernelTerminating` - method was introduced in Symfony 7.1. - .. note:: When setting a response for the ``kernel.exception`` event, the propagation diff --git a/components/ldap.rst b/components/ldap.rst index e52a341986c..64a9099e1a4 100644 --- a/components/ldap.rst +++ b/components/ldap.rst @@ -83,10 +83,6 @@ for binding to an LDAP server using `SASL`_:: After binding to the LDAP server, you can use the :method:`Symfony\\Component\\Ldap\\Ldap::whoami` method to get the distinguished name (DN) of the authenticated and authorized user. -.. versionadded:: 7.2 - - The ``saslBind()`` and ``whoami()`` methods were introduced in Symfony 7.2. - Once bound (or if you enabled anonymous authentication on your LDAP server), you may query the LDAP server using the :method:`Symfony\\Component\\Ldap\\Ldap::query` method:: diff --git a/components/lock.rst b/components/lock.rst index 2403763bd4a..14b955af5fa 100644 --- a/components/lock.rst +++ b/components/lock.rst @@ -407,10 +407,6 @@ Store Scope Blocking Ex ``InMemoryStore``, which saves locks in memory during a process, and ``NullStore``, which doesn't persist anything. -.. versionadded:: 7.2 - - The :class:`Symfony\\Component\\Lock\\Store\\NullStore` was introduced in Symfony 7.2. - .. _lock-store-flock: FlockStore @@ -623,10 +619,6 @@ and expects a TTL to avoid stalled locks:: $store = new RedisStore($redis); -.. versionadded:: 7.3 - - Support for ``Relay\Cluster`` was introduced in Symfony 7.3. - .. _lock-store-semaphore: SemaphoreStore diff --git a/components/options_resolver.rst b/components/options_resolver.rst index 17ec46c2fc9..26ea485f032 100644 --- a/components/options_resolver.rst +++ b/components/options_resolver.rst @@ -316,10 +316,6 @@ correctly. To validate the types of the options, call } } -.. versionadded:: 7.3 - - Defining type unions with the ``|`` syntax was introduced in Symfony 7.3. - You can pass any type for which an ``is_()`` function is defined in PHP. You may also pass fully qualified class or interface names (which is checked using ``instanceof``). Additionally, you can validate all items in an array @@ -686,16 +682,6 @@ default value:: ], ]); -.. deprecated:: 7.3 - - Defining nested options via :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::setDefault` - is deprecated since Symfony 7.3. Use the :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::setOptions` - method instead, which also allows defining default values for prototyped options. - -.. versionadded:: 7.3 - - The ``setOptions()`` method was introduced in Symfony 7.3. - Nested options also support required options, validation (type, value) and normalization of their values. If the default value of a nested option depends on another option defined in the parent level, add a second ``Options`` argument diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index 5ce4c003a11..f91c2ce88af 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -566,9 +566,9 @@ Clock Mocking The :class:`Symfony\\Bridge\\PhpUnit\\ClockMock` class provided by this bridge allows you to mock the PHP's built-in time functions ``time()``, ``microtime()``, -``sleep()``, ``usleep()``, ``gmdate()``, and ``hrtime()``. Additionally the -function ``date()`` is mocked so it uses the mocked time if no timestamp is -specified. +``sleep()``, ``usleep()``, ``gmdate()``, ``hrtime()``, and ``strtotime()``. +Additionally the function ``date()`` is mocked so it uses the mocked time if no +timestamp is specified. Other functions with an optional timestamp parameter that defaults to ``time()`` will still use the system time instead of the mocked time. This means that you diff --git a/components/process.rst b/components/process.rst index 9c25c931510..f5a96bb7791 100644 --- a/components/process.rst +++ b/components/process.rst @@ -527,11 +527,6 @@ method. The given signals won't be propagated to the child process:: $process = new Process(['find', '/', '-name', 'rabbit']); $process->setIgnoredSignals([SIGKILL, SIGUSR1]); -.. versionadded:: 7.1 - - The :method:`Symfony\\Component\\Process\\Process::setIgnoredSignals` - method was introduced in Symfony 7.1. - Process Pid ----------- diff --git a/components/property_info.rst b/components/property_info.rst index 865a36c5941..e3a68b925f8 100644 --- a/components/property_info.rst +++ b/components/property_info.rst @@ -198,11 +198,6 @@ can provide the full documentation block for a property as a string:: It can span multiple lines. */ -.. versionadded:: 7.1 - - The :class:`Symfony\\Component\\PropertyInfo\\PropertyDocBlockExtractorInterface` - interface was introduced in Symfony 7.1. - .. _property-info-description: Description Information @@ -435,11 +430,6 @@ library is present:: $phpDocExtractor->getLongDescription($class, $property); $phpDocExtractor->getDocBlock($class, $property); -.. versionadded:: 7.1 - - The :method:`Symfony\\Component\\PropertyInfo\\Extractor\\PhpDocExtractor::getDocBlock` - method was introduced in Symfony 7.1. - PhpStanExtractor ~~~~~~~~~~~~~~~~ @@ -476,12 +466,6 @@ information from annotations of properties and methods, such as ``@var``, $phpStanExtractor->getShortDescription($class, 'bar'); $phpStanExtractor->getLongDescription($class, 'bar'); -.. versionadded:: 7.3 - - The :method:`Symfony\\Component\\PropertyInfo\\Extractor\\PhpStanExtractor::getShortDescription` - and :method:`Symfony\\Component\\PropertyInfo\\Extractor\\PhpStanExtractor::getLongDescription` - methods were introduced in Symfony 7.3. - SerializerExtractor ~~~~~~~~~~~~~~~~~~~ @@ -592,10 +576,6 @@ service by defining it as a service with one or more of the following (it checks if a property can be initialized through the constructor). * ``property_info.constructor_extractor`` if it provides type information from the constructor argument. - .. versionadded:: 7.3 - - The ``property_info.constructor_extractor`` tag was introduced in Symfony 7.3. - .. _`PSR-1`: https://www.php-fig.org/psr/psr-1/ .. _`phpDocumentor Reflection`: https://github.com/phpDocumentor/ReflectionDocBlock .. _`phpdocumentor/reflection-docblock`: https://packagist.org/packages/phpdocumentor/reflection-docblock diff --git a/components/type_info.rst b/components/type_info.rst index 817c7f1d61a..ee7681ffb7a 100644 --- a/components/type_info.rst +++ b/components/type_info.rst @@ -46,10 +46,6 @@ You can also use a generic method that detects the type automatically:: Type::fromValue('...'); // same as Type::string() Type::fromValue(false); // same as Type::false() -.. versionadded:: 7.3 - - The ``fromValue()`` method was introduced in Symfony 7.3. - Resolvers ~~~~~~~~~ @@ -163,11 +159,6 @@ Checking if a type **accepts a value**:: $type->accepts(123); // true $type->accepts('z'); // true -.. versionadded:: 7.3 - - The :method:`Symfony\\Component\\TypeInfo\\Type::accepts` - method was introduced in Symfony 7.3. - Using callables for **complex checks**:: class Foo diff --git a/components/uid.rst b/components/uid.rst index b4083765436..fdf9799b311 100644 --- a/components/uid.rst +++ b/components/uid.rst @@ -120,7 +120,7 @@ sortable (like :ref:`ULIDs `). It's more efficient for database indexing **UUID v7** (UNIX timestamp) Generates time-ordered UUIDs based on a high-resolution Unix Epoch timestamp -source (the number of milliseconds since midnight 1 Jan 1970 UTC, leap seconds excluded) +source (the number of microseconds since midnight 1 Jan 1970 UTC, leap seconds excluded) (`read the UUIDv7 spec `__). It's recommended to use this version over UUIDv1 and UUIDv6 because it provides better entropy (and a more strict chronological order of UUID generation):: @@ -255,10 +255,6 @@ Use these methods to transform the UUID object into different bases:: $uuid->toHex(); // string(34) "0xd9e7a1845d5b11eaa62a3499710062d0" $uuid->toString(); // string(36) "d9e7a184-5d5b-11ea-a62a-3499710062d0" -.. versionadded:: 7.1 - - The ``toString()`` method was introduced in Symfony 7.1. - You can also convert some UUID versions to others:: // convert V1 to V6 or V7 @@ -272,13 +268,6 @@ You can also convert some UUID versions to others:: $uuid->toV7(); // returns a Symfony\Component\Uid\UuidV7 instance -.. versionadded:: 7.1 - - The :method:`Symfony\\Component\\Uid\\UuidV1::toV6`, - :method:`Symfony\\Component\\Uid\\UuidV1::toV7` and - :method:`Symfony\\Component\\Uid\\UuidV6::toV7` - methods were introduced in Symfony 7.1. - Working with UUIDs ~~~~~~~~~~~~~~~~~~ @@ -336,11 +325,6 @@ The following constants are available: You can also use the ``Uuid::FORMAT_ALL`` constant to accept any UUID format. By default, only the RFC 4122 format is accepted. -.. versionadded:: 7.2 - - The ``$format`` parameter of the :method:`Symfony\\Component\\Uid\\Uuid::isValid` - method and the related constants were introduced in Symfony 7.2. - Storing UUIDs in Databases ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/components/var_exporter.rst b/components/var_exporter.rst index c7ec9cd90d0..031e285d0c5 100644 --- a/components/var_exporter.rst +++ b/components/var_exporter.rst @@ -207,169 +207,5 @@ pattern, which also works with abstract classes, internal classes, and interface Use this mechanism only when native lazy objects cannot be leveraged (otherwise you'll get a deprecation notice). -Legacy Creation of Lazy Objects -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When using a PHP version earlier than 8.4, native lazy objects are not available. -In these cases, the VarExporter component provides two traits that help you -implement lazy-loading mechanisms in your classes. - -.. _var-exporter_ghost-objects: - -LazyGhostTrait -.............. - -.. deprecated:: 7.3 - - ``LazyGhostTrait`` is deprecated since Symfony 7.3. Use PHP 8.4's native lazy - objects instead. Note that using the trait with PHP versions earlier than 8.4 - does not trigger a deprecation, to ease the transition. - -Ghost objects are empty objects, which see their properties populated the first -time any method is called. Thanks to :class:`Symfony\\Component\\VarExporter\\LazyGhostTrait`, -the implementation of the lazy mechanism is eased. The ``MyLazyObject::populateHash()`` -method will be called only when the object is actually used and needs to be -initialized:: - - namespace App\Hash; - - use Symfony\Component\VarExporter\LazyGhostTrait; - - class HashProcessor - { - use LazyGhostTrait; - - // This property may require a heavy computation to have its value - public readonly string $hash; - - public function __construct() - { - self::createLazyGhost(initializer: $this->populateHash(...), instance: $this); - } - - private function populateHash(array $data): void - { - // Compute $this->hash value with the passed data - } - } - -:class:`Symfony\\Component\\VarExporter\\LazyGhostTrait` also allows to -convert non-lazy classes to lazy ones:: - - namespace App\Hash; - - use Symfony\Component\VarExporter\LazyGhostTrait; - - class HashProcessor - { - public readonly string $hash; - - public function __construct(array $data) - { - $this->populateHash($data); - } - - private function populateHash(array $data): void - { - // ... - } - - public function validateHash(): bool - { - // ... - } - } - - class LazyHashProcessor extends HashProcessor - { - use LazyGhostTrait; - } - - $processor = LazyHashProcessor::createLazyGhost(initializer: function (HashProcessor $instance): void { - // Do any operation you need here: call setters, getters, methods to validate the hash, etc. - $data = /** Retrieve required data to compute the hash */; - $instance->__construct(...$data); - $instance->validateHash(); - }); - -While you never query ``$processor->hash`` value, heavy methods will never be -triggered. But still, the ``$processor`` object exists and can be used in your -code, passed to methods, functions, etc. - -Ghost objects unfortunately can't work with abstract classes or internal PHP -classes. Nevertheless, the VarExporter component covers this need with the help -of :ref:`Virtual Proxies `. - -.. _var-exporter_virtual-proxies: - -LazyProxyTrait -.............. - -.. deprecated:: 7.3 - - ``LazyProxyTrait`` is deprecated since Symfony 7.3. Use PHP 8.4's native lazy - objects instead. Note that using the trait with PHP versions earlier than 8.4 - does not trigger a deprecation, to ease the transition. - -The purpose of virtual proxies in the same one as -:ref:`ghost objects `, but their internal behavior is -totally different. Where ghost objects requires to extend a base class, virtual -proxies take advantage of the **Liskov Substitution principle**. This principle -describes that if two objects are implementing the same interface, you can swap -between the different implementations without breaking your application. This is -what virtual proxies take advantage of. To use virtual proxies, you may use -:class:`Symfony\\Component\\VarExporter\\ProxyHelper` to generate proxy's class -code:: - - namespace App\Hash; - - use Symfony\Component\VarExporter\ProxyHelper; - - interface ProcessorInterface - { - public function getHash(): bool; - } - - abstract class AbstractProcessor implements ProcessorInterface - { - protected string $hash; - - public function getHash(): bool - { - return $this->hash; - } - } - - class HashProcessor extends AbstractProcessor - { - public function __construct(array $data) - { - $this->populateHash($data); - } - - private function populateHash(array $data): void - { - // ... - } - } - - $proxyCode = ProxyHelper::generateLazyProxy(new \ReflectionClass(AbstractProcessor::class)); - // $proxyCode contains the actual proxy and the reference to LazyProxyTrait. - // In production env, this should be dumped into a file to avoid calling eval(). - eval('class HashProcessorProxy'.$proxyCode); - - $processor = HashProcessorProxy::createLazyProxy(initializer: function (): ProcessorInterface { - $data = /** Retrieve required data to compute the hash */; - $instance = new HashProcessor(...$data); - - // Do any operation you need here: call setters, getters, methods to validate the hash, etc. - - return $instance; - }); - -Just like ghost objects, while you never query ``$processor->hash``, its value -will not be computed. The main difference with ghost objects is that this time, -a proxy of an abstract class was created. This also works with internal PHP class. - .. _`OPcache`: https://www.php.net/opcache .. _`PSR-2`: https://www.php-fig.org/psr/psr-2/ diff --git a/components/yaml.rst b/components/yaml.rst index efaf84f04e6..6e89e8b849f 100644 --- a/components/yaml.rst +++ b/components/yaml.rst @@ -372,11 +372,6 @@ giving the enumeration FQCN:: $parameters = Yaml::parse($yaml, Yaml::PARSE_CONSTANT); // $parameters = ['bar' => ['foo', 'bar']]; -.. versionadded:: 7.1 - - The support for using the enum FQCN without specifying a case - was introduced in Symfony 7.1. - Parsing and Dumping of Binary Data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -434,10 +429,6 @@ use the ``DUMP_NULL_AS_EMPTY`` flag to dump null values as empty strings:: $dumped = Yaml::dump(['foo' => null], 2, 4, Yaml::DUMP_NULL_AS_EMPTY); // foo: -.. versionadded:: 7.3 - - The ``DUMP_NULL_AS_EMPTY`` flag was introduced in Symfony 7.3. - Dumping Numeric Keys as Strings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -467,10 +458,6 @@ if they are reserved words or contain newlines and spaces). Use the ], 2, 4, Yaml::DUMP_FORCE_DOUBLE_QUOTES_ON_VALUES); // "foo": "bar", "some foo": "some bar", "x": 3.14, "y": true, "z": null -.. versionadded:: 7.3 - - The ``Yaml::DUMP_FORCE_DOUBLE_QUOTES_ON_VALUES`` flag was introduced in Symfony 7.3. - Dumping Collection of Maps ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -498,10 +485,6 @@ use the ``Yaml::DUMP_COMPACT_NESTED_MAPPING`` flag: - name: Jupiter distance: 778500000 -.. versionadded:: 7.3 - - The ``Yaml::DUMP_COMPACT_NESTED_MAPPING`` flag was introduced in Symfony 7.3. - Syntax Validation ~~~~~~~~~~~~~~~~~ diff --git a/configuration.rst b/configuration.rst index 35bc2fb7eec..9dd18c7e0c5 100644 --- a/configuration.rst +++ b/configuration.rst @@ -392,10 +392,6 @@ If a non-empty parameter is ``null``, an empty string ``''``, or an empty array Symfony will throw an exception. This validation is **not** made at compile time but when attempting to retrieve the value of the parameter. -.. versionadded:: 7.2 - - Validating non-empty parameters was introduced in Symfony 7.2. - .. seealso:: Later in this article you can read how to @@ -984,11 +980,6 @@ to learn more about this. If you need to know the path to the ``.env`` file that Symfony is using, you can read the ``SYMFONY_DOTENV_PATH`` environment variable in your application. -.. versionadded:: 7.1 - - The ``SYMFONY_DOTENV_PATH`` environment variable was introduced in Symfony - 7.1. - .. _configuration-secrets: Encrypting Environment Variables (Secrets) diff --git a/configuration/env_var_processors.rst b/configuration/env_var_processors.rst index 2e82104db66..33f50864081 100644 --- a/configuration/env_var_processors.rst +++ b/configuration/env_var_processors.rst @@ -865,10 +865,6 @@ Symfony provides the following env var processors: $container->setParameter('encoded_database_url', '%env(urlencode:DATABASE_URL)%'); }; - .. versionadded:: 7.1 - - The ``env(urlencode:...)`` env var processor was introduced in Symfony 7.1. - It is also possible to combine any number of processors: .. configuration-block:: diff --git a/configuration/micro_kernel_trait.rst b/configuration/micro_kernel_trait.rst index 542532ee1af..6adee785a7f 100644 --- a/configuration/micro_kernel_trait.rst +++ b/configuration/micro_kernel_trait.rst @@ -310,11 +310,6 @@ Now it looks like this:: } -.. versionadded:: 7.3 - - The ``wdt.php`` and ``profiler.php`` files were introduced in Symfony 7.3. - Previously, you had to import ``wdt.xml`` and ``profiler.xml`` - Before continuing, run this command to add support for the new dependencies: .. code-block:: terminal diff --git a/configuration/secrets.rst b/configuration/secrets.rst index 285b89d521e..b0a31e02afe 100644 --- a/configuration/secrets.rst +++ b/configuration/secrets.rst @@ -178,10 +178,6 @@ you to reveal a single secret's value. my secret -.. versionadded:: 7.1 - - The ``secrets:reveal`` command was introduced in Symfony 7.1. - Remove Secrets -------------- diff --git a/console.rst b/console.rst index be9292f92a5..a9457c1620f 100644 --- a/console.rst +++ b/console.rst @@ -202,6 +202,35 @@ After configuring and registering the command, you can run it in the terminal: As you might expect, this command will do nothing as you didn't write any logic yet. Add your own logic inside the ``__invoke()`` method. +.. _command-aliases: + +Command Aliases +~~~~~~~~~~~~~~~ + +You can define alternative names (aliases) for a command directly in its name +using a pipe (``|``) separator. The first name in the list becomes the actual +command name; the others are aliases that can also be used to run the command:: + + // src/Command/CreateUserCommand.php + namespace App\Command; + + use Symfony\Component\Console\Attribute\AsCommand; + use Symfony\Component\Console\Command\Command; + + #[AsCommand( + name: 'app:create-user|app:add-user|app:new-user', + description: 'Creates a new user.', + )] + class CreateUserCommand extends Command + { + // ... + } + +.. versionadded:: 7.4 + + The ability to define aliases through the command name was introduced in + Symfony 7.4. + Console Output -------------- diff --git a/console/hide_commands.rst b/console/hide_commands.rst index 4ab9d3a6dad..aad4b6d45a4 100644 --- a/console/hide_commands.rst +++ b/console/hide_commands.rst @@ -22,8 +22,25 @@ the ``hidden`` property of the ``AsCommand`` attribute:: // ... } -Hidden commands behave the same as normal commands but they are no longer displayed -in command listings, so end-users are not aware of their existence. +You can also define a command as hidden using the pipe (``|``) syntax of +:ref:`command aliases `. To do this, use the command name as one +of the aliases and leave the main command name (the part before the ``|``) empty:: + + // src/Command/LegacyCommand.php + namespace App\Command; + + use Symfony\Component\Console\Attribute\AsCommand; + use Symfony\Component\Console\Command\Command; + + #[AsCommand(name: '|app:legacy')] + class LegacyCommand extends Command + { + // ... + } + +.. versionadded:: 7.4 + + Support for hidding commands using the pipe syntax was introduced in Symfony 7.4. .. note:: diff --git a/console/input.rst b/console/input.rst index 7a978687066..4d51cacdb07 100644 --- a/console/input.rst +++ b/console/input.rst @@ -342,11 +342,6 @@ command without having to worry about the number of arguments or options:: // ... } -.. versionadded:: 7.1 - - The :method:`Symfony\\Component\\Console\\Input\\ArgvInput::getRawTokens` - method was introduced in Symfony 7.1. - Adding Argument/Option Value Completion --------------------------------------- @@ -453,10 +448,6 @@ The Console component adds some predefined options to all commands: * ``--help``: displays the command help * ``--ansi|--no-ansi``: whether to force of disable coloring the output -.. versionadded:: 7.2 - - The ``--silent`` option was introduced in Symfony 7.2. - When using the ``FrameworkBundle``, two more options are predefined: * ``--env``: sets the Kernel configuration environment (defaults to ``APP_ENV``) diff --git a/console/lockable_trait.rst b/console/lockable_trait.rst index 2a4fd64ffaf..9d81504328b 100644 --- a/console/lockable_trait.rst +++ b/console/lockable_trait.rst @@ -62,8 +62,4 @@ a ``$lockFactory`` property with your own lock factory:: // ... } -.. versionadded:: 7.1 - - The ``$lockFactory`` property was introduced in Symfony 7.1. - .. _`locks`: https://en.wikipedia.org/wiki/Lock_(computer_science) diff --git a/console/style.rst b/console/style.rst index 5357b9e6172..827cbc9bde1 100644 --- a/console/style.rst +++ b/console/style.rst @@ -181,11 +181,6 @@ Content Methods ], ]); -.. versionadded:: 7.3 - - The ``SymfonyStyle::tree()`` and the ``SymfonyStyle::createTree()`` methods - were introduced in Symfony 7.3. - :method:`Symfony\\Component\\Console\\Style\\SymfonyStyle::createTree` Creates an instance of :class:`Symfony\\Component\\Console\\Helper\\TreeHelper` styled according to the Symfony Style Guide, which allows you to use diff --git a/console/verbosity.rst b/console/verbosity.rst index 3afd085d773..39fc6f4f3f9 100644 --- a/console/verbosity.rst +++ b/console/verbosity.rst @@ -26,10 +26,6 @@ messages, but you can control their verbosity with the ``-q`` and ``-v`` options # display all messages (useful to debug errors) $ php bin/console some-command -vvv -.. versionadded:: 7.2 - - The ``--silent`` option was introduced in Symfony 7.2. - The verbosity level can also be controlled globally for all commands with the ``SHELL_VERBOSITY`` environment variable (the ``-q`` and ``-v`` options still have more precedence over the value of ``SHELL_VERBOSITY``): @@ -82,10 +78,6 @@ level. For example:: } } -.. versionadded:: 7.2 - - The ``isSilent()`` method was introduced in Symfony 7.2. - When the silent or quiet level are used, all output is suppressed as the default :method:`Symfony\\Component\\Console\\Output\\Output::write` method returns without actually printing. diff --git a/contributing/code/pull_requests.rst b/contributing/code/pull_requests.rst index 6b40e940dfb..b6ca5d49beb 100644 --- a/contributing/code/pull_requests.rst +++ b/contributing/code/pull_requests.rst @@ -31,7 +31,7 @@ Before working on Symfony, setup a friendly environment with the following software: * Git; -* PHP version 8.2 or above. +* PHP version 8.4 or above. Configure Git ~~~~~~~~~~~~~ diff --git a/contributing/documentation/format.rst b/contributing/documentation/format.rst index 3318df50841..86f43b233c4 100644 --- a/contributing/documentation/format.rst +++ b/contributing/documentation/format.rst @@ -243,39 +243,39 @@ 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:: 7.x`` +For a new feature or a behavior change use the ``.. versionadded:: 8.x`` directive: .. code-block:: rst - .. versionadded:: 7.2 + .. versionadded:: 8.2 - ... ... ... was introduced in Symfony 7.2. + ... ... ... was introduced in Symfony 8.2. If you are documenting a behavior change, it may be helpful to *briefly* describe how the behavior has changed: .. code-block:: rst - .. versionadded:: 7.2 + .. versionadded:: 8.2 - ... ... ... was introduced in Symfony 7.2. Prior to this, + ... ... ... was introduced in Symfony 8.2. Prior to this, ... ... ... ... ... ... ... ... . -For a deprecation use the ``.. deprecated:: 7.x`` directive: +For a deprecation use the ``.. deprecated:: 8.x`` directive: .. code-block:: rst - .. deprecated:: 7.2 + .. deprecated:: 8.2 - ... ... ... was deprecated in Symfony 7.2. + ... ... ... was deprecated in Symfony 8.2. -Whenever a new major version of Symfony is released (e.g. 8.0, 9.0, etc), a new +Whenever a new major version of Symfony is released (e.g. 9.0, 10.0, etc), a new branch of the documentation is created from the ``x.4`` branch of the previous major version. At this point, all the ``versionadded`` and ``deprecated`` tags for Symfony versions that have a lower major version will be removed. For -example, if Symfony 8.0 were released today, 7.0 to 7.4 ``versionadded`` and -``deprecated`` tags would be removed from the new ``8.0`` branch. +example, if Symfony 9.0 were released today, 8.0 to 8.4 ``versionadded`` and +``deprecated`` tags would be removed from the new ``9.0`` branch. .. _`reStructuredText`: https://docutils.sourceforge.io/rst.html .. _`Docs Builder`: https://github.com/symfony-tools/docs-builder diff --git a/controller.rst b/controller.rst index 05abdaee4ea..7f5c9f39086 100644 --- a/controller.rst +++ b/controller.rst @@ -373,10 +373,6 @@ The ``MapQueryParameter`` attribute supports the following argument types: * ``string`` * Objects that extend :class:`Symfony\\Component\\Uid\\AbstractUid` -.. versionadded:: 7.3 - - Support for ``AbstractUid`` objects was introduced in Symfony 7.3. - ``#[MapQueryParameter]`` can take an optional argument called ``filter``. You can use the `Validate Filters`_ constants defined in PHP:: @@ -473,10 +469,6 @@ set the ``key`` option in the ``#[MapQueryString]`` attribute:: // ... } -.. versionadded:: 7.3 - - The ``key`` option of ``#[MapQueryString]`` was introduced in Symfony 7.3. - If you need a valid DTO even when the request query string is empty, set a default value for your controller arguments:: @@ -618,10 +610,6 @@ using the ``type`` option of the attribute:: // ... } -.. versionadded:: 7.1 - - The ``type`` option of ``#[MapRequestPayload]`` was introduced in Symfony 7.1. - .. _controller_map-uploaded-file: Mapping Uploaded Files @@ -718,10 +706,6 @@ there are constraint violations: )] UploadedFile $document -.. versionadded:: 7.1 - - The ``#[MapUploadedFile]`` attribute was introduced in Symfony 7.1. - Managing the Session -------------------- diff --git a/controller/error_pages.rst b/controller/error_pages.rst index 06087837437..8e50fa0d132 100644 --- a/controller/error_pages.rst +++ b/controller/error_pages.rst @@ -192,11 +192,6 @@ need to replace ``http://localhost/`` by the host used in your local setup): * ``http://localhost/_error/{statusCode}`` for HTML * ``http://localhost/_error/{statusCode}.{format}`` for any other format -.. versionadded:: 7.3 - - The ``errors.php`` file was introduced in Symfony 7.3. - Previously, you had to import ``errors.xml`` - .. _overriding-non-html-error-output: Overriding Error output for non-HTML formats @@ -346,10 +341,6 @@ time and again, you can have just one (or several) listeners deal with them. Dumping Error Pages as Static HTML Files ---------------------------------------- -.. versionadded:: 7.3 - - The feature to dump error pages into static HTML files was introduced in Symfony 7.3. - If an error occurs before reaching your Symfony application, web servers display their own default error pages instead of your custom ones. Dumping your application's error pages to static HTML ensures users always see your defined pages and improves diff --git a/controller/service.rst b/controller/service.rst index cf83e066a19..3cba131daed 100644 --- a/controller/service.rst +++ b/controller/service.rst @@ -25,11 +25,6 @@ its methods. This is the simplest and recommended way to register controllers as services when not extending the base controller class. -.. versionadded:: 7.3 - - The feature to register controllers as services when using the ``#[Route]`` - attribute was introduced in Symfony 7.3. - Using the ``#[AsController]`` Attribute --------------------------------------- diff --git a/controller/upload_file.rst b/controller/upload_file.rst index 793cd26dd65..cb203e6225d 100644 --- a/controller/upload_file.rst +++ b/controller/upload_file.rst @@ -196,10 +196,6 @@ There are some important things to consider in the code of the above controller: the **webkitRelativePath** as provided by the browser. Otherwise this value will be identical to ``getClientOriginalName()``. -.. versionadded:: 7.1 - - The ``getClientOriginalPath()`` method was introduced in Symfony 7.1. - You can use the following code to link to the PDF brochure of a product: .. code-block:: html+twig diff --git a/deployment/proxies.rst b/deployment/proxies.rst index 4dad6f95fb1..d9d974314bf 100644 --- a/deployment/proxies.rst +++ b/deployment/proxies.rst @@ -92,16 +92,6 @@ using the following configuration options: ; }; -.. versionadded:: 7.1 - - ``private_ranges`` as a shortcut for private IP address ranges for the - ``trusted_proxies`` option was introduced in Symfony 7.1. - -.. versionadded:: 7.2 - - Support for the ``SYMFONY_TRUSTED_PROXIES`` and ``SYMFONY_TRUSTED_HEADERS`` - environment variables was introduced in Symfony 7.2. - .. danger:: Enabling the ``Request::HEADER_X_FORWARDED_HOST`` option exposes the @@ -159,10 +149,6 @@ In this case, you'll need to - *very carefully* - trust *all* proxies. # runtime by the IpUtils::PRIVATE_SUBNETS constant # trusted_proxies: '127.0.0.1,PRIVATE_SUBNETS' -.. versionadded:: 7.2 - - The support for the ``'PRIVATE_SUBNETS'`` string was introduced in Symfony 7.2. - That's it! It's critical that you prevent traffic from all non-trusted sources. If you allow outside traffic, they could "spoof" their true IP address and other information. diff --git a/doctrine.rst b/doctrine.rst index 6a1438322fa..52bfbd353d5 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -712,10 +712,6 @@ The ``{slug:product}`` syntax maps the route parameter named ``slug`` to the controller argument named ``$product``. It also hints the resolver to look up the corresponding ``Product`` object from the database using the slug. -.. versionadded:: 7.1 - - Route parameter mapping was introduced in Symfony 7.1. - You can also configure the mapping explicitly for any controller argument using the ``MapEntity`` attribute. You can even control the behavior of the ``EntityValueResolver`` by using the `MapEntity options`_ :: @@ -768,10 +764,6 @@ In that case, update the type of your controller argument:: ): Response { } -.. versionadded:: 7.1 - - The mapping of the lists of entities was introduced in Symfony 7.1. - This can also be used to help resolve multiple arguments:: #[Route('/product/{id}/comments/{comment_id}')] @@ -819,11 +811,6 @@ resolved automatically:: // ... } -.. versionadded:: 7.3 - - Support for target entity resolution in the ``EntityValueResolver`` was - introduced Symfony 7.3 - MapEntity Options ~~~~~~~~~~~~~~~~~ @@ -888,10 +875,6 @@ control behavior: ): Response { } -.. versionadded:: 7.1 - - The ``message`` option was introduced in Symfony 7.1. - Updating an Object ------------------ diff --git a/doctrine/resolve_target_entity.rst b/doctrine/resolve_target_entity.rst index 1495f475628..9cf54be4b90 100644 --- a/doctrine/resolve_target_entity.rst +++ b/doctrine/resolve_target_entity.rst @@ -15,11 +15,6 @@ This makes it possible to define relationships between entities without creating hard dependencies. This feature also works with the ``EntityValueResolver`` :ref:`as explained in the main Doctrine article `. -.. versionadded:: 7.3 - - Support for target entity resolution in the ``EntityValueResolver`` was - introduced Symfony 7.3 - Background ---------- diff --git a/emoji.rst b/emoji.rst index 551497f0c76..718fc5d952c 100644 --- a/emoji.rst +++ b/emoji.rst @@ -1,10 +1,6 @@ Working with Emojis =================== -.. versionadded:: 7.1 - - The emoji component was introduced in Symfony 7.1. - Symfony provides several utilities to work with emoji characters and sequences from the `Unicode CLDR dataset`_. They are available via the Emoji component, which you must first install in your application: diff --git a/form/form_customization.rst b/form/form_customization.rst index dc09aefe77d..2b42343a7fd 100644 --- a/form/form_customization.rst +++ b/form/form_customization.rst @@ -131,10 +131,6 @@ fields, so you no longer have to deal with form themes: {% endfor %} -.. versionadded:: 7.3 - - The ``field_id()`` helper was introduced in Symfony 7.3. - Form Rendering Variables ------------------------ diff --git a/frontend/asset_mapper.rst b/frontend/asset_mapper.rst index 454e13a1d29..33fe53b4ab9 100644 --- a/frontend/asset_mapper.rst +++ b/frontend/asset_mapper.rst @@ -157,10 +157,6 @@ The ``debug:asset-map`` command provides several options to filter results: # you can also combine all filters (e.g. find bold web fonts in your own asset dirs) $ php bin/console debug:asset-map bold --no-vendor --ext=woff2 -.. versionadded:: 7.2 - - The options to filter ``debug:asset-map`` results were introduced in Symfony 7.2. - .. _importmaps-javascript: Importmaps & Writing JavaScript @@ -220,10 +216,6 @@ to add any `npm package`_: Add the ``--dry-run`` option to simulate package installation without actually making any changes (e.g. ``php bin/console importmap:require bootstrap --dry-run``) - .. versionadded:: 7.3 - - The ``--dry-run`` option was introduced in Symfony 7.3. - This adds the ``bootstrap`` package to your ``importmap.php`` file:: // importmap.php @@ -740,10 +732,6 @@ Symfony will add a ``Link`` header in the response to preload the CSS files. Pre-Compressing Assets ---------------------- -.. versionadded:: 7.3 - - Support for pre-compressing assets was introduced in Symfony 7.3. - Although most web servers (Caddy, Nginx, Apache, FrankenPHP) and services like Cloudflare provide asset compression features, AssetMapper also allows you to compress all your assets before serving them. diff --git a/http_client.rst b/http_client.rst index bdb51681dc3..8914453fdf5 100644 --- a/http_client.rst +++ b/http_client.rst @@ -157,11 +157,6 @@ brings most of the available options with type-hinted getters and setters:: ->toArray() ); -.. versionadded:: 7.1 - - The :method:`Symfony\\Component\\HttpClient\\HttpOptions::setHeader` - method was introduced in Symfony 7.1. - Some options are described in this guide: * `Authentication`_ @@ -996,9 +991,13 @@ Enabling cURL Support ~~~~~~~~~~~~~~~~~~~~~ This component can make HTTP requests using native PHP streams and the -``amphp/http-client`` and cURL libraries. Although they are interchangeable and -provide the same features, including concurrent requests, HTTP/2 is only supported -when using cURL or ``amphp/http-client``. +``amphp/http-client`` (version 5.3.2 or higher) and cURL libraries. Although they +are interchangeable and provide the same features, including concurrent requests, +HTTP/2 is only supported when using cURL or ``amphp/http-client``. + +.. versionadded:: 8.0 + + Symfony started requiring ``amphp/http-client`` version 5.3.2 or higher in Symfony 8.0. .. note:: @@ -1604,11 +1603,6 @@ installed in your application:: $client = HttpClient::createForBaseUri('https://example.com'); $throttlingClient = new ThrottlingHttpClient($client, $limiter); -.. versionadded:: 7.1 - - The :class:`Symfony\\Component\\HttpClient\\ThrottlingHttpClient` was - introduced in Symfony 7.1. - Consuming Server-Sent Events ---------------------------- @@ -2057,11 +2051,6 @@ snapshots in files:: $response = MockResponse::fromFile('tests/fixtures/response.xml'); -.. versionadded:: 7.1 - - The :method:`Symfony\\Component\\HttpClient\\Response\\MockResponse::fromFile` - method was introduced in Symfony 7.1. - Another way of using :class:`Symfony\\Component\\HttpClient\\MockHttpClient` is to pass a callback that generates the responses dynamically when it's called:: @@ -2244,11 +2233,6 @@ directly from a file:: $response = JsonMockResponse::fromFile('tests/fixtures/response.json'); -.. versionadded:: 7.1 - - The :method:`Symfony\\Component\\HttpClient\\Response\\JsonMockResponse::fromFile` - method was introduced in Symfony 7.1. - Testing Request Data ~~~~~~~~~~~~~~~~~~~~ diff --git a/lock.rst b/lock.rst index 6bfe7a5390e..eede96d189d 100644 --- a/lock.rst +++ b/lock.rst @@ -167,10 +167,6 @@ this behavior by using the ``lock`` key like: ; }; -.. versionadded:: 7.2 - - The option to use an existing service as the lock/semaphore was introduced in Symfony 7.2. - Locking a Resource ------------------ diff --git a/mailer.rst b/mailer.rst index 46517dfd968..4f23bc742c3 100644 --- a/mailer.rst +++ b/mailer.rst @@ -120,18 +120,6 @@ Service Install with Webhook su `Sweego`_ ``composer require symfony/sweego-mailer`` yes ===================== =============================================== =============== -.. versionadded:: 7.1 - - The Azure and Resend integrations were introduced in Symfony 7.1. - -.. versionadded:: 7.2 - - The Mailomat, Mailtrap, Postal and Sweego integrations were introduced in Symfony 7.2. - -.. versionadded:: 7.3 - - The AhaSend integration was introduced in Symfony 7.3. - .. note:: As a convenience, Symfony also provides support for Gmail (``composer @@ -341,10 +329,6 @@ the retry period by setting the ``retry_period`` option in the DSN: MAILER_DSN="failover(postmark+api://ID@default sendgrid+smtp://KEY@default)?retry_period=15" -.. versionadded:: 7.3 - - The ``retry_period`` option was introduced in Symfony 7.3. - Load Balancing ~~~~~~~~~~~~~~ @@ -372,10 +356,6 @@ the retry period by setting the ``retry_period`` option in the DSN: MAILER_DSN="roundrobin(postmark+api://ID@default sendgrid+smtp://KEY@default)?retry_period=15" -.. versionadded:: 7.3 - - The ``retry_period`` option was introduced in Symfony 7.3. - TLS Peer Verification ~~~~~~~~~~~~~~~~~~~~~ @@ -399,10 +379,6 @@ may be specified as SHA1 or MD5 hash:: Disabling Automatic TLS ~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 7.1 - - The option to disable automatic TLS was introduced in Symfony 7.1. - By default, the Mailer component will use encryption when the OpenSSL extension is enabled and the SMTP server supports ``STARTTLS``. This behavior can be turned off by calling ``setAutoTls(false)`` on the ``EsmtpTransport`` instance, or by @@ -438,17 +414,9 @@ with the SMTP server. This setting only applies when using the ``smtp://`` protocol. -.. versionadded:: 7.3 - - The ``require_tls`` option was introduced in Symfony 7.3. - Binding to IPv4 or IPv6 ~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 7.3 - - The option to bind to IPv4, or IPv6, or a specific IP address was introduced in Symfony 7.3. - By default, the underlying ``SocketStream`` will bind to IPv4 or IPv6 based on the available interfaces. You can enforce binding to a specific protocol or IP address by using the ``source_ip`` option. To bind to IPv4, use:: @@ -634,11 +602,6 @@ both strings or address objects:: :ref:`configure emails globally ` to set the same ``From`` email to all messages. -.. versionadded:: 7.2 - - Support for non-ASCII email addresses (e.g. ``jânë.dœ@ëxãmplę.com``) - was introduced in Symfony 7.2. - .. note:: The local part of the address (what goes before the ``@``) can include UTF-8 @@ -1123,10 +1086,6 @@ This behavior can be overridden by passing a custom file name as the third argum ACME Logo -.. versionadded:: 7.3 - - The third argument of ``email.image()`` was introduced in Symfony 7.3. - .. _mailer-inline-css: Inlining CSS Styles @@ -1495,10 +1454,6 @@ minimizes repetition and centralizes your configuration for DKIM and S/MIME sign ; }; -.. versionadded:: 7.3 - - Global message signing was introduced in Symfony 7.3. - Encrypting Messages ~~~~~~~~~~~~~~~~~~~ @@ -1616,10 +1571,6 @@ return the file path to the certificate associated with the given email address: } } -.. versionadded:: 7.3 - - Global message encryption configuration was introduced in Symfony 7.3. - .. _multiple-email-transports: Multiple Email Transports @@ -2226,10 +2177,6 @@ With this configuration, all emails will be sent to ``youremail@example.com``, except for those sent to ``internal@example.com``, ``internal-monitoring@example.fr``, etc., which will receive emails as usual. -.. versionadded:: 7.1 - - The ``allowed_recipients`` option was introduced in Symfony 7.1. - Write a Functional Test ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/messenger.rst b/messenger.rst index 61763453764..f9756ec0df9 100644 --- a/messenger.rst +++ b/messenger.rst @@ -266,10 +266,6 @@ you can configure them to be sent to a transport: ; }; -.. versionadded:: 7.2 - - The ``#[AsMessage]`` attribute was introduced in Symfony 7.2. - Thanks to this, the ``App\Message\SmsNotification`` will be sent to the ``async`` transport and its handler(s) will *not* be called immediately. Any messages not matched under ``routing`` will still be handled immediately, i.e. synchronously. @@ -539,10 +535,6 @@ command with the ``--all`` option: $ php bin/console messenger:consume --all -.. versionadded:: 7.1 - - The ``--all`` option was introduced in Symfony 7.1. - Messages that take a long time to process may be redelivered prematurely because some transports assume that an unacknowledged message is lost. To prevent this issue, use the ``--keepalive`` command option to specify an interval (in seconds; @@ -557,10 +549,6 @@ the message from being redelivered until the worker completes processing it: This option is only available for the following transports: Beanstalkd, AmazonSQS, Doctrine and Redis. -.. versionadded:: 7.2 - - The ``--keepalive`` option was introduced in Symfony 7.2. - .. tip:: In a development environment and if you're using the Symfony CLI tool, @@ -757,10 +745,6 @@ of some or all transports: $ php bin/console messenger:stats --format=json $ php bin/console messenger:stats my_transport_name other_transport_name --format=json -.. versionadded:: 7.2 - - The ``format`` option was introduced in Symfony 7.2. - .. note:: In order for this command to work, the configured transport's receiver must implement @@ -894,12 +878,6 @@ configuration option: ->stopWorkerOnSignals(['SIGTERM', 'SIGINT', 'SIGUSR1']); }; -.. versionadded:: 7.3 - - Support for signals plain names in configuration was introduced in Symfony 7.3. - Previously, you had to use the numeric values of signals as defined by the - ``pcntl`` extension's `predefined constants`_. - In some cases the ``SIGTERM`` signal is sent by Supervisor itself (e.g. stopping a Docker container having Supervisor as its entrypoint). In these cases you need to add a ``stopwaitsecs`` key to the program configuration (with a value @@ -1166,10 +1144,6 @@ this is configurable for each transport: ; }; -.. versionadded:: 7.1 - - The ``jitter`` option was introduced in Symfony 7.1. - .. tip:: Symfony triggers a :class:`Symfony\\Component\\Messenger\\Event\\WorkerMessageRetriedEvent` @@ -1207,11 +1181,6 @@ You can define a custom retry delay (e.g., to use the value from the ``Retry-Aft header in an HTTP response) by setting the ``retryDelay`` argument in the constructor of the ``RecoverableMessageHandlingException``. -.. versionadded:: 7.2 - - The ``retryDelay`` argument and the ``getRetryDelay()`` method were introduced - in Symfony 7.2. - .. _messenger-failure-transport: Saving & Retrying Failed Messages @@ -1319,16 +1288,6 @@ If the message fails again, it will be re-sent back to the failure transport due to the normal :ref:`retry rules `. Once the max retry has been hit, the message will be discarded permanently. -.. versionadded:: 7.2 - - The option to skip a message in the ``messenger:failed:retry`` command was - introduced in Symfony 7.2 - -.. versionadded:: 7.3 - - The option to filter by a message class in the ``messenger:failed:remove`` command was - introduced in Symfony 7.3 - Multiple Failed Transports ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1650,10 +1609,6 @@ The transport has a number of options: ``exchange[type]`` (default: ``fanout``) Type of exchange -.. versionadded:: 7.3 - - Empty string support for ``exchange[name]`` was introduced in Symfony 7.3. - You can also configure AMQP-specific settings on your message by adding :class:`Symfony\\Component\\Messenger\\Bridge\\Amqp\\Transport\\AmqpStamp` to your Envelope:: @@ -1760,10 +1715,6 @@ in the table. The Doctrine transport supports the ``--keepalive`` option by periodically updating the ``delivered_at`` timestamp to prevent the message from being redelivered. -.. versionadded:: 7.3 - - Keepalive support was introduced in Symfony 7.3. - Beanstalkd Transport ~~~~~~~~~~~~~~~~~~~~ @@ -1790,10 +1741,6 @@ The transport has a number of options: When set to ``true``, rejected messages are placed into a "buried" state in Beanstalkd instead of being deleted. - .. versionadded:: 7.3 - - The ``bury_on_reject`` option was introduced in Symfony 7.3. - ``timeout`` (default: ``0``) Message reservation timeout - in seconds. 0 will cause the server to immediately return either a response or a TransportException will be thrown. @@ -1808,10 +1755,6 @@ The transport has a number of options: The Beanstalkd transport supports the ``--keepalive`` option by using Beanstalkd's ``touch`` command to periodically reset the job's ``ttr``. -.. versionadded:: 7.2 - - Keepalive support was introduced in Symfony 7.2. - The Beanstalkd transport lets you set the priority of the messages being dispatched. Use the :class:`Symfony\\Component\\Messenger\\Bridge\\Beanstalkd\\Transport\\BeanstalkdPriorityStamp` and pass a number to specify the priority (default = ``1024``; lower numbers mean higher priority):: @@ -1825,10 +1768,6 @@ and pass a number to specify the priority (default = ``1024``; lower numbers mea new BeanstalkdPriorityStamp(0), ]); -.. versionadded:: 7.3 - - ``BeanstalkdPriorityStamp`` support was introduced in Symfony 7.3. - .. _messenger-redis-transport: Redis Transport @@ -1931,10 +1870,6 @@ under the transport in ``messenger.yaml``: ``redis_sentinel`` (default: ``null``) An alias of the ``sentinel_master`` option - .. versionadded:: 7.1 - - The ``redis_sentinel`` option was introduced in Symfony 7.1. - ``ssl`` (default: ``null``) Map of `SSL context options`_ for the TLS channel. This is useful for example to change the requirements for the TLS channel in tests: @@ -1978,10 +1913,6 @@ under the transport in ``messenger.yaml``: The Redis transport supports the ``--keepalive`` option by using Redis's ``XCLAIM`` command to periodically reset the message's idle time to zero. -.. versionadded:: 7.3 - - Keepalive support was introduced in Symfony 7.3. - In Memory Transport ~~~~~~~~~~~~~~~~~~~ @@ -2145,10 +2076,6 @@ The transport has a number of options: ``wait_time`` (default: ``20``) `Long polling`_ duration in seconds -.. versionadded:: 7.3 - - The ``queue_attributes`` and ``queue_tags`` options were introduced in Symfony 7.3. - .. note:: The ``wait_time`` parameter defines the maximum duration Amazon SQS should @@ -2184,10 +2111,6 @@ The transport has a number of options: The SQS transport supports the ``--keepalive`` option by using the ``ChangeMessageVisibility`` action to periodically update the ``VisibilityTimeout`` of the message. -.. versionadded:: 7.2 - - Keepalive support was introduced in Symfony 7.2. - Serializing Messages ~~~~~~~~~~~~~~~~~~~~ @@ -2282,11 +2205,6 @@ This interface is implemented by the following transports: AmazonSqs, Amqp, and If you need to close a Doctrine connection, you can do so :ref:`using middleware `. -.. versionadded:: 7.3 - - The ``CloseableTransportInterface`` and its ``close()`` method were introduced - in Symfony 7.3. - Running Commands And External Processes --------------------------------------- @@ -2379,10 +2297,6 @@ If you want to use shell features such as redirections or pipes, use the static For more information, read the documentation about :ref:`using features from the OS shell `. -.. versionadded:: 7.3 - - The ``RunProcessMessage::fromShellCommandline()`` method was introduced in Symfony 7.3. - Once handled, the handler will return a :class:`Symfony\\Component\\Process\\Messenger\\RunProcessContext` which contains many useful information such as the exit code or the output of the @@ -2534,10 +2448,6 @@ to the existing ones:: $this->handle(new SomeMessage($data), [new SomeStamp(), new AnotherStamp()]); -.. versionadded:: 7.3 - - The ``$stamps`` parameter of the ``handle()`` method was introduced in Symfony 7.3. - Customizing Handlers -------------------- @@ -3764,5 +3674,4 @@ Learn more .. _`high connection churn`: https://www.rabbitmq.com/connections.html#high-connection-churn .. _`article about CQRS`: https://martinfowler.com/bliki/CQRS.html .. _`SSL context options`: https://php.net/context.ssl -.. _`predefined constants`: https://www.php.net/pcntl.constants .. _`SQS CreateQueue API`: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html diff --git a/notifier.rst b/notifier.rst index 49a1c2d533b..461eefa331a 100644 --- a/notifier.rst +++ b/notifier.rst @@ -38,10 +38,6 @@ The notifier component supports the following channels: * :ref:`Desktop channel ` displays desktop notifications on the same host machine. -.. versionadded:: 7.2 - - The ``Desktop`` channel was introduced in Symfony 7.2. - .. _notifier-sms-channel: SMS Channel @@ -159,9 +155,6 @@ Service `Sendinblue`_ **Install**: ``composer require symfony/sendinblue-notifier`` \ **DSN**: ``sendinblue://API_KEY@default?sender=PHONE`` \ **Webhook support**: No -`Sms77`_ **Install**: ``composer require symfony/sms77-notifier`` \ - **DSN**: ``sms77://API_KEY@default?from=FROM`` \ - **Webhook support**: No `SimpleTextin`_ **Install**: ``composer require symfony/simple-textin-notifier`` \ **DSN**: ``simpletextin://API_KEY@default?from=FROM`` \ **Webhook support**: No @@ -229,26 +222,6 @@ Service via webhooks. See the :doc:`Webhook documentation ` for more details. -.. versionadded:: 7.1 - - The ``Smsbox``, ``SmsSluzba``, ``SMSense``, ``LOX24`` and ``Unifonic`` - integrations were introduced in Symfony 7.1. - -.. versionadded:: 7.2 - - The ``Primotexto``, ``Sipgate`` and ``Sweego`` integrations were introduced in Symfony 7.2. - -.. versionadded:: 7.3 - - Webhook support for the ``Brevo`` integration was introduced in Symfony 7.3. - The extra properties in ``SentMessage`` for ``AllMySms`` and ``OvhCloud`` - providers were introduced in Symfony 7.3 too. - -.. deprecated:: 7.1 - - The `Sms77`_ integration is deprecated since - Symfony 7.1, use the `Seven.io`_ integration instead. - To enable a texter, add the correct DSN in your ``.env`` file and configure the ``texter_transports``: @@ -406,23 +379,6 @@ Service **DSN**: ``zulip://EMAIL:TOKEN@HOST?channel=CHANNEL`` ====================================== ===================================================================================== -.. versionadded:: 7.1 - - The ``Bluesky`` integration was introduced in Symfony 7.1. - -.. versionadded:: 7.2 - - The ``LINE Bot`` integration was introduced in Symfony 7.2. - -.. deprecated:: 7.2 - - The ``Gitter`` integration was removed in Symfony 7.2 because that service - no longer provides an API. - -.. versionadded:: 7.3 - - The ``Matrix`` integration was introduced in Symfony 7.3. - .. warning:: By default, if you have the :doc:`Messenger component ` installed, @@ -628,10 +584,6 @@ Service To enable a texter, add the correct DSN in your ``.env`` file and configure the ``texter_transports``: -.. versionadded:: 7.1 - - The `Pushy`_ integration was introduced in Symfony 7.1. - .. code-block:: bash # .env @@ -694,10 +646,6 @@ Provider Install DSN `JoliNotif`_ ``composer require symfony/joli-notif-notifier`` ``jolinotif://default`` =============== ================================================ ============================================================================== -.. versionadded:: 7.2 - - The JoliNotif bridge was introduced in Symfony 7.2. - If you are using :ref:`Symfony Flex `, installing that package will also create the necessary environment variable and configuration. Otherwise, you'll need to add the following manually: @@ -1329,7 +1277,6 @@ is dispatched. Listeners receive a .. _`Sinch`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/Sinch/README.md .. _`Sipgate`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/Sipgate/README.md .. _`Slack`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/Slack/README.md -.. _`Sms77`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/Sms77/README.md .. _`SmsBiuras`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/SmsBiuras/README.md .. _`Smsbox`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/Smsbox/README.md .. _`Smsapi`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/Smsapi/README.md diff --git a/object_mapper.rst b/object_mapper.rst index 625466ffefc..bee6f156f93 100644 --- a/object_mapper.rst +++ b/object_mapper.rst @@ -1,11 +1,6 @@ Object Mapper ============= -.. versionadded:: 7.3 - - The ObjectMapper component was introduced in Symfony 7.3 as an - :doc:`experimental feature `. - This component transforms one object into another, simplifying tasks such as converting DTOs (Data Transfer Objects) into entities or vice versa. It can also be helpful when decoupling API input/output from internal models, particularly diff --git a/performance.rst b/performance.rst index 828333f338b..9ec91958060 100644 --- a/performance.rst +++ b/performance.rst @@ -365,10 +365,6 @@ method does, which stops an event and then restarts it immediately:: // Gets the last event period: // $event->getLastPeriod(); -.. versionadded:: 7.2 - - The ``getLastPeriod()`` method was introduced in Symfony 7.2. - Profiling Sections .................. @@ -395,10 +391,6 @@ know their names, as follows:: echo (string) $event; } -.. versionadded:: 7.2 - - The ``Stopwatch::ROOT`` constant as a shortcut for ``__root__`` was introduced in Symfony 7.2. - Learn more ---------- diff --git a/rate_limiter.rst b/rate_limiter.rst index 3a517c37bd4..4807bdf6333 100644 --- a/rate_limiter.rst +++ b/rate_limiter.rst @@ -222,20 +222,9 @@ prevents that number from being higher than 5,000). find them with a :doc:`tagged iterator ` or :doc:`locator `. - .. versionadded:: 7.1 - - The automatic addition of the ``rate_limiter`` tag was introduced - in Symfony 7.1. - Rate Limiting in Action ----------------------- -.. versionadded:: 7.3 - - :class:`Symfony\\Component\\RateLimiter\\RateLimiterFactoryInterface` was - added and should now be used for autowiring instead of - :class:`Symfony\\Component\\RateLimiter\\RateLimiterFactory`. - After having installed and configured the rate limiter, inject it in any service or controller and call the ``consume()`` method to try to consume a given number of tokens. For example, this controller uses the previous rate limiter to control @@ -541,19 +530,9 @@ at all): ; }; -.. versionadded:: 7.3 - - Before Symfony 7.3, configuring a rate limiter and using the default configured - lock factory (``lock.factory``) failed if the Symfony Lock component was not - installed in the application. - Compound Rate Limiter --------------------- -.. versionadded:: 7.3 - - Support for configuring compound rate limiters was introduced in Symfony 7.3. - You can configure multiple rate limiters to work together: .. configuration-block:: diff --git a/reference/attributes.rst b/reference/attributes.rst index 968c7df1568..76fdf1477e4 100644 --- a/reference/attributes.rst +++ b/reference/attributes.rst @@ -39,17 +39,10 @@ Dependency Injection * :ref:`AutowireServiceClosure ` * :ref:`Exclude ` * :ref:`Lazy ` -* :ref:`TaggedIterator ` -* :ref:`TaggedLocator ` * :ref:`Target ` * :ref:`When ` * :ref:`WhenNot ` -.. deprecated:: 7.1 - - The :class:`Symfony\\Component\\DependencyInjection\\Attribute\\TaggedIterator` - and :class:`Symfony\\Component\\DependencyInjection\\Attribute\\TaggedLocator` - attributes were deprecated in Symfony 7.1. EventDispatcher ~~~~~~~~~~~~~~~ diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index e60e5d67c99..6a76dd5a8e4 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -867,10 +867,6 @@ stateless_token_ids The list of CSRF token ids that will use :ref:`stateless CSRF protection `. -.. versionadded:: 7.2 - - The ``stateless_token_ids`` option was introduced in Symfony 7.2. - check_header ............ @@ -882,10 +878,6 @@ this to ``2`` (the value of the ``CHECK_ONLY_HEADER`` constant on the :class:`Symfony\\Component\\Security\\Csrf\\SameOriginCsrfTokenManager` class) to check only the header and ignore the cookie. -.. versionadded:: 7.2 - - The ``check_header`` option was introduced in Symfony 7.2. - cookie_name ........... @@ -894,10 +886,6 @@ cookie_name The name of the cookie (and HTTP header) to use for the double-submit when using :ref:`stateless CSRF protection `. -.. versionadded:: 7.2 - - The ``cookie_name`` option was introduced in Symfony 7.2. - .. _config-framework-default_locale: default_locale @@ -1120,10 +1108,6 @@ and HTTP status code applied to the exceptions that match the given exception cl ; }; -.. versionadded:: 7.3 - - The ``log_channel`` option was introduced in Symfony 7.3. - The order in which you configure exceptions is important because Symfony will use the configuration of the first exception that matches ``instanceof``: @@ -1183,11 +1167,6 @@ The attributes can also be added to interfaces directly:: { } -.. versionadded:: 7.1 - - Support to use ``#[WithHttpStatus]`` and ``#[WithLogLevel]`` attributes - on interfaces was introduced in Symfony 7.1. - .. _reference-framework-form: form @@ -1843,10 +1822,6 @@ The service ID of the rate limiter used to limit the number of HTTP requests within a certain period. The service must implement the :class:`Symfony\\Component\\RateLimiter\\LimiterInterface`. -.. versionadded:: 7.1 - - The ``rate_limiter`` option was introduced in Symfony 7.1. - resolve ....... @@ -2535,10 +2510,6 @@ with_constructor_extractor Configures the ``property_info`` service to extract property information from the constructor arguments using the :ref:`ConstructorExtractor `. -.. versionadded:: 7.3 - - The ``with_constructor_extractor`` option was introduced in Symfony 7.3. - rate_limiter ~~~~~~~~~~~~ @@ -3154,11 +3125,6 @@ chance that the GC process will start on each request. If not set, Symfony will use the value of the `session.gc_probability`_ directive in the ``php.ini`` configuration file. -.. versionadded:: 7.2 - - Relying on ``php.ini``'s directive as default for ``gc_probability`` was - introduced in Symfony 7.2. - .. _config-framework-session-handler-id: handler_id @@ -3310,39 +3276,6 @@ If ``null``, ``php.ini``'s `session.save_path`_ directive will be relied on: ->savePath(null); }; -sid_bits_per_character -...................... - -**type**: ``integer`` - -This determines the number of bits in the encoded session ID character. The possible -values are ``4`` (0-9, a-f), ``5`` (0-9, a-v), and ``6`` (0-9, a-z, A-Z, "-", ","). -The more bits results in stronger session ID. ``5`` is recommended value for -most environments. - -If not set, ``php.ini``'s `session.sid_bits_per_character`_ directive will be relied on. - -.. deprecated:: 7.2 - - The ``sid_bits_per_character`` option was deprecated in Symfony 7.2. No alternative - is provided as PHP 8.4 has deprecated the related option. - -sid_length -.......... - -**type**: ``integer`` - -This determines the length of session ID string, which can be an integer between -``22`` and ``256`` (both inclusive), ``32`` being the recommended value. Longer -session IDs are harder to guess. - -If not set, ``php.ini``'s `session.sid_length`_ directive will be relied on. - -.. deprecated:: 7.2 - - The ``sid_length`` option was deprecated in Symfony 7.2. No alternative is - provided as PHP 8.4 has deprecated the related option. - .. _storage_id: storage_factory_id @@ -3490,11 +3423,6 @@ trust_x_sendfile_type_header **type**: ``boolean`` **default**: ``%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%`` -.. versionadded:: 7.2 - - In Symfony 7.2, the default value of this option was changed from ``false`` to the - value stored in the ``SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER`` environment variable. - ``X-Sendfile`` is a special HTTP header that tells web servers to replace the response contents by the file that is defined in that header. This improves performance because files are no longer served by your application but directly @@ -3522,11 +3450,6 @@ trusted_hosts **type**: ``array`` | ``string`` **default**: ``['%env(default::SYMFONY_TRUSTED_HOSTS)%']`` -.. versionadded:: 7.2 - - In Symfony 7.2, the default value of this option was changed from ``[]`` to the - value stored in the ``SYMFONY_TRUSTED_HOSTS`` environment variable. - A lot of different attacks have been discovered relying on inconsistencies in handling the ``Host`` header by various software (web servers, reverse proxies, web frameworks, etc.). Basically, every time the framework is @@ -3682,10 +3605,6 @@ locale. Set this option to ``true`` to disable translation of validation message This is useful to avoid "missing translation" errors in applications that use only a single language. -.. versionadded:: 7.3 - - The ``disable_translation`` option was introduced in Symfony 7.3. - .. _reference-validation-email_validation_mode: email_validation_mode @@ -4019,8 +3938,6 @@ to know their differences. .. _`session.gc_divisor`: https://www.php.net/manual/en/session.configuration.php#ini.session.gc-divisor .. _`session.gc_probability`: https://www.php.net/manual/en/session.configuration.php#ini.session.gc-probability .. _`session.gc_maxlifetime`: https://www.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime -.. _`session.sid_length`: https://www.php.net/manual/en/session.configuration.php#ini.session.sid-length -.. _`session.sid_bits_per_character`: https://www.php.net/manual/en/session.configuration.php#ini.session.sid-bits-per-character .. _`session.save_path`: https://www.php.net/manual/en/session.configuration.php#ini.session.save-path .. _`session.use_cookies`: https://www.php.net/manual/en/session.configuration.php#ini.session.use-cookies .. _`Microsoft NTLM authentication protocol`: https://docs.microsoft.com/en-us/windows/win32/secauthn/microsoft-ntlm diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index ef7247e330e..bad6136a71b 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -22,9 +22,7 @@ key in your application configuration. **Basic Options**: * `access_denied_url`_ -* `erase_credentials`_ * `expose_security_errors`_ -* `hide_user_not_found`_ (deprecated) * `session_fixation_strategy`_ **Advanced Options**: @@ -46,41 +44,11 @@ access_denied_url Defines the URL where the user is redirected after a ``403`` HTTP error (unless you define a custom access denial handler). Example: ``/no-permission`` -erase_credentials ------------------ - -**type**: ``boolean`` **default**: ``true`` - -If ``true``, the ``eraseCredentials()`` method of the user object is called -after authentication:: - - use Symfony\Component\Security\Core\User\UserInterface; - - class User implements UserInterface - { - // ... - - public function eraseCredentials(): void - { - // If you store any temporary, sensitive data on the user, clear it here - // $this->plainPassword = null; - } - } - -.. deprecated:: 7.3 - - Since Symfony 7.3, ``eraseCredentials()`` methods are deprecated and are - not called if they have the ``#[\Deprecated]`` attribute. - expose_security_errors ---------------------- **type**: ``string`` **default**: ``'none'`` -.. versionadded:: 7.3 - - The ``expose_security_errors`` option was introduced in Symfony 7.3 - User enumeration is a common security issue where attackers infer valid usernames based on error messages. For example, a message like "This user does not exist" shown by your login form reveals whether a username exists. @@ -95,24 +63,6 @@ option can be one of the following: accounts) but only for users who provided the correct password; * ``'all'``: shows all security-related exceptions. -hide_user_not_found -------------------- - -**type**: ``boolean`` **default**: ``true`` - -.. deprecated:: 7.3 - - The ``hide_user_not_found`` option was deprecated in favor of the - ``expose_security_errors`` option in Symfony 7.3. - -If ``true``, when a user is not found a generic exception of type -:class:`Symfony\\Component\\Security\\Core\\Exception\\BadCredentialsException` -is thrown with the message "Bad credentials". - -If ``false``, the exception thrown is of type -:class:`Symfony\\Component\\Security\\Core\\Exception\\UserNotFoundException` -and it includes the given not found user identifier. - session_fixation_strategy ------------------------- diff --git a/reference/configuration/twig.rst b/reference/configuration/twig.rst index 360309fef8f..e2ac367a56f 100644 --- a/reference/configuration/twig.rst +++ b/reference/configuration/twig.rst @@ -87,12 +87,6 @@ Set this option to ``false`` to disable Twig template compilation. However, this is not recommended, not even in the ``dev`` environment, because the ``auto_reload`` option ensures that cached templates which have changed get compiled again. -.. versionadded:: 7.3 - - Support for using ``true`` as a value was introduced in Symfony 7.3. It also - became the default value for this option, replacing the explicit path - ``%kernel.cache_dir%/twig``. - charset ~~~~~~~ diff --git a/reference/configuration/web_profiler.rst b/reference/configuration/web_profiler.rst index c3b57d37c55..3c1b227d643 100644 --- a/reference/configuration/web_profiler.rst +++ b/reference/configuration/web_profiler.rst @@ -67,7 +67,3 @@ ajax_replace If you set this option to ``true``, the toolbar is replaced on AJAX requests. This only works in combination with an enabled toolbar. - -.. versionadded:: 7.3 - - The ``ajax_replace`` configuration option was introduced in Symfony 7.3. diff --git a/reference/constraints/Bic.rst b/reference/constraints/Bic.rst index 6cde4a11bac..5b2be9ed738 100644 --- a/reference/constraints/Bic.rst +++ b/reference/constraints/Bic.rst @@ -132,8 +132,4 @@ as constants in the :class:`Symfony\\Component\\Validator\\Constraints\\Bic` cla * ``Bic::VALIDATION_MODE_STRICT`` validates the given value without any modification; * ``Bic::VALIDATION_MODE_CASE_INSENSITIVE`` converts the given value to uppercase before validating it. -.. versionadded:: 7.2 - - The ``mode`` option was introduced in Symfony 7.2. - .. _`Business Identifier Code (BIC)`: https://en.wikipedia.org/wiki/Business_Identifier_Code diff --git a/reference/constraints/Charset.rst b/reference/constraints/Charset.rst index 084f24cdf76..136ef94c88a 100644 --- a/reference/constraints/Charset.rst +++ b/reference/constraints/Charset.rst @@ -1,10 +1,6 @@ Charset ======= -.. versionadded:: 7.1 - - The ``Charset`` constraint was introduced in Symfony 7.1. - Validates that a string (or an object implementing the ``Stringable`` PHP interface) is encoded in a given charset. diff --git a/reference/constraints/Cidr.rst b/reference/constraints/Cidr.rst index 78a5b6c7167..75f3b04aba1 100644 --- a/reference/constraints/Cidr.rst +++ b/reference/constraints/Cidr.rst @@ -134,8 +134,4 @@ of :ref:`IP version ranges `. considered ``*_public``, but it also includes the ``10.0.0.0/8`` range, which is categorized as ``*_private``. -.. versionadded:: 7.1 - - The support of all IP version ranges was introduced in Symfony 7.1. - .. _`CIDR`: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing diff --git a/reference/constraints/Compound.rst b/reference/constraints/Compound.rst index 4d2c7743176..307d45c84ba 100644 --- a/reference/constraints/Compound.rst +++ b/reference/constraints/Compound.rst @@ -141,11 +141,6 @@ Validation groups and payload can be passed via constructor: } } -.. versionadded:: 7.2 - - Support for passing validation groups and the payload to the constructor - of the ``Compound`` class was introduced in Symfony 7.2. - Options ------- diff --git a/reference/constraints/DateTime.rst b/reference/constraints/DateTime.rst index ffcfbf55dda..73bf7592f04 100644 --- a/reference/constraints/DateTime.rst +++ b/reference/constraints/DateTime.rst @@ -107,8 +107,4 @@ Parameter Description ``{{ format }}`` The date format defined in ``format`` ================ ============================================================== -.. versionadded:: 7.3 - - The ``{{ format }}`` parameter was introduced in Symfony 7.3. - .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/File.rst b/reference/constraints/File.rst index 62efa6cc08e..9cf52983baa 100644 --- a/reference/constraints/File.rst +++ b/reference/constraints/File.rst @@ -295,10 +295,6 @@ Can be one of the following constants of the length of the string in graphemes, i.e. even emojis and ZWJ sequences of composed emojis count as 1 character. -.. versionadded:: 7.3 - - The ``filenameCountUnit`` option was introduced in Symfony 7.3. - ``filenameTooLongMessage`` ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -340,10 +336,6 @@ Parameter Description ``{{ name }}`` The current (invalid) value ================= ============================================================ -.. versionadded:: 7.3 - - The ``filenameCharset`` and ``filenameCharsetMessage`` options were introduced in Symfony 7.3. - ``extensionsMessage`` ~~~~~~~~~~~~~~~~~~~~~ diff --git a/reference/constraints/Image.rst b/reference/constraints/Image.rst index 5dd270c44f8..a375ba647a4 100644 --- a/reference/constraints/Image.rst +++ b/reference/constraints/Image.rst @@ -210,10 +210,6 @@ add several other options. If this option is false, the image cannot be landscape oriented. -.. versionadded:: 7.3 - - The ``allowLandscape`` option support for SVG files was introduced in Symfony 7.3. - ``allowLandscapeMessage`` ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -238,10 +234,6 @@ Parameter Description If this option is false, the image cannot be portrait oriented. -.. versionadded:: 7.3 - - The ``allowPortrait`` option support for SVG files was introduced in Symfony 7.3. - ``allowPortraitMessage`` ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -268,10 +260,6 @@ If this option is false, the image cannot be a square. If you want to force a square image, then leave this option as its default ``true`` value and set `allowLandscape`_ and `allowPortrait`_ both to ``false``. -.. versionadded:: 7.3 - - The ``allowSquare`` option support for SVG files was introduced in Symfony 7.3. - ``allowSquareMessage`` ~~~~~~~~~~~~~~~~~~~~~~ @@ -370,10 +358,6 @@ Parameter Description If set, the aspect ratio (``width / height``) of the image file must be less than or equal to this value. -.. versionadded:: 7.3 - - The ``maxRatio`` option support for SVG files was introduced in Symfony 7.3. - ``maxRatioMessage`` ~~~~~~~~~~~~~~~~~~~ @@ -493,10 +477,6 @@ Parameter Description If set, the aspect ratio (``width / height``) of the image file must be greater than or equal to this value. -.. versionadded:: 7.3 - - The ``minRatio`` option support for SVG files was introduced in Symfony 7.3. - ``minRatioMessage`` ~~~~~~~~~~~~~~~~~~~ diff --git a/reference/constraints/Ip.rst b/reference/constraints/Ip.rst index 20cd4400c0a..8257fabbb92 100644 --- a/reference/constraints/Ip.rst +++ b/reference/constraints/Ip.rst @@ -119,8 +119,3 @@ Only private ``4_private`` ``6_private`` ``all_private`` Only reserved ``4_reserved`` ``6_reserved`` ``all_reserved`` Only public ``4_public`` ``6_public`` ``all_public`` ==================== =================== =================== ================== - -.. versionadded:: 7.1 - - The ``*_no_public``, ``*_reserved`` and ``*_public`` ranges were introduced - in Symfony 7.1. diff --git a/reference/constraints/MacAddress.rst b/reference/constraints/MacAddress.rst index 9a282ddf118..4fbf62a06d9 100644 --- a/reference/constraints/MacAddress.rst +++ b/reference/constraints/MacAddress.rst @@ -1,10 +1,6 @@ MacAddress ========== -.. versionadded:: 7.1 - - The ``MacAddress`` constraint was introduced in Symfony 7.1. - This constraint ensures that the given value is a valid `MAC address`_ (internally it uses the ``FILTER_VALIDATE_MAC`` option of the :phpfunction:`filter_var` PHP function). @@ -110,10 +106,6 @@ Parameter Description **type**: ``string`` **default**: ``all`` -.. versionadded:: 7.1 - - The ``type`` option was introduced in Symfony 7.1. - This option defines the kind of MAC addresses that are allowed. There are a lot of different possible values based on your needs: diff --git a/reference/constraints/PasswordStrength.rst b/reference/constraints/PasswordStrength.rst index 0b242cacf08..ff1fd650558 100644 --- a/reference/constraints/PasswordStrength.rst +++ b/reference/constraints/PasswordStrength.rst @@ -132,10 +132,6 @@ The default message supplied when the password does not reach the minimum requir Customizing the Password Strength Estimation -------------------------------------------- -.. versionadded:: 7.2 - - The feature to customize the password strength estimation was introduced in Symfony 7.2. - By default, this constraint calculates the strength of a password based on its length and the number of unique characters used. You can get the calculated password strength (e.g. to display it in the user interface) using the following diff --git a/reference/constraints/Twig.rst b/reference/constraints/Twig.rst index e38b4507d7a..cc2ba1f0e60 100644 --- a/reference/constraints/Twig.rst +++ b/reference/constraints/Twig.rst @@ -1,10 +1,6 @@ Twig Constraint =============== -.. versionadded:: 7.3 - - The ``Twig`` constraint was introduced in Symfony 7.3. - Validates that a given string contains valid :ref:`Twig syntax `. This is particularly useful when template content is user-generated or configurable, and you want to ensure it can be rendered by the Twig engine. diff --git a/reference/constraints/Type.rst b/reference/constraints/Type.rst index b49536dff8b..c2d0bfe9ce3 100644 --- a/reference/constraints/Type.rst +++ b/reference/constraints/Type.rst @@ -217,11 +217,6 @@ Also, you can use ``ctype_*()`` functions from corresponding Make sure that the proper :phpfunction:`locale ` is set before using one of these. -.. versionadded:: 7.1 - - The ``list`` and ``associative_array`` types were introduced in Symfony - 7.1. - Finally, you can use aggregated functions: * ``number``: ``is_int || is_float && !is_nan`` diff --git a/reference/constraints/Ulid.rst b/reference/constraints/Ulid.rst index 4094bab98f5..3fba5cc334b 100644 --- a/reference/constraints/Ulid.rst +++ b/reference/constraints/Ulid.rst @@ -84,10 +84,6 @@ The format of the ULID to validate. The following formats are available: * ``Ulid::FORMAT_BASE_58``: The ULID is encoded in `base58`_ * ``Ulid::FORMAT_RFC4122``: The ULID is encoded in the `RFC 4122 format`_ -.. versionadded:: 7.2 - - The ``format`` option was introduced in Symfony 7.2. - .. include:: /reference/constraints/_groups-option.rst.inc ``message`` diff --git a/reference/constraints/Unique.rst b/reference/constraints/Unique.rst index 9ce84139cd5..113586c76c0 100644 --- a/reference/constraints/Unique.rst +++ b/reference/constraints/Unique.rst @@ -175,10 +175,6 @@ collection:: **type**: ``string`` **default**: ``null`` -.. versionadded:: 7.2 - - The ``errorPath`` option was introduced in Symfony 7.2. - If a validation error occurs, the error message is, by default, bound to the first element in the collection. Use this option to bind the error message to a specific field within the first item of the collection. @@ -225,8 +221,4 @@ By default, this constraint stops at the first violation. If this option is set to ``false``, validation continues on all elements and returns all detected :class:`Symfony\\Component\\Validator\\ConstraintViolation` objects. -.. versionadded:: 7.3 - - The ``stopOnFirstError`` option was introduced in Symfony 7.3. - .. _`PHP callable`: https://www.php.net/callable diff --git a/reference/constraints/Url.rst b/reference/constraints/Url.rst index c3fac520f96..a939141e575 100644 --- a/reference/constraints/Url.rst +++ b/reference/constraints/Url.rst @@ -313,10 +313,6 @@ also relative URLs that contain no protocol (e.g. ``//example.com``). **type**: ``boolean`` **default**: ``false`` -.. versionadded:: 7.1 - - The ``requireTld`` option was introduced in Symfony 7.1. - .. deprecated:: 7.1 Not setting the ``requireTld`` option is deprecated since Symfony 7.1 @@ -338,10 +334,6 @@ name): e.g. ``https://example.com`` will be valid but ``https://example`` won't. **type**: ``string`` **default**: ``This URL does not contain a TLD.`` -.. versionadded:: 7.1 - - The ``tldMessage`` option was introduced in Symfony 7.1. - This message is shown if the ``requireTld`` option is set to ``true`` and the URL does not contain at least one TLD. diff --git a/reference/constraints/Week.rst b/reference/constraints/Week.rst index b3c1b0ca122..485a11ca8f4 100644 --- a/reference/constraints/Week.rst +++ b/reference/constraints/Week.rst @@ -1,10 +1,6 @@ Week ==== -.. versionadded:: 7.2 - - The ``Week`` constraint was introduced in Symfony 7.2. - Validates that a given string (or an object implementing the ``Stringable`` PHP interface) represents a valid week number according to the `ISO-8601`_ standard (e.g. ``2025-W01``). diff --git a/reference/constraints/When.rst b/reference/constraints/When.rst index 6eca8b4895f..747b8748caf 100644 --- a/reference/constraints/When.rst +++ b/reference/constraints/When.rst @@ -194,16 +194,11 @@ applied but the constraints defined in ``otherwise`` option (if provided) will b object that provides information such as the currently validated class, the name of the currently validated property, the list of violations, etc. -.. versionadded:: 7.2 - - The ``context`` variable in expressions was introduced in Symfony 7.2. - **When using a closure**, the first argument is the object being validated. -.. versionadded:: 7.3 +.. note:: - The support for closures in the ``expression`` option was introduced in Symfony 7.3 - and requires PHP 8.5. + The support for closures in the ``expression`` option requires PHP 8.5. .. configuration-block:: @@ -318,10 +313,6 @@ One or multiple constraints that are applied if the expression returns true. One or multiple constraints that are applied if the expression returns false. -.. versionadded:: 7.3 - - The ``otherwise`` option was introduced in Symfony 7.3. - .. include:: /reference/constraints/_groups-option.rst.inc .. include:: /reference/constraints/_payload-option.rst.inc diff --git a/reference/constraints/WordCount.rst b/reference/constraints/WordCount.rst index 392f8a5bcb7..bb0cecfc461 100644 --- a/reference/constraints/WordCount.rst +++ b/reference/constraints/WordCount.rst @@ -1,10 +1,6 @@ WordCount ========= -.. versionadded:: 7.2 - - The ``WordCount`` constraint was introduced in Symfony 7.2. - Validates that a string (or an object implementing the ``Stringable`` PHP interface) contains a given number of words. Internally, this constraint uses the :phpclass:`IntlBreakIterator` class to count the words depending on your locale. diff --git a/reference/constraints/Yaml.rst b/reference/constraints/Yaml.rst index 0d1564f4f8a..bab168d7b19 100644 --- a/reference/constraints/Yaml.rst +++ b/reference/constraints/Yaml.rst @@ -3,10 +3,6 @@ Yaml Validates that a value has valid `YAML`_ syntax. -.. versionadded:: 7.2 - - The ``Yaml`` constraint was introduced in Symfony 7.2. - ========== =================================================================== Applies to :ref:`property or method ` Class :class:`Symfony\\Component\\Validator\\Constraints\\Yaml` diff --git a/reference/formats/expression_language.rst b/reference/formats/expression_language.rst index dfed9c74398..9c071a0ee4f 100644 --- a/reference/formats/expression_language.rst +++ b/reference/formats/expression_language.rst @@ -22,10 +22,6 @@ The component supports: * **exponential** - also known as scientific (e.g. ``1.99E+3`` or ``1e-2``) * **comments** - using ``/*`` and ``*/`` (e.g. ``/* this is a comment */``) -.. versionadded:: 7.2 - - The support for comments inside expressions was introduced in Symfony 7.2. - .. warning:: A backslash (``\``) must be escaped by 3 backslashes (``\\\\``) in a string @@ -129,11 +125,6 @@ returns the right-hand side. Expressions can chain multiple coalescing operators * ``foo[3] ?? 'no'`` * ``foo.baz ?? foo['baz'] ?? 'no'`` -.. versionadded:: 7.2 - - Starting from Symfony 7.2, no exception is thrown when trying to access a - non-existent variable. This is the same behavior as the `null-coalescing operator in PHP`_. - .. _component-expression-functions: Working with Functions @@ -222,10 +213,6 @@ PHP function to find the highest value:: This will print out ``3``. -.. versionadded:: 7.1 - - The ``min()`` and ``max()`` functions were introduced in Symfony 7.1. - .. tip:: To read how to register your own functions to use in an expression, see @@ -288,11 +275,6 @@ Bitwise Operators * ``<<`` (left shift) * ``>>`` (right shift) -.. versionadded:: 7.2 - - Support for the ``~``, ``<<`` and ``>>`` bitwise operators was introduced - in Symfony 7.2. - Comparison Operators ~~~~~~~~~~~~~~~~~~~~ @@ -347,10 +329,6 @@ Logical Operators * ``or`` or ``||`` * ``xor`` -.. versionadded:: 7.2 - - Support for the ``xor`` logical operator was introduced in Symfony 7.2. - For example:: $ret = $expressionLanguage->evaluate( @@ -507,5 +485,3 @@ expressions (e.g. the request, the current user, etc.): * :doc:`Variables available in security expressions `; * :doc:`Variables available in service container expressions `; * :ref:`Variables available in routing expressions `. - -.. _`null-coalescing operator in PHP`: https://www.php.net/manual/en/language.operators.comparison.php#language.operators.comparison.coalesce diff --git a/reference/formats/xliff.rst b/reference/formats/xliff.rst index b5dc99b4186..1d4e9ba70ac 100644 --- a/reference/formats/xliff.rst +++ b/reference/formats/xliff.rst @@ -37,8 +37,4 @@ loaded/dumped inside a Symfony application: -.. versionadded:: 7.2 - - The support of attributes in the ```` element was introduced in Symfony 7.2. - .. _XLIFF: https://docs.oasis-open.org/xliff/xliff-core/v2.1/xliff-core-v2.1.html diff --git a/reference/formats/yaml.rst b/reference/formats/yaml.rst index 1884735bd82..d1f3e39052d 100644 --- a/reference/formats/yaml.rst +++ b/reference/formats/yaml.rst @@ -352,11 +352,6 @@ official YAML specification but are useful in Symfony applications: data: operator_types: !php/enum App\Operator\Enum\Type - .. versionadded:: 7.1 - - The support for using the enum FQCN without specifying a case - was introduced in Symfony 7.1. - Unsupported YAML Features ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/reference/forms/types/choice.rst b/reference/forms/types/choice.rst index 9f61fb768bd..8cbd61f25cc 100644 --- a/reference/forms/types/choice.rst +++ b/reference/forms/types/choice.rst @@ -211,10 +211,6 @@ This option allows you to customize the visual separator shown after the preferr choices. You can use HTML elements like ``
`` to display a more modern separator, but you'll also need to set the `separator_html`_ option to ``true``. -.. versionadded:: 7.1 - - The ``separator`` option was introduced in Symfony 7.1. - ``separator_html`` ~~~~~~~~~~~~~~~~~~ @@ -224,10 +220,6 @@ If this option is true, the `separator`_ option will be displayed as HTML instea of text. This is useful when using HTML elements (e.g. ``
``) as a more modern visual separator. -.. versionadded:: 7.1 - - The ``separator_html`` option was introduced in Symfony 7.1. - Overridden Options ------------------ diff --git a/reference/forms/types/collection.rst b/reference/forms/types/collection.rst index 2875ba076d0..a5e4234ee23 100644 --- a/reference/forms/types/collection.rst +++ b/reference/forms/types/collection.rst @@ -244,10 +244,6 @@ it to ``true``, the indexes will be reindexed as ``0`` and ``1``. This ensures that the indexes remain consecutive and do not have gaps, providing a clearer and more predictable structure for your nested forms. -.. versionadded:: 7.1 - - The ``keep_as_list`` option was introduced in Symfony 7.1. - prototype ~~~~~~~~~ diff --git a/reference/forms/types/date.rst b/reference/forms/types/date.rst index 210fff5dd0d..ea57e000966 100644 --- a/reference/forms/types/date.rst +++ b/reference/forms/types/date.rst @@ -163,10 +163,6 @@ an ``integer`` from :phpclass:`IntlDateFormatter` calendar constants or an insta of the :phpclass:`IntlCalendar` to use. By default, the Gregorian calendar with the application default locale is used. -.. versionadded:: 7.2 - - The ``calendar`` option was introduced in Symfony 7.2. - .. include:: /reference/forms/types/options/date_widget.rst.inc .. include:: /reference/forms/types/options/years.rst.inc diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index 5fda8e9a14f..72ca2285a9a 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -110,6 +110,7 @@ on your underlying object. Valid values are: * ``string`` (e.g. ``2011-06-05 12:15:00``) * ``datetime`` (a ``DateTime`` object) * ``datetime_immutable`` (a ``DateTimeImmutable`` object) +* ``date_point`` (a :ref:`DatePoint ` object) * ``array`` (e.g. ``[2011, 06, 05, 12, 15, 0]``) * ``timestamp`` (e.g. ``1307276100``) diff --git a/reference/forms/types/money.rst b/reference/forms/types/money.rst index 967fe9e4ce4..1060dda0728 100644 --- a/reference/forms/types/money.rst +++ b/reference/forms/types/money.rst @@ -87,10 +87,6 @@ You can also set this option to ``string``, it can be useful if the underlying data is a string for precision reasons (for example, Doctrine uses strings for the decimal type). -.. versionadded:: 7.1 - - The ``input`` option was introduced in Symfony 7.1. - scale ~~~~~ diff --git a/reference/forms/types/options/choice_lazy.rst.inc b/reference/forms/types/options/choice_lazy.rst.inc index 08fbe953e41..c9bbdab35a5 100644 --- a/reference/forms/types/options/choice_lazy.rst.inc +++ b/reference/forms/types/options/choice_lazy.rst.inc @@ -3,10 +3,6 @@ **type**: ``boolean`` **default**: ``false`` -.. versionadded:: 7.2 - - The ``choice_lazy`` option was introduced in Symfony 7.2. - The ``choice_lazy`` option is particularly useful when dealing with a large set of choices, where loading them all at once could cause performance issues or delays:: diff --git a/reference/forms/types/options/date_input.rst.inc b/reference/forms/types/options/date_input.rst.inc index dafd7c483ad..1e0f5f2ec00 100644 --- a/reference/forms/types/options/date_input.rst.inc +++ b/reference/forms/types/options/date_input.rst.inc @@ -9,6 +9,7 @@ on your underlying object. Valid values are: * ``string`` (e.g. ``2011-06-05``) * ``datetime`` (a ``DateTime`` object) * ``datetime_immutable`` (a ``DateTimeImmutable`` object) +* ``date_point`` (a :ref:`DatePoint ` object) * ``array`` (e.g. ``['year' => 2011, 'month' => 06, 'day' => 05]``) * ``timestamp`` (e.g. ``1307232000``) diff --git a/reference/forms/types/time.rst b/reference/forms/types/time.rst index a3378f948cd..8ccf820caa9 100644 --- a/reference/forms/types/time.rst +++ b/reference/forms/types/time.rst @@ -99,6 +99,7 @@ on your underlying object. Valid values are: * ``string`` (e.g. ``12:17:26``) * ``datetime`` (a ``DateTime`` object) * ``datetime_immutable`` (a ``DateTimeImmutable`` object) +* ``date_point`` (a :ref:`DatePoint ` object) * ``array`` (e.g. ``['hour' => 12, 'minute' => 17, 'second' => 26]``) * ``timestamp`` (e.g. ``1307232000``) diff --git a/reference/forms/types/url.rst b/reference/forms/types/url.rst index 9c6dde6072e..bed1d208d6a 100644 --- a/reference/forms/types/url.rst +++ b/reference/forms/types/url.rst @@ -23,7 +23,7 @@ Field Options ``default_protocol`` ~~~~~~~~~~~~~~~~~~~~ -**type**: ``string`` **default**: ``http`` +**type**: ``string`` **default**: ``null`` Set this value to ``null`` to render the field using a ````, allowing the browser to perform local validation before submission. @@ -36,11 +36,6 @@ If a value is submitted that doesn't begin with some protocol (e.g. ``http://``, ``ftp://``, etc), this protocol will be prepended to the string when the data is submitted to the form. -.. deprecated:: 7.1 - - Not setting the ``default_protocol`` option is deprecated since Symfony 7.1 - and will default to ``null`` in Symfony 8.0. - Overridden Options ------------------ diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index 633d4c7f0c6..39e3513c25c 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -202,10 +202,6 @@ can be found in :ref:`security-template`. is_granted_for_user ~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 7.3 - - The ``is_granted_for_user()`` function was introduced in Symfony 7.3. - .. code-block:: twig {{ is_granted_for_user(user, attribute, subject = null) }} @@ -1010,10 +1006,6 @@ For example:: emojify ~~~~~~~ -.. versionadded:: 7.1 - - The ``emojify`` filter was introduced in Symfony 7.1. - .. code-block:: twig {{ text|emojify(catalog = null) }} diff --git a/routing.rst b/routing.rst index 4f31e70da64..cacee28ccd6 100644 --- a/routing.rst +++ b/routing.rst @@ -505,10 +505,6 @@ evaluates them: $ php bin/console debug:router --method=GET $ php bin/console debug:router --method=ANY -.. versionadded:: 7.3 - - The ``--method`` option was introduced in Symfony 7.3. - Pass the name (or part of the name) of some route to this argument to print the route details: @@ -1080,10 +1076,6 @@ The ``{slug:post}`` syntax maps the route parameter named ``slug`` to the contro argument named ``$post``. It also hints the "param converter" to look up the corresponding ``BlogPost`` object from the database using the slug. -.. versionadded:: 7.1 - - Route parameter mapping was introduced in Symfony 7.1. - When mapping multiple entities from route parameters, name collisions can occur. In this example, the route tries to define two mappings: one for an author and one for a category; both using the same ``name`` parameter. This isn't allowed because @@ -1099,10 +1091,6 @@ This way, the route parameter names are unique (``authorName`` and ``categoryNam and the "param converter" can correctly map them to controller arguments (``$author`` and ``$category``), loading them both by their name. -.. versionadded:: 7.3 - - This more advanced style of route parameter mapping was introduced in Symfony 7.3. - More advanced mappings can be achieved using the ``#[MapEntity]`` attribute. Check out the :ref:`Doctrine param conversion documentation ` to learn how to customize the database queries used to fetch the object from the route @@ -1158,6 +1146,9 @@ special parameters created by Symfony: ``_locale`` Used to set the :ref:`locale ` on the request. +``_query`` + An array of query parameters to add to the generated URL. + You can include these attributes (except ``_fragment``) both in individual routes and in route imports. Symfony defines some special attributes with the same name (except for the leading underscore) so you can define them easier: @@ -1176,6 +1167,7 @@ and in route imports. Symfony defines some special attributes with the same name path: '/articles/{_locale}/search.{_format}', locale: 'en', format: 'html', + query: ['page' => 1], requirements: [ '_locale' => 'en|fr', '_format' => 'html|xml', @@ -1194,6 +1186,8 @@ and in route imports. Symfony defines some special attributes with the same name controller: App\Controller\ArticleController::search locale: en format: html + query: + page: 1 requirements: _locale: en|fr _format: html|xml @@ -1231,6 +1225,7 @@ and in route imports. Symfony defines some special attributes with the same name ->controller([ArticleController::class, 'search']) ->locale('en') ->format('html') + ->query(['page' => 1]) ->requirements([ '_locale' => 'en|fr', '_format' => 'html|xml', @@ -1513,10 +1508,6 @@ Instead of duplicating the original route, you can create an alias for it. $routes->alias('product_details', 'product_show'); }; -.. versionadded:: 7.3 - - Support for route aliases in PHP attributes was introduced in Symfony 7.3. - In this example, both ``product_show`` and ``product_details`` routes can be used in the application and will produce the same result. @@ -3053,10 +3044,6 @@ argument of :method:`Symfony\\Component\\HttpFoundation\\UriSigner::sign`:: The expiration date/time is included in the signed URIs as a timestamp via the ``_expiration`` query parameter. -.. versionadded:: 7.1 - - The feature to add an expiration date for a signed URI was introduced in Symfony 7.1. - If you need to know the reason why a signed URI is invalid, you can use the ``verify()`` method which throws exceptions on failure:: @@ -3078,21 +3065,12 @@ If you need to know the reason why a signed URI is invalid, you can use the // the URI is signed but expired } -.. versionadded:: 7.3 - - The ``verify()`` method was introduced in Symfony 7.3. - .. tip:: If ``symfony/clock`` is installed, it will be used to create and verify expirations. This allows you to :ref:`mock the current time in your tests `. -.. versionadded:: 7.3 - - Support for :doc:`Symfony Clock ` in ``UriSigner`` was - introduced in Symfony 7.3. - Troubleshooting --------------- diff --git a/scheduler.rst b/scheduler.rst index ed6ada8b5ed..40cc0a0fa25 100644 --- a/scheduler.rst +++ b/scheduler.rst @@ -133,7 +133,7 @@ on a particular schedule:: .. tip:: - By default, the schedule name is ``default`` and the transport name follows + The schedule name must be unique and by default, it is ``default``. The transport name follows the syntax: ``scheduler_nameofyourschedule`` (e.g. ``scheduler_default``). .. tip:: @@ -750,10 +750,6 @@ after a message is consumed:: // do something with the schedule, context, message or result } -.. versionadded:: 7.3 - - The ``getResult()`` method was introduced in Symfony 7.3. - Execute this command to find out which listeners are registered for this event and their priorities: @@ -992,10 +988,6 @@ handle a message only once, you can use the ``processOnlyLastMissedRun`` option: } } -.. versionadded:: 7.2 - - The ``processOnlyLastMissedRun`` option was introduced in Symfony 7.2. - To scale your schedules more effectively, you can use multiple workers. In such cases, a good practice is to add a :doc:`lock ` to prevent the same task more than once:: diff --git a/security.rst b/security.rst index 9d2df6165d0..3088a03e539 100644 --- a/security.rst +++ b/security.rst @@ -461,8 +461,8 @@ You can also manually hash a password by running: $ php bin/console security:hash-password -Read more about all available hashers and password migration in -:doc:`security/passwords`. +Read more about all available hashers (including specific hashers) and password +migration in :doc:`security/passwords`. .. _firewalls-authentication: .. _a-authentication-firewalls: @@ -1774,12 +1774,6 @@ You can log in a user programmatically using the ``login()`` method of the } } -.. versionadded:: 7.2 - - The support for passport attributes in the - :method:`Symfony\\Bundle\\SecurityBundle\\Security::login` method was - introduced in Symfony 7.2. - .. _security-logging-out: Logging Out @@ -2594,11 +2588,6 @@ want to include extra details only for users that have a ``ROLE_SALES_ADMIN`` ro is unavailable (e.g., in a CLI context such as a message queue or cron job), you can use the ``isGrantedForUser()`` method to explicitly set the target user. - .. versionadded:: 7.3 - - The :method:`Symfony\\Bundle\\SecurityBundle\\Security::isGrantedForUser` - method was introduced in Symfony 7.3. - If you're using the :ref:`default services.yaml configuration `, Symfony will automatically pass the ``security.helper`` to your service thanks to autowiring and the ``Security`` type-hint. @@ -2713,11 +2702,6 @@ anonymous users access by checking if there is no user set on the token:: } } -.. versionadded:: 7.3 - - The ``$vote`` argument of the ``voteOnAttribute()`` method was introduced - in Symfony 7.3. - Setting Individual User Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -2809,11 +2793,6 @@ Two strategies are supported: return $data; } -.. versionadded:: 7.3 - - Support for hashing passwords with ``crc32c`` in session serialization was - introduced in Symfony 7.3. - If you're having problems authenticating, it could be that you *are* authenticating successfully, but you immediately lose authentication after the first redirect. diff --git a/security/access_token.rst b/security/access_token.rst index 70c9e21980e..836fd75c887 100644 --- a/security/access_token.rst +++ b/security/access_token.rst @@ -477,10 +477,6 @@ Next, configure the ``base_uri`` and ``discovery`` options: ; }; -.. versionadded:: 7.3 - - Support for OpenID Connect Discovery was introduced in Symfony 7.3. - Following the `OpenID Connect Specification`_, the ``sub`` claim is used as user identifier by default. To use another claim, specify it on the configuration: @@ -707,15 +703,6 @@ it, and retrieves the user information from it. Optionally, the token can be enc ; }; -.. versionadded:: 7.1 - - The support of multiple algorithms to sign the JWS was introduced in Symfony 7.1. - In previous versions, only the ``ES256`` algorithm was supported. - -.. versionadded:: 7.3 - - Support for encryption algorithms to decrypt JWEs was introduced in Symfony 7.3. - To enable `OpenID Connect Discovery`_, the ``OidcTokenHandler`` requires the ``symfony/cache`` package to store the OIDC configuration in the cache. If you haven't installed it yet, run the following command: @@ -878,10 +865,6 @@ create your own User from the claims, you must Using CAS 2.0 ------------- -.. versionadded:: 7.1 - - The support for CAS token handlers was introduced in Symfony 7.1. - `Central Authentication Service (CAS)`_ is an enterprise multilingual single sign-on solution and identity provider for the web and attempts to be a comprehensive platform for your authentication and authorization needs. diff --git a/security/csrf.rst b/security/csrf.rst index 8797b4e7553..07623b8b9c2 100644 --- a/security/csrf.rst +++ b/security/csrf.rst @@ -321,15 +321,6 @@ array, the attribute is ignored for that request, and no CSRF validation occurs: // ... delete the object } -.. versionadded:: 7.1 - - The :class:`Symfony\\Component\\Security\\Http\\Attribute\\IsCsrfTokenValid` - attribute was introduced in Symfony 7.1. - -.. versionadded:: 7.3 - - The ``methods`` parameter was introduced in Symfony 7.3. - CSRF Tokens and Compression Side-Channel Attacks ------------------------------------------------ @@ -344,10 +335,6 @@ and used to scramble it. Stateless CSRF Tokens --------------------- -.. versionadded:: 7.2 - - Stateless anti-CSRF protection was introduced in Symfony 7.2. - Traditionally, CSRF tokens are stateful, meaning they're stored in the session. However, some token IDs can be declared as stateless using the ``stateless_token_ids`` option. Stateless CSRF tokens are enabled by default diff --git a/security/custom_authenticator.rst b/security/custom_authenticator.rst index 462ec21521c..5d318992b06 100644 --- a/security/custom_authenticator.rst +++ b/security/custom_authenticator.rst @@ -289,10 +289,6 @@ lowercasing identifiers helps treat values like "john.doe", "John.Doe", or If needed, you can pass a normalizer as the third argument to ``UserBadge``. This callable receives the ``$userIdentifier`` and must return a string. -.. versionadded:: 7.3 - - Support for user identifier normalizers was introduced in Symfony 7.3. - The example below uses a normalizer that converts usernames to a normalized, ASCII-only, lowercase format:: diff --git a/security/expressions.rst b/security/expressions.rst index a4ec02c7b84..83b785999c4 100644 --- a/security/expressions.rst +++ b/security/expressions.rst @@ -228,11 +228,6 @@ returns an array of values that will be injected into the closure:: } } -.. versionadded:: 7.3 - - The support for closures in the ``#[IsGranted]`` attribute was introduced - in Symfony 7.3 and requires PHP 8.5. - Learn more ---------- diff --git a/security/ldap.rst b/security/ldap.rst index c4c3646122b..0b007006eea 100644 --- a/security/ldap.rst +++ b/security/ldap.rst @@ -270,10 +270,6 @@ Symfony provides ``Symfony\Component\Ldap\Security\MemberOfRoles``, a concrete implementation of the interface that fetches roles from the ``ismemberof`` attribute. -.. versionadded:: 7.3 - - The ``role_fetcher`` configuration option was introduced in Symfony 7.3. - uid_key ....... diff --git a/security/passwords.rst b/security/passwords.rst index 7f05bc3acb9..5de5d4b7b24 100644 --- a/security/passwords.rst +++ b/security/passwords.rst @@ -256,6 +256,64 @@ You can customize the reset password bundle's behavior by updating the ``reset_password.yaml`` file. For more information on the configuration, check out the `SymfonyCastsResetPasswordBundle`_ guide. +Injecting a Specific Password Hasher +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In some cases, you may define a password hasher in your configuration that is +not tied to a user class. For example, you might use a separate hasher for +password recovery codes or API tokens. + +With the following configuration: + +.. code-block:: yaml + + # config/packages/security.yaml + security: + password_hashers: + recovery_code: 'auto' + + firewalls: + main: + # ... + +You can inject the ``recovery_code`` password hasher into any service. However, +you can't rely on standard autowiring, as Symfony doesn't know which specific +hasher to provide. + +Instead, use the ``#[Target]`` attribute to explicitly request the hasher by +its configuration key:: + + // src/Controller/HomepageController.php + namespace App\Controller; + + use Symfony\Component\DependencyInjection\Attribute\Target; + use Symfony\Component\PasswordHasher\PasswordHasherInterface; + + class HomepageController extends AbstractController + { + public function __construct( + #[Target('recovery_code')] + private readonly PasswordHasherInterface $passwordHasher, + ) { + } + + #[Route('/')] + public function index(): Response + { + $plaintextToken = 'some-secret-token'; + + // Note: use hash(), not hashPassword(), as we are not using a UserInterface object + $hashedToken = $this->passwordHasher->hash($plaintextToken); + } + } + +When injecting a specific hasher by its name, you should type-hint the generic +:class:`Symfony\\Component\\PasswordHasher\\PasswordHasherInterface`. + +.. versionadded:: 7.4 + + The feature to inject specific password hashers was introduced in Symfony 7.4. + .. _security-password-migration: Password Migration diff --git a/security/remember_me.rst b/security/remember_me.rst index 2fd0f7e8d1e..649482d8e20 100644 --- a/security/remember_me.rst +++ b/security/remember_me.rst @@ -77,12 +77,6 @@ the session lasts using a cookie with the ``remember_me`` firewall option: ; }; -.. versionadded:: 7.2 - - The ``secret`` option is no longer required starting from Symfony 7.2. By - default, ``%kernel.secret%`` is used, which is defined using the - ``APP_SECRET`` environment variable. - After enabling the ``remember_me`` system in the configuration, there are a couple more things to do before remember me works correctly: diff --git a/security/user_checkers.rst b/security/user_checkers.rst index ec8f49da522..a9d6c155eb3 100644 --- a/security/user_checkers.rst +++ b/security/user_checkers.rst @@ -59,10 +59,6 @@ displayed to the user:: } } -.. versionadded:: 7.2 - - The ``token`` argument for the ``checkPostAuth()`` method was introduced in Symfony 7.2. - Enabling the Custom User Checker -------------------------------- diff --git a/security/voters.rst b/security/voters.rst index e621263abb4..fbc0609119c 100644 --- a/security/voters.rst +++ b/security/voters.rst @@ -49,11 +49,6 @@ which makes creating a voter even easier:: abstract protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, ?Vote $vote = null): bool; } -.. versionadded:: 7.3 - - The ``$vote`` argument of the ``voteOnAttribute()`` method was introduced - in Symfony 7.3. - .. _how-to-use-the-voter-in-a-controller: Setup: Checking for Access in a Controller diff --git a/serializer.rst b/serializer.rst index 68357bbe6c5..7bbe1eb4eb7 100644 --- a/serializer.rst +++ b/serializer.rst @@ -1300,10 +1300,6 @@ setting the ``name_converter`` setting to ]; $serializer = new Serializer($normalizers, $encoders); -.. versionadded:: 7.2 - - The snake_case to CamelCase converter was introduced in Symfony 7.2. - .. _serializer-built-in-normalizers: Serializer Normalizers @@ -1348,10 +1344,6 @@ normalizers (in order of priority): context option ``DateTimeNormalizer::CAST_KEY`` to ``int`` or ``float``. - .. versionadded:: 7.1 - - The ``DateTimeNormalizer::CAST_KEY`` context option was introduced in Symfony 7.1. - :class:`Symfony\\Component\\Serializer\\Normalizer\\ConstraintViolationListNormalizer` This normalizer converts objects that implement :class:`Symfony\\Component\\Validator\\ConstraintViolationListInterface` @@ -1391,10 +1383,6 @@ normalizers (in order of priority): This normalizer converts between :phpclass:`BcMath\\Number` or :phpclass:`GMP` objects and strings or integers. -.. versionadded:: 7.2 - - The ``NumberNormalizer`` was introduced in Symfony 7.2. - :class:`Symfony\\Component\\Serializer\\Normalizer\\DataUriNormalizer` This normalizer converts between :phpclass:`SplFileInfo` objects and a `data URI`_ string (``data:...``) such that files can be embedded into @@ -1570,10 +1558,6 @@ like: Named Serializers ----------------- -.. versionadded:: 7.2 - - Named serializers were introduced in Symfony 7.2. - Sometimes, you may need multiple configurations for the serializer, such as different default contexts, name converters, or sets of normalizers and encoders, depending on the use case. For example, when your application communicates with @@ -2444,10 +2428,6 @@ Now it deserializes like this: $invoiceLine = $serializer->deserialize('{"invoiceItem":{...},...}', InvoiceLine::class, 'json'); // $invoiceLine contains new InvoiceLine(new Product(...)) -.. versionadded:: 7.3 - - The ``defaultType`` parameter was added in Symfony 7.3. - .. _serializer-unwrapping-denormalizer: Deserializing Input Partially (Unwrapping) @@ -2509,10 +2489,6 @@ setting the serializer context option Handling Boolean Values ~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 7.1 - - The ``AbstractNormalizer::FILTER_BOOL`` context option was introduced in Symfony 7.1. - PHP considers many different values as true or false. For example, the strings ``true``, ``1``, and ``yes`` are considered true, while ``false``, ``0``, and ``no`` are considered false. diff --git a/serializer/custom_name_converter.rst b/serializer/custom_name_converter.rst index 49dafb02cc4..dd247c43834 100644 --- a/serializer/custom_name_converter.rst +++ b/serializer/custom_name_converter.rst @@ -43,19 +43,6 @@ A custom name converter can handle such cases:: } } -.. versionadded:: 7.1 - - Accessing the current class name, format and context via - :method:`Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface::normalize` - and :method:`Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface::denormalize` - was introduced in Symfony 7.1. - -.. note:: - - You can also implement - :class:`Symfony\\Component\\Serializer\\NameConverter\\AdvancedNameConverterInterface` - to access the current class name, format and context. - Then, configure the serializer to use your name converter: .. configuration-block:: diff --git a/serializer/encoders.rst b/serializer/encoders.rst index 8238d4d057d..40eef12c45d 100644 --- a/serializer/encoders.rst +++ b/serializer/encoders.rst @@ -64,13 +64,6 @@ are available to customize the behavior of the encoder: Sets the field enclosure (one character only). ``csv_end_of_line`` (default: ``\n``) Sets the character(s) used to mark the end of each line in the CSV file. -``csv_escape_char`` (default: empty string) - - .. deprecated:: 7.2 - - The ``csv_escape_char`` option was deprecated in Symfony 7.2. - - Sets the escape character (at most one character). ``csv_key_separator`` (default: ``.``) Sets the separator for array's keys during its flattening ``csv_headers`` (default: ``[]``, inferred from input data's keys) @@ -208,14 +201,6 @@ These are the options available on the :ref:`serializer context ` called ``CheckTypeDeclarationsPass`` and ``CheckAliasValidityPass``, which are @@ -1120,10 +1112,6 @@ disabled by default and enabled only when executing the ``lint:container`` comma If you don't mind the performance loss, you can enable these compiler passes in your application. -.. versionadded:: 7.1 - - The ``CheckAliasValidityPass`` compiler pass was introduced in Symfony 7.1. - .. _container-public: Public Versus Private Services diff --git a/service_container/alias_private.rst b/service_container/alias_private.rst index 22bf649d861..a22fe2aebe9 100644 --- a/service_container/alias_private.rst +++ b/service_container/alias_private.rst @@ -203,10 +203,6 @@ The ``#[AsAlias]`` attribute can also be limited to one or more specific // ... } -.. versionadded:: 7.3 - - The ``when`` argument of the ``#[AsAlias]`` attribute was introduced in Symfony 7.3. - .. tip:: When using ``#[AsAlias]`` attribute, you may omit passing ``id`` argument diff --git a/service_container/autowiring.rst b/service_container/autowiring.rst index ea1bf1b12ff..ff5decfb931 100644 --- a/service_container/autowiring.rst +++ b/service_container/autowiring.rst @@ -794,11 +794,6 @@ by using the property name as method name:: } } -.. versionadded:: 7.1 - - The :class:`Symfony\Component\DependencyInjection\Attribute\\AutowireMethodOf` - attribute was introduced in Symfony 7.1. - .. _autowiring-calls: Autowiring other Methods (e.g. Setters and Public Typed Properties) @@ -865,10 +860,6 @@ typed properties: Autowiring Anonymous Services Inline ------------------------------------ -.. versionadded:: 7.1 - - The ``#[AutowireInline]`` attribute was added in Symfony 7.1. - Similar to how anonymous services can be defined inline in configuration files, the :class:`Symfony\\Component\\DependencyInjection\\Attribute\\AutowireInline` attribute allows you to declare anonymous services inline, directly next to their diff --git a/service_container/lazy_services.rst b/service_container/lazy_services.rst index abb3c2cca7f..f7747be5e12 100644 --- a/service_container/lazy_services.rst +++ b/service_container/lazy_services.rst @@ -138,10 +138,6 @@ It defines an optional parameter used to define interfaces for proxy and interse ) { } -.. versionadded:: 7.1 - - The ``#[Lazy]`` attribute was introduced in Symfony 7.1. - Interface Proxifying -------------------- diff --git a/service_container/service_closures.rst b/service_container/service_closures.rst index 88b0ab64002..86c9201be85 100644 --- a/service_container/service_closures.rst +++ b/service_container/service_closures.rst @@ -97,10 +97,6 @@ argument of type ``service_closure``: // ->args([service_closure('mailer')->ignoreOnInvalid()]); }; -.. versionadded:: 7.3 - - The ``@>`` shortcut syntax for YAML was introduced in Symfony 7.3. - .. seealso:: Service closures can be injected :ref:`by using autowiring ` diff --git a/service_container/service_subscribers_locators.rst b/service_container/service_subscribers_locators.rst index 9026478cf33..4263a31a262 100644 --- a/service_container/service_subscribers_locators.rst +++ b/service_container/service_subscribers_locators.rst @@ -135,11 +135,6 @@ count and iterate over the services of the locator:: // do something with the service, the service id or both } -.. versionadded:: 7.1 - - The :class:`Symfony\\Contracts\\Service\\ServiceCollectionInterface` was - introduced in Symfony 7.1. - Including Services ------------------ @@ -307,14 +302,6 @@ This is done by having ``getSubscribedServices()`` return an array of ]; } -.. deprecated:: 7.1 - - The :class:`Symfony\\Component\\DependencyInjection\\Attribute\\TaggedIterator` - and :class:`Symfony\\Component\\DependencyInjection\\Attribute\\TaggedLocator` - attributes were deprecated in Symfony 7.1 in favor of - :class:`Symfony\\Component\\DependencyInjection\\Attribute\\AutowireIterator` - and :class:`Symfony\\Component\\DependencyInjection\\Attribute\\AutowireLocator`. - .. note:: The above example requires using ``3.2`` version or newer of ``symfony/service-contracts``. @@ -937,11 +924,6 @@ services based on type-hinted helper methods:: } } -.. versionadded:: 7.1 - - The ``ServiceMethodsSubscriberTrait`` was introduced in Symfony 7.1. - In previous Symfony versions it was called ``ServiceSubscriberTrait``. - This allows you to create helper traits like RouterAware, LoggerAware, etc... and compose your services with them:: diff --git a/service_container/tags.rst b/service_container/tags.rst index 3a547042de7..594c925a701 100644 --- a/service_container/tags.rst +++ b/service_container/tags.rst @@ -1047,8 +1047,6 @@ you can define it in the configuration of the collecting service: // config/services.php namespace Symfony\Component\DependencyInjection\Loader\Configurator; - use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; - return function (ContainerConfigurator $container): void { $services = $container->services(); @@ -1138,7 +1136,6 @@ to index the services: use App\Handler\One; use App\Handler\Two; - use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; return function (ContainerConfigurator $container): void { $services = $container->services(); @@ -1242,7 +1239,6 @@ get the value used to index the services: namespace Symfony\Component\DependencyInjection\Loader\Configurator; use App\HandlerCollection; - use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; return function (ContainerConfigurator $container) { $services = $container->services(); @@ -1299,9 +1295,4 @@ same service under different indexes:: // ... } -.. versionadded:: 7.3 - - The feature to apply the ``#[AsTaggedItem]`` attribute multiple times was - introduced in Symfony 7.3. - .. _`PHP constructor promotion`: https://www.php.net/manual/en/language.oop5.decon.php#language.oop5.decon.constructor.promotion diff --git a/session.rst b/session.rst index 8cb3462d920..6ab03ba2df7 100644 --- a/session.rst +++ b/session.rst @@ -425,11 +425,6 @@ Check out the Symfony config reference to learn more about the other available ``session.auto_start = 1`` This directive should be turned off in ``php.ini``, in the web server directives or in ``.htaccess``. -.. deprecated:: 7.2 - - The ``sid_length`` and ``sid_bits_per_character`` options were deprecated - in Symfony 7.2 and will be ignored in Symfony 8.0. - The session cookie is also available in :ref:`the Response object `. This is useful to get that cookie in the CLI context or when using PHP runners like Roadrunner or Swoole. @@ -512,11 +507,6 @@ Alternatively, you can configure these settings by passing ``gc_probability``, or to the :method:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage::setOptions` method. -.. versionadded:: 7.2 - - Using the ``php.ini`` directive as the default value for ``gc_probability`` - was introduced in Symfony 7.2. - .. _session-database: Store Sessions in a Database diff --git a/setup.rst b/setup.rst index 20d71d112eb..6c9c5966263 100644 --- a/setup.rst +++ b/setup.rst @@ -14,7 +14,7 @@ Technical Requirements Before creating your first Symfony application you must: -* Install PHP 8.2 or higher and these PHP extensions (which are installed and +* Install PHP 8.4 or higher and these PHP extensions (which are installed and enabled by default in most PHP 8 installations): `Ctype`_, `iconv`_, `PCRE`_, `Session`_, `SimpleXML`_, and `Tokenizer`_; * `Install Composer`_, which is used to install PHP packages. @@ -48,10 +48,10 @@ application: .. code-block:: terminal # run this if you are building a traditional web application - $ symfony new my_project_directory --version="7.3.x-dev" --webapp + $ symfony new my_project_directory --version="8.0.x-dev" --webapp # run this if you are building a microservice, console application or API - $ symfony new my_project_directory --version="7.3.x-dev" + $ symfony new my_project_directory --version="8.0.x-dev" The only difference between these two commands is the number of packages installed by default. The ``--webapp`` option installs extra packages to give @@ -63,12 +63,12 @@ Symfony application using Composer: .. code-block:: terminal # run this if you are building a traditional web application - $ composer create-project symfony/skeleton:"7.3.x-dev" my_project_directory + $ composer create-project symfony/skeleton:"8.0.x-dev" my_project_directory $ cd my_project_directory $ composer require webapp # run this if you are building a microservice, console application or API - $ composer create-project symfony/skeleton:"7.3.x-dev" my_project_directory + $ composer create-project symfony/skeleton:"8.0.x-dev" my_project_directory No matter which command you run to create the Symfony application. All of them will create a new ``my_project_directory/`` directory, download some dependencies diff --git a/string.rst b/string.rst index e51e7d1b502..fa3f2775b4c 100644 --- a/string.rst +++ b/string.rst @@ -239,19 +239,6 @@ Methods to Change Case // other cases can be achieved by chaining methods, e.g. : u('Foo: Bar-baz.')->camel()->upper(); // 'FOOBARBAZ' -.. versionadded:: 7.1 - - The ``localeLower()``, ``localeUpper()`` and ``localeTitle()`` methods were - introduced in Symfony 7.1. - -.. versionadded:: 7.2 - - The ``kebab()`` method was introduced in Symfony 7.2. - -.. versionadded:: 7.3 - - The ``pascal()`` method was introduced in Symfony 7.3. - The methods of all string classes are case-sensitive by default. You can perform case-insensitive operations with the ``ignoreCase()`` method:: @@ -417,10 +404,6 @@ Methods to Join, Split, Truncate and Reverse // returns up to the last complete word that fits in the given length, surpassing it if needed u('Lorem ipsum dolor sit amet')->truncate(8, cut: TruncateMode::WordAfter); // 'Lorem ipsum' -.. versionadded:: 7.2 - - The ``TruncateMode`` parameter for truncate function was introduced in Symfony 7.2. - :: // breaks the string into lines of the given length @@ -680,10 +663,6 @@ Symfony also provides inflectors for other languages:: $result = $inflector->singularize('aviones'); // ['avión'] $result = $inflector->pluralize('miércoles'); // ['miércoles'] -.. versionadded:: 7.2 - - The ``SpanishInflector`` class was introduced in Symfony 7.2. - .. note:: Symfony provides an :class:`Symfony\\Component\\String\\Inflector\\InflectorInterface` diff --git a/templates.rst b/templates.rst index fc353384202..34af75cd51a 100644 --- a/templates.rst +++ b/templates.rst @@ -661,10 +661,6 @@ a block to render:: } } -.. versionadded:: 7.2 - - The ``#[Template]`` attribute's ``block`` argument was introduced in Symfony 7.2. - Rendering a Template in Services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -817,10 +813,6 @@ provided by Symfony: ; }; -.. versionadded:: 7.2 - - The ``headers`` option was introduced in Symfony 7.2. - Checking if a Template Exists ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -873,15 +865,6 @@ errors. It's useful to run it before deploying your application to production # you can also excludes directories $ php bin/console lint:twig templates/ --excludes=data_collector --excludes=dev_tool -.. versionadded:: 7.1 - - The option to exclude directories was introduced in Symfony 7.1. - -.. versionadded:: 7.3 - - Before Symfony 7.3, the ``--show-deprecations`` option only displayed the - first deprecation found, so you had to run the command repeatedly. - When running the linter inside `GitHub Actions`_, the output is automatically adapted to the format required by GitHub, but you can force that format too: @@ -1598,13 +1581,6 @@ If you want to create a function instead of a filter, use the Along with custom filters and functions, you can also register `global variables`_. -.. versionadded:: 7.3 - - Support for the ``#[AsTwigFilter]``, ``#[AsTwigFunction]`` and ``#[AsTwigTest]`` - attributes was introduced in Symfony 7.3. Previously, you had to extend the - ``AbstractExtension`` class, and override the ``getFilters()`` and ``getFunctions()`` - methods. - If you're using the :ref:`default services.yaml configuration `, the :ref:`service autoconfiguration ` feature will enable this class as a Twig extension. Otherwise, you need to define a service manually diff --git a/testing.rst b/testing.rst index 09cddfa55bb..3ef04f9663b 100644 --- a/testing.rst +++ b/testing.rst @@ -986,11 +986,11 @@ However, Symfony provides useful shortcut methods for the most common cases: Response Assertions ................... -``assertResponseIsSuccessful(string $message = '', bool $verbose = true)`` +``assertResponseIsSuccessful(string $message = '', ?bool $verbose = null)`` Asserts that the response was successful (HTTP status is 2xx). -``assertResponseStatusCodeSame(int $expectedCode, string $message = '', bool $verbose = true)`` +``assertResponseStatusCodeSame(int $expectedCode, string $message = '', ?bool $verbose = null)`` Asserts a specific HTTP status code. -``assertResponseRedirects(?string $expectedLocation = null, ?int $expectedCode = null, string $message = '', bool $verbose = true)`` +``assertResponseRedirects(?string $expectedLocation = null, ?int $expectedCode = null, string $message = '', ?bool $verbose = null)`` Asserts the response is a redirect response (optionally, you can check the target location and status code). The excepted location can be either an absolute or a relative path. @@ -1008,12 +1008,16 @@ Response Assertions Asserts the response format returned by the :method:`Symfony\\Component\\HttpFoundation\\Response::getFormat` method is the same as the expected value. -``assertResponseIsUnprocessable(string $message = '', bool $verbose = true)`` +``assertResponseIsUnprocessable(string $message = '', bool ?$verbose = null)`` Asserts the response is unprocessable (HTTP status is 422) -.. versionadded:: 7.1 +By default, these assert methods provide detailed error messages when they fail. +You can control the verbosity level using the optional ``verbose`` argument in +each assert method. To set this verbosity level globally, use the +``setBrowserKitAssertionsAsVerbose()`` method from the +:class:`Symfony\\Bundle\\FrameworkBundle\\Test\\BrowserKitAssertionsTrait`:: - The ``$verbose`` parameters were introduced in Symfony 7.1. + BrowserKitAssertionsTrait::setBrowserKitAssertionsAsVerbose(false); Request Assertions .................. @@ -1105,14 +1109,18 @@ Mailer Assertions ``assertEmailHeaderSame(RawMessage $email, string $headerName, string $expectedValue, string $message = '')``/``assertEmailHeaderNotSame(RawMessage $email, string $headerName, string $expectedValue, string $message = '')`` Asserts that the given email does (not) have the expected header set to the expected value. -``assertEmailAddressContains(RawMessage $email, string $headerName, string $expectedValue, string $message = '')`` - Asserts that the given address header equals the expected e-mail +``assertEmailAddressContains(RawMessage $email, string $headerName, string $expectedValue, string $message = '')``/``assertEmailAddressNotContains(RawMessage $email, string $headerName, string $expectedValue, string $message = '')`` + Asserts that the given address header does (not) equal the expected e-mail address. This assertion normalizes addresses like ``Jane Smith `` into ``jane@example.com``. ``assertEmailSubjectContains(RawMessage $email, string $expectedValue, string $message = '')``/``assertEmailSubjectNotContains(RawMessage $email, string $expectedValue, string $message = '')`` Asserts that the subject of the given email does (not) contain the expected subject. +.. versionadded:: 7.4 + + The ``assertEmailAddressNotContains()`` assertion was introduced in Symfony 7.4. + Notifier Assertions ................... diff --git a/translation.rst b/translation.rst index d431e1cd215..74e40f5c38c 100644 --- a/translation.rst +++ b/translation.rst @@ -419,10 +419,6 @@ You can also specify the message domain and pass some additional variables: Global Translation Parameters ----------------------------- -.. versionadded:: 7.3 - - The global translation parameters feature was introduced in Symfony 7.3. - If the content of a translation parameter is repeated across multiple translation messages (e.g. a company name, or a version number), you can define it as a global translation parameter. This helps you avoid repeating the same @@ -564,10 +560,6 @@ to spot untranslated strings: # when using the --no-fill option, the --prefix option is ignored $ php bin/console translation:extract --force --no-fill fr -.. versionadded:: 7.2 - - The ``--no-fill`` option was introduced in Symfony 7.2. - .. _translation-resource-locations: Translation Resource/File Names and Locations @@ -1096,10 +1088,6 @@ match between them, Symfony will try to find a partial match based on the langua If there's no perfect or partial match, this method returns the first locale passed as argument (that's why the order of the passed locales is important). -.. versionadded:: 7.1 - - The feature to match locales partially was introduced in Symfony 7.1. - .. _translation-fallback: Fallback Translation Locales @@ -1511,10 +1499,6 @@ to check that the translation contents are also correct: # checks the contents of the translation catalogues for Italian (it) and Japanese (ja) locales $ php bin/console lint:translations --locale=it --locale=ja -.. versionadded:: 7.2 - - The ``lint:translations`` command was introduced in Symfony 7.2. - Pseudo-localization translator ------------------------------ diff --git a/validation/custom_constraint.rst b/validation/custom_constraint.rst index 10584a36383..390fac79dc2 100644 --- a/validation/custom_constraint.rst +++ b/validation/custom_constraint.rst @@ -665,7 +665,3 @@ class to check precisely which of the constraints failed to pass:: } } -.. versionadded:: 7.2 - - The :class:`Symfony\\Component\\Validator\\Test\\CompoundConstraintTestCase` - class was introduced in Symfony 7.2. diff --git a/web_link.rst b/web_link.rst index 79fd51b8d02..70eed7c8b86 100644 --- a/web_link.rst +++ b/web_link.rst @@ -195,6 +195,26 @@ You can also add links to the HTTP response directly from controllers and servic } } +Parsing Link Headers +-------------------- + +Some third-party APIs provide resources such as pagination URLs using the +``Link`` HTTP header. The WebLink component provides the +:class:`Symfony\\Component\\WebLink\\HttpHeaderParser` utility class to parse +those headers and transform them into :class:`Symfony\\Component\\WebLink\\Link` +instances:: + + use Symfony\Component\WebLink\HttpHeaderParser; + + $parser = new HttpHeaderParser(); + // get the value of the Link header from the Request + $linkHeader = '; rel="prerender",; rel="dns-prefetch"; pr="0.7",; rel="preload"; as="script"'; + + $links = $parser->parse($linkHeader)->getLinks(); + $links[0]->getRels(); // ['prerender'] + $links[1]->getAttributes(); // ['pr' => '0.7'] + $links[2]->getHref(); // '/baz.js' + .. _`WebLink`: https://github.com/symfony/web-link .. _`HTTP/2 Server Push`: https://tools.ietf.org/html/rfc7540#section-8.2 .. _`Resource Hints`: https://www.w3.org/TR/resource-hints/ diff --git a/webhook.rst b/webhook.rst index d27a6e6d906..c15d36f09c1 100644 --- a/webhook.rst +++ b/webhook.rst @@ -42,19 +42,6 @@ Sendgrid ``mailer.webhook.request_parser.sendgrid`` Sweego ``mailer.webhook.request_parser.sweego`` ============== ============================================ -.. versionadded:: 7.1 - - The support for ``Resend`` and ``MailerSend`` were introduced in Symfony 7.1. - -.. versionadded:: 7.2 - - The ``Mandrill``, ``Mailomat``, ``Mailtrap``, and ``Sweego`` integrations were introduced in - Symfony 7.2. - -.. versionadded:: 7.3 - - The ``AhaSend`` integration was introduced in Symfony 7.3. - .. note:: Install the third-party mailer provider you want to use as described in the diff --git a/workflow.rst b/workflow.rst index 8ebaf05e784..85d94a8abf9 100644 --- a/workflow.rst +++ b/workflow.rst @@ -178,11 +178,6 @@ follows: that are used in the workflow. Symfony will automatically extract the places from the transitions. - .. versionadded:: 7.1 - - The support for omitting the ``places`` option was introduced in - Symfony 7.1. - The configured property will be used via its implemented getter/setter methods by the marking store:: // src/Entity/BlogPost.php @@ -364,11 +359,6 @@ To get the enabled transition of a Workflow, you can use :method:`Symfony\\Component\\Workflow\\WorkflowInterface::getEnabledTransition` method. -.. versionadded:: 7.1 - - The :method:`Symfony\\Component\\Workflow\\WorkflowInterface::getEnabledTransition` - method was introduced in Symfony 7.1. - Workflows can also be injected thanks to their name and the :class:`Symfony\\Component\\DependencyInjection\\Attribute\\Target` attribute:: @@ -406,10 +396,6 @@ name. Learn more about :ref:`tag attributes ` and :ref:`storing workflow metadata `. - .. versionadded:: 7.1 - - The attached configuration to the tag was introduced in Symfony 7.1. - .. tip:: You can find the list of available workflow services with the @@ -568,10 +554,6 @@ workflow leaves a place:: You can also use this method in your custom events via the :class:`Symfony\\Component\\Workflow\\Event\\EventNameTrait`. - .. versionadded:: 7.1 - - The ``getName()`` method was introduced in Symfony 7.1. - If some listeners update the context during a transition, you can retrieve it via the marking:: @@ -1383,10 +1365,6 @@ After implementing your validator, configure your workflow to use it: The ``BlogPublishingValidator`` will be executed during container compilation to validate the workflow definition. -.. versionadded:: 7.3 - - Support for workflow definition validators was introduced in Symfony 7.3. - Learn more ---------- diff --git a/workflow/workflow-and-state-machine.rst b/workflow/workflow-and-state-machine.rst index 3a034b97357..661eaae315e 100644 --- a/workflow/workflow-and-state-machine.rst +++ b/workflow/workflow-and-state-machine.rst @@ -258,11 +258,6 @@ Below is the configuration for the pull request state machine. that are used in the workflow. Symfony will automatically extract the places from the transitions. - .. versionadded:: 7.1 - - The support for omitting the ``places`` option was introduced in - Symfony 7.1. - Symfony automatically creates a service for each workflow (:class:`Symfony\\Component\\Workflow\\Workflow`) or state machine (:class:`Symfony\\Component\\Workflow\\StateMachine`) you have defined in your configuration. You can use the workflow inside a class by using