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

Commitf8c9ce3

Browse files
committed
Merge branch '2.7' into 2.8
2 parents6e8d5fc +9b7fe51 commitf8c9ce3

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

‎components/options_resolver.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@ that, you can write normalizers. Normalizers are executed after validating an
427427
option. You can configure a normalizer by calling
428428
:method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::setNormalizer`::
429429

430+
use Symfony\Component\OptionsResolver\Options;
431+
430432
// ...
431433
class Mailer
432434
{
@@ -436,7 +438,7 @@ option. You can configure a normalizer by calling
436438
{
437439
// ...
438440

439-
$resolver->setNormalizer('host', function ($options, $value) {
441+
$resolver->setNormalizer('host', function (Options$options, $value) {
440442
if ('http://' !== substr($value, 0, 7)) {
441443
$value = 'http://'.$value;
442444
}
@@ -462,7 +464,7 @@ if you need to use other options during normalization::
462464
public function configureOptions(OptionsResolver $resolver)
463465
{
464466
// ...
465-
$resolver->setNormalizer('host', function ($options, $value) {
467+
$resolver->setNormalizer('host', function (Options$options, $value) {
466468
if (!in_array(substr($value, 0, 7), array('http://', 'https://'))) {
467469
if ('ssl' === $options['encryption']) {
468470
$value = 'https://'.$value;

‎components/routing/introduction.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,9 @@ your autoloader to load the Routing component::
4848

4949
..note::
5050

51-
Be careful when using ``$_SERVER['REQUEST_URI']``, as it may include
52-
any query parameters on the URL, which will cause problems with route
53-
matching. An easy way to solve this is to use the HttpFoundation component
54-
as explained:ref:`below<components-routing-http-foundation>`.
51+
The:class:`Symfony\\Component\\Routing\\RequestContext` parameters can be populated
52+
with the values stored in ``$_SERVER``, but it's easier to use the HttpFoundation
53+
component as explained:ref:`below<components-routing-http-foundation>`.
5554

5655
You can add as many routes as you like to a
5756
:class:`Symfony\\Component\\Routing\\RouteCollection`.

‎cookbook/controller/upload_file.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ in the ``Product`` entity::
4949
Note that the type of the ``brochure`` column is ``string`` instead of ``binary``
5050
or ``blob`` because it just stores the PDF file name instead of the file contents.
5151

52-
Then, add a new ``brochure`` field to the form thatmanage the ``Product`` entity::
52+
Then, add a new ``brochure`` field to the form thatmanages the ``Product`` entity::
5353

5454
// src/AppBundle/Form/ProductType.php
5555
namespace AppBundle\Form;
@@ -133,7 +133,7 @@ Finally, you need to update the code of the controller that handles the form::
133133

134134
// Update the 'brochure' property to store the PDF file name
135135
// instead of its contents
136-
$product->setBrochure($filename);
136+
$product->setBrochure($fileName);
137137

138138
// ... persist the $product variable or any other work
139139

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp