Skip to content

[Routing] Better use of composer require #14400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ once in your application to enable them:

.. code-block:: terminal

$ composer require annotations
$ composer require doctrine/annotations

.. versionadded:: 5.2

Expand Down Expand Up @@ -1063,12 +1063,11 @@ integer acting as the user ID) into another value (e.g. the object that
represents the user). This feature is called "param converter" and is only
available when using annotations to define routes.

In case you didn't run this command before, run it now to add support for
annotations and "param converters":
To add support for "param converters" we need SensioFrameworkExtraBundle:

.. code-block:: terminal

$ composer require annotations
$ composer require sensio/framework-extra-bundle

Now, keep the previous route configuration, but change the arguments of the
controller action. Instead of ``string $slug``, add ``BlogPost $post``::
Expand Down