Repository navigation
Leave psr/log out of the Phar - #1220
Draft
swissspidy wants to merge 1 commit into
Draft
swissspidy wants to merge 1 commit into
swissspidy wants to merge 1 commit into
Conversation
wp-cli/wp-cli#6439 requires composer/xdebug-handler, which pulls in psr/log. Its logger is never set, so psr/log isn't needed at runtime. Leaving it and its autoload map entries out means WP-CLI's autoloader never answers for Psr\Log, so plugins can load their own version (see wp-cli/wp-cli#4632 and #5920). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWTd5pwpi2xQfDA6mUYkkx
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Companion to wp-cli/wp-cli#6439, which restarts PHP with OPcache's file cache via
composer/xdebug-handler. That bringscomposer/pcreandpsr/logback into WP-CLI's runtime dependencies now thatcomposer/composeris gone (wp-cli/package-command#248).A bundled
psr/logv1 is a known source of clashes with plugins that shippsr/logv2/v3 (wp-cli/wp-cli#4632, wp-cli/wp-cli#5920): WP-CLI's autoloader can answer forPsr\Logfirst. xdebug-handler never has a logger set (setLogger()isn't called), sopsr/logisn't needed at runtime.This leaves
vendor/psr/logout of the Phar and strips its entries from the autoload maps, so WP-CLI's autoloader never answers forPsr\Log. Otherpsr/*packages are kept as before.Draft until wp-cli/wp-cli#6439 is merged and the bundle picks up
composer/xdebug-handler. Until then the bundle has nopsr/log, so this changes nothing yet. The autoload strip pattern was checked against sample classmap, PSR-4 and static-loader lines; a full Phar build withpsr/logpresent hasn't been run yet.Generated by Claude Code