Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit40ce796

Browse files
committed
Merge branch '2.8' into 3.2
* 2.8: (37 commits) [#8192] use path() in PHP templates Reworded the article about form login redirects Explained the edge-case where the use_referer option doesn't work [#7572] fix wording [#7585] remove trailing whitespaces [#7585] minor rewording Fixed a typo Fixed a typo Update parent_services for tip consistency [#7685] use the method role Minor change Updating doc to specify priority of default normalizer [#7767] remove trailing space [#7767] replace "options" with "entry_options" [#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 ...
2 parents7bd58ae +cff2ee2 commit40ce796

File tree

17 files changed

+244
-120
lines changed

17 files changed

+244
-120
lines changed

‎components/http_foundation.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ exist::
153153
// returns 'baz'
154154

155155
When PHP imports the request query, it handles request parameters like
156-
``foo[bar]=bar`` in a special way as it creates an array. So you can get the
156+
``foo[bar]=baz`` in a special way as it creates an array. So you can get the
157157
``foo`` parameter and you will get back an array with a ``bar`` element::
158158

159159
// the query string is '?foo[bar]=baz'

‎components/validator.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ characters long::
4646
}
4747
}
4848

49+
The validator returns the list of violations.
50+
4951
Retrieving a Validator Instance
5052
-------------------------------
5153

‎controller/service.rst‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,19 @@ These are the main **advantages** of defining controllers as services:
2323
service container configuration. This is useful when developing reusable bundles;
2424
* Your controllers are more "sandboxed". By looking at the constructor arguments,
2525
it's easy to see what types of things this controller may or may not do;
26+
* If you're not passing some required dependencies or if you are injecting some
27+
non-existent services, you'll get errors during the container compilation
28+
instead of during runtime execution;
2629
* Since dependencies must be injected manually, it's more obvious when your
2730
controller is becoming too big (i.e. if you have many constructor arguments).
2831

2932
These are the main **drawbacks** of defining controllers as services:
3033

31-
* It takes more work to create the controllers because they don't have
32-
automatic access to the services or to the base controller shortcuts;
34+
* It takes more work to create the controllers and they become more verbose
35+
because they don't have automatic access to the services and the base
36+
controller shortcuts;
3337
* The constructor of the controllers can rapidly become too complex because you
34-
must inject every single dependency needed by them;
35-
* The code of the controllers is more verbose because you can't use the shortcuts
36-
of the base controller and you must replace them with some lines of code.
38+
must inject every single dependency needed by them.
3739

3840
The recommendation from the:doc:`best practices</best_practices/controllers>`
3941
is also valid for controllers defined as services: avoid putting your business

‎forms.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -562,10 +562,10 @@ the correct values of a number of field options.
562562
field ``nullable``). This is very useful, as your client-side validation will
563563
automatically match your validation rules.
564564

565-
``max_length``
566-
If the field is some sort of text field, then the ``max_length`` optioncan be
567-
guessed from the validation constraints (if ``Length`` or ``Range`` is used) or
568-
from the Doctrine metadata (via the field's length).
565+
``maxlength``
566+
If the field is some sort of text field, then the ``maxlength`` optionattribute
567+
can beguessed from the validation constraints (if ``Length`` or ``Range`` is used)
568+
orfrom the Doctrine metadata (via the field's length).
569569

570570
..caution::
571571

‎page_creation.rst‎

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

71-
http://localhost:8000/app_dev.php/lucky/number
72-
73-
..tip::
74-
75-
If you're using the built-in PHP web-server, you can omit the ``app_dev.php``
76-
part of the URL.
71+
http://localhost:8000/lucky/number
7772

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

‎reference/configuration/security.rst‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,14 @@ use_referer
414414
**type**: ``boolean`` **default**: ``false``
415415

416416
If ``true``, the user is redirected to the value stored in the ``HTTP_REFERER``
417-
header when no previous URL was stored in the session.
417+
header when no previous URL was stored in the session. If the referrer URL is
418+
the same as the one generated with the ``login_path`` route, the user is
419+
redirected to the ``default_target_path`` to avoid a redirection loop.
420+
421+
..note::
422+
423+
For historical reasons, and to match the misspelling of the HTTP standard,
424+
the option is called ``use_referer`` instead of ``use_referrer``.
418425

419426
.. _reference-security-pbkdf2:
420427

‎reference/dic_tags.rst‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,10 @@ and :class:`Symfony\\Component\\Serializer\\Normalizer\\DenormalizerInterface`.
10031003

10041004
For more details, see:doc:`/serializer`.
10051005

1006+
The priorities of the default normalizers can be found in the
1007+
:method:`Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\FrameworkExtension::registerSerializerConfiguration`
1008+
method.
1009+
10061010
swiftmailer.default.plugin
10071011
--------------------------
10081012

‎reference/forms/types/collection.rst‎

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

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

‎reference/forms/types/date.rst‎

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

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

106107
..code-block::html
107108

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

‎reference/forms/types/form.rst‎

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

7272
..include::/reference/forms/types/options/data_class.rst.inc
7373

74+
.. _reference-form-option-empty-data:
75+
7476
..include::/reference/forms/types/options/empty_data.rst.inc
7577
:end-before: DEFAULT_PLACEHOLDER
7678

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp