diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 189105d..2f3eecb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,5 +12,3 @@ jobs: uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@main cs: uses: innmind/github-workflows/.github/workflows/cs.yml@main - with: - php-version: '8.2' diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e3f0ff..9ad2bf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [Unreleased] + +### Changed + +- Requires PHP `8.4` +- Requires `innmind/immutable:~6.0` + ## 4.2.0 - 2025-06-07 ### Changed diff --git a/composer.json b/composer.json index 1d13663..d39fc2d 100644 --- a/composer.json +++ b/composer.json @@ -15,10 +15,10 @@ "issues": "http://github.com/Innmind/StackTrace/issues" }, "require": { - "php": "~8.2", - "innmind/immutable": "~5.16", - "innmind/url": "~4.4", - "innmind/graphviz": "~4.0" + "php": "~8.4", + "innmind/immutable": "~6.0", + "innmind/url": "~5.0", + "innmind/graphviz": "~5.0" }, "autoload": { "psr-4": { @@ -31,7 +31,7 @@ } }, "require-dev": { - "innmind/static-analysis": "~1.2.1", + "innmind/static-analysis": "~1.3", "innmind/black-box": "^6.4.1", "innmind/coding-standard": "~2.0" } diff --git a/src/Render.php b/src/Render.php index b9763c2..e28b35c 100644 --- a/src/Render.php +++ b/src/Render.php @@ -312,7 +312,7 @@ private function hashFrame(CallFrame $frame): string $prefix = "{$frame->file()->path()->toString()}|{$frame->line()->toString()}|"; } - return "$prefix{$frame->toString()}|{$frame->arguments()->count()}"; + return "$prefix{$frame->toString()}|{$frame->arguments()->size()}"; } private function node(CallFrame|Throwable $reference): Node diff --git a/tests/CallFramesTest.php b/tests/CallFramesTest.php index dd59c79..b8c1b3d 100644 --- a/tests/CallFramesTest.php +++ b/tests/CallFramesTest.php @@ -22,7 +22,7 @@ public function testOf() } $this->assertInstanceOf(Sequence::class, $frames); - $this->assertCount(15, $frames); + $this->assertSame(15, $frames->size()); $this->assertInstanceOf(CallFrame\MethodCall::class, $frames->get(0)->match( static fn($frame) => $frame, static fn() => null, @@ -67,7 +67,9 @@ public static function staticCall() if (!\function_exists('\Tests\Innmind\StackTrace\foo')) { function foo(callable $x) { - (static function($x) {$x(); })($x); + (static function($x) { + $x(); + })($x); } } diff --git a/tests/StackTraceTest.php b/tests/StackTraceTest.php index 67979e3..4af4baf 100644 --- a/tests/StackTraceTest.php +++ b/tests/StackTraceTest.php @@ -31,7 +31,7 @@ public function testInterface() $this->assertEquals(Throwable::of($foo), $stack->throwable()); $this->assertInstanceOf(Sequence::class, $stack->previous()); - $this->assertCount(2, $stack->previous()); + $this->assertSame(2, $stack->previous()->size()); $this->assertEquals( [Throwable::of($bar), Throwable::of($baz)], $stack->previous()->toList(), diff --git a/tests/ThrowableTest.php b/tests/ThrowableTest.php index 9acde84..4e61d36 100644 --- a/tests/ThrowableTest.php +++ b/tests/ThrowableTest.php @@ -31,7 +31,7 @@ public function testInterface() $this->assertInstanceOf(Line::class, $throwable->line()); $this->assertSame(22, $throwable->line()->toInt()); $this->assertInstanceOf(Sequence::class, $throwable->trace()); - $this->assertCount(9, $throwable->trace()); + $this->assertSame(9, $throwable->trace()->size()); $this->assertSame( $e->getTraceAsString(), Str::of("\n")->join($throwable->trace()->map( @@ -39,6 +39,6 @@ public function testInterface() ))->toString(), ); $this->assertInstanceOf(Sequence::class, $throwable->callFrames()); - $this->assertCount(8, $throwable->callFrames()); + $this->assertSame(8, $throwable->callFrames()->size()); } }