Skip to content

Commit 4997962

Browse files
authored
Bump PHPStan to 2.1.38 (#7879)
* bump PHPStan to 2.1.38 * bump process to 7.4
1 parent a134f6a commit 4997962

File tree

14 files changed

+21
-21
lines changed

14 files changed

+21
-21
lines changed

build/target-repository/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
],
1010
"require": {
1111
"php": "^7.4|^8.0",
12-
"phpstan/phpstan": "^2.1.37"
12+
"phpstan/phpstan": "^2.1.38"
1313
},
1414
"autoload": {
1515
"files": [

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"nikic/php-parser": "^5.7",
2424
"ondram/ci-detector": "^4.2",
2525
"phpstan/phpdoc-parser": "^2.3",
26-
"phpstan/phpstan": "^2.1.37",
26+
"phpstan/phpstan": "^2.1.38",
2727
"react/event-loop": "^1.6",
2828
"react/promise": "^3.3",
2929
"react/socket": "^1.17",
@@ -36,7 +36,7 @@
3636
"symfony/console": "^6.4.24",
3737
"symfony/filesystem": "^7.0",
3838
"symfony/finder": "^6.4",
39-
"symfony/process": "^6.4|7.0.*",
39+
"symfony/process": "^6.4|^7.4",
4040
"symplify/easy-parallel": "^11.2.2",
4141
"symplify/rule-doc-generator-contracts": "^11.2",
4242
"webmozart/assert": "^2.1"

rules-tests/TypeDeclaration/Rector/FunctionLike/AddClosureParamTypeForArrayMapRector/config/configured_rule.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
use Rector\TypeDeclaration\Rector\FunctionLike\AddClosureParamTypeForArrayMapRector;
77
use Rector\ValueObject\PhpVersionFeature;
88

9-
return static function (RectorConfig $rectorConfig): void {
10-
$rectorConfig
11-
->rules([AddClosureParamTypeForArrayMapRector::class]);
12-
13-
$rectorConfig->phpVersion(PhpVersionFeature::UNION_TYPES);
14-
};
9+
return RectorConfig::configure()
10+
->withRules([AddClosureParamTypeForArrayMapRector::class])
11+
->withPhpVersion(PhpVersionFeature::UNION_TYPES);

rules/Carbon/NodeFactory/CarbonCallFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public function createFromDateTimeString(
3737
$methodCall = $this->createModifyMethodCall(
3838
$carbonCall,
3939
new Int_((int) $match['count']),
40-
$match['unit'],
41-
$match['operator']
40+
(string) $match['unit'],
41+
(string) $match['operator']
4242
);
4343
if ($methodCall instanceof MethodCall) {
4444
$carbonCall = $methodCall;

rules/CodingStyle/Rector/Catch_/CatchExceptionNameMatchingTypeRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private function resolveNewVariableName(string $typeShortName): string
170170
lcfirst($typeShortName),
171171
self::STARTS_WITH_ABBREVIATION_REGEX,
172172
static function (array $matches): string {
173-
$output = isset($matches[1]) ? strtolower((string) $matches[1]) : '';
173+
$output = isset($matches[1]) ? strtolower($matches[1]) : '';
174174
$output .= $matches[2] ?? '';
175175

176176
return $output . ($matches[3] ?? '');

rules/Naming/ExpectedNameResolver/InflectorSingularResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private function singularizeCamelParts(string $currentName): string
9393
if (in_array($camelCase[self::CAMELCASE], ['is', 'has', 'cms', 'this'], true)) {
9494
$value = $camelCase[self::CAMELCASE];
9595
} else {
96-
$value = $this->inflector->singularize($camelCase[self::CAMELCASE]);
96+
$value = $this->inflector->singularize((string) $camelCase[self::CAMELCASE]);
9797
}
9898

9999
$resolvedName .= $value;

rules/Naming/RectorNamingInflector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function singularize(string $name): string
2626
return $this->inflector->singularize($name);
2727
}
2828

29-
$singularized = $this->inflector->singularize($matches['prefix']);
29+
$singularized = $this->inflector->singularize((string) $matches['prefix']);
3030
$uninflectable = $matches['suffix'];
3131

3232
return $singularized . $uninflectable;

rules/Php55/RegexMatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private function matchConcat(Concat $concat): ?Concat
9696
return null;
9797
}
9898

99-
if (! \str_contains((string) $matches['modifiers'], 'e')) {
99+
if (! \str_contains($matches['modifiers'], 'e')) {
100100
return null;
101101
}
102102

scripts/check-before-after-same-fixtures.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private function hasFileSameBeforeAndAfterPart(SplFileInfo $fixtureFile): bool
5959
return false;
6060
}
6161

62-
return trim((string) $parts[0]) === trim((string) $parts[1]);
62+
return trim($parts[0]) === trim($parts[1]);
6363
}
6464
}
6565

src/BetterPhpDocParser/PhpDocParser/BetterPhpDocParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function parseTagValue(TokenIterator $tokenIterator, string $tag): PhpDoc
133133
$phpDocTagValueNode->value = Strings::replace(
134134
$phpDocTagValueNode->value,
135135
self::MULTI_NEW_LINES_REGEX,
136-
static fn (array $match) => $match['new_line']
136+
static fn (array $match): string => (string) $match['new_line']
137137
);
138138
}
139139

0 commit comments

Comments
 (0)