Skip to content

Commit 394bb14

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 f5fe218 commit 394bb14

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

Tests/Command/LintCommandTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ public function testLintFileCompileTimeException()
7777
* When deprecations are not reported by the command, the testsuite reporter will catch them so we need to mark the test as ignoring deprecations.
7878
*/
7979
#[IgnoreDeprecations]
80-
#[Group('legacy')]
8180
public function testLintFileWithNotReportedDeprecation()
8281
{
8382
$tester = $this->createCommandTester();

Tests/Validator/Constraints/TwigValidatorTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bridge\Twig\Tests\Validator\Constraints;
1313

1414
use PHPUnit\Framework\Attributes\DataProvider;
15-
use PHPUnit\Framework\Attributes\Group;
1615
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
1716
use Symfony\Bridge\Twig\Validator\Constraints\Twig;
1817
use Symfony\Bridge\Twig\Validator\Constraints\TwigValidator;
@@ -68,7 +67,6 @@ public function testInvalidValues($value, $message, $line)
6867
* When deprecations are skipped by the validator, the testsuite reporter will catch them so we need to mark the test as ignoring deprecations.
6968
*/
7069
#[IgnoreDeprecations]
71-
#[Group('legacy')]
7270
public function testTwigWithSkipDeprecation()
7371
{
7472
$constraint = new Twig(skipDeprecations: true);

0 commit comments

Comments
 (0)