Skip to content

Commit 222d286

Browse files
committed
bump dev dependencies, PHPUnit 13
Run composer update and vendor/bin/jack raise-to-installed, then composer fix-cs for the newer easy-coding-standard rules. PHPUnit 13 ignores a RequiresPhp version without a comparison operator, which made the PHP 8.5 only tests run everywhere.
1 parent aad70d7 commit 222d286

19 files changed

Lines changed: 37 additions & 37 deletions

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
"require-dev": {
1010
"boundwize/structarmed": "^0.14",
1111
"phpstan/extension-installer": "^1.4",
12-
"phpstan/phpstan": "^2.1.33",
12+
"phpstan/phpstan": "^2.2",
1313
"phpstan/phpstan-webmozart-assert": "^2.0",
14-
"phpunit/phpunit": "^11.5",
15-
"rector/jack": "^0.5.1",
14+
"phpunit/phpunit": "^13.2",
15+
"rector/jack": "^1.0",
1616
"rector/rector-src": "dev-main",
17-
"rector/swiss-knife": "^2.3",
18-
"symplify/easy-coding-standard": "^13.0",
17+
"rector/swiss-knife": "^2.4",
18+
"symplify/easy-coding-standard": "^13.2",
1919
"symplify/phpstan-extensions": "^12.0",
20-
"symplify/phpstan-rules": "^14.9",
20+
"symplify/phpstan-rules": "^14.12",
2121
"symplify/rule-doc-generator": "^12.2",
2222
"symplify/vendor-patches": "^11.5",
2323
"tomasvotruba/class-leak": "^2.1",
2424
"tomasvotruba/type-coverage": "^2.3",
2525
"tomasvotruba/unused-public": "^2.2",
26-
"tracy/tracy": "^2.11"
26+
"tracy/tracy": "^2.12"
2727
},
2828
"autoload": {
2929
"psr-4": {

rules-tests/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector/DowngradeVoidCastRectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
final class DowngradeVoidCastRectorTest extends AbstractRectorTestCase
1313
{
1414
#[DataProvider('provideData')]
15-
#[RequiresPhp('8.5')]
15+
#[RequiresPhp('>= 8.5.0')]
1616
public function test(string $filePath): void
1717
{
1818
$this->doTestFile($filePath);

rules-tests/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector/DowngradePipeOperatorRectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
final class DowngradePipeOperatorRectorTest extends AbstractRectorTestCase
1313
{
1414
#[DataProvider('provideData')]
15-
#[RequiresPhp('>= 8.5')]
15+
#[RequiresPhp('>= 8.5.0')]
1616
public function test(string $filePath): void
1717
{
1818
$this->doTestFile($filePath);

rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ private function removeParamTypeFromMethod(ClassMethod $classMethod, int $paramP
211211

212212
private function hasParamAlreadyNonTyped(ClassMethod $classMethod): bool
213213
{
214-
return array_all($classMethod->params, fn(Param $param): bool => !$param->type instanceof Node);
214+
return array_all($classMethod->params, static fn (Param $param): bool => ! $param->type instanceof Node);
215215
}
216216

217217
private function isSafeType(ClassReflection $classReflection, ClassMethod $classMethod): bool

rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ public function refactor(Node $node): ?array
130130
* Remove the right-side-most params by reference or empty from `list()`,
131131
* since they are not needed anymore.
132132
*/
133-
private function removeStaleParams(List_ | Array_ $node, int $rightSideRemovableParamsCount): void
133+
private function removeStaleParams(List_|Array_ $node, int $rightSideRemovableParamsCount): void
134134
{
135135
$nodeItemsCount = count($node->items);
136136
if ($rightSideRemovableParamsCount > 0) {
137137
array_splice($node->items, $nodeItemsCount - $rightSideRemovableParamsCount);
138138
}
139139
}
140140

141-
private function shouldSkipAssign(Assign $assign, List_ | Array_ $arrayOrList): bool
141+
private function shouldSkipAssign(Assign $assign, List_|Array_ $arrayOrList): bool
142142
{
143143
if (! $assign->expr instanceof Variable) {
144144
return true;
@@ -264,7 +264,7 @@ private function hasAllItemsByRef(array $items): bool
264264
/**
265265
* Return the key inside the ArrayItem, if provided, or the position otherwise
266266
*/
267-
private function getArrayItemKey(ArrayItem $arrayItem, int | string $position): int | string
267+
private function getArrayItemKey(ArrayItem $arrayItem, int|string $position): int|string
268268
{
269269
if ($arrayItem->key instanceof String_) {
270270
return $arrayItem->key->value;
@@ -285,7 +285,7 @@ private function createAssignRefWithArrayDimFetch(
285285
Variable $assignVariable,
286286
Variable $exprVariable,
287287
array $nestedArrayIndexes,
288-
string | int $arrayIndex
288+
string|int $arrayIndex
289289
): Expression {
290290
$nestedExprVariable = $exprVariable;
291291
foreach ($nestedArrayIndexes as $nestedArrayIndex) {
@@ -301,7 +301,7 @@ private function createAssignRefWithArrayDimFetch(
301301
}
302302

303303
/**
304-
* @param array<(ArrayItem | null)> $arrayItems
304+
* @param array<(ArrayItem|null)> $arrayItems
305305
* @return ArrayItem[]
306306
*/
307307
private function getItemsByRef(array $arrayItems, int $condition): array

rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ private function getDifferentParamTypeFromReflectionMethod(
248248
return null;
249249
}
250250

251-
private function refactorParam(Param $param, ClassMethod | Function_ $functionLike): void
251+
private function refactorParam(Param $param, ClassMethod|Function_ $functionLike): void
252252
{
253253
if (! $this->isNullableParam($param, $functionLike)) {
254254
return;
@@ -260,7 +260,7 @@ private function refactorParam(Param $param, ClassMethod | Function_ $functionLi
260260
$this->hasChanged = true;
261261
}
262262

263-
private function decorateWithDocBlock(ClassMethod | Function_ $functionLike, Param $param): void
263+
private function decorateWithDocBlock(ClassMethod|Function_ $functionLike, Param $param): void
264264
{
265265
if (! $param->type instanceof Node) {
266266
return;

rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function refactor(Node $node): ?Node
155155

156156
private function resolveDifferentAncestorReturnType(
157157
ClassMethod $classMethod,
158-
UnionType | NullableType | Name | Identifier | ComplexType $returnTypeNode
158+
UnionType|NullableType|Name|Identifier|ComplexType $returnTypeNode
159159
): Type {
160160
$classReflection = $this->reflectionResolver->resolveClassReflection($classMethod);
161161
if (! $classReflection instanceof ClassReflection) {
@@ -261,6 +261,6 @@ private function isNullable(Type $parentReturnType, Type $returnType): bool
261261
return false;
262262
}
263263

264-
return array_any($parentReturnType->getTypes(), fn(Type $type): bool => $type->equals($returnType));
264+
return array_any($parentReturnType->getTypes(), static fn (Type $type): bool => $type->equals($returnType));
265265
}
266266
}

rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private function shouldSkipFuncCall(FuncCall $funcCall): bool
143143
}
144144

145145
private function createArrayFromString(
146-
Array_ | Variable | PropertyFetch | ConstFetch | ClassConstFetch $expr
146+
Array_|Variable|PropertyFetch|ConstFetch|ClassConstFetch $expr
147147
): Concat {
148148
$args = [new Arg(new String_('><')), new Arg($expr)];
149149
$implodeFuncCall = new FuncCall(new Name('implode'), $args);
@@ -153,7 +153,7 @@ private function createArrayFromString(
153153
}
154154

155155
private function createIsArrayTernaryFromExpression(
156-
Variable | PropertyFetch | ConstFetch | ClassConstFetch $expr
156+
Variable|PropertyFetch|ConstFetch|ClassConstFetch $expr
157157
): Ternary {
158158
$isArrayFuncCall = new FuncCall(new Name('is_array'), [new Arg($expr)]);
159159
$nullNotIdentical = new NotIdentical($expr, $this->nodeFactory->createNull());

rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function refactor(Node $node): ?Node
8181
return $node;
8282
}
8383

84-
private function shouldSkip(Int_ | Float_ $node, mixed $rawValue): bool
84+
private function shouldSkip(Int_|Float_ $node, mixed $rawValue): bool
8585
{
8686
if (! is_string($rawValue)) {
8787
return true;

rules/DowngradePhp80/NodeAnalyzer/NamedToUnnamedArgs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function fillFromNamedArgs(
7070
* @return array<int, Arg>
7171
*/
7272
public function fillFromJumpedNamedArgs(
73-
FunctionReflection | MethodReflection | ReflectionFunction $functionLikeReflection,
73+
FunctionReflection|MethodReflection|ReflectionFunction $functionLikeReflection,
7474
array $unnamedArgs,
7575
array $parameters
7676
): array {

0 commit comments

Comments
 (0)