8000 apply suggestions from Nicolas · symfony/symfony@bcc0e19 · GitHub
[go: up one dir, main page]

Skip to content

Commit bcc0e19

Browse files
apply suggestions from Nicolas
1 parent a8f194f commit bcc0e19

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed
6969
if (false === stripos($doc, '@inheritdoc') || !preg_match('#(?:^/\*\*|\n\s*+\*)\s*+(?:\{@inheritdoc\}|@inheritdoc)(?:\s|\*/$)#i', $doc)) {
7070
break;
7171
}
72+
trigger_deprecation('symfony/dependency-injection', '6.3', 'The "@required" annotation on methods is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
7273
}
7374
try {
7475
$r = $r->getPrototype();

src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -947,13 +947,9 @@ public function testWithFactory()
947947

948948
/**
949949
* @dataProvider provideNotWireableCalls
950-
*
951-
* @group legacy
952950
*/
953951
public function testNotWireableCalls($method, $expectedMsg)
954952
{
955-
$this->expectDeprecation('Since symfony/dependency-injection 6.3: The "@required" annotation on methods is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
956-
957953
$container = new ContainerBuilder();
958954

959955
$foo = $container->register('foo', NotWireable::class)->setAutowired(true)
@@ -986,13 +982,8 @@ public function provideNotWireableCalls()
986982
];
987983
}
988984

989-
/**
990-
* @group legacy
991-
*/
992985
public function testSuggestRegisteredServicesWithSimilarCase()
993986
{
994-
$this->expectDeprecation('Since symfony/dependency-injection 6.3: The "@required" annotation on methods is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
995-
996987
$container = new ContainerBuilder();
997988

998989
$container->register(LesTilleuls::class, LesTilleuls::class);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,6 @@ public function setOptionalArgNoAutowireable($other = 'default_val')
446446
{
447447
}
448448

449-
// @deprecated since Symfony 6.3, to be removed in 7.0
450-
/** @required */
451449
protected function setProtectedMethod(A $a)
452450
{
453451
}

0 commit comments

Comments
 (0)
0