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

Commitec1f003

Browse files
committed
[DependencyInjection] Rename#[InnerService] to `#[Decorated]
1 parent84d35a2 commitec1f003

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

‎src/Symfony/Component/DependencyInjection/Attribute/InnerService.php‎renamed to ‎src/Symfony/Component/DependencyInjection/Attribute/Decorated.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
namespaceSymfony\Component\DependencyInjection\Attribute;
1313

1414
#[\Attribute(\Attribute::TARGET_PARAMETER)]
15-
classInnerService
15+
classDecorated
1616
{
1717
}

‎src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
useSymfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
1616
useSymfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
1717
useSymfony\Component\DependencyInjection\Attribute\Autowire;
18-
useSymfony\Component\DependencyInjection\Attribute\InnerService;
18+
useSymfony\Component\DependencyInjection\Attribute\Decorated;
1919
useSymfony\Component\DependencyInjection\Attribute\TaggedIterator;
2020
useSymfony\Component\DependencyInjection\Attribute\TaggedLocator;
2121
useSymfony\Component\DependencyInjection\Attribute\Target;
@@ -273,7 +273,7 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
273273
break;
274274
}
275275

276-
if (InnerService::class ===$attribute->getName()) {
276+
if (Decorated::class ===$attribute->getName()) {
277277
$arguments[$index] =newReference($this->currentId.'.inner', ContainerInterface::NULL_ON_INVALID_REFERENCE);
278278

279279
break;

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes_80.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
useSymfony\Component\DependencyInjection\Attribute\AsDecorator;
66
useSymfony\Component\DependencyInjection\Attribute\Autowire;
7-
useSymfony\Component\DependencyInjection\Attribute\InnerService;
7+
useSymfony\Component\DependencyInjection\Attribute\Decorated;
88
useSymfony\Component\DependencyInjection\ContainerInterface;
99
useSymfony\Contracts\Service\Attribute\Required;
1010

@@ -65,23 +65,23 @@ class AsDecoratorFoo implements AsDecoratorInterface
6565
#[AsDecorator(decorates: AsDecoratorFoo::class, priority:10)]
6666
class AsDecoratorBar10implements AsDecoratorInterface
6767
{
68-
publicfunction__construct(string$arg1, #[InnerService]AsDecoratorInterface$inner)
68+
publicfunction__construct(string$arg1, #[Decorated]AsDecoratorInterface$inner)
6969
{
7070
}
7171
}
7272

7373
#[AsDecorator(decorates: AsDecoratorFoo::class, priority:20)]
7474
class AsDecoratorBar20implements AsDecoratorInterface
7575
{
76-
publicfunction__construct(string$arg1, #[InnerService]AsDecoratorInterface$inner)
76+
publicfunction__construct(string$arg1, #[Decorated]AsDecoratorInterface$inner)
7777
{
7878
}
7979
}
8080

8181
#[AsDecorator(decorates: \NonExistent::class, onInvalid: ContainerInterface::NULL_ON_INVALID_REFERENCE)]
8282
class AsDecoratorBazimplements AsDecoratorInterface
8383
{
84-
publicfunction__construct(#[InnerService]AsDecoratorInterface$inner =null)
84+
publicfunction__construct(#[Decorated]AsDecoratorInterface$inner =null)
8585
{
8686
}
8787
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp