Skip to content

Commit 4dd1f25

Browse files
committed
Merge branch '2.6' into 2.7
* 2.6: (55 commits) Removed an unneeded reference to Symfony 2.4 version Added a mention to the @Security annotation 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 grammar fix ...
2 parents 16dcf53 + 9caab86 commit 4dd1f25

32 files changed

+262
-143
lines changed

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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ content:
435435
436436
{
437437
"require": {
438-
"symfony/symfony": "2.5.*"
438+
"symfony/symfony": "2.6.*"
439439
},
440440
"autoload": {
441441
"files": ["model.php","controllers.php"]
@@ -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
@@ -1249,7 +1249,7 @@ By calling ``validate`` on the validator, you can pass in a raw value and
12491249
the constraint object that you want to validate that value against. A full
12501250
list of the available constraints - as well as the full class name for each
12511251
constraint - is available in the :doc:`constraints reference </reference/constraints>`
1252-
section .
1252+
section.
12531253

12541254
The ``validate`` method returns a :class:`Symfony\\Component\\Validator\\ConstraintViolationList`
12551255
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
@@ -38,8 +38,8 @@ In this case, the user will be asked "Continue with this action?". If the user
3838
answers with ``y`` it returns ``true`` or ``false`` if they answer with ``n``.
3939
The second argument to
4040
:method:`Symfony\\Component\\Console\\Question\\ConfirmationQuestion::__construct`
41-
is the default value to return if the user doesn't enter any input. Any other
42-
input will ask the same question again.
41+
is the default value to return if the user doesn't enter any valid input. If
42+
the second argument is not provided, ``true`` is assumed.
4343

4444
.. tip::
4545

components/expression_language/caching.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Both ``evaluate()`` and ``compile()`` can handle ``ParsedExpression`` and
6464
// ...
6565
6666
$expression = new SerializedParsedExpression(
67+
'1 + 4',
6768
serialize($language->parse('1 + 4', array()))
6869
);
6970

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