Repository navigation
Document how wp package install resolves a package name - #255
muneeb-ashraf wants to merge 1 commit into
Conversation
The docs still described names as coming from WP-CLI's package index, which is deprecated. Explain the lookup order the command uses (package index, Packagist, GitHub, GitLab) and the GITHUB_TOKEN and GITLAB_TOKEN variables it reads for the GitHub and GitLab checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6LxjEQnP4PPgXXvAM3M2F
|
Hello! 👋 Thanks for opening this pull request! Please check out our contributing guidelines. We appreciate you taking the initiative to contribute to this project. Contributing isn't limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation. Here are some useful Composer commands to get you started:
To run a single Behat test, you can use the following command: # Run all tests in a single file
composer behat features/some-feature.feature
# Run only a specific scenario (where 123 is the line number of the "Scenario:" title)
composer behat features/some-feature.feature:123You can find a list of all available Behat steps in our handbook. |
wp package install resolves a package name
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe README and ChangesPackage lookup documentation
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~4 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The lookup documentation matches the implementation and does not change runtime behavior. The PHP checks could not complete in this environment, but no actionable issue was established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Copilot review overview
0 open findings
What changed in this PR
Updates WP-CLI package install documentation to clarify supported package spec formats and how name resolution is performed.
Changes:
- Reworded the “package name” specifier to use a concrete example (
wp-cli/server-command). - Documented the lookup order (WP-CLI index → Packagist → GitHub/GitLab URL fallbacks).
- Documented environment variables for avoiding GitHub/GitLab rate limits during remote checks.
| File | Description |
|---|---|
| src/Package_Command.php | Updates the wp package install command docblock with clearer package name resolution behavior and token hints. |
| README.md | Mirrors the same clarification in the public README command documentation. |
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
The
wp package installdocs say a package can be given as a "Package name from WP-CLI's package index". That index is deprecated:wp package browsesays it "has been deprecated and will not be updated further". In practice, a name now resolves from Packagist or from GitHub or GitLab, and the docs don't mention either.This updates the docblock (and the README section generated from it) to describe what
get_package_by_shortened_identifier()does:https://repo.packagist.org/p2/<package-name>.json).https://github.com/<package-name>.git, usingGITHUB_TOKENif it is set.https://gitlab.com/<package-name>.git, usingGITLAB_TOKENif it is set.For example,
runcommand/db-ack, which the Running commands remotely guide installs, isn't on Packagist and only installs through the GitHub fallback.Documentation only, no behavior change.
composer phpcspasses on the changed file.AI assistance: Claude Code (Claude Opus 5.5) helped trace the lookup order and draft the wording. I checked it against
get_package_by_shortened_identifier().Summary by CodeRabbit
GITHUB_TOKENorGITLAB_TOKENcan help avoid rate limits during repository checks.