chore: bumps dependencies

This commit is contained in:
Nuno Maduro
2025-03-29 17:44:06 +00:00
parent ed70c9dc2b
commit f68d11ccae
14 changed files with 219 additions and 31 deletions

View File

@ -155,7 +155,7 @@ final class TestCaseMethodFactory
assert($testCase instanceof TestCaseFactory);
$method = $this;
return function (...$arguments) use ($testCase, $method, $closure): mixed { // @phpstan-ignore-line
return function (...$arguments) use ($testCase, $method, $closure): mixed {
/* @var TestCase $this */
$testCase->proxies->proxy($this);
$method->proxies->proxy($this);

View File

@ -183,7 +183,6 @@ final class Expectation
{
foreach ($needles as $needle) {
if (is_string($this->value)) {
// @phpstan-ignore-next-line
Assert::assertStringContainsString((string) $needle, $this->value);
} else {
if (! is_iterable($this->value)) {

View File

@ -46,7 +46,7 @@ final readonly class Panic
{
try {
$output = Container::getInstance()->get(OutputInterface::class);
} catch (Throwable) { // @phpstan-ignore-line
} catch (Throwable) {
$output = new ConsoleOutput;
}

View File

@ -78,7 +78,7 @@ final class DescribeCall
$this->currentBeforeEachCall->describing[] = $this->description;
}
$this->currentBeforeEachCall->{$name}(...$arguments); // @phpstan-ignore-line
$this->currentBeforeEachCall->{$name}(...$arguments);
return $this;
}

View File

@ -224,7 +224,7 @@ final class TestCall // @phpstan-ignore-line
*/
public function only(): self
{
Only::enable($this, ...func_get_args()); // @phpstan-ignore-line
Only::enable($this, ...func_get_args());
return $this;
}

View File

@ -71,7 +71,7 @@ final class DatasetsRepository
*
* @throws ShouldNotHappen
*/
public static function get(string $filename, string $description): Closure|array
public static function get(string $filename, string $description): Closure|array // @phpstan-ignore-line
{
$dataset = self::$withs[$filename.self::SEPARATOR.$description];
@ -110,7 +110,6 @@ final class DatasetsRepository
foreach ($datasetCombination as $datasetCombinationElement) {
$partialDescriptions[] = $datasetCombinationElement['label'];
// @phpstan-ignore-next-line
$values = array_merge($values, $datasetCombinationElement['values']);
}
@ -221,7 +220,6 @@ final class DatasetsRepository
$result = $tmp;
}
// @phpstan-ignore-next-line
return $result;
}

View File

@ -15,7 +15,6 @@ final class Closure
/**
* Binds the given closure to the given "this".
*
*
* @throws ShouldNotHappen
*/
public static function bind(?BaseClosure $closure, ?object $newThis, object|string|null $newScope = 'static'): BaseClosure
@ -24,6 +23,7 @@ final class Closure
throw ShouldNotHappen::fromMessage('Could not bind null closure.');
}
// @phpstan-ignore-next-line
$closure = BaseClosure::bind($closure, $newThis, $newScope);
if (! $closure instanceof \Closure) {

View File

@ -66,6 +66,7 @@ final readonly class Exporter
$result[] = $context->contains($data[$key]) !== false
? '*RECURSION*'
// @phpstan-ignore-next-line
: sprintf('[%s]', $this->shortenedRecursiveExport($data[$key], $context));
}

View File

@ -50,14 +50,13 @@ final class HigherOrderMessage
}
if ($this->hasHigherOrderCallable()) {
/* @phpstan-ignore-next-line */
return (new HigherOrderCallables($target))->{$this->name}(...$this->arguments);
}
try {
return is_array($this->arguments)
? Reflection::call($target, $this->name, $this->arguments)
: $target->{$this->name}; /* @phpstan-ignore-line */
: $target->{$this->name};
} catch (Throwable $throwable) {
Reflection::setPropertyValue($throwable, 'file', $this->filename);
Reflection::setPropertyValue($throwable, 'line', $this->line);
@ -65,7 +64,6 @@ final class HigherOrderMessage
if ($throwable->getMessage() === $this->getUndefinedMethodMessage($target, $this->name)) {
/** @var ReflectionClass<TValue> $reflection */
$reflection = new ReflectionClass($target);
/* @phpstan-ignore-next-line */
$reflection = $reflection->getParentClass() ?: $reflection;
Reflection::setPropertyValue($throwable, 'message', sprintf('Call to undefined method %s::%s()', $reflection->getName(), $this->name));
}
@ -96,10 +94,6 @@ final class HigherOrderMessage
private function getUndefinedMethodMessage(object $target, string $methodName): string
{
if (\PHP_MAJOR_VERSION >= 8) {
return sprintf(self::UNDEFINED_METHOD, sprintf('%s::%s()', $target::class, $methodName));
}
return sprintf(self::UNDEFINED_METHOD, $methodName);
return sprintf(self::UNDEFINED_METHOD, sprintf('%s::%s()', $target::class, $methodName));
}
}

View File

@ -40,7 +40,6 @@ final class HigherOrderMessageCollection
public function chain(object $target): void
{
foreach ($this->messages as $message) {
// @phpstan-ignore-next-line
$target = $message->call($target) ?? $target;
}
}

View File

@ -26,7 +26,7 @@ final class HigherOrderTapProxy
*/
public function __set(string $property, mixed $value): void
{
$this->target->{$property} = $value; // @phpstan-ignore-line
$this->target->{$property} = $value;
}
/**
@ -37,7 +37,7 @@ final class HigherOrderTapProxy
public function __get(string $property)
{
if (property_exists($this->target, $property)) {
return $this->target->{$property}; // @phpstan-ignore-line
return $this->target->{$property};
}
$className = (new ReflectionClass($this->target))->getName();