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

Appearance settings

Commit e3bca72

Browse filesBrowse files
apply suggestions from Nicolas
1 parent 85b4f9e commit e3bca72
Copy full SHA for e3bca72

File tree

3 files changed

+1
-11
lines changed
Filter options

3 files changed

+1
-11
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php
+1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
-9Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php
-2Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.