Skip to content

Commit 67d75eb

Browse files
committedAug 26, 2013
Merge branch '2.2' into 2.3
2 parents d4c4ed7 + a6d8456 commit 67d75eb

26 files changed

+722
-367
lines changed
 

‎book/controller.rst

+21-7
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,16 @@ to the controller:
156156
.. code-block:: xml
157157
158158
<!-- app/config/routing.xml -->
159-
<route id="hello" path="/hello/{name}">
160-
<default key="_controller">AcmeHelloBundle:Hello:index</default>
161-
</route>
159+
<?xml version="1.0" encoding="UTF-8" ?>
160+
<routes xmlns="http://symfony.com/schema/routing"
161+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
162+
xsi:schemaLocation="http://symfony.com/schema/routing
163+
http://symfony.com/schema/routing/routing-1.0.xsd">
164+
165+
<route id="hello" path="/hello/{name}">
166+
<default key="_controller">AcmeHelloBundle:Hello:index</default>
167+
</route>
168+
</routes>
162169
163170
.. code-block:: php
164171
@@ -235,10 +242,17 @@ example:
235242
.. code-block:: xml
236243
237244
<!-- app/config/routing.xml -->
238-
<route id="hello" path="/hello/{first_name}/{last_name}">
239-
<default key="_controller">AcmeHelloBundle:Hello:index</default>
240-
<default key="color">green</default>
241-
</route>
245+
<?xml version="1.0" encoding="UTF-8" ?>
246+
<routes xmlns="http://symfony.com/schema/routing"
247+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
248+
xsi:schemaLocation="http://symfony.com/schema/routing
249+
http://symfony.com/schema/routing/routing-1.0.xsd">
250+
251+
<route id="hello" path="/hello/{first_name}/{last_name}">
252+
<default key="_controller">AcmeHelloBundle:Hello:index</default>
253+
<default key="color">green</default>
254+
</route>
255+
</routes>
242256
243257
.. code-block:: php
244258

‎book/doctrine.rst

+45-22
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,24 @@ information. By convention, this information is usually configured in an
8080
.. code-block:: xml
8181
8282
<!-- app/config/config.xml -->
83-
<doctrine:config>
84-
<doctrine:dbal
85-
driver="%database_driver%"
86-
host="%database_host%"
87-
dbname="%database_name%"
88-
user="%database_user%"
89-
password="%database_password%"
90-
>
91-
</doctrine:config>
83+
<?xml version="1.0" encoding="UTF-8" ?>
84+
<container xmlns="http://symfony.com/schema/dic/services"
85+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
86+
xmlns:doctrine="http://symfony.com/schema/dic/doctrine"
87+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
88+
http://symfony.com/schema/dic/doctrine http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd">
89+
90+
<doctrine:config>
91+
<doctrine:dbal
92+
driver="%database_driver%"
93+
host="%database_host%"
94+
dbname="%database_name%"
95+
user="%database_user%"
96+
password="%database_password%"
97+
/>
98+
</doctrine:config>
99+
100+
</container>
92101
93102
.. code-block:: php
94103
@@ -161,13 +170,22 @@ for you:
161170
.. code-block:: xml
162171
163172
<!-- app/config/config.xml -->
164-
<doctrine:config
165-
driver="pdo_sqlite"
166-
path="%kernel.root_dir%/sqlite.db"
167-
charset="UTF-8"
168-
>
169-
<!-- ... -->
170-
</doctrine:config>
173+
<?xml version="1.0" encoding="UTF-8" ?>
174+
<container xmlns="http://symfony.com/schema/dic/services"
175+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
176+
xmlns:doctrine="http://symfony.com/schema/dic/doctrine"
177+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
178+
http://symfony.com/schema/dic/doctrine http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd">
179+
180+
<doctrine:config
181+
driver="pdo_sqlite"
182+
path="%kernel.root_dir%/sqlite.db"
183+
charset="UTF-8"
184+
>
185+
<!-- ... -->
186+
</doctrine:config>
187+
188+
</container>
171189
172190
.. code-block:: php
173191
@@ -299,6 +317,7 @@ in a number of different formats including YAML, XML or directly inside the
299317
.. code-block:: xml
300318
301319
<!-- src/Acme/StoreBundle/Resources/config/doctrine/Product.orm.xml -->
320+
<?xml version="1.0" encoding="UTF-8" ?>
302321
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
303322
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
304323
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
@@ -833,9 +852,11 @@ To do this, add the name of the repository class to your mapping definition.
833852
.. code-block:: xml
834853
835854
<!-- src/Acme/StoreBundle/Resources/config/doctrine/Product.orm.xml -->
836-
837-
<!-- ... -->
838-
<doctrine-mapping>
855+
<?xml version="1.0" encoding="UTF-8" ?>
856+
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
857+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
858+
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
859+
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
839860
840861
<entity name="Acme\StoreBundle\Entity\Product"
841862
repository-class="Acme\StoreBundle\Entity\ProductRepository">
@@ -1332,9 +1353,11 @@ the current date, only when the entity is first persisted (i.e. inserted):
13321353
.. code-block:: xml
13331354
13341355
<!-- src/Acme/StoreBundle/Resources/config/doctrine/Product.orm.xml -->
1335-
1336-
<!-- ... -->
1337-
<doctrine-mapping>
1356+
<?xml version="1.0" encoding="UTF-8" ?>
1357+
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
1358+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1359+
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
1360+
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
13381361
13391362
<entity name="Acme\StoreBundle\Entity\Product">
13401363
<!-- ... -->

‎book/forms.rst

+46-20
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,12 @@ object.
357357
.. code-block:: xml
358358
359359
<!-- Acme/TaskBundle/Resources/config/validation.xml -->
360-
<?xml version="1.0" charset="UTF-8"?>
361-
<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 http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
360+
<?xml version="1.0" encoding="UTF-8"?>
361+
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
362+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
363+
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping
364+
http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
365+
362366
<class name="Acme\TaskBundle\Entity\Task">
363367
<property name="task">
364368
<constraint name="NotBlank" />
@@ -1092,10 +1096,16 @@ easy to use in your application.
10921096
.. code-block:: xml
10931097
10941098
<!-- src/Acme/TaskBundle/Resources/config/services.xml -->
1095-
<service id="acme_demo.form.type.task"
1096-
class="Acme\TaskBundle\Form\Type\TaskType">
1097-
<tag name="form.type" alias="task" />
1098-
</service>
1099+
<?xml version="1.0" encoding="UTF-8" ?>
1100+
<container xmlns="http://symfony.com/schema/dic/services"
1101+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1102+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd>
1103+
1104+
<service id="acme_demo.form.type.task"
1105+
class="Acme\TaskBundle\Form\Type\TaskType">
1106+
<tag name="form.type" alias="task" />
1107+
</service>
1108+
</container>
10991109
11001110
.. code-block:: php
11011111
@@ -1548,12 +1558,20 @@ file:
15481558
.. code-block:: xml
15491559
15501560
<!-- app/config/config.xml -->
1551-
<twig:config ...>
1552-
<twig:form>
1553-
<resource>AcmeTaskBundle:Form:fields.html.twig</resource>
1554-
</twig:form>
1555-
<!-- ... -->
1556-
</twig:config>
1561+
<?xml version="1.0" encoding="UTF-8" ?>
1562+
<container xmlns="http://symfony.com/schema/dic/services"
1563+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1564+
xmlns:twig="http://symfony.com/schema/dic/twig"
1565+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
1566+
http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/twig/twig-1.0.xsd">
1567+
1568+
<twig:config>
1569+
<twig:form>
1570+
<twig:resource>AcmeTaskBundle:Form:fields.html.twig</twig:resource>
1571+
</twig:form>
1572+
<!-- ... -->
1573+
</twig:config>
1574+
</container>
15571575
15581576
.. code-block:: php
15591577
@@ -1626,14 +1644,22 @@ file:
16261644
.. code-block:: xml
16271645
16281646
<!-- app/config/config.xml -->
1629-
<framework:config ...>
1630-
<framework:templating>
1631-
<framework:form>
1632-
<resource>AcmeTaskBundle:Form</resource>
1633-
</framework:form>
1634-
</framework:templating>
1635-
<!-- ... -->
1636-
</framework:config>
1647+
<?xml version="1.0" encoding="UTF-8" ?>
1648+
<container xmlns="http://symfony.com/schema/dic/services"
1649+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1650+
xmlns:framework="http://symfony.com/schema/dic/symfony"
1651+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
1652+
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
1653+
1654+
<framework:config ...>
1655+
<framework:templating>
1656+
<framework:form>
1657+
<framework:resource>AcmeTaskBundle:Form</framework:resource>
1658+
</framework:form>
1659+
</framework:templating>
1660+
<!-- ... -->
1661+
</framework:config>
1662+
</container>
16371663
16381664
.. code-block:: php
16391665

‎book/http_cache.rst

+24-7
Original file line numberDiff line numberDiff line change
@@ -845,10 +845,19 @@ First, to use ESI, be sure to enable it in your application configuration:
845845
.. code-block:: xml
846846
847847
<!-- app/config/config.xml -->
848-
<framework:config ...>
849-
<!-- ... -->
850-
<framework:esi enabled="true" />
851-
</framework:config>
848+
<?xml version="1.0" encoding="UTF-8" ?>
849+
<container xmlns="http://symfony.com/schema/dic/symfony"
850+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
851+
xmlns:framework="http://symfony.com/schema/dic/symfony"
852+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
853+
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
854+
855+
<framework:config ...>
856+
<!-- ... -->
857+
<framework:esi enabled="true" />
858+
</framework:config>
859+
860+
</container>
852861
853862
.. code-block:: php
854863
@@ -957,9 +966,17 @@ listener that must be enabled in your configuration:
957966
.. code-block:: xml
958967
959968
<!-- app/config/config.xml -->
960-
<framework:config>
961-
<framework:fragments path="/_fragment" />
962-
</framework:config>
969+
<?xml version="1.0" encoding="UTF-8" ?>
970+
<container xmlns="http://symfony.com/schema/dic/services"
971+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
972+
xmlns:doctrine="http://symfony.com/schema/dic/framework"
973+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
974+
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
975+
976+
<framework:config>
977+
<framework:fragments path="/_fragment" />
978+
</framework:config>
979+
</container>
963980
964981
.. code-block:: php
965982

‎book/http_fundamentals.rst

+10-3
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,16 @@ by adding an entry for ``/contact`` to your routing configuration file:
429429
430430
.. code-block:: xml
431431
432-
<route id="contact" path="/contact">
433-
<default key="_controller">AcmeDemoBundle:Main:contact</default>
434-
</route>
432+
<?xml version="1.0" encoding="UTF-8" ?>
433+
<routes xmlns="http://symfony.com/schema/routing"
434+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
435+
xsi:schemaLocation="http://symfony.com/schema/routing
436+
http://symfony.com/schema/routing/routing-1.0.xsd">
437+
438+
<route id="contact" path="/contact">
439+
<default key="_controller">AcmeDemoBundle:Main:contact</default>
440+
</route>
441+
</routes>
435442
436443
.. code-block:: php
437444

‎book/internals.rst

+32-18
Original file line numberDiff line numberDiff line change
@@ -563,20 +563,27 @@ the configuration for the development environment:
563563
564564
.. code-block:: xml
565565
566-
<!-- xmlns:webprofiler="http://symfony.com/schema/dic/webprofiler" -->
567-
<!-- xsi:schemaLocation="http://symfony.com/schema/dic/webprofiler http://symfony.com/schema/dic/webprofiler/webprofiler-1.0.xsd"> -->
568-
569-
<!-- load the profiler -->
570-
<framework:config>
571-
<framework:profiler only-exceptions="false" />
572-
</framework:config>
573-
574-
<!-- enable the web profiler -->
575-
<webprofiler:config
576-
toolbar="true"
577-
intercept-redirects="true"
578-
verbose="true"
579-
/>
566+
<?xml version="1.0" encoding="UTF-8" ?>
567+
<container xmlns="http://symfony.com/schema/dic/services"
568+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
569+
xmlns:webprofiler="http://symfony.com/schema/dic/webprofiler"
570+
xmlns:framework="http://symfony.com/schema/dic/symfony"
571+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
572+
http://symfony.com/schema/dic/webprofiler http://symfony.com/schema/dic/webprofiler/webprofiler-1.0.xsd
573+
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
574+
575+
<!-- load the profiler -->
576+
<framework:config>
577+
<framework:profiler only-exceptions="false" />
578+
</framework:config>
579+
580+
<!-- enable the web profiler -->
581+
<webprofiler:config
582+
toolbar="true"
583+
intercept-redirects="true"
584+
verbose="true"
585+
/>
586+
</container>
580587
581588
.. code-block:: php
582589
@@ -611,10 +618,17 @@ If you enable the web profiler, you also need to mount the profiler routes:
611618
612619
.. code-block:: xml
613620
614-
<import
615-
resource="@WebProfilerBundle/Resources/config/routing/profiler.xml"
616-
prefix="/_profiler"
617-
/>
621+
<?xml version="1.0" encoding="UTF-8" ?>
622+
<routes xmlns="http://symfony.com/schema/routing"
623+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
624+
xsi:schemaLocation="http://symfony.com/schema/routing
625+
http://symfony.com/schema/routing/routing-1.0.xsd">
626+
627+
<import
628+
resource="@WebProfilerBundle/Resources/config/routing/profiler.xml"
629+
prefix="/_profiler"
630+
/>
631+
</routes>
618632
619633
.. code-block:: php
620634

0 commit comments

Comments
 (0)
Failed to load comments.