Skip to content

Commit 9caab86

Browse files
committed
Merge branch '2.5' into 2.6
* 2.5: (48 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. [#4423] Added missing word Update tests.rst ensure consistency with the note Update security.rst minor #4977 Unnecessary comma (edsonmedina) Wrong comma file extension fix ... Conflicts: reference/configuration/twig.rst
2 parents 2a29225 + ff44111 commit 9caab86

30 files changed

+215
-81
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
@@ -646,7 +646,7 @@ A routing configuration map provides this information in a readable format:
646646
647647
Now that Symfony is handling all the mundane tasks, the front controller
648648
is dead simple. And since it does so little, you'll never have to touch
649-
it once it's created (and if you use a Symfony distribution, you won't
649+
it once it's created (and if you use a `Symfony distribution`_, you won't
650650
even need to create it!)::
651651

652652
// web/app.php
@@ -761,3 +761,4 @@ Learn more from the Cookbook
761761
.. _`Twig`: http://twig.sensiolabs.org
762762
.. _`Varnish`: https://www.varnish-cache.org/
763763
.. _`PHPUnit`: http://www.phpunit.de
764+
.. _`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
@@ -622,7 +622,8 @@ and pass it a ``Link`` object::
622622
Forms
623623
~~~~~
624624

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

627628
$buttonCrawlerNode = $crawler->selectButton('submit');
628629

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/console/helpers/questionhelper.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ In this case, the user will be asked "Continue with this action?". If the user
4141
answers with ``y`` it returns ``true`` or ``false`` if they answer with ``n``.
4242
The second argument to
4343
:method:`Symfony\\Component\\Console\\Question\\ConfirmationQuestion::__construct`
44-
is the default value to return if the user doesn't enter any input. Any other
45-
input will ask the same question again.
44+
is the default value to return if the user doesn't enter any valid input. If
45+
the second argument is not provided, ``true`` is assumed.
4646

4747
Asking the User for Information
4848
-------------------------------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy