Skip to content

Commit 16c3b97

Browse files
Merge pull request #3 from php-static-analysis/codex/update-php-static-analysis-dependencies-to-0.5.0
feat: store attribute parameters
2 parents 33010d3 + cb5ac36 commit 16c3b97

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
"prefer-stable": true,
2828
"require": {
2929
"php": ">=8.1",
30-
"php-static-analysis/attributes": "^0.4.1 || dev-main",
31-
"php-static-analysis/node-visitor": "^0.4.1 || dev-main",
30+
"php-static-analysis/attributes": "^0.5.0 || dev-main",
31+
"php-static-analysis/node-visitor": "^0.5.0 || dev-main",
3232
"rector/rector": "^2.0"
3333
},
3434
"require-dev": {
3535
"composer/composer": "^2.8",
36-
"php-static-analysis/phpstan-extension": "^0.4.1 || dev-main",
37-
"php-static-analysis/psalm-plugin": "^0.4.1 || dev-main",
36+
"php-static-analysis/phpstan-extension": "^0.5.0 || dev-main",
37+
"php-static-analysis/psalm-plugin": "^0.5.0 || dev-main",
3838
"phpstan/extension-installer": "^1.3",
3939
"phpstan/phpstan": "^2.0",
4040
"phpunit/phpunit": "^9.0",

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
errorLevel="1"
88
findUnusedBaselineEntry="true"
99
findUnusedCode="false"
10+
ensureOverrideAttribute="false"
1011
>
1112
<projectFiles>
1213
<directory name="src" />

src/AnnotationsToAttributesRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
6969
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
7070

71-
/** @psalm-suppress PropertyNotSetInConstructor */
7271
final class AnnotationsToAttributesRector extends AbstractRector implements ConfigurableRectorInterface, MinPhpVersionInterface
7372
{
7473
#[Type('AnnotationToAttribute[]')]

src/AttributesToAnnotationsRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
2424
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
2525

26-
/** @psalm-suppress PropertyNotSetInConstructor */
2726
final class AttributesToAnnotationsRector extends AbstractRector implements RectorInterface, MinPhpVersionInterface
2827
{
2928
private AttributeNodeVisitor $nodeVisitor;

src/Composer/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Composer\Script\Event;
1010
use PhpStaticAnalysis\Attributes\Returns;
1111

12-
class Plugin implements PluginInterface, EventSubscriberInterface
12+
final class Plugin implements PluginInterface, EventSubscriberInterface
1313
{
1414
public function activate(Composer $composer, IOInterface $io)
1515
{

tests/AttributesToAnnotationsToAttributesRectorTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ final class AttributesToAnnotationsToAttributesRectorTest extends AbstractRector
1414
*/
1515
public function test(string $filePath): void
1616
{
17+
$fileName = basename($filePath);
18+
$this->expectOutputString(
19+
<<<TXT
20+
21+
WARNING: On fixture file "$fileName" for test "test\PhpStaticAnalysis\RectorRule\AttributesToAnnotationsToAttributesRectorTest"
22+
File not changed but some Rector rules applied:
23+
* PhpStaticAnalysis\RectorRule\AnnotationsToAttributesRector
24+
* PhpStaticAnalysis\RectorRule\AttributesToAnnotationsRector
25+
26+
TXT
27+
);
1728
$this->doTestFile($filePath);
1829
}
1930

0 commit comments

Comments
 (0)