Skip to content

Commit 28a70b1

Browse files
committed
clean up legacy groups in tests
In the past, we needed the legacy group with PHPUnit < 10 to indicate that a test was expected to trigger deprecations. With our update to PHPUnit 12 this is no longer necessary. We now use the group only to skip these tests when running high deps tests with different major versions. The tests from which the legacy group is dropped do not handle deprecated Symfony features but deal with features that users can use to trigger deprecations leveraging our components. They don't have to be skipped in cross-version test runs.
1 parent 797ed21 commit 28a70b1

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Routing\Tests\Generator\Dumper;
1313

14-
use PHPUnit\Framework\Attributes\Group;
1514
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
1615
use PHPUnit\Framework\TestCase;
1716
use Symfony\Component\Routing\Exception\RouteCircularReferenceException;
@@ -338,7 +337,6 @@ public function testIndirectCircularReferenceShouldThrowAnException()
338337
}
339338

340339
#[IgnoreDeprecations]
341-
#[Group('legacy')]
342340
public function testDeprecatedAlias()
343341
{
344342
$this->expectUserDeprecationMessage('Since foo/bar 1.0.0: The "b" route alias is deprecated. You should stop using it, as it will be removed in the future.');
@@ -355,7 +353,6 @@ public function testDeprecatedAlias()
355353
}
356354

357355
#[IgnoreDeprecations]
358-
#[Group('legacy')]
359356
public function testDeprecatedAliasWithCustomMessage()
360357
{
361358
$this->expectUserDeprecationMessage('Since foo/bar 1.0.0: foo b.');
@@ -372,7 +369,6 @@ public function testDeprecatedAliasWithCustomMessage()
372369
}
373370

374371
#[IgnoreDeprecations]
375-
#[Group('legacy')]
376372
public function testTargettingADeprecatedAliasShouldTriggerDeprecation()
377373
{
378374
$this->expectUserDeprecationMessage('Since foo/bar 1.0.0: foo b.');

Tests/Generator/UrlGeneratorTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,6 @@ public function testAliasWhichTargetRouteDoesntExist()
803803
}
804804

805805
#[IgnoreDeprecations]
806-
#[Group('legacy')]
807806
public function testDeprecatedAlias()
808807
{
809808
$this->expectUserDeprecationMessage('Since foo/bar 1.0.0: The "b" route alias is deprecated. You should stop using it, as it will be removed in the future.');
@@ -817,7 +816,6 @@ public function testDeprecatedAlias()
817816
}
818817

819818
#[IgnoreDeprecations]
820-
#[Group('legacy')]
821819
public function testDeprecatedAliasWithCustomMessage()
822820
{
823821
$this->expectUserDeprecationMessage('Since foo/bar 1.0.0: foo b.');
@@ -831,7 +829,6 @@ public function testDeprecatedAliasWithCustomMessage()
831829
}
832830

833831
#[IgnoreDeprecations]
834-
#[Group('legacy')]
835832
public function testTargettingADeprecatedAliasShouldTriggerDeprecation()
836833
{
837834
$this->expectUserDeprecationMessage('Since foo/bar 1.0.0: foo b.');

0 commit comments

Comments
 (0)