From 6d4cf25e88cc5f25312201b9d59de2b4baab9022 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Tue, 14 Apr 2026 14:38:01 +0200 Subject: [PATCH 1/2] fix: allow constructor to take nullable colors --- src/TableFormatter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TableFormatter.php b/src/TableFormatter.php index 20d71c6..d952a6e 100644 --- a/src/TableFormatter.php +++ b/src/TableFormatter.php @@ -26,7 +26,7 @@ class TableFormatter * * @param Colors|null $colors */ - public function __construct(Colors $colors = null) + public function __construct(?Colors $colors = null) { // try to get terminal width $width = $this->getTerminalWidth(); From b5057bb1811a156808f15bc12710b8d389d79150 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Tue, 14 Apr 2026 14:40:25 +0200 Subject: [PATCH 2/2] fix: allow null for previous in exception --- src/Exception.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exception.php b/src/Exception.php index 4d24d58..0dd58ca 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -25,7 +25,7 @@ class Exception extends \RuntimeException * @param int $code The Exception code * @param \Exception $previous The previous exception used for the exception chaining. */ - public function __construct($message = "", $code = 0, \Exception $previous = null) + public function __construct($message = "", $code = 0, ?\Exception $previous = null) { if (!$code) { $code = self::E_ANY;