Skip to content

Commit 9e0ea24

Browse files
committed
chore: make logger explicitly nullable
1 parent b480bf1 commit 9e0ea24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Codeception/Module/Yii2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ final class Yii2 extends Framework implements ActiveRecord, PartedModule
256256
*/
257257
private array $server;
258258

259-
private Logger $yiiLogger;
259+
private null|Logger $yiiLogger = null;
260260

261261
private function getClient(): Yii2Connector
262262
{
@@ -292,7 +292,7 @@ protected function onReconfigure(): void
292292
$this->getClient()->resetApplication();
293293
$this->validateConfig();
294294
$this->configureClient($this->config);
295-
$this->yiiLogger->getAndClearLog();
295+
$this->yiiLogger?->getAndClearLog();
296296
$this->getClient()->startApp($this->yiiLogger);
297297
}
298298

0 commit comments

Comments
 (0)