From 13406b944eedd25ce4f370f46c0f16d1e305ac26 Mon Sep 17 00:00:00 2001 From: Ricardo Mosselman Date: Wed, 26 Aug 2026 14:14:20 +0200 Subject: [PATCH] Fix: fully-qualify \Closure in docblock type hints for correct reflection-copy resolution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fully qualify the type inline as `\Closure` in all three docblocks. Because the qualification lives in the docblock text itself, it survives being copied verbatim into any consumer's generated actor class — resolving correctly regardless of that file's namespace or its own imports. --- src/Codeception/Module/Laravel/InteractsWithContainer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Codeception/Module/Laravel/InteractsWithContainer.php b/src/Codeception/Module/Laravel/InteractsWithContainer.php index 8bbec1e..39a8e6b 100644 --- a/src/Codeception/Module/Laravel/InteractsWithContainer.php +++ b/src/Codeception/Module/Laravel/InteractsWithContainer.php @@ -84,7 +84,7 @@ public function haveApplicationHandler(callable $handler): void * ``` * * @param string $abstract - * @param Closure|string|null $concrete + * @param \Closure|string|null $concrete * @param bool $shared */ public function haveBinding(string $abstract, $concrete = null, bool $shared = false): void @@ -108,7 +108,7 @@ public function haveBinding(string $abstract, $concrete = null, bool $shared = f * * @param string $concrete * @param string $abstract - * @param Closure|string $implementation + * @param \Closure|string $implementation */ public function haveContextualBinding(string $concrete, string $abstract, $implementation): void { @@ -139,7 +139,7 @@ public function haveInstance(string $abstract, object $instance): void * ``` * * @param string $abstract - * @param Closure|string|null $concrete + * @param \Closure|string|null $concrete */ public function haveSingleton(string $abstract, $concrete): void {