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

Appearance settings

Commit 3308a13

Browse filesBrowse files
committed
Merge branch '3.2' into 3.3
* 3.2: (38 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 Fix framework instantiation in event-dispatcher [#8104] minor rewording ...
2 parents acf161e + 40ce796 commit 3308a13
Copy full SHA for 3308a13

File tree

17 files changed

+244
-111
lines changed
Filter options

17 files changed

+244
-111
lines changed

‎components/http_foundation.rst

Copy file name to clipboardExpand all lines: components/http_foundation.rst
+1-1Lines 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

Copy file name to clipboardExpand all lines: components/validator.rst
+2Lines 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

‎create_framework/event_dispatcher.rst

Copy file name to clipboardExpand all lines: create_framework/event_dispatcher.rst
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,11 @@ the registration of a listener for the ``response`` event::
138138

139139
$response->setContent($response->getContent().'GA CODE');
140140
});
141+
142+
$controllerResolver = new ControllerResolver();
143+
$argumentResolver = new ArgumentResolver();
141144

142-
$framework = new Simplex\Framework($dispatcher, $matcher, $resolver);
145+
$framework = new Simplex\Framework($dispatcher, $matcher, $controllerResolver, $argumentResolver);
143146
$response = $framework->handle($request);
144147

145148
$response->send();

‎forms.rst

Copy file name to clipboardExpand all lines: forms.rst
+4-4Lines 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`` option can 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`` option attribute
567+
can be guessed from the validation constraints (if ``Length`` or ``Range`` is used)
568+
or from the Doctrine metadata (via the field's length).
569569

570570
.. caution::
571571

‎page_creation.rst

Copy file name to clipboardExpand all lines: page_creation.rst
+1-6Lines 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

Copy file name to clipboardExpand all lines: reference/configuration/security.rst
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,14 @@ use_referer
416416
**type**: ``boolean`` **default**: ``false``
417417

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

421428
.. _reference-security-pbkdf2:
422429

‎reference/dic_tags.rst

Copy file name to clipboardExpand all lines: reference/dic_tags.rst
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,10 @@ and :class:`Symfony\\Component\\Serializer\\Normalizer\\DenormalizerInterface`.
940940

941941
For more details, see :doc:`/serializer`.
942942

943+
The priorities of the default normalizers can be found in the
944+
:method:`Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\FrameworkExtension::registerSerializerConfiguration`
945+
method.
946+
943947
swiftmailer.default.plugin
944948
--------------------------
945949

‎reference/forms/types/collection.rst

Copy file name to clipboardExpand all lines: reference/forms/types/collection.rst
+9Lines 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 the allow_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

Copy file name to clipboardExpand all lines: reference/forms/types/date.rst
+3-1Lines 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

Copy file name to clipboardExpand all lines: reference/forms/types/form.rst
+2Lines 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

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

Copy file name to clipboardExpand all lines: reference/forms/types/options/data.rst.inc
+1-1Lines 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

Copy file name to clipboardExpand all lines: routing/scheme.rst
+4-3Lines 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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.