File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -384,6 +384,20 @@ but you can set it yourself to change its ``priority`` or ``name`` attributes.
384
384
;
385
385
};
386
386
387
+ .. code-block :: php-attributes
388
+
389
+ // src/ValueResolver/IdentifierValueResolver.php
390
+ namespace App\ValueResolver;
391
+
392
+ use Symfony\Component\DependencyInjection\Attribute\AsTaggedItem;
393
+ use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
394
+
395
+ #[AsTaggedItem(name: 'booking_id', priority: 150)]
396
+ class BookingIdValueResolver implements ValueResolverInterface
397
+ {
398
+ // ...
399
+ }
400
+
387
401
While adding a priority is optional, it's recommended to add one to make sure
388
402
the expected value is injected. The built-in ``RequestAttributeValueResolver ``,
389
403
which fetches attributes from the ``Request ``, has a priority of ``100 ``. If your
You can’t perform that action at this time.
0 commit comments