Skip to content

Commit f44e21d

Browse files
committed
minor #21531 fix(documentation): reorder service id on target attribute (LaurentQ56)
This PR was merged into the 6.4 branch. Discussion ---------- fix(documentation): reorder service id on target attribute When I use the name of named configuration with suffix `.lock.factory`, the service was not found. After a `debug:container LockFatory`, I see the service ID is `lock.xxx.factory`. `xxx` being the named configured lock wanted. My version is 6.4, but I haven't checked whether this error is still present in the current version. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `7.x` for features of unreleased versions). --> Commits ------- 3df64f7 fix(documentation): reorder service id on target attribute
2 parents 269e97c + 3df64f7 commit f44e21d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lock.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ For example, to inject the ``invoice`` package defined earlier::
308308

309309
When :ref:`dealing with multiple implementations of the same type <autowiring-multiple-implementations-same-type>`
310310
the ``#[Target]`` attribute helps you select which one to inject. Symfony creates
311-
a target called "asset package name" + ``.lock.factory`` suffix.
311+
a target called ``lock.`` + "asset package name" + ``.factory``.
312312

313313
For example, to select the ``invoice`` lock defined earlier::
314314

@@ -318,7 +318,7 @@ For example, to select the ``invoice`` lock defined earlier::
318318
class SomeService
319319
{
320320
public function __construct(
321-
#[Target('invoice.lock.factory')] private LockFactory $lockFactory
321+
#[Target('lock.invoice.factory')] private LockFactory $lockFactory
322322
): void {
323323
// ...
324324
}

0 commit comments

Comments
 (0)