From e432580aca4f7c73d23511b93b31e1d618376b98 Mon Sep 17 00:00:00 2001 From: Jozef Rebjak Date: Wed, 4 Feb 2026 11:15:30 +0100 Subject: [PATCH] fix: add void return type to Toolbar::prepare() for CI4.7 compatibility CodeIgniter 4.7.0 updated the base Toolbar class to require a void return type on the prepare() method. This adds the return type to maintain compatibility with the parent class signature. Fixes fatal error: Declaration must be compatible with CodeIgniter\Debug\Toolbar::prepare(?RequestInterface, ?ResponseInterface): void --- src/Debug/Toolbar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Debug/Toolbar.php b/src/Debug/Toolbar.php index 14c599e..601bd45 100644 --- a/src/Debug/Toolbar.php +++ b/src/Debug/Toolbar.php @@ -20,7 +20,7 @@ class Toolbar extends BaseToolbar * * @psalm-suppress UndefinedClass */ - public function prepare(?RequestInterface $request = null, ?ResponseInterface $response = null) + public function prepare(?RequestInterface $request = null, ?ResponseInterface $response = null): void { /** * @var IncomingRequest|null $request