-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Invalidate path even if the file was deleted #12323
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
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.
The patch makes sense. The minimal changes are requested.
I think, it may make sense to target this to PHP-8.3.
@adoy @bukka @ericmann @iluuu1994 what do you think?
This could be in some way considered as a bug fix so I'm fine this going to PHP 8.3. @dstogov Do you see any issue with this going even to 8.2? Seems like logical behaviour to be able to invalidate deleted file. |
68a452e
to
a5ab365
Compare
a5ab365
to
3b7c0da
Compare
Ooh, we seem to have a test checking this return value. Updated the test as well |
@dstogov Not that I object, but always returning |
I agree with Ilija here. Successfully resetting the cache for a file and telling the developer it failed is not great, but safe. Not successfully resetting the cache (because the realpath is different) and telling the developer it succeeded might be unsafe if the developer relies on the reset working. |
OK. I have to agree. @mikhainin please revert it back and sorry for the noise. |
3b7c0da
to
c54983a
Compare
Not a problem, returned the initial change - the test is now not broken and not changed |
@iluuu1994 please merge this into appropriate branch (I'm not sure 8.3 or 8.1). |
c54983a
to
736a420
Compare
Great, thank you @mikhainin! |
If the script was cached and deleted, the current implementation will not be able to invalidate it.
This change makes it still possible to delete script and then force its invalidation