8000 Merge branch '2.7' into 2.8 · symfony/symfony-docs@6fbe7cd · GitHub
[go: up one dir, main page]

Skip to content

Commit 6fbe7cd

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [#7767] minor rewording [#8047] add inline code comment Fixed the issue in a different way Jquery datePicker syntax update [#8104] minor rewording Add more precision about automatic provider assignation Update data.rst.inc Minor reword to explain that path() generates absolute URLs Added a caution note about UploadedFile and insulated tests Postpone talk about front controllers Applied reviewer suggestion Minor fix Minor reword Improved format of message and added missing information. Added caution block under delete_empty to warn the developer when he try to activate delete_empty for collections of compound forms.
2 parents 42c3511 + a839ed4 commit 6fbe7cd

File tree

8 files changed

+32
-14
lines changed

8 files changed

+32
-14
lines changed

page_creation.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,7 @@ random) number and prints it. To do that, create a "Controller class" and a
6363
Before diving into this, test it out! If you are using PHP's internal web server
6464
go to:
6565

66-
http://localhost:8000/app_dev.php/lucky/number
67-
68-
.. tip::
69-
70-
If you're using the built-in PHP web-server, you can omit the ``app_dev.php``
71-
part of the URL.
66+
http://localhost:8000/lucky/number
7267

7368
If you see a lucky number being printed back to you, congratulations! But before
7469
you run off to play the lottery, check out how this works. Remember the two steps

reference/forms/types/collection.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,15 @@ form you have to set this option to true. However, existing collection entries
278278
will only be deleted if you have the allow_delete_ option enabled. Otherwise
279279
the empty values will be kept.
280280

281+
.. caution::
282+
283+
The ``delete_empty`` option only removes items when the normalized value is
284+
``null``. If the nested `type`_ is a compound form type, you must either set
285+
the ``required`` option to ``false`` or set the ``empty_data`` option to
286+
``null``. Both of these options can be set inside `options`_. Read about
287+
the :ref:`form's empty_data option <reference-form-option-empty-data>`
288+
to learn why this is necessary.
289+
281290
entry_options
282291
~~~~~~~~~~~~~
283292

reference/forms/types/date.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,14 @@ make the following changes::
102102
'attr' => ['class' => 'js-datepicker'],
103103
));
104104

105-
Assuming you're using jQuery, you can initialize the date picker via:
105+
Then, add the following JavaScript code in your template to initialize the date
106+
picker:
106107

107108
.. code-block:: html
108109

109110
<script>
110111
$(document).ready(function() {
112+
// configure the bootstrap datepicker
111113
$('.js-datepicker').datepicker({
112114
format: 'yyyy-mm-dd'
113115
});

reference/forms/types/form.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ option on the form.
7777

7878
.. include:: /reference/forms/types/options/data_class.rst.inc
7979

80+
.. _reference-form-option-empty-data:
81+
8082
.. include:: /reference/forms/types/options/empty_data.rst.inc
8183
:end-before: DEFAULT_PLACEHOLDER
8284

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ an individual field, you can set it in the data option::
2020

2121
The ``data`` option *always* overrides the value taken from the domain data
2222
(object) when rendering. This means the object value is also overriden when
23-
the form edits an already persisted object, causing it to lose it's
23+
the form edits an already persisted object, causing it to lose its
2424
persisted value when the form is submitted.

routing/scheme.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,18 @@ the URI scheme via schemes:
4848
The above configuration forces the ``secure`` route to always use HTTPS.
4949

5050
When generating the ``secure`` URL, and if the current scheme is HTTP, Symfony
51-
will automatically generate an absolute URL with HTTPS as the scheme:
51+
will automatically generate an absolute URL with HTTPS as the scheme, even when
52+
using the ``path()`` function:
5253

5354
.. code-block:: twig
5455
5556
{# If the current scheme is HTTPS #}
5657
{{ path('secure') }}
57-
{# generates /secure #}
58+
{# generates a relative URL: /secure #}
5859
5960
{# If the current scheme is HTTP #}
6061
{{ path('secure') }}
61-
{# generates https://example.com/secure #}
62+
{# generates an absolute URL: https://example.com/secure #}
6263
6364
The requirement is also enforced for incoming requests. If you try to access
6465
the ``/secure`` path with HTTP, you will automatically be redirected to the

security/multiple_user_providers.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ a new provider that chains the two together:
8282
),
8383
));
8484
85-
Now, all authentication mechanisms will use the ``chain_provider``, since
86-
it's the first specified. The ``chain_provider`` will, in turn, try to load
87-
the user from both the ``in_memory`` and ``user_db`` providers.
85+
Now, all firewalls without an explicitly configured user provider will use
86+
the ``chain_provider`` since it's the first specified. The ``chain_provider``
87+
will, in turn, try to load the user from both the ``in_memory`` and ``user_db``
88+
providers.
8889

8990
You can also configure the firewall or individual authentication mechanisms
9091
to use a specific provider. Again, unless a provider is specified explicitly,

testing/insulating_clients.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,11 @@ clean PHP process, thus avoiding any side-effects.
4343

4444
As an insulated client is slower, you can keep one client in the main
4545
process, and insulate the other ones.
46+
47+
.. caution::
48+
49+
Insulating tests requires some serializing and unserializing operations. If
50+
your test includes data that can't be serialized, such as file streams when
51+
using the ``UploadedFile`` class, you'll see an exception about
52+
*"serialization is not allowed"*. This is a technical limitation of PHP, so
53+
the only solution is to disable insulation for those tests.

0 commit comments

Comments
 (0)
0