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"

routing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,7 +1996,7 @@ generate URLs. This context can be configured globally for all commands:
19961996
.. code-block:: xml
19971997
19981998
<!-- config/services.xml -->
1999-
<?xml version="1.0" encoding="UTF-8"?>
1999+
<?xml version="1.0" encoding="UTF-8" ?>
20002000
<container xmlns="http://symfony.com/schema/dic/services"
20012001
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20022002
xsi:schemaLocation="http://symfony.com/schema/dic/services
@@ -2111,7 +2111,7 @@ method) or globally with these configuration parameters:
21112111
.. code-block:: xml
21122112
21132113
<!-- config/services.xml -->
2114-
<?xml version="1.0" encoding="UTF-8"?>
2114+
<?xml version="1.0" encoding="UTF-8" ?>
21152115
<container xmlns="http://symfony.com/schema/dic/services"
21162116
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21172117
xsi:schemaLocation="http://symfony.com/schema/dic/services

routing/custom_route_loader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ Now define a service for the ``ExtraLoader``:
318318
.. code-block:: xml
319319
320320
<!-- config/services.xml -->
321-
<?xml version="1.0" ?>
321+
<?xml version="1.0" encoding="UTF-8" ?>
322322
<container xmlns="http://symfony.com/schema/dic/services"
323323
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
324324
xsi:schemaLocation="http://symfony.com/schema/dic/services

security.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Fortunately, the ``make:user`` command already configured one for you in your
116116
.. code-block:: xml
117117
118118
<!-- config/packages/security.xml -->
119-
<?xml version="1.0" encoding="UTF-8"?>
119+
<?xml version="1.0" encoding="UTF-8" ?>
120120
<srv:container xmlns="http://symfony.com/schema/dic/security"
121121
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
122122
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -184,7 +184,7 @@ command will pre-configure this for you:
184184
.. code-block:: xml
185185
186186
<!-- config/packages/security.xml -->
187-
<?xml version="1.0" encoding="UTF-8"?>
187+
<?xml version="1.0" encoding="UTF-8" ?>
188188
<srv:container xmlns="http://symfony.com/schema/dic/security"
189189
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
190190
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -298,7 +298,7 @@ important section is ``firewalls``:
298298
.. code-block:: xml
299299
300300
<!-- config/packages/security.xml -->
301-
<?xml version="1.0" encoding="UTF-8"?>
301+
<?xml version="1.0" encoding="UTF-8" ?>
302302
<srv:container xmlns="http://symfony.com/schema/dic/security"
303303
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
304304
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -523,7 +523,7 @@ start with ``/admin``, you can:
523523
.. code-block:: xml
524524
525525
<!-- config/packages/security.xml -->
526-
<?xml version="1.0" encoding="UTF-8"?>
526+
<?xml version="1.0" encoding="UTF-8" ?>
527527
<srv:container xmlns="http://symfony.com/schema/dic/security"
528528
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
529529
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -599,7 +599,7 @@ the list and stops when it finds the first match:
599599
.. code-block:: xml
600600
601601
<!-- config/packages/security.xml -->
602-
<?xml version="1.0" encoding="UTF-8"?>
602+
<?xml version="1.0" encoding="UTF-8" ?>
603603
<srv:container xmlns="http://symfony.com/schema/dic/security"
604604
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
605605
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -853,7 +853,7 @@ To enable logging out, activate the ``logout`` config parameter under your fire
853853
.. code-block:: xml
854854
855855
<!-- config/packages/security.xml -->
856-
<?xml version="1.0" encoding="UTF-8"?>
856+
<?xml version="1.0" encoding="UTF-8" ?>
857857
<srv:container xmlns="http://symfony.com/schema/dic/security"
858858
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
859859
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -970,7 +970,7 @@ rules by creating a role hierarchy:
970970
.. code-block:: xml
971971
972972
<!-- config/packages/security.xml -->
973-
<?xml version="1.0" encoding="UTF-8"?>
973+
<?xml version="1.0" encoding="UTF-8" ?>
974974
<srv:container xmlns="http://symfony.com/schema/dic/security"
975975
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
976976
xmlns:srv="http://symfony.com/schema/dic/services"

security/access_control.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Take the following ``access_control`` entries as an example:
5050
.. code-block:: xml
5151
5252
<!-- config/packages/security.xml -->
53-
<?xml version="1.0" encoding="UTF-8"?>
53+
<?xml version="1.0" encoding="UTF-8" ?>
5454
<srv:container xmlns="http://symfony.com/schema/dic/security"
5555
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5656
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -222,7 +222,7 @@ pattern so that it is only accessible by requests from the local server itself:
222222
.. code-block:: xml
223223
224224
<!-- config/packages/security.xml -->
225-
<?xml version="1.0" encoding="UTF-8"?>
225+
<?xml version="1.0" encoding="UTF-8" ?>
226226
<srv:container xmlns="http://symfony.com/schema/dic/security"
227227
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
228228
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -309,7 +309,7 @@ key:
309309
.. code-block:: xml
310310
311311
<!-- config/packages/security.xml -->
312-
<?xml version="1.0" encoding="UTF-8"?>
312+
<?xml version="1.0" encoding="UTF-8" ?>
313313
<srv:container xmlns="http://symfony.com/schema/dic/security"
314314
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
315315
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -385,7 +385,7 @@ access those URLs via a specific port. This could be useful for example for
385385
.. code-block:: xml
386386
387387
<!-- config/packages/security.xml -->
388-
<?xml version="1.0" encoding="UTF-8"?>
388+
<?xml version="1.0" encoding="UTF-8" ?>
389389
<srv:container xmlns="http://symfony.com/schema/dic/security"
390390
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
391391
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -436,7 +436,7 @@ the user will be redirected to ``https``:
436436
.. code-block:: xml
437437
438438
<!-- config/packages/security.xml -->
439-
<?xml version="1.0" encoding="UTF-8"?>
439+
<?xml version="1.0" encoding="UTF-8" ?>
440440
<srv:container xmlns="http://symfony.com/schema/dic/security"
441441
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
442442
xmlns:srv="http://symfony.com/schema/dic/services"

security/access_denied_handler.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Now, configure this service ID as the entry point for the firewall:
7373
.. code-block:: xml
7474
7575
<!-- config/packages/security.xml -->
76-
<?xml version="1.0" encoding="UTF-8"?>
76+
<?xml version="1.0" encoding="UTF-8" ?>
7777
<srv:container xmlns="http://symfony.com/schema/dic/security"
7878
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7979
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -150,7 +150,7 @@ configure it under your firewall:
150150
.. code-block:: xml
151151
152152
<!-- config/packages/security.xml -->
153-
<?xml version="1.0" encoding="UTF-8"?>
153+
<?xml version="1.0" encoding="UTF-8" ?>
154154
<srv:container xmlns="http://symfony.com/schema/dic/security"
155155
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
156156
xmlns:srv="http://symfony.com/schema/dic/services"

security/auth_providers.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To support HTTP Basic authentication, add the ``http_basic`` key to your firewal
5252
.. code-block:: xml
5353
5454
<!-- config/packages/security.xml -->
55-
<?xml version="1.0" encoding="UTF-8"?>
55+
<?xml version="1.0" encoding="UTF-8" ?>
5656
<srv:container xmlns="http://symfony.com/schema/dic/security"
5757
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5858
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -118,7 +118,7 @@ Enable the x509 authentication for a particular firewall in the security configu
118118
.. code-block:: xml
119119
120120
<!-- config/packages/security.xml -->
121-
<?xml version="1.0" encoding="UTF-8"?>
121+
<?xml version="1.0" encoding="UTF-8" ?>
122122
<srv:container xmlns="http://symfony.com/schema/dic/security"
123123
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
124124
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -197,7 +197,7 @@ corresponding firewall in your security configuration:
197197
.. code-block:: xml
198198
199199
<!-- config/packages/security.xml -->
200-
<?xml version="1.0" ?>
200+
<?xml version="1.0" encoding="UTF-8" ?>
201201
<srv:container xmlns="http://symfony.com/schema/dic/security"
202202
xmlns:srv="http://symfony.com/schema/dic/services">
203203

security/custom_authentication_provider.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ You are finished! You can now define parts of your app as under WSSE protection.
483483
.. code-block:: xml
484484
485485
<!-- config/packages/security.xml -->
486-
<?xml version="1.0" encoding="UTF-8"?>
486+
<?xml version="1.0" encoding="UTF-8" ?>
487487
<srv:container xmlns="http://symfony.com/schema/dic/security"
488488
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
489489
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -563,7 +563,7 @@ in order to put it to use::
563563

564564
// src/DependencyInjection/Security/Factory/WsseFactory.php
565565
namespace App\DependencyInjection\Security\Factory;
566-
566+
567567
use App\Security\Authentication\Provider\WsseProvider;
568568

569569
class WsseFactory implements SecurityFactoryInterface
@@ -607,7 +607,7 @@ set to any desirable value per firewall.
607607
.. code-block:: xml
608608
609609
<!-- config/packages/security.xml -->
610-
<?xml version="1.0" encoding="UTF-8"?>
610+
<?xml version="1.0" encoding="UTF-8" ?>
611611
<srv:container xmlns="http://symfony.com/schema/dic/security"
612612
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
613613
xmlns:srv="http://symfony.com/schema/dic/services"

0 commit comments

Comments
 (0)