Repository navigation
Pass the ImageMagick settings on to the WP-CLI processes - #422
Conversation
setup-php installs ImageMagick on macOS somewhere else than it was built for, and points it at its coders and configuration through MAGICK_* variables. The launched processes did not get these, so Imagick supported none of the formats ImageMagick provides as modules, and PDF previews were never made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Forward inherited ImageMagick variables src/Context/FeatureContext.php |
get_process_env_variables() adds inherited variables with the MAGICK_ prefix to the environment used for launched WP-CLI processes. |
Estimated code review effort: 2 (Simple) | ~5 minutes
Change: Bug fix
Possibly related issues
wp-cli/wp-cli-tests#395: This change forwardsMAGICK_*settings to launchedwpprocesses, but does not declare or check the ImageMagick requirement.wp-cli/wp-cli-tests#393: This change addresses missing ImageMagick environment settings in launchedwpprocesses, but does not implement external-tool requirement checks.
Suggested labels: bug, scope:testing
Suggested reviewers: swissspidy
Merge Risk: 
Minimal · up to 91e9c
-
No actionable merge-blocking risk was identified in this environment-forwarding change.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
media-command's macOS job fails every night on its 7 PDF scenarios, even though Ghostscript is installed there.
Cause
MAGICK_CODER_MODULE_PATH,MAGICK_CONFIGURE_PATHand the like.wpprocesses the tests launch get only$_ENVand a few named variables.$_ENVis empty with the usualvariables_order, so theMAGICK_*variables never arrive.Change
Every
MAGICK_*variable is passed on to the launched processes.Testing
I ran a diagnostic scenario on the macOS runner in media-command:
Imagick::queryFormats( 'PDF' )PDF, 262 formats in totalphpcs and PHPStan pass.
🤖 Generated with Claude Code
Summary by CodeRabbit
MAGICK_environment variables are now available to launched WP-CLI processes, helping commands use the same configuration as the surrounding environment. Other environment settings and coverage behavior remain unchanged.