diff --git a/lock.rst b/lock.rst index 03584fbfaa9..f5835bf9a71 100644 --- a/lock.rst +++ b/lock.rst @@ -308,7 +308,7 @@ For example, to inject the ``invoice`` package defined earlier:: When :ref:`dealing with multiple implementations of the same type ` the ``#[Target]`` attribute helps you select which one to inject. Symfony creates -a target called "asset package name" + ``.lock.factory`` suffix. +a target called ``lock.`` + "asset package name" + ``.factory``. For example, to select the ``invoice`` lock defined earlier:: @@ -318,7 +318,7 @@ For example, to select the ``invoice`` lock defined earlier:: class SomeService { public function __construct( - #[Target('invoice.lock.factory')] private LockFactory $lockFactory + #[Target('lock.invoice.factory')] private LockFactory $lockFactory ): void { // ... }