@@ -299,35 +299,35 @@ the ``decoration_priority`` option. Its value is an integer that defaults to
299
299
300
300
.. configuration-block ::
301
301
302
- .. code-block :: php-attributes
302
+ .. code-block :: php-attributes
303
303
304
- // ...
305
- use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
306
- use Symfony\Component\DependencyInjection\Attribute\AutowireDecorated;
304
+ // ...
305
+ use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
306
+ use Symfony\Component\DependencyInjection\Attribute\AutowireDecorated;
307
307
308
- #[AsDecorator(decorates: Foo::class, priority: 5)]
309
- class Bar
310
- {
311
- public function __construct(
312
- #[AutowireDecorated]
313
- private $inner,
314
- ) {
315
- }
316
- // ...
308
+ #[AsDecorator(decorates: Foo::class, priority: 5)]
309
+ class Bar
310
+ {
311
+ public function __construct(
312
+ #[AutowireDecorated]
313
+ private $inner,
314
+ ) {
317
315
}
316
+ // ...
317
+ }
318
318
319
- #[AsDecorator(decorates: Foo::class, priority: 1)]
320
- class Baz
321
- {
322
- public function __construct(
323
- #[AutowireDecorated]
324
- private $inner,
325
- ) {
326
- }
327
-
328
- // ...
319
+ #[AsDecorator(decorates: Foo::class, priority: 1)]
320
+ class Baz
321
+ {
322
+ public function __construct(
323
+ #[AutowireDecorated]
324
+ private $inner,
325
+ ) {
329
326
}
330
327
328
+ // ...
329
+ }
330
+
331
331
.. code-block :: yaml
332
332
333
333
# config/services.yaml
@@ -619,24 +619,24 @@ Three different behaviors are available:
619
619
620
620
.. configuration-block ::
621
621
622
- .. code-block :: php-attributes
623
-
624
- // ...
625
- use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
626
- use Symfony\Component\DependencyInjection\Attribute\AutowireDecorated;
627
- use Symfony\Component\DependencyInjection\ContainerInterface;
622
+ .. code-block :: php-attributes
628
623
629
- #[AsDecorator(decorates: Mailer::class, onInvalid: ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]
630
- class Bar
631
- {
632
- public function __construct(
633
- #[AutowireDecorated] private $inner,
634
- ) {
635
- }
624
+ // ...
625
+ use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
626
+ use Symfony\Component\DependencyInjection\Attribute\AutowireDecorated;
627
+ use Symfony\Component\DependencyInjection\ContainerInterface;
636
628
637
- // ...
629
+ #[AsDecorator(decorates: Mailer::class, onInvalid: ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]
630
+ class Bar
631
+ {
632
+ public function __construct(
633
+ #[AutowireDecorated] private $inner,
634
+ ) {
638
635
}
639
636
637
+ // ...
638
+ }
639
+
640
640
.. code-block :: yaml
641
641
642
642
# config/services.yaml
0 commit comments