Skip to content

Commit ff44111

Browse files
committed
Merge branch '2.3' into 2.5
* 2.3: (45 commits) More xml fixes Xml changes and line-break changes Swiched mydomain and specialdomain Changes recommended by @cordoval Changes recommended by @javierguiluz Changed line-breaks in text Added improvments from @wouterj fixed typo in "except" Document whitelist option to email redirect Typo Improve assetic:watch text Update asset_management.rst Link to standard edition so users can get the app/AppKernel.php if needed. Update tests.rst ensure consistency with the note Update security.rst minor #4977 Unnecessary comma (edsonmedina) Wrong comma file extension fix Fixed some syntax issues in Twig Reference ... Conflicts: cookbook/session/index.rst reference/twig_reference.rst
2 parents 73a7c0c + f75bc2b commit ff44111

28 files changed

+212
-79
lines changed

best_practices/business-logic.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The blog application needs a utility that can transform a post title (e.g.
5656
"Hello World") into a slug (e.g. "hello-world"). The slug will be used as
5757
part of the post URL.
5858

59-
Let's, create a new ``Slugger`` class inside ``src/AppBundle/Utils/`` and
59+
Let's create a new ``Slugger`` class inside ``src/AppBundle/Utils/`` and
6060
add the following ``slugify()`` method:
6161

6262
.. code-block:: php

best_practices/tests.rst

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,35 @@ A functional test can be as easy as this:
3030

3131
.. code-block:: php
3232
33-
/** @dataProvider provideUrls */
34-
public function testPageIsSuccessful($url)
35-
{
36-
$client = self::createClient();
37-
$client->request('GET', $url);
33+
// src/AppBundle/Tests/ApplicationAvailabilityFunctionalTest.php
34+
namespace AppBundle\Tests;
3835
39-
$this->assertTrue($client->getResponse()->isSuccessful());
40-
}
36+
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
4137
42-
public function provideUrls()
38+
class ApplicationAvailabilityFunctionalTest extends WebTestCase
4339
{
44-
return array(
45-
array('/'),
46-
array('/posts'),
47-
array('/post/fixture-post-1'),
48-
array('/blog/category/fixture-category'),
49-
array('/archives'),
50-
// ...
51-
);
40+
/**
41+
* @dataProvider urlProvider
42+
*/
43+
public function testPageIsSuccessful($url)
44+
{
45+
$client = self::createClient();
46+
$client->request('GET', $url);
47+
48+
$this->assertTrue($client->getResponse()->isSuccessful());
49+
}
50+
51+
public function urlProvider()
52+
{
53+
return array(
54+
array('/'),
55+
array('/posts'),
56+
array('/post/fixture-post-1'),
57+
array('/blog/category/fixture-category'),
58+
array('/archives'),
59+
// ...
60+
);
61+
}
5262
}
5363
5464
This code checks that all the given URLs load successfully, which means that

book/controller.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Controllers are also called *actions*.
116116

117117
This controller is pretty straightforward:
118118

119-
* *line 4*: Symfony takes advantage of PHP 5.3 namespace functionality to
119+
* *line 4*: Symfony takes advantage of PHP's namespace functionality to
120120
namespace the entire controller class. The ``use`` keyword imports the
121121
``Response`` class, which the controller must return.
122122

book/from_flat_php_to_symfony2.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ A routing configuration map provides this information in a readable format:
649649
650650
Now that Symfony is handling all the mundane tasks, the front controller
651651
is dead simple. And since it does so little, you'll never have to touch
652-
it once it's created (and if you use a Symfony distribution, you won't
652+
it once it's created (and if you use a `Symfony distribution`_, you won't
653653
even need to create it!)::
654654

655655
// web/app.php
@@ -764,3 +764,4 @@ Learn more from the Cookbook
764764
.. _`Twig`: http://twig.sensiolabs.org
765765
.. _`Varnish`: https://www.varnish-cache.org/
766766
.. _`PHPUnit`: http://www.phpunit.de
767+
.. _`Symfony distribution`: https://github.com/symfony/symfony-standard

book/security.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ is both flexible and (hopefully) fun to work with.
1414
Since there's a lot to talk about, this chapter is organized into a few big
1515
sections:
1616

17-
1) Initial ``security.yml`` setup (*authentication*);
17+
#. Initial ``security.yml`` setup (*authentication*);
1818

19-
2) Denying access to your app (*authorization*);
19+
#. Denying access to your app (*authorization*);
2020

21-
3) Fetching the current User object
21+
#. Fetching the current User object.
2222

2323
These are followed by a number of small (but still captivating) sections,
2424
like :ref:`logging out <book-security-logging-out>` and :ref:`encoding user passwords <security-encoding-password>`.
@@ -492,7 +492,7 @@ else, you'll want to encode their passwords. The best algorithm to use is
492492
493493
'encoders' => array(
494494
'Symfony\Component\Security\Core\User\User' => array(
495-
'algorithm' => 'plaintext',
495+
'algorithm' => 'bcrypt',
496496
'cost' => 12,
497497
)
498498
),

book/testing.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,8 @@ and pass it a ``Link`` object::
619619
Forms
620620
~~~~~
621621

622-
Just like links, you select forms with the ``selectButton()`` method::
622+
Forms can be selected using their buttons, which can be selected with the
623+
``selectButton()`` method, just like links::
623624

624625
$buttonCrawlerNode = $crawler->selectButton('submit');
625626

book/validation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ By calling ``validate`` on the validator, you can pass in a raw value and
12521252
the constraint object that you want to validate that value against. A full
12531253
list of the available constraints - as well as the full class name for each
12541254
constraint - is available in the :doc:`constraints reference </reference/constraints>`
1255-
section .
1255+
section.
12561256

12571257
The ``validate`` method returns a :class:`Symfony\\Component\\Validator\\ConstraintViolationList`
12581258
object, which acts just like an array of errors. Each error in the collection

components/class_loader/map_class_loader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Usage
2525
Using it is as easy as passing your mapping to its constructor when creating
2626
an instance of the ``MapClassLoader`` class::
2727

28-
require_once '/path/to/src/Symfony/Component/ClassLoader/MapClassLoader';
28+
require_once '/path/to/src/Symfony/Component/ClassLoader/MapClassLoader.php';
2929

3030
$mapping = array(
3131
'Foo' => '/path/to/Foo',

components/console/events.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ the wheel, it uses the Symfony EventDispatcher component to do the work::
2020
$application->setDispatcher($dispatcher);
2121
$application->run();
2222

23+
.. caution::
24+
25+
Console events are only triggered by the main command being executed.
26+
Commands called by the main command will not trigger any event.
27+
2328
The ``ConsoleEvents::COMMAND`` Event
2429
------------------------------------
2530

components/http_foundation/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ Serving Files
480480
When sending a file, you must add a ``Content-Disposition`` header to your
481481
response. While creating this header for basic file downloads is easy, using
482482
non-ASCII filenames is more involving. The
483-
:method:`Symfony\\Component\\HttpFoundation\\Response::makeDisposition`
483+
:method:`Symfony\\Component\\HttpFoundation\\ResponseHeaderBag::makeDisposition`
484484
abstracts the hard work behind a simple API::
485485

486486
use Symfony\Component\HttpFoundation\ResponseHeaderBag;

0 commit comments

Comments
 (0)