diff --git a/best_practices.rst b/best_practices.rst
index 7ca5590036a..0850d8b2e87 100644
--- a/best_practices.rst
+++ b/best_practices.rst
@@ -201,7 +201,7 @@ most services will be configured automatically. However, in some edge cases
you'll need to configure services (or parts of them) manually.
YAML is the format recommended configuring services because it's friendly to
-newcomers and concise, but Symfony also supports XML and PHP configuration.
+newcomers and concise, but Symfony also supports PHP configuration.
Use Attributes to Define the Doctrine Entity Mapping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -238,7 +238,7 @@ Use Attributes to Configure Routing, Caching, and Security
Using attributes for routing, caching, and security simplifies
configuration. You don't need to browse several files created with different
-formats (YAML, XML, PHP): all the configuration is just where you require it,
+formats (YAML, PHP): all the configuration is just where you require it,
and it only uses one format.
Use Dependency Injection to Get Services
diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst
index 34bf24308ef..c52035d6446 100644
--- a/bundles/best_practices.rst
+++ b/bundles/best_practices.rst
@@ -427,21 +427,6 @@ The end user can provide values in any configuration file:
parameters:
acme_blog.author.email: 'fabien@example.com'
- .. code-block:: xml
-
-
-
-
-
- fabien@example.com
-
-
-
-
.. code-block:: php
// config/services.php
diff --git a/bundles/configuration.rst b/bundles/configuration.rst
index dedfada2ea2..742d4cf184b 100644
--- a/bundles/configuration.rst
+++ b/bundles/configuration.rst
@@ -20,23 +20,6 @@ as integration of other related components:
framework:
form: true
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -162,23 +145,6 @@ can add some configuration that looks like this:
client_id: 123
client_secret: your_secret
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/acme_social.php
@@ -228,7 +194,7 @@ First things first, you have to create an extension class as explained in
Whenever a user includes the ``acme_social`` key (which is the DI alias) in a
configuration file, the configuration under it is added to an array of
configurations and passed to the ``load()`` method of your extension (Symfony
-automatically converts XML and YAML to an array).
+automatically converts the configuration to an array).
For the configuration example in the previous section, the array passed to your
``load()`` method will look like this::
@@ -304,7 +270,7 @@ The ``Configuration`` class to handle the sample configuration looks like::
.. seealso::
The ``Configuration`` class can be much more complicated than shown here,
- supporting "prototype" nodes, advanced validation, XML-specific normalization
+ supporting "prototype" nodes, advanced validation, plural/singular normalization
and advanced merging. You can read more about this in
:doc:`the Config component documentation `. You
can also see it in action by checking out some core Configuration
@@ -333,22 +299,18 @@ configuration arrays together.
Now, you can use the ``$config`` variable to modify a service provided by your bundle.
For example, imagine your bundle has the following example config:
-.. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
+.. code-block:: php
+
+
+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
+
+ use Acme\SocialBundle\TwitterClient;
+
+ return function (ContainerConfigurator $container) {
+ $container->services()
+ ->set('acme_social.twitter_client', TwitterClient::class)
+ ->args([abstract_arg('client_id'), abstract_arg('client_secret')]);
+ };
In your extension, you can load this and dynamically set its arguments::
@@ -356,12 +318,12 @@ In your extension, you can load this and dynamically set its arguments::
namespace Acme\SocialBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
- use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
+ use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
public function load(array $configs, ContainerBuilder $container): void
{
- $loader = new XmlFileLoader($container, new FileLocator(dirname(__DIR__).'/Resources/config'));
- $loader->load('services.xml');
+ $loader = new PhpFileLoader($container, new FileLocator(dirname(__DIR__).'/Resources/config'));
+ $loader->load('services.php');
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
@@ -401,7 +363,7 @@ In your extension, you can load this and dynamically set its arguments::
Using the Config component is fully optional. The ``load()`` method gets an
array of configuration values. You can instead parse these arrays yourself
(e.g. by overriding configurations and using :phpfunction:`isset` to check
- for the existence of a value). Be aware that it'll be very hard to support XML::
+ for the existence of a value)::
public function load(array $configs, ContainerBuilder $container): void
{
@@ -435,105 +397,6 @@ have something different, your ``Extension`` class must override the
:method:`Extension::getConfiguration() `
method and return an instance of your ``Configuration``.
-Supporting XML
---------------
-
-Symfony allows people to provide the configuration in three different formats:
-Yaml, XML and PHP. Both Yaml and PHP use the same syntax and are supported by
-default when using the Config component. Supporting XML requires you to do some
-more things. But when sharing your bundle with others, it is recommended that
-you follow these steps.
-
-Make your Config Tree ready for XML
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The Config component provides some methods by default to allow it to correctly
-process XML configuration. See ":ref:`component-config-normalization`" of the
-component documentation. However, you can do some optional things as well, this
-will improve the experience of using XML configuration:
-
-Choosing an XML Namespace
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In XML, the `XML namespace`_ is used to determine which elements belong to the
-configuration of a specific bundle. The namespace is returned from the
-:method:`Extension::getNamespace() `
-method. By convention, the namespace is a URL (it doesn't have to be a valid
-URL nor does it need to exist). By default, the namespace for a bundle is
-``http://example.org/schema/dic/DI_ALIAS``, where ``DI_ALIAS`` is the DI alias of
-the extension. You might want to change this to a more professional URL::
-
- // src/DependencyInjection/AcmeHelloExtension.php
- namespace Acme\HelloBundle\DependencyInjection;
-
- // ...
- class AcmeHelloExtension extends Extension
- {
- // ...
-
- public function getNamespace(): string
- {
- return 'http://acme_company.com/schema/dic/hello';
- }
- }
-
-Providing an XML Schema
-~~~~~~~~~~~~~~~~~~~~~~~
-
-XML has a very useful feature called `XML schema`_. This allows you to
-describe all possible elements and attributes and their values in an XML Schema
-Definition (an XSD file). This XSD file is used by IDEs for auto completion and
-it is used by the Config component to validate the elements.
-
-In order to use the schema, the XML configuration file must provide an
-``xsi:schemaLocation`` attribute pointing to the XSD file for a certain XML
-namespace. This location always starts with the XML namespace. This XML
-namespace is then replaced with the XSD validation base path returned from
-:method:`Extension::getXsdValidationBasePath() `
-method. This namespace is then followed by the rest of the path from the base
-path to the file itself.
-
-By convention, the XSD file lives in ``config/schema/`` directory, but you
-can place it anywhere you like. You should return this path as the base path::
-
- // src/DependencyInjection/AcmeHelloExtension.php
- namespace Acme\HelloBundle\DependencyInjection;
-
- // ...
- class AcmeHelloExtension extends Extension
- {
- // ...
-
- public function getXsdValidationBasePath(): string
- {
- return __DIR__.'/../config/schema';
- }
- }
-
-Assuming the XSD file is called ``hello-1.0.xsd``, the schema location will be
-``https://acme_company.com/schema/dic/hello/hello-1.0.xsd``:
-
-.. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
.. _`FrameworkBundle Configuration`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
.. _`TwigBundle Configuration`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php
-.. _`XML namespace`: https://en.wikipedia.org/wiki/XML_namespace
-.. _`XML schema`: https://en.wikipedia.org/wiki/XML_schema
.. _`snake case`: https://en.wikipedia.org/wiki/Snake_case
diff --git a/bundles/extension.rst b/bundles/extension.rst
index f3cc943e515..e49831686fe 100644
--- a/bundles/extension.rst
+++ b/bundles/extension.rst
@@ -33,8 +33,8 @@ method to load service definitions from configuration files::
{
public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void
{
- // load an XML, PHP or YAML file
- $container->import('../config/services.xml');
+ // load a PHP or YAML file
+ $container->import('../config/services.php');
// you can also add or replace parameters and services
$container->parameters()
@@ -143,25 +143,25 @@ container.
In the ``load()`` method, you can use PHP code to register service definitions,
but it is more common if you put these definitions in a configuration file
-(using the YAML, XML or PHP format).
+(using the YAML or PHP format).
-For instance, assume you have a file called ``services.xml`` in the
+For instance, assume you have a file called ``services.php`` in the
``config/`` directory of your bundle, your ``load()`` method looks like::
use Symfony\Component\Config\FileLocator;
- use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
+ use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
// ...
public function load(array $configs, ContainerBuilder $container): void
{
- $loader = new XmlFileLoader(
+ $loader = new PhpFileLoader(
$container,
new FileLocator(__DIR__.'/../../config')
);
- $loader->load('services.xml');
+ $loader->load('services.php');
}
-The other available loaders are ``YamlFileLoader`` and ``PhpFileLoader``.
+The other available loader is ``YamlFileLoader``.
Using Configuration to Change the Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/bundles/prepend_extension.rst b/bundles/prepend_extension.rst
index 7425adedaf1..40df06ac834 100644
--- a/bundles/prepend_extension.rst
+++ b/bundles/prepend_extension.rst
@@ -108,32 +108,6 @@ registered and the ``entity_manager_name`` setting for ``acme_hello`` is set to
# ...
use_acme_goodbye: false
- .. code-block:: xml
-
-
-
-
-
-
- non_default
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/acme_something.php
diff --git a/cache.rst b/cache.rst
index b56599ca486..560ba6a7e07 100644
--- a/cache.rst
+++ b/cache.rst
@@ -61,26 +61,6 @@ adapter (template) they use by using the ``app`` and ``system`` key like:
app: cache.adapter.filesystem
system: cache.adapter.system
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/cache.php
@@ -134,30 +114,6 @@ Some of these adapters could be configured via shortcuts.
default_memcached_provider: 'memcached://localhost'
default_pdo_provider: 'pgsql:host=localhost'
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/cache.php
@@ -219,44 +175,6 @@ You can also create more customized pools:
adapter: foobar.cache
default_lifetime: 60
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/cache.php
@@ -339,39 +257,6 @@ with either :class:`Symfony\\Contracts\\Cache\\CacheInterface` or
tags:
- { name: 'cache.pool', namespace: 'my_custom_namespace' }
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
- .. code-block:: php
-
- // config/services.php
- namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
- return function(ContainerConfigurator $container): void {
- $container->services()
- // ...
-
- ->set('app.cache.adapter.redis')
- ->parent('cache.adapter.redis')
- ->tag('cache.pool', ['namespace' => 'my_custom_namespace'])
- ;
- };
-
Custom Provider Options
-----------------------
@@ -401,39 +286,6 @@ and use that when configuring the pool.
- 'redis://localhost'
- { retry_interval: 2, timeout: 10 }
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
- redis://localhost
-
- 2
- 10
-
-
-
-
-
.. code-block:: php
// config/packages/cache.php
@@ -493,30 +345,6 @@ Symfony stores the item automatically in all the missing pools.
- cache.adapter.apcu
- {name: cache.adapter.redis, provider: 'redis://user:password@example.com'}
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/cache.php
@@ -589,28 +417,6 @@ to enable this feature. This could be added by using the following configuration
adapter: cache.adapter.redis_tag_aware
tags: true
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/cache.php
@@ -642,29 +448,6 @@ achieved by specifying the adapter.
tag_pool:
adapter: cache.adapter.apcu
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/cache.php
@@ -787,32 +570,6 @@ Then, register the ``SodiumMarshaller`` service using this key:
#- ['%env(base64:CACHE_DECRYPTION_KEY)%', '%env(base64:OLD_CACHE_DECRYPTION_KEY)%']
- '@.inner'
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
- env(base64:CACHE_DECRYPTION_KEY)
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/cache.php
@@ -918,32 +675,6 @@ a message bus to compute values in a worker:
routing:
'Symfony\Component\Cache\Messenger\EarlyExpirationMessage': async_bus
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
- %env(MESSENGER_TRANSPORT_DSN)%
-
-
-
-
-
-
-
.. code-block:: php
// config/framework/framework.php
diff --git a/components/dependency_injection.rst b/components/dependency_injection.rst
index d146f553a0c..3ae645aa289 100644
--- a/components/dependency_injection.rst
+++ b/components/dependency_injection.rst
@@ -210,22 +210,22 @@ Setting up the Container with Configuration Files
-------------------------------------------------
As well as setting up the services using PHP as above you can also use
-configuration files. This allows you to use XML or YAML to write the definitions
+configuration files. This allows you to use YAML or PHP to write the definitions
for the services rather than using PHP to define the services as in the
above examples. In anything but the smallest applications it makes sense
to organize the service definitions by moving them into one or more configuration
files. To do this you also need to install
:doc:`the Config component `.
-Loading an XML config file::
+Loading a PHP config file::
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
- use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
+ use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
$container = new ContainerBuilder();
- $loader = new XmlFileLoader($container, new FileLocator(__DIR__));
- $loader->load('services.xml');
+ $loader = new PhpFileLoader($container, new FileLocator(__DIR__));
+ $loader->load('services.php');
Loading a YAML config file::
@@ -242,15 +242,6 @@ Loading a YAML config file::
If you want to load YAML config files then you will also need to install
:doc:`the Yaml component `.
-.. tip::
-
- If your application uses unconventional file extensions (for example, your
- XML files have a ``.config`` extension) you can pass the file type as the
- second optional parameter of the ``load()`` method::
-
- // ...
- $loader->load('services.config', 'xml');
-
If you *do* want to use PHP to create the services then you can move this
into a separate config file and load it in a similar way::
@@ -282,32 +273,6 @@ config files:
calls:
- [setMailer, ['@mailer']]
- .. code-block:: xml
-
-
-
-
-
- sendmail
-
-
-
-
- %mailer.transport%
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
diff --git a/components/dependency_injection/_imports-parameters-note.rst.inc b/components/dependency_injection/_imports-parameters-note.rst.inc
index 1389ca78fe3..41b523afddd 100644
--- a/components/dependency_injection/_imports-parameters-note.rst.inc
+++ b/components/dependency_injection/_imports-parameters-note.rst.inc
@@ -12,20 +12,6 @@
imports:
- { resource: '%kernel.project_dir%/somefile.yaml' }
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/services.php
diff --git a/components/dependency_injection/compilation.rst b/components/dependency_injection/compilation.rst
index c79281b5c27..763d409ab54 100644
--- a/components/dependency_injection/compilation.rst
+++ b/components/dependency_injection/compilation.rst
@@ -57,17 +57,17 @@ A very simple extension may just load configuration files into the container::
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
- use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
+ use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
class AcmeDemoExtension implements ExtensionInterface
{
public function load(array $configs, ContainerBuilder $container): void
{
- $loader = new XmlFileLoader(
+ $loader = new PhpFileLoader(
$container,
new FileLocator(__DIR__.'/../Resources/config')
);
- $loader->load('services.xml');
+ $loader->load('services.php');
}
// ...
@@ -170,45 +170,6 @@ you could access the config value this way::
// ...
}
-There are a further two methods you must implement. One to return the XML
-namespace so that the relevant parts of an XML config file are passed to
-the extension. The other to specify the base path to XSD files to validate
-the XML configuration::
-
- public function getXsdValidationBasePath(): string
- {
- return __DIR__.'/../Resources/config/';
- }
-
- public function getNamespace(): string
- {
- return 'http://www.example.com/symfony/schema/';
- }
-
-.. note::
-
- XSD validation is optional, returning ``false`` from the ``getXsdValidationBasePath()``
- method will disable it.
-
-The XML version of the config would then look like this:
-
-.. code-block:: xml
-
-
-
-
- fooValue
- barValue
-
-
-
.. note::
In the Symfony full-stack Framework there is a base Extension class
@@ -240,14 +201,14 @@ file but also load a secondary one only if a certain parameter is set::
$processor = new Processor();
$config = $processor->processConfiguration($configuration, $configs);
- $loader = new XmlFileLoader(
+ $loader = new PhpFileLoader(
$container,
new FileLocator(__DIR__.'/../Resources/config')
);
- $loader->load('services.xml');
+ $loader->load('services.php');
if ($config['advanced']) {
- $loader->load('advanced.xml');
+ $loader->load('advanced.php');
}
}
@@ -256,7 +217,7 @@ about not using them anymore. This helps with the migration across major version
of an extension.
Deprecation is only possible when using PHP to configure the extension, not when
-using XML or YAML. Use the ``ContainerBuilder::deprecateParameter()`` method to
+using YAML. Use the ``ContainerBuilder::deprecateParameter()`` method to
provide the deprecation details::
public function load(array $configs, ContainerBuilder $containerBuilder)
diff --git a/components/uid.rst b/components/uid.rst
index 5d4a7e305fc..fcb9fc0c052 100644
--- a/components/uid.rst
+++ b/components/uid.rst
@@ -204,28 +204,6 @@ You can configure these default values::
time_based_uuid_version: 6
time_based_uuid_node: 121212121212
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/uid.php
@@ -625,25 +603,6 @@ configuration in your application before using these commands:
Symfony\Component\Uid\Command\InspectUlidCommand: ~
Symfony\Component\Uid\Command\InspectUuidCommand: ~
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/services.php
diff --git a/components/var_dumper.rst b/components/var_dumper.rst
index c6966a692af..01dbbdec15e 100644
--- a/components/var_dumper.rst
+++ b/components/var_dumper.rst
@@ -124,21 +124,6 @@ the :ref:`dump_destination option ` of the
debug:
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"
- .. code-block:: xml
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/debug.php
diff --git a/configuration.rst b/configuration.rst
index e46fd28750c..5f6bae9068a 100644
--- a/configuration.rst
+++ b/configuration.rst
@@ -53,7 +53,7 @@ Configuration Formats
~~~~~~~~~~~~~~~~~~~~~
Unlike other frameworks, Symfony doesn't impose a specific format on you to
-configure your applications, but lets you choose between YAML, XML and PHP.
+configure your applications, but lets you choose between YAML and PHP.
Throughout the Symfony documentation, all configuration examples will be
shown in these three formats.
@@ -66,21 +66,9 @@ readable. These are the main advantages and disadvantages of each format:
* **YAML**: simple, clean and readable, but not all IDEs support autocompletion
and validation for it. :doc:`Learn the YAML syntax `;
-* **XML**: autocompleted/validated by most IDEs and is parsed natively by PHP,
- but sometimes it generates configuration considered too verbose. `Learn the XML syntax`_;
* **PHP**: very powerful and it allows you to create dynamic configuration with
arrays or a :ref:`ConfigBuilder `.
-.. note::
-
- By default Symfony loads the configuration files defined in YAML and PHP
- formats. If you define configuration in XML format, update the
- :method:`Symfony\\Bundle\\FrameworkBundle\\Kernel\\MicroKernelTrait::configureContainer`
- and/or
- :method:`Symfony\\Bundle\\FrameworkBundle\\Kernel\\MicroKernelTrait::configureRoutes`
- methods in the ``src/Kernel.php`` file to add support for the ``.xml`` file
- extension.
-
Importing Configuration Files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -106,31 +94,6 @@ configuration files, even if they use a different format:
# ...
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/services.php
@@ -191,49 +154,6 @@ reusable configuration value. By convention, parameters are defined under the
# ...
- .. code-block:: xml
-
-
-
-
-
-
-
- something@example.com
-
-
- true
-
- true
-
-
-
- en
- es
- fr
-
-
-
- VGhpcyBpcyBhIEJlbGwgY2hhciAH
-
-
- GLOBAL_CONSTANT
- App\Entity\BlogPost::MAX_ITEMS
-
-
- App\Enum\PostState::Published
-
-
-
-
-
.. code-block:: php
// config/services.php
@@ -267,27 +187,6 @@ reusable configuration value. By convention, parameters are defined under the
// ...
-.. warning::
-
- By default and when using XML configuration, the values between ````
- tags are not trimmed. This means that the value of the following parameter will be
- ``'\n something@example.com\n'``:
-
- .. code-block:: xml
-
-
- something@example.com
-
-
- If you want to trim the value of your parameter, use the ``trim`` attribute.
- When using it, the value of the following parameter will be ``something@example.com``:
-
- .. code-block:: xml
-
-
- something@example.com
-
-
Once defined, you can reference this parameter value from any other
configuration file using a special syntax: wrap the parameter name in two ``%``
(e.g. ``%app.admin_email%``):
@@ -301,24 +200,6 @@ configuration file using a special syntax: wrap the parameter name in two ``%``
# any string surrounded by two % is replaced by that parameter value
email_address: '%app.admin_email%'
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/some_package.php
@@ -331,7 +212,7 @@ configuration file using a special syntax: wrap the parameter name in two ``%``
'email_address' => param('app.admin_email'),
// ... but if you prefer it, you can also pass the name as a string
- // surrounded by two % (same as in YAML and XML formats) and Symfony will
+ // surrounded by two % (same as in YAML format) and Symfony will
// replace it by that parameter value
'email_address' => '%app.admin_email%',
]);
@@ -352,13 +233,6 @@ configuration file using a special syntax: wrap the parameter name in two ``%``
# Parsed as 'https://symfony.com/?foo=%s&bar=%d'
url_pattern: 'https://symfony.com/?foo=%%s&bar=%%d'
- .. code-block:: xml
-
-
-
- http://symfony.com/?foo=%%s&bar=%%d
-
-
.. code-block:: php
// config/services.php
@@ -479,33 +353,6 @@ files directly in the ``config/packages/`` directory.
# ...
when@test: *webpack_prod
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -626,23 +473,6 @@ This example shows how you could configure the application secret using an env v
secret: '%env(APP_SECRET)%'
# ...
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -693,26 +523,6 @@ To do so, define a parameter with the same name as the env var using this syntax
# ...
- .. code-block:: xml
-
-
-
-
-
-
-
- some_secret
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -1169,26 +979,6 @@ doesn't work for parameters:
arguments:
$contentsDir: '%app.contents_dir%'
- .. code-block:: xml
-
-
-
-
-
-
- ...
-
-
-
-
- %app.contents_dir%
-
-
-
-
.. code-block:: php
// config/services.php
@@ -1226,26 +1016,6 @@ whenever a service/controller defines a ``$projectDir`` argument, use this:
# ...
- .. code-block:: xml
-
-
-
-
-
-
-
-
- %kernel.project_dir%
-
-
-
-
-
-
.. code-block:: php
// config/services.php
diff --git a/configuration/env_var_processors.rst b/configuration/env_var_processors.rst
index 22d2880dc75..4b7c55f59fc 100644
--- a/configuration/env_var_processors.rst
+++ b/configuration/env_var_processors.rst
@@ -21,23 +21,6 @@ processor to turn the value of the ``HTTP_PORT`` env var into an integer:
router:
http_port: '%env(int:HTTP_PORT)%'
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -71,25 +54,6 @@ Symfony provides the following env var processors:
framework:
secret: '%env(string:SECRET)%'
- .. code-block:: xml
-
-
-
-
-
-
- some_secret
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -118,25 +82,6 @@ Symfony provides the following env var processors:
framework:
http_method_override: '%env(bool:HTTP_METHOD_OVERRIDE)%'
- .. code-block:: xml
-
-
-
-
-
-
- true
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -162,24 +107,6 @@ Symfony provides the following env var processors:
parameters:
safe_for_production: '%env(not:APP_DEBUG)%'
- .. code-block:: xml
-
-
-
-
-
-
- %env(not:APP_DEBUG)%
-
-
-
-
.. code-block:: php
// config/services.php
@@ -205,27 +132,6 @@ Symfony provides the following env var processors:
access_control:
- { path: '^/health-check$', methods: '%env(const:HEALTH_CHECK_METHOD)%' }
- .. code-block:: xml
-
-
-
-
-
-
- Symfony\Component\HttpFoundation\Request::METHOD_HEAD
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/security.php
@@ -255,24 +161,6 @@ Symfony provides the following env var processors:
env(ALLOWED_LANGUAGES): '["en","de","es"]'
app_allowed_languages: '%env(json:ALLOWED_LANGUAGES)%'
- .. code-block:: xml
-
-
-
-
-
-
- ["en","de","es"]
- %env(json:ALLOWED_LANGUAGES)%
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -301,23 +189,6 @@ Symfony provides the following env var processors:
sentry:
dsn: '%env(resolve:SENTRY_DSN)%'
- .. code-block:: xml
-
-
-
-
-
-
- 10.0.0.1
- http://%sentry_host%/project
-
-
-
-
-
.. code-block:: php
// config/packages/sentry.php
@@ -339,24 +210,6 @@ Symfony provides the following env var processors:
env(ALLOWED_LANGUAGES): "en,de,es"
app_allowed_languages: '%env(csv:ALLOWED_LANGUAGES)%'
- .. code-block:: xml
-
-
-
-
-
-
- en,de,es
- %env(csv:ALLOWED_LANGUAGES)%
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -385,30 +238,6 @@ Symfony provides the following env var processors:
class: RedisCluster
arguments: [null, "%env(shuffle:csv:REDIS_NODES)%"]
- .. code-block:: xml
-
-
-
-
-
-
- redis://127.0.0.1:6380,redis://127.0.0.1:6381
-
-
-
-
- null
- %env(shuffle:csv:REDIS_NODES)%
-
-
-
-
.. code-block:: php
// config/services.php
@@ -432,25 +261,6 @@ Symfony provides the following env var processors:
google:
auth: '%env(file:AUTH_FILE)%'
- .. code-block:: xml
-
-
-
-
-
-
- ../config/auth.json
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -473,25 +283,6 @@ Symfony provides the following env var processors:
app:
auth: '%env(require:PHP_FILE)%'
- .. code-block:: xml
-
-
-
-
-
-
- ../config/.runtime-evaluated.php
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -515,25 +306,6 @@ Symfony provides the following env var processors:
google:
auth: '%env(trim:file:AUTH_FILE)%'
- .. code-block:: xml
-
-
-
-
-
-
- ../config/auth.json
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -556,24 +328,6 @@ Symfony provides the following env var processors:
database_password: '%env(key:database_password:json:file:SECRETS_FILE)%'
# if SECRETS_FILE contents are: {"database_password": "secret"} it returns "secret"
- .. code-block:: xml
-
-
-
-
-
-
- /opt/application/.secrets.json
- %env(key:database_password:json:file:SECRETS_FILE)%
-
-
-
.. code-block:: php
// config/services.php
@@ -594,24 +348,6 @@ Symfony provides the following env var processors:
private_key: '%env(default:raw_key:file:PRIVATE_KEY)%'
raw_key: '%env(PRIVATE_KEY)%'
- .. code-block:: xml
-
-
-
-
-
-
- %env(default:raw_key:file:PRIVATE_KEY)%
- %env(PRIVATE_KEY)%
-
-
-
.. code-block:: php
// config/services.php
@@ -647,23 +383,6 @@ Symfony provides the following env var processors:
default:
database_name: '%env(key:path:url:MONGODB_URL)%'
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/mongodb.php
@@ -712,20 +431,6 @@ Symfony provides the following env var processors:
# ...
connectTimeoutMS: '%env(int:key:timeout:query_string:MONGODB_URL)%'
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/mongodb.php
@@ -759,23 +464,6 @@ Symfony provides the following env var processors:
parameters:
suit: '%env(enum:App\Enum\Suit:CARD_SUIT)%'
- .. code-block:: xml
-
-
-
-
-
-
- %env(enum:App\Enum\Suit:CARD_SUIT)%
-
-
-
.. code-block:: php
// config/services.php
@@ -796,23 +484,6 @@ Symfony provides the following env var processors:
parameters:
typed_env: '%env(defined:FOO)%'
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/services.php
@@ -834,24 +505,6 @@ Symfony provides the following env var processors:
env(DATABASE_URL): 'mysql://db_user:foo@b$r@127.0.0.1:3306/db_name'
encoded_database_url: '%env(urlencode:DATABASE_URL)%'
- .. code-block:: xml
-
-
-
-
-
-
- mysql://db_user:foo@b$r@127.0.0.1:3306/db_name
- %env(urlencode:DATABASE_URL)%
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -881,29 +534,6 @@ It is also possible to combine any number of processors:
# 4. JSON-decodes the content of the file and returns it
auth: '%env(json:file:resolve:AUTH_FILE)%'
- .. code-block:: xml
-
-
-
-
-
-
- %kernel.project_dir%/config/auth.json
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
diff --git a/configuration/front_controllers_and_kernel.rst b/configuration/front_controllers_and_kernel.rst
index b55f66afc33..428aa13e871 100644
--- a/configuration/front_controllers_and_kernel.rst
+++ b/configuration/front_controllers_and_kernel.rst
@@ -166,21 +166,6 @@ parameter used, for example, to turn Twig's debug mode on:
twig:
debug: '%kernel.debug%'
- .. code-block:: xml
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/twig.php
diff --git a/configuration/micro_kernel_trait.rst b/configuration/micro_kernel_trait.rst
index 6adee785a7f..947abefc807 100644
--- a/configuration/micro_kernel_trait.rst
+++ b/configuration/micro_kernel_trait.rst
@@ -357,21 +357,6 @@ because the configuration started to get bigger:
secret: S0ME_SECRET
profiler: { only_exceptions: false }
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/framework.php
diff --git a/configuration/override_dir_structure.rst b/configuration/override_dir_structure.rst
index e5dff35b6d0..1ace31069d3 100644
--- a/configuration/override_dir_structure.rst
+++ b/configuration/override_dir_structure.rst
@@ -166,24 +166,6 @@ for multiple directories):
# ...
default_path: "%kernel.project_dir%/resources/views"
- .. code-block:: xml
-
-
-
-
-
-
- %kernel.project_dir%/resources/views
-
-
-
-
.. code-block:: php
// config/packages/twig.php
@@ -210,26 +192,6 @@ configuration option to define your own translations directory (use :ref:`framew
# ...
default_path: "%kernel.project_dir%/i18n"
- .. code-block:: xml
-
-
-
-
-
-
-
- %kernel.project_dir%/i18n
-
-
-
-
-
.. code-block:: php
// config/packages/translation.php
diff --git a/configuration/secrets.rst b/configuration/secrets.rst
index b0a31e02afe..5e91c82a611 100644
--- a/configuration/secrets.rst
+++ b/configuration/secrets.rst
@@ -114,26 +114,6 @@ If you stored a ``DATABASE_PASSWORD`` secret, you can reference it by:
# ...
# ...
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/doctrine.php
@@ -297,25 +277,6 @@ The secrets system is enabled by default and some of its behavior can be configu
#local_dotenv_file: '%kernel.project_dir%/.env.%kernel.environment%.local'
#decryption_env_var: 'base64:default::SYMFONY_DECRYPTION_SECRET'
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
diff --git a/configuration/using_parameters_in_dic.rst b/configuration/using_parameters_in_dic.rst
index 3cac5d5049c..1036d404d8f 100644
--- a/configuration/using_parameters_in_dic.rst
+++ b/configuration/using_parameters_in_dic.rst
@@ -44,31 +44,6 @@ Now, examine the results to see this closely:
# The Configurator does not know anything about
# "%kernel.debug%" being a parameter.
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
$container->loadFromExtension('my_bundle', [
diff --git a/console/commands_as_services.rst b/console/commands_as_services.rst
index ed5b99f9cb4..da8e664ba80 100644
--- a/console/commands_as_services.rst
+++ b/console/commands_as_services.rst
@@ -78,24 +78,6 @@ Or set the ``command`` attribute on the ``console.command`` tag in your service
tags:
- { name: 'console.command', command: 'app:sunshine' }
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/services.php
diff --git a/contributing/code/reproducer.rst b/contributing/code/reproducer.rst
index c2208b70b09..bc08a353498 100644
--- a/contributing/code/reproducer.rst
+++ b/contributing/code/reproducer.rst
@@ -70,11 +70,11 @@ to a route definition. Then, after creating your project:
see if the bug appears or not.
#. If you can see the bug, you're done and you can already share the code with us.
#. If you can't see the bug, you must keep making small changes. For example, if
- your original route was defined using XML, forget about the previous route
- and define the route using XML instead. Or maybe your application
- registers some event listeners and that's where the real bug is. In that case,
- add an event listener that's similar to your real app to see if you can find
- the bug.
+ your original route was defined in a YAML or PHP file in the ``config/`` folder,
+ forget about the previous route and define the route using the same pattern.
+ Or maybe your application registers some event listeners and that's where the
+ real bug is. In that case, add an event listener that's similar to your real
+ app to see if you can find the bug.
In short, the idea is to keep adding small and incremental changes to a new project
until you can reproduce the bug.
diff --git a/contributing/documentation/standards.rst b/contributing/documentation/standards.rst
index 5e195d008fd..02bc3e3836f 100644
--- a/contributing/documentation/standards.rst
+++ b/contributing/documentation/standards.rst
@@ -87,8 +87,8 @@ Configuration examples should show all supported formats using
:ref:`configuration blocks `. The supported formats
(and their orders) are:
-* **Configuration** (including services): YAML, XML, PHP
-* **Routing**: Attributes, YAML, XML, PHP
+* **Configuration** (including services): YAML, PHP
+* **Routing**: Attributes, YAML, PHP
* **Validation**: Attributes, YAML, XML, PHP
* **Doctrine Mapping**: Attributes, YAML, XML, PHP
* **Translation**: XML, YAML, PHP
diff --git a/controller/error_pages.rst b/controller/error_pages.rst
index 8e50fa0d132..7fb7043de82 100644
--- a/controller/error_pages.rst
+++ b/controller/error_pages.rst
@@ -158,20 +158,6 @@ automatically when installing ``symfony/framework-bundle``):
type: php
prefix: /_error
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/routes/framework.php
@@ -256,21 +242,6 @@ configuration option to point to it:
framework:
error_controller: App\Controller\ErrorController::show
- .. code-block:: xml
-
-
-
-
-
-
- App\Controller\ErrorController::show
-
-
-
-
.. code-block:: php
// config/packages/framework.php
diff --git a/controller/service.rst b/controller/service.rst
index 3cba131daed..6d78b6dae02 100644
--- a/controller/service.rst
+++ b/controller/service.rst
@@ -143,19 +143,6 @@ a service like: ``App\Controller\HelloController::index``:
controller: App\Controller\HelloController::index
methods: GET
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/routes.php
@@ -204,21 +191,6 @@ which is a common practice when following the `ADR pattern`_
path: /hello/{name}
controller: App\Controller\HelloController
- .. code-block:: xml
-
-
-
-
-
-
- App\Controller\HelloController
-
-
-
-
.. code-block:: php
use App\Controller\HelloController;
diff --git a/controller/upload_file.rst b/controller/upload_file.rst
index cb203e6225d..88b8855d4d8 100644
--- a/controller/upload_file.rst
+++ b/controller/upload_file.rst
@@ -285,21 +285,6 @@ Then, define a service for this class:
arguments:
$targetDirectory: '%brochures_directory%'
- .. code-block:: xml
-
-
-
-
-
-
-
- %brochures_directory%
-
-
-
.. code-block:: php
// config/services.php
diff --git a/controller/value_resolver.rst b/controller/value_resolver.rst
index 835edcfbff9..35f199826a9 100644
--- a/controller/value_resolver.rst
+++ b/controller/value_resolver.rst
@@ -362,27 +362,6 @@ but you can set it yourself to change its ``priority`` or ``name`` attributes.
name: booking_id
priority: 150
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
- controller.argument_value_resolver
-
-
-
-
-
.. code-block:: php
// config/services.php
diff --git a/create_framework/routing.rst b/create_framework/routing.rst
index 71e3a8250e1..1632f2628b3 100644
--- a/create_framework/routing.rst
+++ b/create_framework/routing.rst
@@ -74,7 +74,7 @@ of default values for route attributes (``['name' => 'World']``).
Read the :doc:`Routing documentation ` to learn more about
its many features like URL generation, attribute requirements, HTTP
- method enforcement, loaders for YAML or XML files, dumpers to PHP or
+ method enforcement, loaders for YAML or PHP files, dumpers to PHP or
Apache rewrite rules for enhanced performance and much more.
Based on the information stored in the ``RouteCollection`` instance, a
diff --git a/deployment/proxies.rst b/deployment/proxies.rst
index d9d974314bf..016ef136412 100644
--- a/deployment/proxies.rst
+++ b/deployment/proxies.rst
@@ -44,36 +44,6 @@ using the following configuration options:
# or, if your proxy instead uses the "Forwarded" header
trusted_headers: ['forwarded']
- .. code-block:: xml
-
-
-
-
-
-
-
- 192.0.0.1,10.0.0.0/8
-
- private_ranges
-
-
- x-forwarded-for
- x-forwarded-host
- x-forwarded-proto
- x-forwarded-port
- x-forwarded-prefix
-
-
- forwarded
-
-
-
.. code-block:: php
// config/packages/framework.php
diff --git a/doctrine/custom_dql_functions.rst b/doctrine/custom_dql_functions.rst
index e5b21819f58..dfb13d5ca0f 100644
--- a/doctrine/custom_dql_functions.rst
+++ b/doctrine/custom_dql_functions.rst
@@ -23,30 +23,6 @@ In Symfony, you can register your custom DQL functions as follows:
datetime_functions:
test_datetime: App\DQL\DatetimeFunction
- .. code-block:: xml
-
-
-
-
-
-
-
-
- App\DQL\StringFunction
- App\DQL\SecondStringFunction
- App\DQL\NumericFunction
- App\DQL\DatetimeFunction
-
-
-
-
-
.. code-block:: php
// config/packages/doctrine.php
@@ -89,34 +65,6 @@ In Symfony, you can register your custom DQL functions as follows:
datetime_functions:
test_datetime: App\DQL\DatetimeFunction
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
- App\DQL\DatetimeFunction
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/doctrine.php
diff --git a/doctrine/dbal.rst b/doctrine/dbal.rst
index 4f47b61eb61..fd6f748401d 100644
--- a/doctrine/dbal.rst
+++ b/doctrine/dbal.rst
@@ -78,25 +78,6 @@ mapping types, read Doctrine's `Custom Mapping Types`_ section of their document
custom_first: App\Type\CustomFirst
custom_second: App\Type\CustomSecond
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/doctrine.php
@@ -130,24 +111,6 @@ mapping type:
mapping_types:
enum: string
- .. code-block:: xml
-
-
-
-
-
-
- string
-
-
-
-
.. code-block:: php
// config/packages/doctrine.php
diff --git a/doctrine/events.rst b/doctrine/events.rst
index accf424083a..0cd4803ccc7 100644
--- a/doctrine/events.rst
+++ b/doctrine/events.rst
@@ -177,39 +177,6 @@ with the ``doctrine.orm.entity_listener`` tag as follows:
# configure a custom method name with the 'method' option
# method: 'checkUserChanges'
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/services.php
@@ -324,30 +291,6 @@ listener in the Symfony application by creating a new service for it and
# you can also restrict listeners to a specific Doctrine connection
connection: 'default'
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/services.php
diff --git a/doctrine/multiple_entity_managers.rst b/doctrine/multiple_entity_managers.rst
index 1a56c55ddad..3d295b9939f 100644
--- a/doctrine/multiple_entity_managers.rst
+++ b/doctrine/multiple_entity_managers.rst
@@ -55,53 +55,6 @@ The following configuration code shows how you can configure two entity managers
prefix: 'App\Entity\Customer'
alias: Customer
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/doctrine.php
diff --git a/doctrine/resolve_target_entity.rst b/doctrine/resolve_target_entity.rst
index 9cf54be4b90..1e281f52b62 100644
--- a/doctrine/resolve_target_entity.rst
+++ b/doctrine/resolve_target_entity.rst
@@ -102,26 +102,6 @@ how to replace the interface with the concrete class:
resolve_target_entities:
App\Model\InvoiceSubjectInterface: App\Entity\Customer
- .. code-block:: xml
-
-
-
-
-
-
-
-
- App\Entity\Customer
-
-
-
-
.. code-block:: php
// config/packages/doctrine.php
diff --git a/event_dispatcher.rst b/event_dispatcher.rst
index ffa9e67aa0d..1fceb2a872d 100644
--- a/event_dispatcher.rst
+++ b/event_dispatcher.rst
@@ -71,22 +71,6 @@ notify Symfony that it is an event listener by using a special "tag":
App\EventListener\ExceptionListener:
tags: [kernel.event_listener]
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/services.php
@@ -477,23 +461,6 @@ First, define some token configuration as parameters:
client1: pass1
client2: pass2
- .. code-block:: xml
-
-
-
-
-
-
-
- pass1
- pass2
-
-
-
-
.. code-block:: php
// config/services.php
diff --git a/form/bootstrap4.rst b/form/bootstrap4.rst
index eef016aa58a..620a3b78ed8 100644
--- a/form/bootstrap4.rst
+++ b/form/bootstrap4.rst
@@ -34,24 +34,6 @@ configuration:
twig:
form_themes: ['bootstrap_4_layout.html.twig']
- .. code-block:: xml
-
-
-
-
-
-
- bootstrap_4_layout.html.twig
-
-
-
-
.. code-block:: php
// config/packages/twig.php
diff --git a/form/bootstrap5.rst b/form/bootstrap5.rst
index db098a1ba09..deb21c23fe2 100644
--- a/form/bootstrap5.rst
+++ b/form/bootstrap5.rst
@@ -34,24 +34,6 @@ configuration:
twig:
form_themes: ['bootstrap_5_layout.html.twig']
- .. code-block:: xml
-
-
-
-
-
-
- bootstrap_5_layout.html.twig
-
-
-
-
.. code-block:: php
// config/packages/twig.php
diff --git a/form/create_custom_field_type.rst b/form/create_custom_field_type.rst
index 0d92a967fa0..3fb0ed7edee 100644
--- a/form/create_custom_field_type.rst
+++ b/form/create_custom_field_type.rst
@@ -376,24 +376,6 @@ add this new template at the end of the list (each theme overrides all the previ
- '...'
- 'form/custom_types.html.twig'
- .. code-block:: xml
-
-
-
-
-
-
- ...
- form/custom_types.html.twig
-
-
-
.. code-block:: php
// config/packages/twig.php
diff --git a/form/form_themes.rst b/form/form_themes.rst
index 8b82982edaa..58aa4b7251f 100644
--- a/form/form_themes.rst
+++ b/form/form_themes.rst
@@ -67,23 +67,6 @@ want to use another theme for all the forms of your app, configure it in the
form_themes: ['bootstrap_5_horizontal_layout.html.twig']
# ...
- .. code-block:: xml
-
-
-
-
-
-
- bootstrap_5_horizontal_layout.html.twig
-
-
-
-
.. code-block:: php
// config/packages/twig.php
@@ -494,23 +477,6 @@ you want to apply the theme globally to all forms, define the
form_themes: ['form/my_theme.html.twig']
# ...
- .. code-block:: xml
-
-
-
-
-
-
- form/my_theme.html.twig
-
-
-
-
.. code-block:: php
// config/packages/twig.php
diff --git a/form/type_guesser.rst b/form/type_guesser.rst
index 106eb4e7742..59fdfffe37f 100644
--- a/form/type_guesser.rst
+++ b/form/type_guesser.rst
@@ -191,22 +191,6 @@ and tag it with ``form.type_guesser``:
App\Form\TypeGuesser\PhpDocTypeGuesser:
tags: [form.type_guesser]
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/services.php
diff --git a/forms.rst b/forms.rst
index 83065d7524b..3d75efe3c57 100644
--- a/forms.rst
+++ b/forms.rst
@@ -339,24 +339,6 @@ can set this option to generate forms compatible with the Bootstrap 5 CSS framew
twig:
form_themes: ['bootstrap_5_layout.html.twig']
- .. code-block:: xml
-
-
-
-
-
-
- bootstrap_5_layout.html.twig
-
-
-
-
.. code-block:: php
// config/packages/twig.php
diff --git a/frontend/custom_version_strategy.rst b/frontend/custom_version_strategy.rst
index 1a0dca3e393..8a20c6acfaa 100644
--- a/frontend/custom_version_strategy.rst
+++ b/frontend/custom_version_strategy.rst
@@ -105,23 +105,6 @@ After creating the strategy PHP class, register it as a Symfony service.
- "%kernel.project_dir%/busters.json"
- "%%s?version=%%s"
- .. code-block:: xml
-
-
-
-
-
-
- %kernel.project_dir%/busters.json
- %%s?version=%%s
-
-
-
-
.. code-block:: php
// config/services.php
@@ -155,21 +138,6 @@ the :ref:`version_strategy ` option:
assets:
version_strategy: 'App\Asset\VersionStrategy\GulpBusterVersionStrategy'
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
diff --git a/html_sanitizer.rst b/html_sanitizer.rst
index 38d7664ccf7..d057dfe2688 100644
--- a/html_sanitizer.rst
+++ b/html_sanitizer.rst
@@ -168,26 +168,6 @@ You can do this by defining a new HTML sanitizer in the configuration:
block_elements:
- h1
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -240,30 +220,6 @@ Safe elements
allow_safe_elements: true
allow_static_elements: true
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
-
-
.. code-block:: php
// config/packages/framework.php
@@ -317,45 +273,6 @@ attributes from the `W3C Standard Proposal`_ are allowed.
# allow the