Skip to content

Require symfony/finder for building the Phar in bundle tests - #84

Merged
swissspidy merged 1 commit into
mainfrom
fix/require-symfony-finder
Nov 26, 2026
Merged

swissspidy merged 1 commit into
mainfrom
fix/require-symfony-finder

Conversation

@swissspidy

@swissspidy swissspidy commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

The wp-cli-bundle legs (Phar and source) still fail with Class "Symfony\Component\Finder\Finder" not found in vendor/wp-cli/wp-cli-bundle/utils/make-phar.php, e.g. https://github.com/wp-cli/automated-tests/actions/runs/45725576112/job/139594465174.

wp-cli/wp-cli-bundle#1215 added symfony/finder to the bundle's require-dev, which fixes the bundle's own builds. But here the bundle is a dependency, and Composer never installs a dependency's require-dev. Finder used to come in through composer/composer via wp-cli/package-command, which wp-cli/package-command#248 removed.

This requires symfony/finder directly, like the bundle's other dev dependencies (wp-cli/package-command, wp-cli/wp-cli-tests) that are already listed here. ^5.4 matches what the bundle locks; a composer update --dry-run resolves it to v5.4.45.


Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • Updated internal project maintenance. There are no visible changes to the app’s features, behavior, or interface in this release.

wp-cli-bundle's make-phar.php uses Symfony Finder, which it now requires
in require-dev (wp-cli/wp-cli-bundle#1215). Dev requirements of a
dependency aren't installed, and package-command no longer pulls it in
through composer/composer, so require it here like the bundle's other
dev dependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UWTd5pwpi2xQfDA6mUYkkx
Copilot AI balanced review requested due to automatic review settings November 26, 2026 08:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Composer’s required dependencies now include symfony/finder with the ^5.4 version constraint.

Changes: Composer dependency update

Layer / File(s) Summary
Add required dependency
composer.json
Adds symfony/finder with the ^5.4 version constraint to Composer’s required dependencies.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Suggested reviewers: schlessera

Merge Risk: Minimal · up to 72b53

This adds the Finder library as a direct dependency so the Phar build can find it. The change is small and low risk, and no merge-blocking issues were found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: adding symfony/finder as a required dependency so the bundle Phar build in tests can find Symfony Finder. The raw summary and objectives confirm that composer.json add…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: adding symfony/finder as a required dependency so the bundle Phar build in tests can find Symfony Finder. The raw summary and objectives confirm that composer.json adds symfony/finder ^5.4 to the required dependencies to fix the failing Phar and source bundle test jobs.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • 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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9063e03f-e35d-406f-8529-0a538dcbde6c
Commits

Reviewing files that changed from the base of the PR and between 9e3b7bd and 72b5361.

Files selected for processing: 1

  • composer.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Copy link
Copy Markdown
Member Author

The package-command Phar legs fail on the same three scenarios as on main (e.g. https://github.com/wp-cli/automated-tests/actions/runs/45514624311): "Download Composer once into the WP-CLI cache", "Reject a ZIP package whose composer.json name contains path-traversal components" and "Update package that is already up to date". They test package-command features from wp-cli/package-command#248 against the nightly Phar, which still bundles package-command v3.0.2, so they'll pass once package-command is released and the bundle is updated. They aren't related to this change, which only affects the wp-cli-bundle legs (the missing Symfony\Component\Finder\Finder class).


Generated by Claude Code

@swissspidy
swissspidy merged commit ea7b99c into main Nov 26, 2026
150 of 156 checks passed
@swissspidy
swissspidy deleted the fix/require-symfony-finder branch November 26, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants