Skip to content

Commit f68d11c

Browse files
committed
chore: bumps dependencies
1 parent ed70c9d commit f68d11c

14 files changed

+219
-31
lines changed

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
"require": {
2020
"php": "^8.2.0",
2121
"brianium/paratest": "^7.7.0",
22-
"nunomaduro/collision": "^8.6.1",
22+
"nunomaduro/collision": "^8.7.0",
2323
"nunomaduro/termwind": "^2.3.0",
2424
"pestphp/pest-plugin": "^3.0.0",
2525
"pestphp/pest-plugin-arch": "^3.0.0",
2626
"pestphp/pest-plugin-mutate": "^3.0.5",
27-
"phpunit/phpunit": "^11.5.6"
27+
"phpunit/phpunit": "^11.5.15"
2828
},
2929
"conflict": {
3030
"filp/whoops": "<2.16.0",
31-
"phpunit/phpunit": ">11.5.6",
31+
"phpunit/phpunit": ">11.5.15",
3232
"sebastian/exporter": "<6.0.0",
3333
"webmozart/assert": "<1.11.0"
3434
},
@@ -53,9 +53,9 @@
5353
]
5454
},
5555
"require-dev": {
56-
"pestphp/pest-dev-tools": "^3.3.0",
57-
"pestphp/pest-plugin-type-coverage": "^3.2.3",
58-
"symfony/process": "^7.2.0"
56+
"pestphp/pest-dev-tools": "^3.4.0",
57+
"pestphp/pest-plugin-type-coverage": "^3.5.0",
58+
"symfony/process": "^7.2.5"
5959
},
6060
"minimum-stability": "dev",
6161
"prefer-stable": true,

phpstan-baseline.neon

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: '#^Parameter \#1 of callable callable\(Pest\\Expectation\<string\|null\>\)\: Pest\\Arch\\Contracts\\ArchExpectation expects Pest\\Expectation\<string\|null\>, Pest\\Expectation\<string\|null\> given\.$#'
5+
identifier: argument.type
6+
count: 1
7+
path: src/ArchPresets/AbstractPreset.php
8+
9+
-
10+
message: '#^Trait Pest\\Concerns\\Expectable is used zero times and is not analysed\.$#'
11+
identifier: trait.unused
12+
count: 1
13+
path: src/Concerns/Expectable.php
14+
15+
-
16+
message: '#^Trait Pest\\Concerns\\Logging\\WritesToConsole is used zero times and is not analysed\.$#'
17+
identifier: trait.unused
18+
count: 1
19+
path: src/Concerns/Logging/WritesToConsole.php
20+
21+
-
22+
message: '#^Trait Pest\\Concerns\\Testable is used zero times and is not analysed\.$#'
23+
identifier: trait.unused
24+
count: 1
25+
path: src/Concerns/Testable.php
26+
27+
-
28+
message: '#^Loose comparison using \!\= between \(Closure\|null\) and false will always evaluate to false\.$#'
29+
identifier: notEqual.alwaysFalse
30+
count: 1
31+
path: src/Expectation.php
32+
33+
-
34+
message: '#^Method Pest\\Expectation\:\:and\(\) should return Pest\\Expectation\<TAndValue\> but returns \(Pest\\Expectation&TAndValue\)\|Pest\\Expectation\<TAndValue of mixed\>\.$#'
35+
identifier: return.type
36+
count: 1
37+
path: src/Expectation.php
38+
39+
-
40+
message: '#^PHPDoc tag @property for property Pest\\Expectation\:\:\$each contains generic class Pest\\Expectations\\EachExpectation but does not specify its types\: TValue$#'
41+
identifier: missingType.generics
42+
count: 1
43+
path: src/Expectation.php
44+
45+
-
46+
message: '#^PHPDoc tag @property for property Pest\\Expectation\:\:\$not contains generic class Pest\\Expectations\\OppositeExpectation but does not specify its types\: TValue$#'
47+
identifier: missingType.generics
48+
count: 1
49+
path: src/Expectation.php
50+
51+
-
52+
message: '#^Parameter \#2 \$newScope of method Closure\:\:bindTo\(\) expects ''static''\|class\-string\|object\|null, string given\.$#'
53+
identifier: argument.type
54+
count: 1
55+
path: src/Expectation.php
56+
57+
-
58+
message: '#^Function expect\(\) should return Pest\\Expectation\<TValue\|null\> but returns Pest\\Expectation\<TValue\|null\>\.$#'
59+
identifier: return.type
60+
count: 1
61+
path: src/Functions.php
62+
63+
-
64+
message: '#^Parameter \#1 \$argv of method PHPUnit\\TextUI\\Application\:\:run\(\) expects list\<string\>, array\<int, string\> given\.$#'
65+
identifier: argument.type
66+
count: 1
67+
path: src/Kernel.php
68+
69+
-
70+
message: '#^Call to an undefined method object&TValue of mixed\:\:__toString\(\)\.$#'
71+
identifier: method.notFound
72+
count: 1
73+
path: src/Mixins/Expectation.php
74+
75+
-
76+
message: '#^Call to an undefined method object&TValue of mixed\:\:toArray\(\)\.$#'
77+
identifier: method.notFound
78+
count: 4
79+
path: src/Mixins/Expectation.php
80+
81+
-
82+
message: '#^Call to an undefined method object&TValue of mixed\:\:toSnapshot\(\)\.$#'
83+
identifier: method.notFound
84+
count: 1
85+
path: src/Mixins/Expectation.php
86+
87+
-
88+
message: '#^Call to an undefined method object&TValue of mixed\:\:toString\(\)\.$#'
89+
identifier: method.notFound
90+
count: 1
91+
path: src/Mixins/Expectation.php
92+
93+
-
94+
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
95+
identifier: staticMethod.alreadyNarrowedType
96+
count: 2
97+
path: src/Mixins/Expectation.php
98+
99+
-
100+
message: '#^PHPDoc tag @var with type callable\(\)\: bool is not subtype of native type Closure\|null\.$#'
101+
identifier: varTag.nativeType
102+
count: 1
103+
path: src/PendingCalls/TestCall.php
104+
105+
-
106+
message: '#^Parameter \#1 \$argv of class Symfony\\Component\\Console\\Input\\ArgvInput constructor expects list\<string\>\|null, array\<int, string\> given\.$#'
107+
identifier: argument.type
108+
count: 1
109+
path: src/Plugins/Parallel.php
110+
111+
-
112+
message: '#^Parameter \#13 \$testRunnerTriggeredDeprecationEvents of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\Event\\TestRunner\\DeprecationTriggered\>, array given\.$#'
113+
identifier: argument.type
114+
count: 1
115+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
116+
117+
-
118+
message: '#^Parameter \#14 \$testRunnerTriggeredWarningEvents of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\Event\\TestRunner\\WarningTriggered\>, array given\.$#'
119+
identifier: argument.type
120+
count: 1
121+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
122+
123+
-
124+
message: '#^Parameter \#15 \$errors of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\TestRunner\\TestResult\\Issues\\Issue\>, array given\.$#'
125+
identifier: argument.type
126+
count: 1
127+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
128+
129+
-
130+
message: '#^Parameter \#16 \$deprecations of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\TestRunner\\TestResult\\Issues\\Issue\>, array given\.$#'
131+
identifier: argument.type
132+
count: 1
133+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
134+
135+
-
136+
message: '#^Parameter \#17 \$notices of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\TestRunner\\TestResult\\Issues\\Issue\>, array given\.$#'
137+
identifier: argument.type
138+
count: 1
139+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
140+
141+
-
142+
message: '#^Parameter \#18 \$warnings of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\TestRunner\\TestResult\\Issues\\Issue\>, array given\.$#'
143+
identifier: argument.type
144+
count: 1
145+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
146+
147+
-
148+
message: '#^Parameter \#19 \$phpDeprecations of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\TestRunner\\TestResult\\Issues\\Issue\>, array given\.$#'
149+
identifier: argument.type
150+
count: 1
151+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
152+
153+
-
154+
message: '#^Parameter \#20 \$phpNotices of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\TestRunner\\TestResult\\Issues\\Issue\>, array given\.$#'
155+
identifier: argument.type
156+
count: 1
157+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
158+
159+
-
160+
message: '#^Parameter \#21 \$phpWarnings of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\TestRunner\\TestResult\\Issues\\Issue\>, array given\.$#'
161+
identifier: argument.type
162+
count: 1
163+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
164+
165+
-
166+
message: '#^Parameter \#4 \$testErroredEvents of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\Event\\Test\\AfterLastTestMethodErrored\|PHPUnit\\Event\\Test\\BeforeFirstTestMethodErrored\|PHPUnit\\Event\\Test\\Errored\>, array given\.$#'
167+
identifier: argument.type
168+
count: 1
169+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
170+
171+
-
172+
message: '#^Parameter \#5 \$testFailedEvents of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\Event\\Test\\Failed\>, array given\.$#'
173+
identifier: argument.type
174+
count: 1
175+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
176+
177+
-
178+
message: '#^Parameter \#7 \$testSuiteSkippedEvents of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\Event\\TestSuite\\Skipped\>, array given\.$#'
179+
identifier: argument.type
180+
count: 1
181+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
182+
183+
-
184+
message: '#^Parameter \#8 \$testSkippedEvents of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\Event\\Test\\Skipped\>, array given\.$#'
185+
identifier: argument.type
186+
count: 1
187+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
188+
189+
-
190+
message: '#^Parameter \#9 \$testMarkedIncompleteEvents of class PHPUnit\\TestRunner\\TestResult\\TestResult constructor expects list\<PHPUnit\\Event\\Test\\MarkedIncomplete\>, array given\.$#'
191+
identifier: argument.type
192+
count: 1
193+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php
194+
195+
-
196+
message: '#^Property Pest\\Plugins\\Parallel\\Paratest\\WrapperRunner\:\:\$pending \(list\<non\-empty\-string\>\) does not accept array\<int, non\-empty\-string\>\.$#'
197+
identifier: assign.propertyType
198+
count: 1
199+
path: src/Plugins/Parallel/Paratest/WrapperRunner.php

phpstan.neon

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
includes:
2-
- vendor/phpstan/phpstan-strict-rules/rules.neon
3-
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
2+
- phpstan-baseline.neon
43

54
parameters:
6-
level: max
5+
level: 7
76
paths:
87
- src
98

10-
checkMissingIterableValueType: true
11-
reportUnmatchedIgnoredErrors: true
9+
reportUnmatchedIgnoredErrors: false
1210

1311
ignoreErrors:
1412
- "#type mixed is not subtype of native#"

src/Factories/TestCaseMethodFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function getClosure(): Closure
155155
assert($testCase instanceof TestCaseFactory);
156156
$method = $this;
157157

158-
return function (...$arguments) use ($testCase, $method, $closure): mixed { // @phpstan-ignore-line
158+
return function (...$arguments) use ($testCase, $method, $closure): mixed {
159159
/* @var TestCase $this */
160160
$testCase->proxies->proxy($this);
161161
$method->proxies->proxy($this);

src/Mixins/Expectation.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ public function toContain(mixed ...$needles): self
183183
{
184184
foreach ($needles as $needle) {
185185
if (is_string($this->value)) {
186-
// @phpstan-ignore-next-line
187186
Assert::assertStringContainsString((string) $needle, $this->value);
188187
} else {
189188
if (! is_iterable($this->value)) {

src/Panic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private function handle(): void
4646
{
4747
try {
4848
$output = Container::getInstance()->get(OutputInterface::class);
49-
} catch (Throwable) { // @phpstan-ignore-line
49+
} catch (Throwable) {
5050
$output = new ConsoleOutput;
5151
}
5252

src/PendingCalls/DescribeCall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function __call(string $name, array $arguments): self
7878
$this->currentBeforeEachCall->describing[] = $this->description;
7979
}
8080

81-
$this->currentBeforeEachCall->{$name}(...$arguments); // @phpstan-ignore-line
81+
$this->currentBeforeEachCall->{$name}(...$arguments);
8282

8383
return $this;
8484
}

src/PendingCalls/TestCall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function group(string ...$groups): self
224224
*/
225225
public function only(): self
226226
{
227-
Only::enable($this, ...func_get_args()); // @phpstan-ignore-line
227+
Only::enable($this, ...func_get_args());
228228

229229
return $this;
230230
}

src/Repositories/DatasetsRepository.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static function has(string $filename, string $description): bool
7171
*
7272
* @throws ShouldNotHappen
7373
*/
74-
public static function get(string $filename, string $description): Closure|array
74+
public static function get(string $filename, string $description): Closure|array // @phpstan-ignore-line
7575
{
7676
$dataset = self::$withs[$filename.self::SEPARATOR.$description];
7777

@@ -110,7 +110,6 @@ public static function resolve(array $dataset, string $currentTestFile): ?array
110110
foreach ($datasetCombination as $datasetCombinationElement) {
111111
$partialDescriptions[] = $datasetCombinationElement['label'];
112112

113-
// @phpstan-ignore-next-line
114113
$values = array_merge($values, $datasetCombinationElement['values']);
115114
}
116115

@@ -221,7 +220,6 @@ private static function getDatasetsCombinations(array $combinations): array
221220
$result = $tmp;
222221
}
223222

224-
// @phpstan-ignore-next-line
225223
return $result;
226224
}
227225

src/Support/Closure.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ final class Closure
1515
/**
1616
* Binds the given closure to the given "this".
1717
*
18-
*
1918
* @throws ShouldNotHappen
2019
*/
2120
public static function bind(?BaseClosure $closure, ?object $newThis, object|string|null $newScope = 'static'): BaseClosure
@@ -24,6 +23,7 @@ public static function bind(?BaseClosure $closure, ?object $newThis, object|stri
2423
throw ShouldNotHappen::fromMessage('Could not bind null closure.');
2524
}
2625

26+
// @phpstan-ignore-next-line
2727
$closure = BaseClosure::bind($closure, $newThis, $newScope);
2828

2929
if (! $closure instanceof \Closure) {

src/Support/Exporter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public function shortenedRecursiveExport(array &$data, ?Context $context = null)
6666

6767
$result[] = $context->contains($data[$key]) !== false
6868
? '*RECURSION*'
69+
// @phpstan-ignore-next-line
6970
: sprintf('[%s]', $this->shortenedRecursiveExport($data[$key], $context));
7071
}
7172

src/Support/HigherOrderMessage.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,20 @@ public function call(object $target): mixed
5050
}
5151

5252
if ($this->hasHigherOrderCallable()) {
53-
/* @phpstan-ignore-next-line */
5453
return (new HigherOrderCallables($target))->{$this->name}(...$this->arguments);
5554
}
5655

5756
try {
5857
return is_array($this->arguments)
5958
? Reflection::call($target, $this->name, $this->arguments)
60-
: $target->{$this->name}; /* @phpstan-ignore-line */
59+
: $target->{$this->name};
6160
} catch (Throwable $throwable) {
6261
Reflection::setPropertyValue($throwable, 'file', $this->filename);
6362
Reflection::setPropertyValue($throwable, 'line', $this->line);
6463

6564
if ($throwable->getMessage() === $this->getUndefinedMethodMessage($target, $this->name)) {
6665
/** @var ReflectionClass<TValue> $reflection */
6766
$reflection = new ReflectionClass($target);
68-
/* @phpstan-ignore-next-line */
6967
$reflection = $reflection->getParentClass() ?: $reflection;
7068
Reflection::setPropertyValue($throwable, 'message', sprintf('Call to undefined method %s::%s()', $reflection->getName(), $this->name));
7169
}
@@ -96,10 +94,6 @@ private function hasHigherOrderCallable(): bool
9694

9795
private function getUndefinedMethodMessage(object $target, string $methodName): string
9896
{
99-
if (\PHP_MAJOR_VERSION >= 8) {
100-
return sprintf(self::UNDEFINED_METHOD, sprintf('%s::%s()', $target::class, $methodName));
101-
}
102-
103-
return sprintf(self::UNDEFINED_METHOD, $methodName);
97+
return sprintf(self::UNDEFINED_METHOD, sprintf('%s::%s()', $target::class, $methodName));
10498
}
10599
}

src/Support/HigherOrderMessageCollection.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public function addWhen(callable $condition, string $filename, int $line, string
4040
public function chain(object $target): void
4141
{
4242
foreach ($this->messages as $message) {
43-
// @phpstan-ignore-next-line
4443
$target = $message->call($target) ?? $target;
4544
}
4645
}

0 commit comments

Comments
 (0)