Skip to content

Commit add69ed

Browse files
committed
minor #15249 Be consistent how we open XML dom (Nyholm)
This PR was merged into the 4.4 branch. Discussion ---------- Be consistent how we open XML dom Im not sure if we want to merge this. I just notice that we are using 4 different ways to open XML config. If this is merged, I'll make a similar PR to re remaining examples in 5.2 (if any) Commits ------- 34f121f Be consistent how we open XML dom
2 parents f5c2b2e + 34f121f commit add69ed

39 files changed

+93
-93
lines changed

bundles/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ can add some configuration that looks like this:
6464
.. code-block:: xml
6565
6666
<!-- config/packages/acme_social.xml -->
67-
<?xml version="1.0" ?>
67+
<?xml version="1.0" encoding="UTF-8" ?>
6868
<container xmlns="http://symfony.com/schema/dic/services"
6969
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7070
xmlns:acme-social="http://example.org/schema/dic/acme_social"
@@ -416,7 +416,7 @@ Assuming the XSD file is called ``hello-1.0.xsd``, the schema location will be
416416
.. code-block:: xml
417417
418418
<!-- config/packages/acme_hello.xml -->
419-
<?xml version="1.0" ?>
419+
<?xml version="1.0" encoding="UTF-8" ?>
420420
<container xmlns="http://symfony.com/schema/dic/services"
421421
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
422422
xmlns:acme-hello="http://acme_company.com/schema/dic/hello"

components/dependency_injection/compilation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ The XML version of the config would then look like this:
197197

198198
.. code-block:: xml
199199
200-
<?xml version="1.0" ?>
200+
<?xml version="1.0" encoding="UTF-8" ?>
201201
<container xmlns="http://symfony.com/schema/dic/services"
202202
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
203203
xmlns:acme_demo="http://www.example.com/symfony/schema/"

components/dom_crawler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Consider the XML below:
126126

127127
.. code-block:: xml
128128
129-
<?xml version="1.0" encoding="UTF-8"?>
129+
<?xml version="1.0" encoding="UTF-8" ?>
130130
<entry
131131
xmlns="http://www.w3.org/2005/Atom"
132132
xmlns:media="http://search.yahoo.com/mrss/"

components/serializer.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ Then, create your groups definition:
331331
332332
.. code-block:: xml
333333
334-
<?xml version="1.0" ?>
334+
<?xml version="1.0" encoding="UTF-8" ?>
335335
<serializer xmlns="http://symfony.com/schema/dic/serializer-mapping"
336336
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
337337
xsi:schemaLocation="http://symfony.com/schema/dic/serializer-mapping
@@ -613,7 +613,7 @@ defines a ``Person`` entity with a ``firstName`` property:
613613
614614
.. code-block:: xml
615615
616-
<?xml version="1.0" ?>
616+
<?xml version="1.0" encoding="UTF-8" ?>
617617
<serializer xmlns="http://symfony.com/schema/dic/serializer-mapping"
618618
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
619619
xsi:schemaLocation="http://symfony.com/schema/dic/serializer-mapping
@@ -903,7 +903,7 @@ For example, take an object normalized as following::
903903

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

906-
<?xml version="1.0"?>
906+
<?xml version="1.0" encoding="UTF-8" ?>
907907
<response>
908908
<foo>1</foo>
909909
<foo>2</foo>
@@ -1187,7 +1187,7 @@ Here, we set it to 2 for the ``$child`` property:
11871187
11881188
.. code-block:: xml
11891189
1190-
<?xml version="1.0" ?>
1190+
<?xml version="1.0" encoding="UTF-8" ?>
11911191
<serializer xmlns="http://symfony.com/schema/dic/serializer-mapping"
11921192
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11931193
xsi:schemaLocation="http://symfony.com/schema/dic/serializer-mapping
@@ -1505,7 +1505,7 @@ and ``BitBucketCodeRepository`` classes:
15051505
15061506
.. code-block:: xml
15071507
1508-
<?xml version="1.0" ?>
1508+
<?xml version="1.0" encoding="UTF-8" ?>
15091509
<serializer xmlns="http://symfony.com/schema/dic/serializer-mapping"
15101510
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
15111511
xsi:schemaLocation="http://symfony.com/schema/dic/serializer-mapping

configuration/override_dir_structure.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ for multiple directories):
114114
.. code-block:: xml
115115
116116
<!-- config/packages/twig.xml -->
117-
<?xml version="1.0" ?>
117+
<?xml version="1.0" encoding="UTF-8" ?>
118118
<container xmlns="http://symfony.com/schema/dic/services"
119119
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
120120
xmlns:twig="http://symfony.com/schema/dic/twig"
@@ -156,7 +156,7 @@ configuration option to define your own translations directory (use :ref:`framew
156156
.. code-block:: xml
157157
158158
<!-- config/packages/translation.xml -->
159-
<?xml version="1.0" ?>
159+
<?xml version="1.0" encoding="UTF-8" ?>
160160
<container xmlns="http://symfony.com/schema/dic/services"
161161
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
162162
xmlns:twig="http://symfony.com/schema/dic/twig"

create_framework/unit_testing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ using `PHPUnit`_. Create a PHPUnit configuration file in
1313

1414
.. code-block:: xml
1515
16-
<?xml version="1.0" encoding="UTF-8"?>
16+
<?xml version="1.0" encoding="UTF-8" ?>
1717
<phpunit
1818
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1919
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.1/phpunit.xsd"
@@ -49,7 +49,7 @@ resolver. Modify the framework to make use of them::
4949
namespace Simplex;
5050

5151
// ...
52-
52+
5353
use Calendar\Controller\LeapYearController;
5454
use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface;
5555
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;

doctrine/events.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ with the ``doctrine.event_listener`` tag:
176176
.. code-block:: xml
177177
178178
<!-- config/services.xml -->
179-
<?xml version="1.0" ?>
179+
<?xml version="1.0" encoding="UTF-8" ?>
180180
<container xmlns="http://symfony.com/schema/dic/services"
181181
xmlns:doctrine="http://symfony.com/schema/dic/doctrine">
182182
<services>
@@ -283,7 +283,7 @@ with the ``doctrine.orm.entity_listener`` tag:
283283
.. code-block:: xml
284284
285285
<!-- config/services.xml -->
286-
<?xml version="1.0" ?>
286+
<?xml version="1.0" encoding="UTF-8" ?>
287287
<container xmlns="http://symfony.com/schema/dic/services"
288288
xmlns:doctrine="http://symfony.com/schema/dic/doctrine">
289289
<services>
@@ -425,7 +425,7 @@ with the ``doctrine.event_subscriber`` tag:
425425
.. code-block:: xml
426426
427427
<!-- config/services.xml -->
428-
<?xml version="1.0" ?>
428+
<?xml version="1.0" encoding="UTF-8" ?>
429429
<container xmlns="http://symfony.com/schema/dic/services"
430430
xmlns:doctrine="http://symfony.com/schema/dic/doctrine">
431431
<services>
@@ -464,7 +464,7 @@ can do it in the service configuration:
464464
.. code-block:: xml
465465
466466
<!-- config/services.xml -->
467-
<?xml version="1.0" ?>
467+
<?xml version="1.0" encoding="UTF-8" ?>
468468
<container xmlns="http://symfony.com/schema/dic/services"
469469
xmlns:doctrine="http://symfony.com/schema/dic/doctrine">
470470
<services>

doctrine/multiple_entity_managers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The following configuration code shows how you can configure two entity managers
7171
.. code-block:: xml
7272
7373
<!-- config/packages/doctrine.xml -->
74-
<?xml version="1.0" encoding="UTF-8"?>
74+
<?xml version="1.0" encoding="UTF-8" ?>
7575
<container xmlns="http://symfony.com/schema/dic/services"
7676
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7777
xmlns:doctrine="http://symfony.com/schema/dic/doctrine"

forms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ object.
521521
.. code-block:: xml
522522
523523
<!-- config/validator/validation.xml -->
524-
<?xml version="1.0" encoding="UTF-8"?>
524+
<?xml version="1.0" encoding="UTF-8" ?>
525525
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
526526
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
527527
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping

reference/configuration/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ application:
358358
.. code-block:: xml
359359
360360
<!-- config/packages/security.xml -->
361-
<?xml version="1.0" encoding="UTF-8"?>
361+
<?xml version="1.0" encoding="UTF-8" ?>
362362
<srv:container xmlns="http://symfony.com/schema/dic/security"
363363
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
364364
xmlns:srv="http://symfony.com/schema/dic/services"

0 commit comments

Comments
 (0)