File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1880,6 +1880,14 @@ use the ``generateUrl()`` helper::
18801880 // the 'blog' route only defines the 'page' parameter; the generated URL is:
18811881 // /blog/2?category=Symfony
18821882
1883+ .. caution ::
1884+
1885+ While objects are converted to string when used as placeholders, they are not
1886+ converted when used as extra parameters. So, if you're passing an object (e.g. an Uuid)
1887+ as value of an extra parameter, you need to explictly convert it to a string::
1888+
1889+ $this->generateUrl('blog', ['uuid' => (string) $entity->getUuid())]
1890+
18831891If your controller does not extend from ``AbstractController ``, you'll need to
18841892:ref: `fetch services in your controller <controller-accessing-services >` and
18851893follow the instructions of the next section.
You can’t perform that action at this time.
0 commit comments