-
Notifications
You must be signed in to change notification settings - Fork 2k
Turn on logging for deprecation notices by default #6773
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
Conversation
d5d4469 to
63a857f
Compare
|
Why does this error occur? https://github.com/codeigniter4/CodeIgniter4/actions/runs/3343093343/jobs/5535960965 |
I'm clueless! Maybe PHPUnit is trigger a deprecation warning? We know it parses docblock tags. |
|
I didn't know this feature existed: https://phpunit.readthedocs.io/en/9.5/configuration.html#the-ignoredeprecatedcodeunits-attribute Doesn't explicitly seem like it would actually trigger a deprecation though. |
Apparently, PHPUnit parses When it detects the tag, it generates the |
63a857f to
a03e770
Compare
a03e770 to
dac38bd
Compare
|
I don't think |
d8fd5e6 to
43fce71
Compare
43fce71 to
13aca45
Compare
|
How about some way of supporting different environment-specific levels? Like if This won't affect existing installations nor current logging expectations in production, and developers can always change it in new projects. |
|
It seems good! I always change it to 9 in development. - public $threshold = 4;
+ public $threshold = (ENVIRONMENT === 'production') ? 4 : 9; |
13aca45 to
17ca2c9
Compare
17ca2c9 to
c97227a
Compare
MGatner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks team! Very nice work @paulbalandan, glad to have this one in.
Description
Following up on #6705 , this turns on the feature by default.
Deprecation notices should not halt execution. These notices are here to notify the users that something will not work in the future. They should not be forced to fix it now.
This PR changes the following:
5CODEIGNITER_SCREAM_DEPRECATIONSto temporarily throw deprecations in tests (for convenience rather than changing the config).Related: #6764
Checklist: