Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ parameters:
count: 1
path: src/Console/DowngradeCommand.php

-
message: '#^Access to property \$text of internal class Symfony\\Polyfill\\Php80\\PhpToken from outside its root namespace Symfony\.$#'
identifier: property.internalClass
count: 2
path: src/Php/FollowedByCommaAnalyser.php

-
message: '#^Call to method getTokenCode\(\) of internal class PhpParser\\Internal\\TokenStream from outside its root namespace PhpParser\.$#'
identifier: method.internalClass
Expand Down
1 change: 1 addition & 0 deletions src/Visitor/DowngradePhpunitAttributesVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function enterNode(Node $node)
'PHPUnit\Framework\Attributes\DataProvider' => '@dataProvider',
'PHPUnit\Framework\Attributes\RequiresPhp' => '@requires',
'PHPUnit\Framework\Attributes\CoversNothing' => '@coversNothing',
'PHPUnit\Framework\Attributes\RunInSeparateProcess' => '@runInSeparateProcess',
];

foreach ($attrGroups as $i => $attrGroup) {
Expand Down
23 changes: 23 additions & 0 deletions tests/Visitor/DowngradePhpunitAttributesVisitorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,29 @@ class Foo
{
}
PHP
,
];

yield [
<<<'PHP'
<?php

#[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
class Foo
{
}
PHP
,
<<<'PHP'
<?php

/**
* @runInSeparateProcess
*/
class Foo
{
}
PHP
,
];
}
Expand Down
Loading