illuminate
illuminate copied to clipboard
Components throw error with wrong return type (cache & logger)
What steps will reproduce the problem?
Added the following to backend/config/main.php
'cache' => Yii2tech\Illuminate\Yii\Caching\Cache::class,
Added the following to config/yii.php
'middleware' => [
'container' => [
'__class' => Yii2tech\Illuminate\Yii\Di\Container::class,
],
'logger' => [
'__class' => Yii2tech\Illuminate\Yii\Log\Logger::class,
],
],
What is the expected result?
App to run without PHP errors.
What do you get instead?
Yii2tech\Illuminate\Yii\Log\Logger::defaultIlluminateLogger(): Return value must be of type yii\log\Logger, Illuminate\Log\LogManager returned
ii2tech\Illuminate\Yii\Caching\Cache::defaultIlluminateCache(): Return value must be of type Illuminate\Contracts\Cache\Repository, Illuminate\Cache\CacheManager returned
Additional info
App runs fine without these configurations.
Q | A |
---|---|
This Package Version | 1.2.1 |
Laravel Framework Version | 9.33.0 |
Yii Framework Version | 2.0.46 |
PHP version | 8.1 |
Operating system | Mac Monterey 12.2.1 |