Skip to content

Commit 526d059

Browse files
committed
Updated Rector to commit 9a2e5e42c5d0ca3512051460bcc6bcfd8cd3432b
rectorphp/rector-src@9a2e5e4 [ci] add lock workflow to lock issues/PRs with over 150 days of inactivity, to avoid confusion of new version on old issues (#7675)
1 parent 1cec891 commit 526d059

File tree

16 files changed

+53
-37
lines changed

16 files changed

+53
-37
lines changed

.github/workflows/lock.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Lock closed issues"
2+
3+
on:
4+
schedule:
5+
- cron: "0 3 * * *" # every day at 03:00 UTC
6+
workflow_dispatch:
7+
8+
jobs:
9+
lock:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: dessant/lock-threads@v5
14+
with:
15+
github-token: ${{ secrets.GITHUB_TOKEN }}
16+
17+
issue-inactive-days: 150
18+
19+
issue-comment: >
20+
This issue has been automatically locked because it has been closed for 150 days.
21+
Please open a new issue if you have a similar problem.
22+
23+
exclude-issue-labels: "keep-open,no-lock"

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = 'e4315fd6c408c89803fcfa17300a20c80facd237';
22+
public const PACKAGE_VERSION = '9a2e5e42c5d0ca3512051460bcc6bcfd8cd3432b';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-11-27 12:53:20';
27+
public const RELEASE_DATE = '2025-11-27 13:25:57';
2828
/**
2929
* @var int
3030
*/

src/PHPStanStaticTypeMapper/TypeMapper/IntegerTypeMapper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use PhpParser\Node;
77
use PhpParser\Node\Identifier;
88
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
9-
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
109
use PHPStan\Type\IntegerType;
1110
use PHPStan\Type\Type;
1211
use Rector\Php\PhpVersionProvider;
@@ -32,7 +31,7 @@ public function getNodeClass(): string
3231
/**
3332
* @param IntegerType $type
3433
*/
35-
public function mapToPHPStanPhpDocTypeNode(Type $type): TypeNode
34+
public function mapToPHPStanPhpDocTypeNode(Type $type): IdentifierTypeNode
3635
{
3736
// note: cannot be handled by PHPStan as uses explicit values
3837
return new IdentifierTypeNode('int');

src/PHPStanStaticTypeMapper/TypeMapper/ThisTypeMapper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
declare (strict_types=1);
44
namespace Rector\PHPStanStaticTypeMapper\TypeMapper;
55

6-
use PhpParser\Node;
76
use PhpParser\Node\Name;
87
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
98
use PHPStan\Type\ThisType;
@@ -28,7 +27,7 @@ public function mapToPHPStanPhpDocTypeNode(Type $type): TypeNode
2827
/**
2928
* @param ThisType $type
3029
*/
31-
public function mapToPhpParserNode(Type $type, string $typeKind): Node
30+
public function mapToPhpParserNode(Type $type, string $typeKind): Name
3231
{
3332
return new Name('self');
3433
}

src/PHPStanStaticTypeMapper/TypeMapper/UnionTypeMapper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use PhpParser\Node\Name\FullyQualified;
1212
use PhpParser\Node\NullableType;
1313
use PhpParser\Node\UnionType as PhpParserUnionType;
14-
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
1514
use PHPStan\Type\ArrayType;
1615
use PHPStan\Type\MixedType;
1716
use PHPStan\Type\NeverType;
@@ -57,7 +56,7 @@ public function getNodeClass(): string
5756
/**
5857
* @param UnionType $type
5958
*/
60-
public function mapToPHPStanPhpDocTypeNode(Type $type): TypeNode
59+
public function mapToPHPStanPhpDocTypeNode(Type $type): BracketsAwareUnionTypeNode
6160
{
6261
$unionTypesNodes = [];
6362
$existingTypes = [];

src/PhpAttribute/AnnotationToAttributeMapper/ArrayAnnotationToAttributeMapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function isCandidate($value): bool
4242
/**
4343
* @param mixed[] $value
4444
*/
45-
public function map($value): Expr
45+
public function map($value): Array_
4646
{
4747
$arrayItems = [];
4848
foreach ($value as $key => $singleValue) {

src/PhpAttribute/AnnotationToAttributeMapper/StringAnnotationToAttributeMapper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
declare (strict_types=1);
44
namespace Rector\PhpAttribute\AnnotationToAttributeMapper;
55

6-
use PhpParser\Node\Expr;
76
use PhpParser\Node\Scalar\String_;
87
use Rector\NodeTypeResolver\Node\AttributeKey;
98
use Rector\PhpAttribute\Contract\AnnotationToAttributeMapperInterface;
@@ -22,7 +21,7 @@ public function isCandidate($value): bool
2221
/**
2322
* @param string $value
2423
*/
25-
public function map($value): Expr
24+
public function map($value): String_
2625
{
2726
if (strpos($value, "'") !== \false && strpos($value, "\n") === \false) {
2827
$kind = String_::KIND_DOUBLE_QUOTED;

src/PhpAttribute/AnnotationToAttributeMapper/StringNodeAnnotationToAttributeMapper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
declare (strict_types=1);
44
namespace Rector\PhpAttribute\AnnotationToAttributeMapper;
55

6-
use PhpParser\Node\Expr;
76
use PhpParser\Node\Scalar\String_;
87
use Rector\BetterPhpDocParser\PhpDoc\StringNode;
98
use Rector\NodeTypeResolver\Node\AttributeKey;
@@ -23,7 +22,7 @@ public function isCandidate($value): bool
2322
/**
2423
* @param StringNode $value
2524
*/
26-
public function map($value): Expr
25+
public function map($value): String_
2726
{
2827
return new String_($value->value, [AttributeKey::KIND => $value->getAttribute(AttributeKey::KIND)]);
2928
}

src/StaticTypeMapper/PhpParser/IntersectionTypeNodeMapper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use PhpParser\Node\Name;
88
use PhpParser\Node\Name\FullyQualified;
99
use PHPStan\Type\IntersectionType;
10-
use PHPStan\Type\Type;
1110
use Rector\StaticTypeMapper\Contract\PhpParser\PhpParserNodeMapperInterface;
1211
/**
1312
* @implements PhpParserNodeMapperInterface<Node\IntersectionType>
@@ -39,7 +38,7 @@ public function getNodeType(): string
3938
/**
4039
* @param Node\IntersectionType $node
4140
*/
42-
public function mapToPHPStan(Node $node): Type
41+
public function mapToPHPStan(Node $node): IntersectionType
4342
{
4443
$types = [];
4544
foreach ($node->types as $intersectionedType) {

src/StaticTypeMapper/PhpParser/StringNodeMapper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use PhpParser\Node;
77
use PhpParser\Node\Scalar\String_;
88
use PHPStan\Type\StringType;
9-
use PHPStan\Type\Type;
109
use Rector\StaticTypeMapper\Contract\PhpParser\PhpParserNodeMapperInterface;
1110
/**
1211
* @implements PhpParserNodeMapperInterface<String_>
@@ -20,7 +19,7 @@ public function getNodeType(): string
2019
/**
2120
* @param String_ $node
2221
*/
23-
public function mapToPHPStan(Node $node): Type
22+
public function mapToPHPStan(Node $node): StringType
2423
{
2524
return new StringType();
2625
}

0 commit comments

Comments
 (0)