From a624f04bdbb632d0fe39b407b943f4f558a6395d Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 8 Sep 2022 14:15:37 +0200 Subject: [PATCH] Fixing namespace issue The line `use JsonSerializable;` of this file is not being passed on to `tests/Support/_generated/AcceptanceTesterActions.php`. And with the current phpDoc ```php @param array|string|JsonSerializable $params ``` ... phpstan is correctly reporting: > Parameter #2 $params of method Tests\Support\AcceptanceTester::sendPatch() expects array|string|Tests\Support\_generated\JsonSerializable ... So the question is: Is there a way to include the needed `use`s in the generated `TesterAction`s` Or should all occurrences of such "root" classes in the code get prefixed with a `\`? --- src/Codeception/Module/REST.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Codeception/Module/REST.php b/src/Codeception/Module/REST.php index 4062d08..6eec944 100644 --- a/src/Codeception/Module/REST.php +++ b/src/Codeception/Module/REST.php @@ -541,7 +541,7 @@ public function sendPut(string $url, $params = [], array $files = []) * $response = $I->sendPatch('/message/1', ['subject' => 'Read this!']); * ``` * - * @param array|string|JsonSerializable $params + * @param array|string|\JsonSerializable $params * @part json * @part xml */