Skip to content

Commit 62248df

Browse files
committed
Merge branch '2.3' into 2.5
* 2.3: Remove 'acme' [Book][Translation] Added tip for routing params Remove trailing whitespace [BestPractices] fix minor typo Remove horizontal scrollbar Update override.rst Update override.rst Conflicts: components/class_loader/debug_class_loader.rst cookbook/form/unit_testing.rst
2 parents d85fa76 + 9a6d7b9 commit 62248df

28 files changed

+113
-88
lines changed

best_practices/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Security Voters
245245

246246
If your security logic is complex and can't be centralized into a method
247247
like ``isAuthor()``, you should leverage custom voters. These are an order
248-
of magnitude easier than :doc:`ACL's </cookbook/security/acl>` and will give
248+
of magnitude easier than :doc:`ACLs </cookbook/security/acl>` and will give
249249
you the flexibility you need in almost all cases.
250250

251251
First, create a voter class. The following example shows a voter that implements

book/controller.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ Symfony will automatically return a 500 HTTP response code.
556556
throw new \Exception('Something went wrong!');
557557
558558
In every case, an error page is shown to the end user and a full debug
559-
error page is shown to the developer (i.e. when you're using ``app_dev.php`` -
559+
error page is shown to the developer (i.e. when you're using ``app_dev.php`` -
560560
see :ref:`page-creation-environments`).
561561

562562
You'll want to customize the error page your user sees. To do that, see the

book/from_flat_php_to_symfony2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ the layout:
244244

245245
<?php include 'layout.php' ?>
246246

247-
You now have a setup that will allow you to reuse the layout.
247+
You now have a setup that will allow you to reuse the layout.
248248
Unfortunately, to accomplish this, you're forced to use a few ugly
249249
PHP functions (``ob_start()``, ``ob_get_clean()``) in the template. Symfony
250250
uses a Templating component that allows this to be accomplished cleanly

book/http_cache.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,8 @@ won't be asked to return the updated response until the cache finally becomes
538538
stale.
539539

540540
The validation model addresses this issue. Under this model, the cache continues
541-
to store responses. The difference is that, for each request, the cache asks the
542-
application if the cached response is still valid or if it needs to be regenerated.
541+
to store responses. The difference is that, for each request, the cache asks the
542+
application if the cached response is still valid or if it needs to be regenerated.
543543
If the cache *is* still valid, your application should return a 304 status code
544544
and no content. This tells the cache that it's ok to return the cached response.
545545

book/service_container.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ the service container gives you a much more appealing option:
569569
services:
570570
my_mailer:
571571
# ...
572-
572+
573573
newsletter_manager:
574574
class: Acme\HelloBundle\Newsletter\NewsletterManager
575575
arguments: ["@my_mailer"]
@@ -765,7 +765,7 @@ Injecting the dependency by the setter method just needs a change of syntax:
765765
services:
766766
my_mailer:
767767
# ...
768-
768+
769769
newsletter_manager:
770770
class: Acme\HelloBundle\Newsletter\NewsletterManager
771771
calls:
@@ -800,7 +800,7 @@ Injecting the dependency by the setter method just needs a change of syntax:
800800
use Symfony\Component\DependencyInjection\Reference;
801801
802802
$container->setDefinition('my_mailer', ...);
803-
803+
804804
$container->setDefinition('newsletter_manager', new Definition(
805805
'Acme\HelloBundle\Newsletter\NewsletterManager'
806806
))->addMethodCall('setMailer', array(
@@ -944,7 +944,7 @@ it exists and do nothing if it doesn't:
944944
<service id="my_mailer">
945945
<!-- ... -->
946946
</service>
947-
947+
948948
<service id="newsletter_manager" class="Acme\HelloBundle\Newsletter\NewsletterManager">
949949
<argument type="service" id="my_mailer" on-invalid="ignore" />
950950
</service>
@@ -959,7 +959,7 @@ it exists and do nothing if it doesn't:
959959
use Symfony\Component\DependencyInjection\ContainerInterface;
960960
961961
$container->setDefinition('my_mailer', ...);
962-
962+
963963
$container->setDefinition('newsletter_manager', new Definition(
964964
'Acme\HelloBundle\Newsletter\NewsletterManager',
965965
array(

book/translation.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ via the ``request`` object::
419419

420420
.. tip::
421421

422-
Read :doc:`/cookbook/session/locale_sticky_session` to learn, how to store
422+
Read :doc:`/cookbook/session/locale_sticky_session` to learn how to store
423423
the user's locale in the session.
424424

425425
.. index::
@@ -499,6 +499,11 @@ as the locale for the current request.
499499
You can now use the locale to create routes to other translated pages
500500
in your application.
501501

502+
.. tip::
503+
504+
Read :doc:`/cookbook/routing/service_container_parameters` to learn how to
505+
avoid hardcoding the ``_locale`` requirement in all your routes.
506+
502507
Setting a default Locale
503508
~~~~~~~~~~~~~~~~~~~~~~~~
504509

components/class_loader/cache_class_loader.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
single: ClassLoader; Cache
55
single: ClassLoader; XcacheClassLoader
66
single: XCache; XcacheClassLoader
7-
7+
88
Cache a Class Loader
99
====================
1010

@@ -30,16 +30,16 @@ ApcClassLoader
3030
``findFile()`` method using `APC`_::
3131

3232
require_once '/path/to/src/Symfony/Component/ClassLoader/ApcClassLoader.php';
33-
33+
3434
// instance of a class that implements a findFile() method, like the ClassLoader
3535
$loader = ...;
36-
36+
3737
// sha1(__FILE__) generates an APC namespace prefix
3838
$cachedLoader = new ApcClassLoader(sha1(__FILE__), $loader);
39-
39+
4040
// register the cached class loader
4141
$cachedLoader->register();
42-
42+
4343
// deactivate the original, non-cached loader if it was registered previously
4444
$loader->unregister();
4545

@@ -50,16 +50,16 @@ XcacheClassLoader
5050
it is straightforward::
5151

5252
require_once '/path/to/src/Symfony/Component/ClassLoader/XcacheClassLoader.php';
53-
53+
5454
// instance of a class that implements a findFile() method, like the ClassLoader
5555
$loader = ...;
56-
56+
5757
// sha1(__FILE__) generates an XCache namespace prefix
5858
$cachedLoader = new XcacheClassLoader(sha1(__FILE__), $loader);
59-
59+
6060
// register the cached class loader
6161
$cachedLoader->register();
62-
62+
6363
// deactivate the original, non-cached loader if it was registered previously
6464
$loader->unregister();
6565

components/class_loader/map_class_loader.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. index::
22
single: ClassLoader; MapClassLoader
3-
3+
44
MapClassLoader
55
==============
66

@@ -26,14 +26,14 @@ Using it is as easy as passing your mapping to its constructor when creating
2626
an instance of the ``MapClassLoader`` class::
2727

2828
require_once '/path/to/src/Symfony/Component/ClassLoader/MapClassLoader';
29-
29+
3030
$mapping = array(
3131
'Foo' => '/path/to/Foo',
3232
'Bar' => '/path/to/Bar',
3333
);
34-
34+
3535
$loader = new MapClassLoader($mapping);
36-
36+
3737
$loader->register();
3838

3939
.. _PSR-0: http://www.php-fig.org/psr/psr-0/

components/css_selector.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ web-browser.
7676

7777
* link-state selectors: ``:link``, ``:visited``, ``:target``
7878
* selectors based on user action: ``:hover``, ``:focus``, ``:active``
79-
* UI-state selectors: ``:invalid``, ``:indeterminate`` (however, ``:enabled``,
79+
* UI-state selectors: ``:invalid``, ``:indeterminate`` (however, ``:enabled``,
8080
``:disabled``, ``:checked`` and ``:unchecked`` are available)
8181

8282
Pseudo-elements (``:before``, ``:after``, ``:first-line``,

components/dependency_injection/advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ using the ``get()`` method::
1717

1818
In some cases, a service *only* exists to be injected into another service
1919
and is *not* intended to be fetched directly from the container as shown
20-
above.
20+
above.
2121

2222
.. _inlined-private-services:
2323

0 commit comments

Comments
 (0)