We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f44e21d commit 7454465Copy full SHA for 7454465
service_container/service_decoration.rst
@@ -146,15 +146,17 @@ automatically changed to ``'.inner'``):
146
namespace App;
147
148
// ...
149
+ use App\Mailer;
150
use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
151
use Symfony\Component\DependencyInjection\Attribute\AutowireDecorated;
152
153
#[AsDecorator(decorates: Mailer::class)]
154
class DecoratingMailer
155
{
156
public function __construct(
- #[AutowireDecorated]
157
- private object $inner,
+ // unlike other configuration formats, that name the decorated service argument
158
+ // as `$inner` by default, when using attributes you can choose any variable name
159
+ #[AutowireDecorated] private Mailer $mailer,
160
) {
161
}
162
0 commit comments