Open vjik opened 1 month ago
check for existing Yii Debug in app
What's the reason for it?
check for existing Yii Debug in app
What's the reason for it?
I was supposed to use it to add collectors, but existence is not enough, need check enabled also.
Constant may use to check whether code in package support current version Yii Debug or not.
Package implemented collector must depend on specific version of yii-debug to check compatibility. Collectors must be loaded by Debug, not from userland
We don't can add yiisoft/yii-debug
dependency to our packages. Constant helps to check Yii Debug version before configure events like here: https://github.com/yiisoft/yii-view-renderer/blob/master/config/events-web.php
This will allow us to check for existing Yii Debug in app. Also we will can check Yii Debug version via compare_version().
Constant may be used in package configurations instead of params, for example here: https://github.com/yiisoft/yii-view-renderer/blob/master/config/events-web.php
Constant may be defined in PHP file that include via "autoload" section in Composer.