Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf44e21d

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 attributeWhen 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 containsthe bug (seehttps://symfony.com/releases for the list of maintained branches).If your pull request documents a NEW FEATURE, use the same Symfony branch wherethe feature was introduced (and `7.x` for features of unreleased versions).-->Commits-------3df64f7 fix(documentation): reorder service id on target attribute
2 parents269e97c +3df64f7 commitf44e21d

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)

[8]ページ先頭

©2009-2025 Movatter.jp