Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add global constant YII_DEBUG_VERSION #266

Open
vjik opened this issue Jul 30, 2024 · 4 comments
Open

Add global constant YII_DEBUG_VERSION #266

vjik opened this issue Jul 30, 2024 · 4 comments

Comments

@vjik
Copy link
Member

vjik commented Jul 30, 2024

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.

@xepozz
Copy link
Member

xepozz commented Jul 31, 2024

check for existing Yii Debug in app

What's the reason for it?

@vjik
Copy link
Member Author

vjik commented Jul 31, 2024

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.

@xepozz
Copy link
Member

xepozz commented Aug 2, 2024

Package implemented collector must depend on specific version of yii-debug to check compatibility.
Collectors must be loaded by Debug, not from userland

@vjik
Copy link
Member Author

vjik commented Aug 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants