Skip to content

Commit f08e2a5

Browse files
committed
Merge branch '2.3' into 2.4
2 parents b028282 + 3a2f53d commit f08e2a5

File tree

6 files changed

+25
-14
lines changed

6 files changed

+25
-14
lines changed

book/forms.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ output can be customized on many different levels.
784784
785785
.. code-block:: html+php
786786

787-
<?php echo $view['form']->get('value')->getTask() ?>
787+
<?php echo $form->vars['value']->getTask() ?>
788788

789789
.. index::
790790
single: Forms; Rendering each field by hand
@@ -890,7 +890,7 @@ to get the ``id``:
890890

891891
.. code-block:: html+php
892892

893-
<?php echo $form['task']->get('id') ?>
893+
<?php echo $form['task']->vars['id']?>
894894

895895
To get the value used for the form field's name attribute you need to use
896896
the ``full_name`` value:
@@ -903,7 +903,7 @@ the ``full_name`` value:
903903

904904
.. code-block:: html+php
905905

906-
<?php echo $form['task']->get('full_name') ?>
906+
<?php echo $form['task']->vars['full_name'] ?>
907907

908908
Twig Template Function Reference
909909
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1085,7 +1085,7 @@ the choice is ultimately up to you.
10851085
The field data can be accessed in a controller with::
10861086

10871087
$form->get('dueDate')->getData();
1088-
1088+
10891089
In addition, the data of an unmapped field can also be modified directly::
10901090

10911091
$form->get('dueDate')->setData(new \DateTime());

components/http_foundation/trusting_proxies.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ your proxy.
2222
2323
use Symfony\Component\HttpFoundation\Request;
2424
25-
$request = Request::createFromGlobals();
26-
2725
// only trust proxy headers coming from this IP addresses
28-
$request->setTrustedProxies(array('192.0.0.1', '10.0.0.0/8'));
26+
Request::setTrustedProxies(array('192.0.0.1', '10.0.0.0/8'));
2927
3028
Configuring Header Names
3129
------------------------
@@ -40,10 +38,10 @@ By default, the following proxy headers are trusted:
4038
If your reverse proxy uses a different header name for any of these, you
4139
can configure that header name via :method:`Symfony\\Component\\HttpFoundation\\Request::setTrustedHeaderName`::
4240

43-
$request->setTrustedHeaderName(Request::HEADER_CLIENT_IP, 'X-Proxy-For');
44-
$request->setTrustedHeaderName(Request::HEADER_CLIENT_HOST, 'X-Proxy-Host');
45-
$request->setTrustedHeaderName(Request::HEADER_CLIENT_PORT, 'X-Proxy-Port');
46-
$request->setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, 'X-Proxy-Proto');
41+
Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, 'X-Proxy-For');
42+
Request::setTrustedHeaderName(Request::HEADER_CLIENT_HOST, 'X-Proxy-Host');
43+
Request::setTrustedHeaderName(Request::HEADER_CLIENT_PORT, 'X-Proxy-Port');
44+
Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, 'X-Proxy-Proto');
4745

4846
Not trusting certain Headers
4947
----------------------------
@@ -53,4 +51,4 @@ listed above are trusted. If you need to trust some of these headers but
5351
not others, you can do that as well::
5452

5553
// disables trusting the ``X-Forwarded-Proto`` header, the default header is used
56-
$request->setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, '');
54+
Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, '');

cookbook/console/usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ or the equivalent:
2323

2424
.. code-block:: bash
2525
26-
$ php app/console cache:clear -e=prod
26+
$ php app/console cache:clear -e prod
2727
2828
In addition to changing the environment, you can also choose to disable debug mode.
2929
This can be useful where you want to run commands in the ``dev`` environment

reference/forms/types/button.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ A simple, non-responsive button.
1818
| | - `label_attr`_ |
1919
| | - `translation_domain`_ |
2020
+----------------------+----------------------------------------------------------------------+
21+
| Overridden Options | - `auto_initialize` |
22+
+----------------------+----------------------------------------------------------------------+
2123
| Parent type | none |
2224
+----------------------+----------------------------------------------------------------------+
2325
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType` |
@@ -35,3 +37,5 @@ Options
3537
.. include:: /reference/forms/types/options/label_attr.rst.inc
3638

3739
.. include:: /reference/forms/types/options/button_translation_domain.rst.inc
40+
41+
.. include:: /reference/forms/types/options/button_auto_initialize.rst.inc
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
auto_initialize
2+
~~~~~~~~~~~~~~~
3+
4+
**type**: ``boolean`` **default**: ``false``
5+
6+
An internal option: sets whether the form should be initialized automatically.
7+
For all fields, this option should only be ``true`` for root forms and since
8+
a button can't be an entire form on its own, this is set to ``false``. You
9+
won't need to change this option and probably won't need to worry about it.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mapped
22
~~~~~~
33

4-
**type**: ``boolean``
4+
**type**: ``boolean`` **default**: ``true``
55

66
If you wish the field to be ignored when reading or writing to the object, you
77
can set the ``mapped`` option to ``false``.

0 commit comments

Comments
 (0)