File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -425,6 +425,20 @@ but you can set it yourself to change its ``priority`` or ``name`` attributes.
425
425
;
426
426
};
427
427
428
+ .. code-block :: php-attributes
429
+
430
+ // src/ValueResolver/BookingIdValueResolver.php
431
+ namespace App\ValueResolver;
432
+
433
+ use Symfony\Component\DependencyInjection\Attribute\AsTaggedItem;
434
+ use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
435
+
436
+ #[AsTaggedItem(name: 'booking_id', priority: 150)]
437
+ class BookingIdValueResolver implements ValueResolverInterface
438
+ {
439
+ // ...
440
+ }
441
+
428
442
While adding a priority is optional, it's recommended to add one to make sure
429
443
the expected value is injected. The built-in ``RequestAttributeValueResolver ``,
430
444
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