diff --git a/CHANGELOG.md b/CHANGELOG.md index f7405a9..9ee32dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased] + +### Fixed + +- PHP `8.4` deprecations + ## 4.1.0 - 2023-09-17 ### Added diff --git a/src/Render.php b/src/Render.php index 90e04e3..17dc157 100644 --- a/src/Render.php +++ b/src/Render.php @@ -27,7 +27,7 @@ final class Render private Link $link; private FormatPath $formatPath; - private function __construct(Link $link = null, FormatPath $formatPath = null) + private function __construct(?Link $link = null, ?FormatPath $formatPath = null) { $this->link = $link ?? new Link\ToFile; $this->formatPath = $formatPath ?? new FormatPath\FullPath; @@ -63,7 +63,7 @@ public function __invoke(StackTrace $stack): Content /** * @psalm-pure */ - public static function of(Link $link = null, FormatPath $formatPath = null): self + public static function of(?Link $link = null, ?FormatPath $formatPath = null): self { return new self($link, $formatPath); } diff --git a/tests/ThrowableTest.php b/tests/ThrowableTest.php index 0e131ff..0d34d43 100644 --- a/tests/ThrowableTest.php +++ b/tests/ThrowableTest.php @@ -5,7 +5,6 @@ use Innmind\StackTrace\{ Throwable, - CallFrame, ClassName, Line, }; @@ -30,7 +29,7 @@ public function testInterface() $this->assertInstanceOf(Url::class, $throwable->file()); $this->assertSame('file://'.__FILE__, $throwable->file()->toString()); $this->assertInstanceOf(Line::class, $throwable->line()); - $this->assertSame(23, $throwable->line()->toInt()); + $this->assertSame(22, $throwable->line()->toInt()); $this->assertInstanceOf(Sequence::class, $throwable->trace()); $this->assertCount(12, $throwable->trace()); $this->assertSame(