10000 Merge branch '7.0' into 7.1 · OskarStark/symfony-docs@29d94f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 29d94f5

Browse files
committed
Merge branch '7.0' into 7.1
* 7.0: Remove reference to some removed classes [String] Remove confusing paragraph about `withEmoji('strip')` [Value Resolver] Added `RequestPayloadValueResolver` section
2 parents 59afa8f + 1509f6f commit 29d94f5

File tree

7 files changed

+29
-22
lines changed

7 files changed

+29
-22
lines changed

components/intl.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,15 @@ platforms::
424424
$transliterator->transliterate('Menus with 🥗 or 🧆');
425425
// => 'Menus with :green_salad: or :falafel:'
426426

427+
Furthermore the ``EmojiTransliterator`` provides a special ``strip`` locale
428+
that removes all the emojis from a string::
429+
430+
use Symfony\Component\Intl\Transliterator\EmojiTransliterator;
431+
432+
$transliterator = EmojiTransliterator::create('strip');
433+
$transliterator->transliterate('🎉Hey!🥳 🎁Happy Birthday!🎁');
434+
// => 'Hey! Happy Birthday!'
435+
427436
.. tip::
428437

429438
Combine this emoji transliterator with the :ref:`Symfony String slugger <string-slugger-emoji>`

components/string.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -603,16 +603,6 @@ from GitHub or Slack, use the first argument of ``withEmoji()`` method::
603603
$slug = $slugger->slug('a 😺, 🐈‍⬛, and a 🦁');
604604
// $slug = 'a-smiley-cat-black-cat-and-a-lion';
605605

606-
If you want to strip emojis from slugs, use the special ``strip`` locale::
607-
608-
use Symfony\Component\String\Slugger\AsciiSlugger;
609-
610-
$slugger = new AsciiSlugger();
611-
$slugger = $slugger->withEmoji('strip');
612-
613-
$slug = $slugger->slug('a 😺, 🐈‍⬛, and a 🦁');
614-
// $slug = 'a-and-a';
615-
616606
.. _string-inflector:
617607

618608
Inflector

controller.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ attribute, arguments of your controller's action can be automatically fulfilled:
379379
// ...
380380
}
381381

382+
.. _controller-mapping-query-string:
383+
382384
Mapping The Whole Query String
383385
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
384386

@@ -440,6 +442,8 @@ HTTP status to return if the validation fails::
440442

441443
The default status code returned if the validation fails is 404.
442444

445+
.. _controller-mapping-request-payload:
446+
443447
Mapping Request Payload
444448
~~~~~~~~~~~~~~~~~~~~~~~
445449

controller/value_resolver.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ Symfony ships with the following value resolvers in the
7575
The example above allows requesting only ``/cards/D`` and ``/cards/S``
7676
URLs and leads to 404 Not Found response in two other cases.
7777

78+
:class:`Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestPayloadValueResolver`
79+
Maps the request payload or the query string into the type-hinted object.
80+
81+
Because this is a :ref:`targeted value resolver <value-resolver-targeted>`,
82+
you'll have to use either the :ref:`MapRequestPayload <controller-mapping-request-payload>`
83+
or the :ref:`MapQueryString <controller-mapping-query-string>` attribute
84+
in order to use this resolver.
85+
7886
:class:`Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver`
7987
Attempts to find a request attribute that matches the name of the argument.
8088

@@ -393,6 +401,8 @@ command to see which argument resolvers are present and in which order they run:
393401
You can also configure the name passed to the ``ValueResolver`` attribute to target
394402
your resolver. Otherwise it will default to the service's id.
395403

404+
.. _value-resolver-targeted:
405+
396406
``controller.targeted_value_resolver``
397407
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
398408

create_framework/http_kernel_httpkernel_class.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ client; that's what the ``ResponseListener`` does::
114114

< 6D40 /div>
115115
$dispatcher->addSubscriber(new HttpKernel\EventListener\ResponseListener('UTF-8'));
116116

117-
If you want out of the box support for streamed responses, subscribe
118-
to ``StreamedResponseListener``::
119-
120-
$dispatcher->addSubscriber(new HttpKernel\EventListener\StreamedResponseListener());
121-
122117
And in your controller, return a ``StreamedResponse`` instance instead of a
123118
``Response`` instance.
124119

introduction/from_flat_php_to_symfony.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ the ``templates/layout.php``:
240240
You now have a setup that will allow you to reuse the layout.
241241
Unfortunately, to accomplish this, you're forced to use a few ugly
242242
PHP functions (``ob_start()``, ``ob_get_clean()``) in the template. Symfony
243-
solves this using a `Templating`_ component. You'll see it in action shortly.
243+
solves this using `Twig`_. You'll see it in action shortly.
244244

245245
Adding a Blog "show" Page
246246
-------------------------
@@ -568,9 +568,8 @@ nice way to group related pages. The controller functions are also sometimes cal
568568

569569
The two controllers (or actions) are still lightweight. Each uses the
570570
:doc:`Doctrine ORM library </doctrine>` to retrieve objects from the
571-
database and the Templating component to render a template and return a
572-
``Response`` object. The ``list.html.twig`` template is now quite a bit simpler,
573-
and uses Twig:
571+
database and Twig to render a template and return a ``Response`` object.
572+
The ``list.html.twig`` template is now quite a bit simpler, and uses Twig:
574573

575574
.. code-block:: html+twig
576575

@@ -677,7 +676,7 @@ migrating the blog from flat PHP to Symfony has improved your life:
677676
:doc:`routing </routing>`, or rendering :doc:`controllers </controller>`;
678677

679678
* Symfony gives you **access to open source tools** such as `Doctrine`_ and the
680-
`Templating`_, :doc:`Security </security>`, :doc:`Form </components/form>`,
679+
`Twig`_, :doc:`Security </security>`, :doc:`Form </components/form>`,
681680
`Validator`_ and `Translation`_ components (to name a few);
682681

683682
* The application now enjoys **fully-flexible URLs** thanks to the Routing
@@ -694,7 +693,7 @@ A good selection of `Symfony community tools`_ can be found on GitHub.
694693

695694
.. _`Model-View-Controller`: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
696695
.. _`Doctrine`: https://www.doctrine-project.org/
697-
.. _Templating: https://github.com/symfony/templating
696+
.. _Twig: https://github.com/twigphp/twig
698697
.. _Translation: https://github.com/symfony/translation
699698
.. _`Composer`: https://getcomposer.org
700699
.. _`download Composer`: https://getcomposer.org/download/

messenger.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2397,7 +2397,7 @@ will not be rolled back.
23972397

23982398
If ``WhenUserRegisteredThenSendWelcomeEmail`` throws an exception, that
23992399
exception will be wrapped into a ``DelayedMessageHandlingException``. Using
2400-
``DelayedMessageHandlingException::getExceptions`` will give you all
2400+
``DelayedMessageHandlingException::getWrappedExceptions`` will give you all
24012401
exceptions that are thrown while handling a message with the
24022402
``DispatchAfterCurrentBusStamp``.
24032403

0 commit comments

Comments
 (0)
0