fix: use error_log for config-cache permission warning (closes #615) - #773
Merged
s2x merged 7 commits intoAug 22, 2026
Merged
Conversation
added 7 commits
August 22, 2026 23:27
s2x
deleted the
refactor/issue-615-configloader-e-user-warning-fallback-esc
branch
August 22, 2026 21:49
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.
Description
Closes #615
Changes
ConfigLoader::validateCacheFilePermissions()no longer emits the fail-open config-cache permission warning viatrigger_error(..., E_USER_WARNING)when no PSR-3 logger is available; the warning is now written directly viaerror_log().DebugErrorHandlerin debug mode, which escalatesE_USER_WARNINGtoErrorException) can no longer turn the advisory "fail-open with a signal" warning into a hard boot failure — fail-open stays fail-open, while unrelated warnings still reach the error handler as before. This mirrors the codebase-wide no-logger convention (ServerWorker,HttpRequestHandler,RequestConverter, and the [Bug] SfxDownloader zip-extraction cleanup does not handle unlink() failure — self-perpetuating loop from #642 can persist silently #670 precedent).testValidateCacheFilePermissionsDoesNotThrowWithThrowingErrorHandlerAndNoLoggerpins the semantics: with a throwingE_USER_WARNINGhandler installed, the no-logger unreadable-metadata path completes without an exception, the handler is never invoked forE_USER_WARNING, and the warning still reaches the log viaerror_log().trust-downgrade no-logger tests to captureerror_log()output.docs/security.md, the[Unreleased][Enhancement] Add an explicit opt-out for the config-cache ownership guard #648 opt-out CHANGELOG entry, and thevalidateCacheFilePermissions()phpdoc updated to document theerror_log()channel and why.Changelog
Under [Unreleased] > Fixed: ConfigLoader no longer emits the advisory config-cache permission warning via
trigger_error(E_USER_WARNING); it is written viaerror_log()so a throwing error handler cannot turn the fail-open warning into a hard boot failure.Proof of Work
docs/proof_of_work/0615-configloader-e-user-warning-fallback/— 4 review rounds (F1-F6 all resolved)Code Review