Skip to content

Commit fe997e4

Browse files
committed
Enable php_unit_attributes
1 parent fd9cb65 commit fe997e4

File tree

324 files changed

+724
-1549
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

324 files changed

+724
-1549
lines changed

.php-cs-fixer.dist.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343

4444
$overrides = [
4545
// for updating to coding-standard
46-
'modernize_strpos' => true,
46+
'modernize_strpos' => true,
47+
'php_unit_attributes' => true,
4748
];
4849

4950
$options = [

.php-cs-fixer.no-header.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131

3232
$overrides = [
3333
// for updating to coding-standard
34-
'modernize_strpos' => true,
34+
'modernize_strpos' => true,
35+
'php_unit_attributes' => true,
3536
];
3637

3738
$options = [

.php-cs-fixer.tests.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
$overrides = [
3737
'void_return' => true,
3838
// for updating to coding-standard
39-
'modernize_strpos' => true,
39+
'modernize_strpos' => true,
40+
'php_unit_attributes' => true,
4041
];
4142

4243
$options = [

.php-cs-fixer.user-guide.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
'leading_backslash_in_global_namespace' => true,
4141
],
4242
// for updating to coding-standard
43-
'modernize_strpos' => true,
43+
'modernize_strpos' => true,
44+
'php_unit_attributes' => true,
4445
];
4546

4647
$options = [

tests/system/API/ResponseTraitTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@
2828

2929
/**
3030
* @internal
31-
*
32-
* @group Others
3331
*/
32+
#[\PHPUnit\Framework\Attributes\Group('Others')]
3433
final class ResponseTraitTest extends CIUnitTestCase
3534
{
3635
private ?MockIncomingRequest $request = null;

tests/system/AutoReview/ComposerJsonTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@
1919

2020
/**
2121
* @internal
22-
*
23-
* @coversNothing
24-
*
25-
* @group AutoReview
2622
*/
23+
#[\PHPUnit\Framework\Attributes\CoversNothing]
24+
#[\PHPUnit\Framework\Attributes\Group('AutoReview')]
2725
final class ComposerJsonTest extends TestCase
2826
{
2927
private array $devComposer;

tests/system/AutoReview/FrameworkCodeTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222

2323
/**
2424
* @internal
25-
*
26-
* @group AutoReview
2725
*/
26+
#[\PHPUnit\Framework\Attributes\Group('AutoReview')]
2827
final class FrameworkCodeTest extends TestCase
2928
{
3029
/**
@@ -41,10 +40,9 @@ final class FrameworkCodeTest extends TestCase
4140
];
4241

4342
/**
44-
* @dataProvider provideEachTestClassHasCorrectGroupAnnotation
45-
*
4643
* @param class-string $class
4744
*/
45+
#[\PHPUnit\Framework\Attributes\DataProvider('provideEachTestClassHasCorrectGroupAnnotation')]
4846
public function testEachTestClassHasCorrectGroupAnnotation(string $class): void
4947
{
5048
$reflection = new ReflectionClass($class);

tests/system/Autoloader/AutoloaderTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@
2727

2828
/**
2929
* @internal
30-
*
31-
* @group Others
3230
*/
31+
#[\PHPUnit\Framework\Attributes\Group('Others')]
3332
final class AutoloaderTest extends CIUnitTestCase
3433
{
3534
use ReflectionHelper;
@@ -390,10 +389,8 @@ public function testAutoloaderLoadsNonClassFiles(): void
390389
$loader->unregister();
391390
}
392391

393-
/**
394-
* @runInSeparateProcess
395-
* @preserveGlobalState disabled
396-
*/
392+
#[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
393+
#[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
397394
public function testLoadHelpers(): void
398395
{
399396
// Workaround for errors on PHPUnit 10 and PHP 8.3.

tests/system/Autoloader/FileLocatorCachedTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919

2020
/**
2121
* @internal
22-
*
23-
* @group Others
2422
*/
23+
#[\PHPUnit\Framework\Attributes\Group('Others')]
2524
final class FileLocatorCachedTest extends FileLocatorTest
2625
{
2726
private FileVarExportHandler $handler;

tests/system/Autoloader/FileLocatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
/**
2222
* @internal
2323
*
24-
* @group Others
2524
* @no-final
2625
*/
26+
#[\PHPUnit\Framework\Attributes\Group('Others')]
2727
class FileLocatorTest extends CIUnitTestCase
2828
{
2929
protected FileLocatorInterface $locator;

0 commit comments

Comments
 (0)