@@ -150,14 +150,14 @@ automatically changed to ``'.inner'``):
150
150
151
151
// ...
152
152
use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
153
- use Symfony\Component\DependencyInjection\Attribute\MapDecorated ;
153
+ use Symfony\Component\DependencyInjection\Attribute\AutowireDecorated ;
154
154
155
155
#[AsDecorator(decorates: Mailer::class)]
156
156
class DecoratingMailer
157
157
{
158
158
private $inner;
159
159
160
- public function __construct(#[MapDecorated ] $inner)
160
+ public function __construct(#[AutowireDecorated ] $inner)
161
161
{
162
162
$this->inner = $inner;
163
163
}
@@ -215,6 +215,12 @@ automatically changed to ``'.inner'``):
215
215
->args([service('.inner')]);
216
216
};
217
217
218
+ .. deprecated :: 6.3
219
+
220
+ The ``#[MapDecorated] `` attribute is deprecated since Symfony 6.3.
221
+ Instead, use the
222
+ :class: `#[AutowireDecorated] <Symfony\\ Component\\ DependencyInjection\\ Attribute\\ AutowireDecorated> ` attribute.
223
+
218
224
.. tip ::
219
225
220
226
The visibility of the decorated ``App\Mailer `` service (which is an alias
@@ -293,14 +299,14 @@ the ``decoration_priority`` option. Its value is an integer that defaults to
293
299
294
300
// ...
295
301
use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
296
- use Symfony\Component\DependencyInjection\Attribute\MapDecorated ;
302
+ use Symfony\Component\DependencyInjection\Attribute\AutowireDecorated ;
297
303
298
304
#[AsDecorator(decorates: Foo::class, priority: 5)]
299
305
class Bar
300
306
{
301
307
private $inner;
302
308
303
- public function __construct(#[MapDecorated ] $inner)
309
+ public function __construct(#[AutowireDecorated ] $inner)
304
310
{
305
311
$this->inner = $inner;
306
312
}
@@ -312,7 +318,7 @@ the ``decoration_priority`` option. Its value is an integer that defaults to
312
318
{
313
319
private $inner;
314
320
315
- public function __construct(#[MapDecorated ] $inner)
321
+ public function __construct(#[AutowireDecorated ] $inner)
316
322
{
317
323
$this->inner = $inner;
318
324
}
@@ -616,15 +622,15 @@ Three different behaviors are available:
616
622
617
623
// ...
618
624
use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
619
- use Symfony\Component\DependencyInjection\Attribute\MapDecorated ;
625
+ use Symfony\Component\DependencyInjection\Attribute\AutowireDecorated ;
620
626
use Symfony\Component\DependencyInjection\ContainerInterface;
621
627
622
628
#[AsDecorator(decorates: Mailer::class, onInvalid: ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]
623
629
class Bar
624
630
{
625
631
private $inner;
626
632
627
- public function __construct(#[MapDecorated ] $inner)
633
+ public function __construct(#[AutowireDecorated ] $inner)
628
634
{
629
635
$this->inner = $inner;
630
636
}
0 commit comments