Skip to content

Commit 821a1b4

Browse files
committed
Merge branch '2.3' into 2.4
2 parents be60602 + 4b97990 commit 821a1b4

File tree

5 files changed

+43
-24
lines changed

5 files changed

+43
-24
lines changed

book/controller.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ example:
236236
237237
# app/config/routing.yml
238238
hello:
239-
path: /hello/{first_name}/{last_name}
239+
path: /hello/{firstName}/{lastName}
240240
defaults: { _controller: AcmeHelloBundle:Hello:index, color: green }
241241
242242
.. code-block:: xml
@@ -248,7 +248,7 @@ example:
248248
xsi:schemaLocation="http://symfony.com/schema/routing
249249
http://symfony.com/schema/routing/routing-1.0.xsd">
250250
251-
<route id="hello" path="/hello/{first_name}/{last_name}">
251+
<route id="hello" path="/hello/{firstName}/{lastName}">
252252
<default key="_controller">AcmeHelloBundle:Hello:index</default>
253253
<default key="color">green</default>
254254
</route>
@@ -257,19 +257,19 @@ example:
257257
.. code-block:: php
258258
259259
// app/config/routing.php
260-
$collection->add('hello', new Route('/hello/{first_name}/{last_name}', array(
260+
$collection->add('hello', new Route('/hello/{firstName}/{lastName}', array(
261261
'_controller' => 'AcmeHelloBundle:Hello:index',
262262
'color' => 'green',
263263
)));
264264
265265
The controller for this can take several arguments::
266266

267-
public function indexAction($first_name, $last_name, $color)
267+
public function indexAction($firstName, $lastName, $color)
268268
{
269269
// ...
270270
}
271271

272-
Notice that both placeholder variables (``{first_name}``, ``{last_name}``)
272+
Notice that both placeholder variables (``{firstName}``, ``{lastName}``)
273273
as well as the default ``color`` variable are available as arguments in the
274274
controller. When a route is matched, the placeholder variables are merged
275275
with the ``defaults`` to make one array that's available to your controller.
@@ -281,11 +281,11 @@ the following guidelines in mind while you develop.
281281

282282
Symfony is able to match the parameter names from the route to the variable
283283
names in the controller method's signature. In other words, it realizes that
284-
the ``{last_name}`` parameter matches up with the ``$last_name`` argument.
284+
the ``{lastName}`` parameter matches up with the ``$lastName`` argument.
285285
The arguments of the controller could be totally reordered and still work
286286
perfectly::
287287

288-
public function indexAction($last_name, $color, $first_name)
288+
public function indexAction($lastName, $color, $firstName)
289289
{
290290
// ...
291291
}
@@ -295,25 +295,25 @@ the following guidelines in mind while you develop.
295295
The following would throw a ``RuntimeException`` because there is no ``foo``
296296
parameter defined in the route::
297297

298-
public function indexAction($first_name, $last_name, $color, $foo)
298+
public function indexAction($firstName, $lastName, $color, $foo)
299299
{
300300
// ...
301301
}
302302

303303
Making the argument optional, however, is perfectly ok. The following
304304
example would not throw an exception::
305305

306-
public function indexAction($first_name, $last_name, $color, $foo = 'bar')
306+
public function indexAction($firstName, $lastName, $color, $foo = 'bar')
307307
{
308308
// ...
309309
}
310310

311311
* **Not all routing parameters need to be arguments on your controller**
312312

313-
If, for example, the ``last_name`` weren't important for your controller,
313+
If, for example, the ``lastName`` weren't important for your controller,
314314
you could omit it entirely::
315315

316-
public function indexAction($first_name, $color)
316+
public function indexAction($firstName, $color)
317317
{
318318
// ...
319319
}

book/installation.rst

+1-6
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,7 @@ Distribution:
5757

5858
.. code-block:: bash
5959
60-
$ php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony 2.3.0
61-
62-
.. tip::
63-
64-
For an exact version, replace "2.3.0" with the latest Symfony version.
65-
For details, see the `Symfony Installation Page`_
60+
$ php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony 2.3.*
6661
6762
.. tip::
6863

book/security.rst

+13-3
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,14 @@ the trusted reverse proxy cache.
896896
construct. Prior to 2.3, users should create one rule per IP address to match and
897897
use the ``ip`` key instead of ``ips``.
898898

899+
.. caution::
900+
901+
As you'll read in the explanation below the example, the ``ip`` option
902+
does not restrict to a specific IP address. Instead, using the ``ip``
903+
key means that the ``access_control`` entry will only match this IP address,
904+
and users accessing it from a different IP address will continue down
905+
the ``acces_control`` list.
906+
899907
Here is an example of how you might secure all ESI routes that start with a
900908
given prefix, ``/esi``, from outside access:
901909

@@ -1007,11 +1015,13 @@ For a list of the other functions and variables, see
10071015

10081016
.. _book-security-securing-channel:
10091017

1010-
Securing by Channel
1011-
~~~~~~~~~~~~~~~~~~~
1018+
Forcing a Channel (http, https)
1019+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10121020

10131021
You can also require a user to access a URL via SSL; just use the
1014-
``requires_channel`` argument in any ``access_control`` entries:
1022+
``requires_channel`` argument in any ``access_control`` entries. If this
1023+
``access_control`` is matched and the request is using the ``http`` channel,
1024+
the user will be redirected to ``https``:
10151025

10161026
.. configuration-block::
10171027

reference/forms/types/checkbox.rst

+9-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ if the box is unchecked, the value will be set to false.
1313
+-------------+------------------------------------------------------------------------+
1414
| Options | - `value`_ |
1515
+-------------+------------------------------------------------------------------------+
16-
| Inherited | - `required`_ |
17-
| options | - `label`_ |
16+
| Inherited | - `data`_ |
17+
| options | - `required`_ |
18+
| | - `label`_ |
1819
| | - `read_only`_ |
1920
| | - `disabled`_ |
2021
| | - `error_bubbling`_ |
@@ -47,11 +48,17 @@ value
4748
The value that's actually used as the value for the checkbox. This does
4849
not affect the value that's set on your object.
4950

51+
.. caution::
52+
53+
To make a checkbox checked by default, use the `data`_ option.
54+
5055
Inherited options
5156
-----------------
5257

5358
These options inherit from the :doc:`form </reference/forms/types/form>` type:
5459

60+
.. include:: /reference/forms/types/options/data.rst.inc
61+
5562
.. include:: /reference/forms/types/options/required.rst.inc
5663

5764
.. include:: /reference/forms/types/options/label.rst.inc

reference/forms/types/radio.rst

+9-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ If you want to have a Boolean field, use :doc:`checkbox </reference/forms/types/
1717
+-------------+---------------------------------------------------------------------+
1818
| Options | - `value`_ |
1919
+-------------+---------------------------------------------------------------------+
20-
| Inherited | - `required`_ |
21-
| options | - `label`_ |
20+
| Inherited | - `data`_ |
21+
| options | - `required`_ |
22+
| | - `label`_ |
2223
| | - `read_only`_ |
2324
| | - `disabled`_ |
2425
| | - `error_bubbling`_ |
@@ -41,11 +42,17 @@ value
4142
The value that's actually used as the value for the radio button. This does
4243
not affect the value that's set on your object.
4344

45+
.. caution::
46+
47+
To make a radio button checked by default, use the `data`_ option.
48+
4449
Inherited Options
4550
-----------------
4651

4752
These options inherit from the :doc:`form </reference/forms/types/form>` type:
4853

54+
.. include:: /reference/forms/types/options/data.rst.inc
55+
4956
.. include:: /reference/forms/types/options/required.rst.inc
5057

5158
.. include:: /reference/forms/types/options/label.rst.inc

0 commit comments

Comments
 (0)