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 @@ -2371,6 +2371,14 @@ use the ``generateUrl()`` helper::
2371
2371
// the 'blog' route only defines the 'page' parameter; the generated URL is:
2372
2372
// /blog/2?category=Symfony
2373
2373
2374
+ .. caution ::
2375
+
2376
+ While objects are converted to string when used as placeholders, they are not
2377
+ converted when used as extra parameters. So, if you're passing an object (e.g. an Uuid)
2378
+ as value of an extra parameter, you need to explictly convert it to a string::
2379
+
2380
+ $this->generateUrl('blog', ['uuid' => (string) $entity->getUuid()]);
2381
+
2374
2382
If your controller does not extend from ``AbstractController ``, you'll need to
2375
2383
:ref: `fetch services in your controller <controller-accessing-services >` and
2376
2384
follow the instructions of the next section.
You can’t perform that action at this time.
0 commit comments