Skip to content

Be consistent how we open XML dom #15249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bundles/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ can add some configuration that looks like this:
.. code-block:: xml

<!-- config/packages/acme_social.xml -->
<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:acme-social="http://example.org/schema/dic/acme_social"
Expand Down Expand Up @@ -416,7 +416,7 @@ Assuming the XSD file is called ``hello-1.0.xsd``, the schema location will be
.. code-block:: xml

<!-- config/packages/acme_hello.xml -->
<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:acme-hello="http://acme_company.com/schema/dic/hello"
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/compilation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ The XML version of the config would then look like this:

.. code-block:: xml

<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:acme_demo="http://www.example.com/symfony/schema/"
Expand Down
2 changes: 1 addition & 1 deletion components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Consider the XML below:

.. code-block:: xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<entry
xmlns="http://www.w3.org/2005/Atom"
xmlns:media="http://search.yahoo.com/mrss/"
Expand Down
10 changes: 5 additions & 5 deletions components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ Then, create your groups definition:

.. code-block:: xml

<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<serializer xmlns="http://symfony.com/schema/dic/serializer-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/serializer-mapping
Expand Down Expand Up @@ -613,7 +613,7 @@ defines a ``Person`` entity with a ``firstName`` property:

.. code-block:: xml

<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<serializer xmlns="http://symfony.com/schema/dic/serializer-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/serializer-mapping
Expand Down Expand Up @@ -903,7 +903,7 @@ For example, take an object normalized as following::

The ``XmlEncoder`` will encode this object like that::

<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8" ?>
<response>
<foo>1</foo>
<foo>2</foo>
Expand Down Expand Up @@ -1187,7 +1187,7 @@ Here, we set it to 2 for the ``$child`` property:

.. code-block:: xml

<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<serializer xmlns="http://symfony.com/schema/dic/serializer-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/serializer-mapping
Expand Down Expand Up @@ -1505,7 +1505,7 @@ and ``BitBucketCodeRepository`` classes:

.. code-block:: xml

<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<serializer xmlns="http://symfony.com/schema/dic/serializer-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/serializer-mapping
Expand Down
4 changes: 2 additions & 2 deletions configuration/override_dir_structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ for multiple directories):
.. code-block:: xml

<!-- config/packages/twig.xml -->
<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:twig="http://symfony.com/schema/dic/twig"
Expand Down Expand Up @@ -156,7 +156,7 @@ configuration option to define your own translations directory (use :ref:`framew
.. code-block:: xml

<!-- config/packages/translation.xml -->
<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:twig="http://symfony.com/schema/dic/twig"
Expand Down
4 changes: 2 additions & 2 deletions create_framework/unit_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using `PHPUnit`_. Create a PHPUnit configuration file in

.. code-block:: xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.1/phpunit.xsd"
Expand Down Expand Up @@ -49,7 +49,7 @@ resolver. Modify the framework to make use of them::
namespace Simplex;

// ...

use Calendar\Controller\LeapYearController;
use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface;
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
Expand Down
8 changes: 4 additions & 4 deletions doctrine/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ with the ``doctrine.event_listener`` tag:
.. code-block:: xml

<!-- config/services.xml -->
<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:doctrine="http://symfony.com/schema/dic/doctrine">
<services>
Expand Down Expand Up @@ -283,7 +283,7 @@ with the ``doctrine.orm.entity_listener`` tag:
.. code-block:: xml

<!-- config/services.xml -->
<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:doctrine="http://symfony.com/schema/dic/doctrine">
<services>
Expand Down Expand Up @@ -425,7 +425,7 @@ with the ``doctrine.event_subscriber`` tag:
.. code-block:: xml

<!-- config/services.xml -->
<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:doctrine="http://symfony.com/schema/dic/doctrine">
<services>
Expand Down Expand Up @@ -464,7 +464,7 @@ can do it in the service configuration:
.. code-block:: xml

<!-- config/services.xml -->
<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:doctrine="http://symfony.com/schema/dic/doctrine">
<services>
Expand Down
2 changes: 1 addition & 1 deletion doctrine/multiple_entity_managers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The following configuration code shows how you can configure two entity managers
.. code-block:: xml

<!-- config/packages/doctrine.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:doctrine="http://symfony.com/schema/dic/doctrine"
Expand Down
2 changes: 1 addition & 1 deletion forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ object.
.. code-block:: xml

<!-- config/validator/validation.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping
Expand Down
2 changes: 1 addition & 1 deletion reference/configuration/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ application:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down
4 changes: 2 additions & 2 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,7 @@ generate URLs. This context can be configured globally for all commands:
.. code-block:: xml

<!-- config/services.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services
Expand Down Expand Up @@ -2111,7 +2111,7 @@ method) or globally with these configuration parameters:
.. code-block:: xml

<!-- config/services.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services
Expand Down
2 changes: 1 addition & 1 deletion routing/custom_route_loader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ Now define a service for the ``ExtraLoader``:
.. code-block:: xml

<!-- config/services.xml -->
<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services
Expand Down
14 changes: 7 additions & 7 deletions security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Fortunately, the ``make:user`` command already configured one for you in your
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -184,7 +184,7 @@ command will pre-configure this for you:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -298,7 +298,7 @@ important section is ``firewalls``:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -523,7 +523,7 @@ start with ``/admin``, you can:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -599,7 +599,7 @@ the list and stops when it finds the first match:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -853,7 +853,7 @@ To enable logging out, activate the ``logout`` config parameter under your fire
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -970,7 +970,7 @@ rules by creating a role hierarchy:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down
10 changes: 5 additions & 5 deletions security/access_control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Take the following ``access_control`` entries as an example:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -222,7 +222,7 @@ pattern so that it is only accessible by requests from the local server itself:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -309,7 +309,7 @@ key:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -385,7 +385,7 @@ access those URLs via a specific port. This could be useful for example for
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -436,7 +436,7 @@ the user will be redirected to ``https``:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down
4 changes: 2 additions & 2 deletions security/access_denied_handler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Now, configure this service ID as the entry point for the firewall:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -150,7 +150,7 @@ configure it under your firewall:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down
6 changes: 3 additions & 3 deletions security/auth_providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To support HTTP Basic authentication, add the ``http_basic`` key to your firewal
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -118,7 +118,7 @@ Enable the x509 authentication for a particular firewall in the security configu
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -197,7 +197,7 @@ corresponding firewall in your security configuration:
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:srv="http://symfony.com/schema/dic/services">

Expand Down
6 changes: 3 additions & 3 deletions security/custom_authentication_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ You are finished! You can now define parts of your app as under WSSE protection.
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down Expand Up @@ -563,7 +563,7 @@ in order to put it to use::

// src/DependencyInjection/Security/Factory/WsseFactory.php
namespace App\DependencyInjection\Security\Factory;

use App\Security\Authentication\Provider\WsseProvider;

class WsseFactory implements SecurityFactoryInterface
Expand Down Expand Up @@ -607,7 +607,7 @@ set to any desirable value per firewall.
.. code-block:: xml

<!-- config/packages/security.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
Expand Down
Loading