When I run analyze my Yii2 project with phpstan v 0.12.34 and proget-hq/phpstan-yii2 v 0.7.3 I get next warning:
PHP Warning: Use of undefined constant YII_DEBUG - assumed 'YII_DEBUG' (this will throw an Error in a future version of PHP) in /config/web.php on line 54
Warning: Use of undefined constant YII_DEBUG - assumed 'YII_DEBUG' (this will throw an Error in a future version of PHP) in /config/web.php on line 54
It appears, because in class ServiceMap there aren't defined this constant. If add to this class constant \defined('YII_DEBUG') or define('YII_DEBUG', true); it is all right. Please, fix this bug in your future release.
When I run analyze my Yii2 project with phpstan v 0.12.34 and proget-hq/phpstan-yii2 v 0.7.3 I get next warning:
It appears, because in class
ServiceMap
there aren't defined this constant. If add to this class constant\defined('YII_DEBUG') or define('YII_DEBUG', true);
it is all right. Please, fix this bug in your future release.