Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [Unreleased]

### Changed

- Requires PHP `8.4`
- Requires `innmind/immutable:~6.0`

## 4.2.0 - 2025-06-07

### Changed
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion src/Render.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions tests/CallFramesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/StackTraceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions tests/ThrowableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ 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(
static fn($line) => $line->toString(),
))->toString(),
);
$this->assertInstanceOf(Sequence::class, $throwable->callFrames());
$this->assertCount(8, $throwable->callFrames());
$this->assertSame(8, $throwable->callFrames()->size());
}
}