8000 Fix naming · symfony/symfony@c0c5468 · GitHub
[go: up one dir, main page]

Skip to content

Commit c0c5468

Browse files
committed
Fix naming
1 parent 4bdbe3d commit c0c5468

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

src/Symfony/Component/DependencyInjection/Attribute/AsDecorator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ class AsDecorator
1818
{
1919
public function __construct(
2020
public string $decorates,
21-
public int $decorationPriority = 0,
22-
public int $decorationOnInvalid = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
21+
public int $priority = 0,
22+
public int $onInvalid = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
2323
) {
2424
}
2525
}

src/Symfony/Component/DependencyInjection/Attribute/Inner.php renamed to src/Symfony/Component/DependencyInjection/Attribute/InnerService.php

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

1414
#[\Attribute(\Attribute::TARGET_PARAMETER)]
15-
class Inner
15+
class InnerService
1616
{
1717
}

src/Symfony/Component/DependencyInjection/Compiler/AutowireAsDecoratorPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private function processClass(Definition $definition, \ReflectionClass $reflecti
4343
foreach ($reflectionClass->getAttributes(AsDecorator::class, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) {
4444
$attribute = $attribute->newInstance();
4545

46-
$definition->setDecoratedService($attribute->decorates, null, $attribute->decorationPriority, $attribute->decorationOnInvalid);
46+
$definition->setDecoratedService($attribute->decorates, null, $attribute->priority, $attribute->onInvalid);
4747
}
4848
}
4949
}

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
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
1616
use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
1717
use Symfony\Component\DependencyInjection\Attribute\Autowire;
18-
use Symfony\Component\DependencyInjection\Attribute\Inner;
18+
use Symfony\Component\DependencyInjection\Attribute\InnerService;
1919
use Symfony\Component\DependencyInjection\Attribute\TaggedIterator;
2020
use Symfony\Component\DependencyInjection\Attribute\TaggedLocator;
2121
use Symfony\Component\DependencyInjection\Attribute\Target;
@@ -273,7 +273,7 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
273273
break;
274274
}
275275

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

279279
break;

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

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

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

@@ -62,26 +62,26 @@ class AsDecoratorFoo implements AsDecoratorInterface
6262
{
6363
}
6464

65-
#[AsDecorator(decorates: AsDecoratorFoo::class, decorationPriority: 10)]
65+
#[AsDecorator(decorates: AsDecoratorFoo::class, priority: 10)]
6666
class AsDecoratorBar10 implements AsDecoratorInterface
6767
{
68-
public function __construct(string $arg1, #[Inner] AsDecoratorInterface $inner)
68+
public function __construct(string $arg1, #[InnerService] AsDecoratorInterface $inner)
6969
{
7070
}
7171
}
7272

73-
#[AsDecorator(decorates: AsDecoratorFoo::class, decorationPriority: 20)]
73+
#[AsDecorator(decorates: AsDecoratorFoo::class, priority: 20)]
7474
class AsDecoratorBar20 implements AsDecoratorInterface
7575
{
76-
public function __construct(string $arg1, #[Inner] AsDecoratorInterface $inner)
76+
public function __construct(string $arg1, #[InnerService] AsDecoratorInterface $inner)
7777
{
7878
}
7979
}
8080

81-
#[AsDecorator(decorates: \NonExistent::class, decorationOnInvalid: ContainerInterface::NULL_ON_INVALID_REFERENCE)]
81+
#[AsDecorator(decorates: \NonExistent::class, onInvalid: ContainerInterface::NULL_ON_INVALID_REFERENCE)]
8282
class AsDecoratorBaz implements AsDecoratorInterface
8383
{
84-
public function __construct(#[Inner] AsDecoratorInterface $inner = null)
84+
public function __construct(#[InnerService] AsDecoratorInterface $inner = null)
8585
{
8686
}
8787
}

0 commit comments

Comments
 (0)
0