Skip to content

Commit a6b7d72

Browse files
committed
bug #4861 Ifdattic's fixes (ifdattic)
This PR was merged into the 2.3 branch. Discussion ---------- Ifdattic's fixes This combines most of @ifdattic's fixes in one PR, to make it easier to merge and review. | Q | A | --- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | - Commits ------- a2e0a27 Update gmail.rst 2980cad Update cloud.rst 5e7846e Update spool.rst ece3904 Update environments.rst 80fc665 Update configuration_organization.rst 07aefea Update error_pages.rst 7c9c7ad Update apply_to_option.rst ff9f315 Update asset_management.rst 8d9a47c Update prepend_extension.rst 04ae7c2 Update configuration.rst 76b23af Update translation.rst 4eb8b64 Update doctrine.rst 8b6cd17 Update testing.rst 0d059ff Update http_cache.rst b4ee5fb Update security.rst a6a3b9c Update inheritance.rst
2 parents 9a6d7b9 + a2e0a27 commit a6b7d72

16 files changed

+152
-97
lines changed

book/doctrine.rst

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ information. By convention, this information is usually configured in an
7777
<container xmlns="http://symfony.com/schema/dic/services"
7878
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7979
xmlns:doctrine="http://symfony.com/schema/dic/doctrine"
80-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
81-
http://symfony.com/schema/dic/doctrine http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd">
80+
xsi:schemaLocation="http://symfony.com/schema/dic/services
81+
http://symfony.com/schema/dic/services/services-1.0.xsd
82+
http://symfony.com/schema/dic/doctrine
83+
http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd">
8284
8385
<doctrine:config>
8486
<doctrine:dbal
@@ -165,8 +167,10 @@ for you:
165167
<container xmlns="http://symfony.com/schema/dic/services"
166168
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
167169
xmlns:doctrine="http://symfony.com/schema/dic/doctrine"
168-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
169-
http://symfony.com/schema/dic/doctrine http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd">
170+
xsi:schemaLocation="http://symfony.com/schema/dic/services
171+
http://symfony.com/schema/dic/services/services-1.0.xsd
172+
http://symfony.com/schema/dic/doctrine
173+
http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd">
170174
171175
<doctrine:config>
172176
<doctrine:dbal
@@ -426,6 +430,7 @@ mapping information) of a bundle or an entire namespace:
426430
427431
# generates all entities in the AppBundle
428432
$ php app/console doctrine:generate:entities AppBundle
433+
429434
# generates all entities of bundles in the Acme namespace
430435
$ php app/console doctrine:generate:entities Acme
431436
@@ -864,7 +869,7 @@ You can use this new method just like the default finder methods of the reposito
864869

865870
$em = $this->getDoctrine()->getManager();
866871
$products = $em->getRepository('AppBundle:Product')
867-
->findAllOrderedByName();
872+
->findAllOrderedByName();
868873

869874
.. note::
870875

@@ -884,7 +889,9 @@ you can let Doctrine create the class for you.
884889

885890
.. code-block:: bash
886891
887-
$ php app/console doctrine:generate:entity --entity="AppBundle:Category" --fields="name:string(255)"
892+
$ php app/console doctrine:generate:entity \
893+
--entity="AppBundle:Category" \
894+
--fields="name:string(255)"
888895
889896
This task generates the ``Category`` entity for you, with an ``id`` field,
890897
a ``name`` field and the associated getter and setter functions.
@@ -929,7 +936,8 @@ To relate the ``Category`` and ``Product`` entities, start by creating a
929936
products:
930937
targetEntity: Product
931938
mappedBy: category
932-
# don't forget to init the collection in the __construct() method of the entity
939+
# don't forget to init the collection in the __construct() method
940+
# of the entity
933941
934942
.. code-block:: xml
935943
@@ -1038,7 +1046,7 @@ methods for you:
10381046

10391047
.. code-block:: bash
10401048
1041-
$ php app/console doctrine:generate:entities Acme
1049+
$ php app/console doctrine:generate:entities AppBundle
10421050
10431051
Ignore the Doctrine metadata for a moment. You now have two classes - ``Category``
10441052
and ``Product`` with a natural one-to-many relationship. The ``Category``
@@ -1151,7 +1159,7 @@ the category (i.e. it's "lazily loaded").
11511159

11521160
You can also query in the other direction::
11531161

1154-
public function showProductAction($id)
1162+
public function showProductsAction($id)
11551163
{
11561164
$category = $this->getDoctrine()
11571165
->getRepository('AppBundle:Category')
@@ -1372,7 +1380,7 @@ list of all available types and more information, see Doctrine's
13721380
Summary
13731381
-------
13741382

1375-
With Doctrine, you can focus on your objects and how they're useful in your
1383+
With Doctrine, you can focus on your objects and how they're used in your
13761384
application and worry about database persistence second. This is because
13771385
Doctrine allows you to use any PHP object to hold your data and relies on
13781386
mapping metadata information to map an object's data to a particular database

book/http_cache.rst

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ If one content corresponds to one URL, the ``PURGE`` model works well.
856856
You send a request to the cache proxy with the HTTP method ``PURGE`` (using
857857
the word "PURGE" is a convention, technically this can be any string) instead
858858
of ``GET`` and make the cache proxy detect this and remove the data from the
859-
cache instead of going to Symfony to get a response.
859+
cache instead of going to the application to get a response.
860860

861861
Here is how you can configure the Symfony reverse proxy to support the
862862
``PURGE`` HTTP method::
@@ -877,7 +877,10 @@ Here is how you can configure the Symfony reverse proxy to support the
877877
}
878878

879879
if ('127.0.0.1' !== $request->getClientIp()) {
880-
return new Response('Invalid HTTP method', Response::HTTP_BAD_REQUEST);
880+
return new Response(
881+
'Invalid HTTP method',
882+
Response::HTTP_BAD_REQUEST
883+
);
881884
}
882885

883886
$response = new Response();
@@ -987,8 +990,10 @@ First, to use ESI, be sure to enable it in your application configuration:
987990
<container xmlns="http://symfony.com/schema/dic/symfony"
988991
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
989992
xmlns:framework="http://symfony.com/schema/dic/symfony"
990-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
991-
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
993+
xsi:schemaLocation="http://symfony.com/schema/dic/services
994+
http://symfony.com/schema/dic/services/services-1.0.xsd
995+
http://symfony.com/schema/dic/symfony
996+
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
992997
993998
<framework:config>
994999
<!-- ... -->
@@ -1115,8 +1120,10 @@ that must be enabled in your configuration:
11151120
<container xmlns="http://symfony.com/schema/dic/services"
11161121
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11171122
xmlns:doctrine="http://symfony.com/schema/dic/framework"
1118-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
1119-
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
1123+
xsi:schemaLocation="http://symfony.com/schema/dic/services
1124+
http://symfony.com/schema/dic/services/services-1.0.xsd
1125+
http://symfony.com/schema/dic/symfony
1126+
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
11201127
11211128
<!-- ... -->
11221129
<framework:config>

book/security.rst

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,17 @@ configuration looks like this:
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"
59-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
59+
xsi:schemaLocation="http://symfony.com/schema/dic/services
60+
http://symfony.com/schema/dic/services/services-1.0.xsd">
6061
6162
<config>
6263
<provider name="in_memory">
6364
<memory />
6465
</provider>
6566
66-
<firewall name="dev" pattern="^/(_(profiler|wdt)|css|images|js)/" security=false />
67+
<firewall name="dev"
68+
pattern="^/(_(profiler|wdt)|css|images|js)/"
69+
security=false />
6770
6871
<firewall name="default">
6972
<anonymous />
@@ -145,7 +148,8 @@ To activate this, add the ``http_basic`` key under your firewall:
145148
<srv:container xmlns="http://symfony.com/schema/dic/security"
146149
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
147150
xmlns:srv="http://symfony.com/schema/dic/services"
148-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
151+
xsi:schemaLocation="http://symfony.com/schema/dic/services
152+
http://symfony.com/schema/dic/services/services-1.0.xsd">
149153
150154
<config>
151155
<!-- ... -->
@@ -216,7 +220,8 @@ user to be logged in to access this URL:
216220
<srv:container xmlns="http://symfony.com/schema/dic/security"
217221
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
218222
xmlns:srv="http://symfony.com/schema/dic/services"
219-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
223+
xsi:schemaLocation="http://symfony.com/schema/dic/services
224+
http://symfony.com/schema/dic/services/services-1.0.xsd">
220225
221226
<config>
222227
<!-- ... -->
@@ -310,7 +315,8 @@ provider, but it's better to think of it as an "in configuration" provider:
310315
<srv:container xmlns="http://symfony.com/schema/dic/security"
311316
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
312317
xmlns:srv="http://symfony.com/schema/dic/services"
313-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
318+
xsi:schemaLocation="http://symfony.com/schema/dic/services
319+
http://symfony.com/schema/dic/services/services-1.0.xsd">
314320
315321
<config>
316322
<provider name="in_memory">
@@ -377,7 +383,8 @@ To fix this, add an ``encoders`` key:
377383
<srv:container xmlns="http://symfony.com/schema/dic/security"
378384
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
379385
xmlns:srv="http://symfony.com/schema/dic/services"
380-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
386+
xsi:schemaLocation="http://symfony.com/schema/dic/services
387+
http://symfony.com/schema/dic/services/services-1.0.xsd">
381388
382389
<config>
383390
<!-- ... -->
@@ -458,13 +465,16 @@ else, you'll want to encode their passwords. The best algorithm to use is
458465
<srv:container xmlns="http://symfony.com/schema/dic/security"
459466
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
460467
xmlns:srv="http://symfony.com/schema/dic/services"
461-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
468+
xsi:schemaLocation="http://symfony.com/schema/dic/services
469+
http://symfony.com/schema/dic/services/services-1.0.xsd">
462470
463471
<config>
464472
<!-- ... -->
465473
466474
<encoder class="Symfony\Component\Security\Core\User\User"
467-
algorithm="bcrypt" cost="12" />
475+
algorithm="bcrypt"
476+
cost="12" />
477+
468478
<!-- ... -->
469479
</config>
470480
</srv:container>
@@ -516,7 +526,8 @@ like this:
516526
<srv:container xmlns="http://symfony.com/schema/dic/security"
517527
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
518528
xmlns:srv="http://symfony.com/schema/dic/services"
519-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
529+
xsi:schemaLocation="http://symfony.com/schema/dic/services
530+
http://symfony.com/schema/dic/services/services-1.0.xsd">
520531
521532
<config>
522533
<provider name="in_memory">
@@ -683,7 +694,8 @@ URL pattern. You saw this earlier, where anything matching the regular expressio
683694
<srv:container xmlns="http://symfony.com/schema/dic/security"
684695
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
685696
xmlns:srv="http://symfony.com/schema/dic/services"
686-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
697+
xsi:schemaLocation="http://symfony.com/schema/dic/services
698+
http://symfony.com/schema/dic/services/services-1.0.xsd">
687699
688700
<config>
689701
<!-- ... -->

book/testing.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,8 @@ narrow down your node selection by chaining the method calls::
558558
return false;
559559
}
560560
})
561-
->first();
561+
->first()
562+
;
562563

563564
.. tip::
564565

@@ -720,8 +721,10 @@ configuration option:
720721
<container xmlns="http://symfony.com/schema/dic/services"
721722
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
722723
xmlns:swiftmailer="http://symfony.com/schema/dic/swiftmailer"
723-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
724-
http://symfony.com/schema/dic/swiftmailer http://symfony.com/schema/dic/swiftmailer/swiftmailer-1.0.xsd">
724+
xsi:schemaLocation="http://symfony.com/schema/dic/services
725+
http://symfony.com/schema/dic/services/services-1.0.xsd
726+
http://symfony.com/schema/dic/swiftmailer
727+
http://symfony.com/schema/dic/swiftmailer/swiftmailer-1.0.xsd">
725728
726729
<!-- ... -->
727730
<swiftmailer:config disable-delivery="true" />
@@ -784,8 +787,9 @@ machine only.
784787
the ``app/phpunit.xml`` file.
785788

786789
By default, only the tests from your own custom bundles stored in the standard
787-
directories ``src/*/*Bundle/Tests`` or ``src/*/Bundle/*Bundle/Tests`` are run
788-
by the ``phpunit`` command, as configured in the ``app/phpunit.xml.dist`` file:
790+
directories ``src/*/*Bundle/Tests``, ``src/*/Bundle/*Bundle/Tests``,
791+
``src/*Bundle/Tests`` are run by the ``phpunit`` command, as configured
792+
in the ``app/phpunit.xml.dist`` file:
789793

790794
.. code-block:: xml
791795
@@ -796,6 +800,7 @@ by the ``phpunit`` command, as configured in the ``app/phpunit.xml.dist`` file:
796800
<testsuite name="Project Test Suite">
797801
<directory>../src/*/*Bundle/Tests</directory>
798802
<directory>../src/*/Bundle/*Bundle/Tests</directory>
803+
<directory>../src/*Bundle/Tests</directory>
799804
</testsuite>
800805
</testsuites>
801806
<!-- ... -->

0 commit comments

Comments
 (0)