Skip to content

Commit ebca342

Browse files
committed
Merge branch '2.3' into 2.6
* 2.3: (30 commits) [#5064] Minor language tweaks Switched the first example to a static constructor method added some more components for Tobion as a merger Fixed variable name in : Reference -> validation constraints -> count -> basic usage -> PHP [#5036] Typo fix (probably mine originally) caught by xabbuh reword to serves Adding a link to define "lts" Better wording Minor improvement for symfony-installer with LTS link to deciders' GitHub profiles Add missing use statement in Building Login Form doc Also removed use statement for Route as it is only needed when using annotations for routing Fixed incorrect plural form Improved the URL of the English reference dictionary Reworded the paragraph about enforcing an English reference enclose data type with double backticks Rewords, tweaks and fixes Updated documentation standards (code examples and English use) Added double backticks. And also a full stop. added link target/label in the cookbook Changed link into ref ... Conflicts: components/config/definition.rst contributing/code/core_team.rst cookbook/security/form_login_setup.rst
2 parents 33232a8 + b3e204c commit ebca342

File tree

16 files changed

+97
-60
lines changed

16 files changed

+97
-60
lines changed

book/installation.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,17 @@ number as the second argument of the ``new`` command:
9898
# Windows
9999
c:\projects\> php symfony.phar new my_project_name 2.3.23
100100
101+
If you want your project to be based on the latest :ref:`Symfony LTS version <releases-lts>`,
102+
pass ``lts`` as the second argument of the ``new`` command:
103+
104+
.. code-block:: bash
105+
106+
# Linux, Mac OS X
107+
$ symfony new my_project_name lts
108+
109+
# Windows
110+
c:\projects\> php symfony.phar new my_project_name lts
111+
101112
Read the :doc:`Symfony Release process </contributing/community/releases>`
102113
to better understand why there are several Symfony versions and which one
103114
to use for your projects.

book/testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ or perform more complex requests. Some useful examples::
394394
array('photo' => $photo)
395395
);
396396

397-
// Perform a DELETE requests and pass HTTP headers
397+
// Perform a DELETE request and pass HTTP headers
398398
$client->request(
399399
'DELETE',
400400
'/post/12',

components/config/definition.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ Node Type
9595
~~~~~~~~~
9696

9797
It is possible to validate the type of a provided value by using the appropriate
98-
node definition. Node type are available for:
98+
node definition. Node types are available for:
9999

100-
* scalar
100+
* scalar (generic type that includes booleans, strings, integers, floats and ``null``)
101101
* boolean
102102
* integer
103103
* float
104-
* enum
104+
* enum (similar to scalar, but it only allows a finite set of values)
105105
* array
106106
* variable (no validation)
107107

@@ -288,7 +288,8 @@ All options can be documented using the
288288
:method:`Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::info`
289289
method.
290290

291-
The info will be printed as a comment when dumping the configuration tree.
291+
The info will be printed as a comment when dumping the configuration tree with
292+
the ``config:dump`` command.
292293

293294
.. versionadded:: 2.6
294295
Since Symfony 2.6, the info will also be added to the exception message

components/config/introduction.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ The Config Component
99
combine, autofill and validate configuration values of any kind, whatever
1010
their source may be (YAML, XML, INI files, or for instance a database).
1111

12-
.. caution::
13-
14-
The ``IniFileLoader`` parses the file contents using the
15-
:phpfunction:`parse_ini_file` function, therefore, you can only set
16-
parameters to string values. To set parameters to other data types
17-
(e.g. boolean, integer, etc), the other loaders are recommended.
18-
1912
Installation
2013
------------
2114

components/config/resources.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
Loading Resources
55
=================
66

7+
.. caution::
8+
9+
The ``IniFileLoader`` parses the file contents using the
10+
:phpfunction:`parse_ini_file` function. Therefore, you can only set
11+
parameters to string values. To set parameters to other data types
12+
(e.g. boolean, integer, etc), the other loaders are recommended.
13+
714
Locating Resources
815
------------------
916

contributing/code/core_team.rst

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,37 +37,37 @@ Active Core Members
3737

3838
* **Project Leader**:
3939

40-
* **Fabien Potencier** (:leader:`fabpot`).
40+
* **Fabien Potencier** (`fabpot`_).
4141

4242
* **Mergers** (``@symfony/mergers`` on GitHub):
4343

44-
* **Bernhard Schussek** (:merger:`webmozart`) can merge into the Form_,
44+
* **Bernhard Schussek** (`webmozart`_) can merge into the Form_,
4545
Validator_, Icu_, Intl_, Locale_, OptionsResolver_ and PropertyAccess_
4646
components;
4747

48-
* **Tobias Schultze** (:merger:`Tobion`) can merge into the Routing_
49-
component;
48+
* **Tobias Schultze** (`Tobion`_) can merge into the Routing_,
49+
OptionsResolver_ and PropertyAccess_ components;
5050

51-
* **Romain Neutron** (:merger:`romainneutron`) can merge into the
51+
* **Romain Neutron** (`romainneutron`_) can merge into the
5252
Process_ component;
5353

54-
* **Nicolas Grekas** (:merger:`nicolas-grekas`) can merge into the Debug_
54+
* **Nicolas Grekas** (`nicolas-grekas`_) can merge into the Debug_
5555
component, the VarDumper_ component and the DebugBundle_;
5656

57-
* **Christophe Coevoet** (:merger:`stof`) can merge into the BrowserKit_,
57+
* **Christophe Coevoet** (`stof`_) can merge into the BrowserKit_,
5858
Config_, Console_, DependencyInjection_, DomCrawler_, EventDispatcher_,
5959
HttpFoundation_, HttpKernel_, Serializer_, Stopwatch_, DoctrineBridge_,
6060
MonologBridge_, and TwigBridge_ components;
6161

62-
* **Kévin Dunglas** (:merger:`dunglas`) can merge into the Serializer_
62+
* **Kévin Dunglas** (`dunglas`_) can merge into the Serializer_
6363
component.
6464

6565
* **Deciders** (``@symfony/deciders`` on GitHub):
6666

67-
* **Jakub Zalas** (:decider:`jakzal`);
68-
* **Jordi Boggiano** (:decider:`seldaek`);
69-
* **Lukas Kahwe Smith** (:decider:`lsmith77`);
70-
* **Ryan Weaver** (:decider:`weaverryan`).
67+
* **Jakub Zalas** (`jakzal`_);
68+
* **Jordi Boggiano** (`seldaek`_);
69+
* **Lukas Kahwe Smith** (`lsmith77`_);
70+
* **Ryan Weaver** (`weaverryan`_).
7171

7272
Core Membership Application
7373
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -170,3 +170,14 @@ discretion of the **Project Leader**.
170170
.. _Validator: https://github.com/symfony/Validator
171171
.. _VarDumper: https://github.com/symfony/var-dumper
172172
.. _DebugBundle: https://github.com/symfony/debug-bundle
173+
.. _`fabpot`: https://github.com/fabpot/
174+
.. _`webmozart`: https://github.com/webmozart/
175+
.. _`Tobion`: https://github.com/Tobion/
176+
.. _`romainneutron`: https://github.com/romainneutron/
177+
.. _`nicolas-grekas`: https://github.com/nicolas-grekas/
178+
.. _`stof`: https://github.com/stof/
179+
.. _`dunglas`: https://github.com/dunglas/
180+
.. _`jakzal`: https://github.com/jakzal/
181+
.. _`Seldaek`: https://github.com/Seldaek/
182+
.. _`lsmith77`: https://github.com/lsmith77/
183+
.. _`weaverryan`: https://github.com/weaverryan/

contributing/community/releases.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Standard Versions
6060
A standard minor version is maintained for an *eight month* period for bug
6161
fixes, and for a *fourteen month* period for security issue fixes.
6262

63+
.. _releases-lts:
64+
6365
Long Term Support Versions
6466
~~~~~~~~~~~~~~~~~~~~~~~~~~
6567

contributing/documentation/standards.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Sphinx
88
------
99

1010
* The following characters are chosen for different heading levels: level 1
11-
is ``=``, level 2 ``-``, level 3 ``~``, level 4 ``.`` and level 5 ``"``;
11+
is ``=`` (equal sign), level 2 ``-`` (dash), level 3 ``~`` (tilde), level 4
12+
``.`` (dot) and level 5 ``"`` (double quote);
1213
* Each line should break approximately after the first word that crosses the
1314
72nd character (so most lines end up being 72-78 characters);
1415
* The ``::`` shorthand is *preferred* over ``.. code-block:: php`` to begin a PHP
@@ -50,6 +51,12 @@ Code Examples
5051

5152
* The code follows the :doc:`Symfony Coding Standards </contributing/code/standards>`
5253
as well as the `Twig Coding Standards`_;
54+
* The code examples should look real for a web application context. Avoid abstract
55+
or trivial examples (``foo``, ``bar``, ``demo``, etc.);
56+
* The code should follow the :doc:`Symfony Best Practices </best_practices/introduction>`.
57+
Unless the example requires a custom bundle, make sure to always use the
58+
``AppBundle`` bundle to store your code;
59+
* Use ``Acme`` when the code requires a vendor name;
5360
* To avoid horizontal scrolling on code blocks, we prefer to break a line
5461
correctly if it crosses the 85th character;
5562
* When you fold one or more lines of code, place ``...`` in a comment at the point
@@ -140,8 +147,12 @@ Files and Directories
140147
English Language Standards
141148
--------------------------
142149

143-
* **English Dialect**: use the United States English dialect, commonly called
144-
`American English`_.
150+
Symfony documentation uses the United States English dialect, commonly called
151+
`American English`_. The `American English Oxford Dictionary`_ is used as the
152+
vocabulary reference.
153+
154+
In addition, documentation follows these rules:
155+
145156
* **Section titles**: use a variant of the title case, where the first
146157
word is always capitalized and all other words are capitalized, except for
147158
the closed-class words (read Wikipedia article about `headings and titles`_).
@@ -164,6 +175,7 @@ English Language Standards
164175
.. _`the Sphinx documentation`: http://sphinx-doc.org/rest.html#source-code
165176
.. _`Twig Coding Standards`: http://twig.sensiolabs.org/doc/coding_standards.html
166177
.. _`American English`: http://en.wikipedia.org/wiki/American_English
178+
.. _`American English Oxford Dictionary`: http://www.oxforddictionaries.com/definition/american_english/
167179
.. _`headings and titles`: http://en.wikipedia.org/wiki/Letter_case#Headings_and_publication_titles
168180
.. _`Serial (Oxford) Commas`: http://en.wikipedia.org/wiki/Serial_comma
169181
.. _`nosism`: http://en.wikipedia.org/wiki/Nosism

cookbook/configuration/web_server_configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ to use PHP :ref:`with Nginx <web-server-nginx>`.
2121
static files, including images, stylesheets and JavaScript files. It is
2222
also where the front controllers live. For more details, see the :ref:`the-web-directory`.
2323

24-
The web directory services as the document root when configuring your
24+
The web directory serves as the document root when configuring your
2525
web server. In the examples below, the ``web/`` directory will be the
2626
document root. This directory is ``/var/www/project/web/``.
2727

cookbook/email/dev_environment.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ the replaced address, so you can still see who it would have been sent to.
119119
These are ``X-Swift-Cc`` and ``X-Swift-Bcc`` for the ``CC`` and ``BCC``
120120
addresses respectively.
121121

122+
.. _sending-to-a-specified-address-but-with-exceptions:
123+
122124
Sending to a Specified Address but with Exceptions
123125
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124126

cookbook/form/unit_testing.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ The simplest ``TypeTestCase`` implementation looks like the following::
5555
$type = new TestedType();
5656
$form = $this->factory->create($type);
5757

58-
$object = new TestObject();
59-
$object->fromArray($formData);
58+
$object = TestObject::fromArray($formData);
6059

6160
// submit the data to the form directly
6261
$form->submit($formData);

cookbook/security/form_login_setup.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,31 +76,29 @@ First, enable form login under your firewall:
7676
Now, when the security system initiates the authentication process, it will
7777
redirect the user to the login form ``/login``. Implementing this login form
7878
visually is your job. First, create a new ``SecurityController`` inside a
79-
bundle with an empty ``loginAction``::
79+
bundle::
8080

8181
// src/AppBundle/Controller/SecurityController.php
8282
namespace AppBundle\Controller;
8383

84-
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
8584
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
85+
use Symfony\Component\HttpFoundation\Request;
8686

8787
class SecurityController extends Controller
8888
{
89-
public function loginAction(Request $request)
90-
{
91-
// todo...
92-
}
9389
}
9490

95-
Next, create two routes: one for each of the paths your configured earlier
91+
Next, create two routes: one for each of the paths you configured earlier
9692
under your ``form_login`` configuration (``/login`` and ``/login_check``):
9793

9894
.. configuration-block::
9995

10096
.. code-block:: php-annotations
10197
10298
// src/AppBundle/Controller/SecurityController.php
99+
103100
// ...
101+
use Symfony\Component\HttpFoundation\Request;
104102
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
105103
106104
class SecurityController extends Controller
@@ -110,14 +108,15 @@ under your ``form_login`` configuration (``/login`` and ``/login_check``):
110108
*/
111109
public function loginAction(Request $request)
112110
{
113-
// todo ...
114111
}
115112
116113
/**
117114
* @Route("/login_check", name="login_check")
118115
*/
119116
public function loginCheckAction()
120117
{
118+
// this controller will not be executed,
119+
// as the route is handled by the Security system
121120
}
122121
}
123122
@@ -129,6 +128,8 @@ under your ``form_login`` configuration (``/login`` and ``/login_check``):
129128
defaults: { _controller: AppBundle:Security:login }
130129
login_check:
131130
path: /login_check
131+
# no controller is bound to this route
132+
# as it's handled by the Security system
132133
133134
.. code-block:: xml
134135
@@ -144,6 +145,8 @@ under your ``form_login`` configuration (``/login`` and ``/login_check``):
144145
</route>
145146
146147
<route id="login_check" path="/login_check" />
148+
<!-- no controller is bound to this route
149+
as it's handled by the Security system -->
147150
</routes>
148151
149152
.. code-block:: php
@@ -157,14 +160,15 @@ under your ``form_login`` configuration (``/login`` and ``/login_check``):
157160
'_controller' => 'AppBundle:Security:login',
158161
)));
159162
$collection->add('login_check', new Route('/login_check', array()));
163+
// no controller is bound to this route
164+
// as it's handled by the Security system
160165
161166
return $collection;
162167
163168
Great! Next, add the logic to ``loginAction`` that will display the login
164169
form::
165170

166171
// src/AppBundle/Controller/SecurityController.php
167-
// ...
168172

169173
public function loginAction(Request $request)
170174
{

quick_tour/the_controller.rst

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,10 @@ The ``hello`` action will now match URLs like ``/hello/fabien.xml`` or
172172
like ``/hello/fabien.js``, because the value of the ``_format`` variable doesn't
173173
meet its requirements.
174174

175-
Redirecting and Forwarding
176-
--------------------------
175+
.. _redirecting-and-forwarding:
176+
177+
Redirecting
178+
-----------
177179

178180
If you want to redirect the user to another page, use the ``redirectToRoute()``
179181
method::
@@ -193,23 +195,6 @@ method::
193195
The ``redirectToRoute()`` method takes as arguments the route name and an optional
194196
array of parameters and redirects the user to the URL generated with those arguments.
195197

196-
You can also internally forward the action to another action of the same or
197-
different controller using the ``forward()`` method::
198-
199-
// src/AppBundle/Controller/DefaultController.php
200-
class DefaultController extends Controller
201-
{
202-
/**
203-
* @Route("/", name="homepage")
204-
*/
205-
public function indexAction()
206-
{
207-
return $this->forward('AppBundle:Blog:index', array(
208-
'name' => $name
209-
);
210-
}
211-
}
212-
213198
Displaying Error Pages
214199
----------------------
215200

reference/configuration/swiftmailer.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Configuration
3232
* `threshold`_
3333
* `sleep`_
3434
* `delivery_address`_
35+
* `delivery_whitelist`_
3536
* `disable_delivery`_
3637
* `logging`_
3738

@@ -156,6 +157,15 @@ emails sent during development go to a single account.
156157
This uses ``Swift_Plugins_RedirectingPlugin``. Original recipients are available
157158
on the ``X-Swift-To``, ``X-Swift-Cc`` and ``X-Swift-Bcc`` headers.
158159

160+
delivery_whitelist
161+
~~~~~~~~~~~~~~~~~~
162+
163+
**type**: ``array``
164+
165+
Used in combination with ``delivery_address``. If set, emails matching any of these
166+
patterns will be delivered like normal, instead of being sent to ``delivery_address``.
167+
For details, see :ref:`the cookbook entry. <sending-to-a-specified-address-but-with-exceptions>`
168+
159169
disable_delivery
160170
~~~~~~~~~~~~~~~~
161171

reference/constraints/Count.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ you might add the following:
8989
9090
class Participant
9191
{
92-
public static function loadValidatorMetadata(ClassMetadata $data)
92+
public static function loadValidatorMetadata(ClassMetadata $metadata)
9393
{
9494
$metadata->addPropertyConstraint('emails', new Assert\Count(array(
9595
'min' => 1,

reference/forms/types/options/data.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
data
22
~~~~
33

4-
**type**: mixed **default**: Defaults to field of the underlying object (if there is one)
4+
**type**: ``mixed`` **default**: Defaults to field of the underlying object (if there is one)
55

66
When you create a form, each field initially displays the value of the
77
corresponding property of the form's domain object (if an object is bound

0 commit comments

Comments
 (0)