Log error cause when opcache cannot write to file cache#9258
Merged
arnaud-lb merged 4 commits intophp:PHP-8.2from Sep 3, 2022
Merged
Log error cause when opcache cannot write to file cache#9258arnaud-lb merged 4 commits intophp:PHP-8.2from
arnaud-lb merged 4 commits intophp:PHP-8.2from
Conversation
cmb69
reviewed
Aug 5, 2022
iluuu1994
approved these changes
Aug 5, 2022
devnexen
reviewed
Aug 5, 2022
f096cce to
7baa0ed
Compare
cmb69
reviewed
Aug 6, 2022
Comment on lines
+13
to
+14
| posix_setrlimit(POSIX_RLIMIT_FSIZE, 1, 1) || die('skip Test requires setrlimit(RLIMIT_FSIZE) to work'); | ||
| ini_parse_quantity(ini_get('opcache.jit_buffer_size')) === 0 || die('skip File cache is disabled when JIT is on'); |
Member
There was a problem hiding this comment.
I, personally, dislike this pattern (regardless of whether || or or is used), and would go with a single line if statement.
Member
There was a problem hiding this comment.
Same. Although the style guide says you should add braces to if statements. (Although granted that's for C)
Member
There was a problem hiding this comment.
Then I'd rather change the style guide, than to find some loopholes. :)
Member
There was a problem hiding this comment.
I agree, I don't find single line ifs to be an issue. IMO the only justified concern is:
#define FOO() foo(); bar()
if (baz) FOO();Most of our macros guard against this with a do {} while(0); loop though.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using
opcache.file_cache, opcache can log the following error when it fails to write a cache file:It is not always obvious why it failed. This PR adds the cause of the failure, for example: