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::
1880
1880
// the 'blog' route only defines the 'page' parameter; the generated URL is:
1881
1881
// /blog/2?category=Symfony
1882
1882
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
+
1883
1891
If your controller does not extend from ``AbstractController ``, you'll need to
1884
1892
:ref: `fetch services in your controller <controller-accessing-services >` and
1885
1893
follow the instructions of the next section.
You can’t perform that action at this time.
0 commit comments