Uh oh!
There was an error while loading. Please reload this page.
Turn on logging for deprecation notices by default - #6773
Conversation
d5d4469 to
63a857fComparekenjis
commented
Oct 28, 2022
Why does this error occur? https://github.com/codeigniter4/CodeIgniter4/actions/runs/3343093343/jobs/5535960965 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
MGatner
commented
Oct 28, 2022
I'm clueless! Maybe PHPUnit is trigger a deprecation warning? We know it parses docblock tags. |
MGatner
commented
Oct 28, 2022
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. |
paulbalandan
commented
Oct 28, 2022
Apparently, PHPUnit parses When it detects the tag, it generates the |
63a857f to
a03e770Comparea03e770 to
dac38bdCompareMGatner
commented
Oct 30, 2022
paulbalandan
commented
Oct 30, 2022
kenjis
commented
Oct 30, 2022
I don't think |
d8fd5e6 to
43fce71CompareUh oh!
There was an error while loading. Please reload this page.
43fce71 to
13aca45CompareHow 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. |
kenjis
commented
Oct 31, 2022
It seems good! I always change it to 9 in development. - public $threshold = 4;+ public $threshold = (ENVIRONMENT === 'production') ? 4 : 9; |
13aca45 to
17ca2c9CompareUh oh!
There was an error while loading. Please reload this page.
17ca2c9 to
c97227aCompare
MGatner
left a comment
There was a problem hiding this comment.
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: