feat(composer): add compact composer command#1539
Open
lamkimphu258 wants to merge 1 commit intortk-ai:developfrom
Open
feat(composer): add compact composer command#1539lamkimphu258 wants to merge 1 commit intortk-ai:developfrom
lamkimphu258 wants to merge 1 commit intortk-ai:developfrom
Conversation
Collaborator
📊 Automated PR Analysis
SummaryAdds a first-class Review Checklist
Analyzed automatically by wshm · This is an automated analysis, not a human review. |
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.
Summary
rtk composersupport for common Composer dependency workflows.install,update,require, anddump-autoload, while preserving failures, warnings, requested detail flags, and Composer semantics.show,licenses,check-platform-reqs, andfund, plus discovery rewrites for supported Composer commands including global flags like-d/--working-dir.Details
This branch adds a Composer command wrapper under
src/cmds/php/and wires it into the CLI and rewrite discovery path. The wrapper chooses between three modes:--format=json.Correctness-oriented cases covered in this branch:
ok (up to date).composer show vendor/packagehandles Composer's single-package JSON shape without collecting nested license objects as packages.ok (up to date)even when Composer prints boilerplate verification/autoload lines.composer showpackage lists append an omitted count.composer show --tree/-tpass through so tree output is preserved.check-platform-reqstreats missing requirements as failures and includes failed requirement context.Composer Savings Report
Method: representative Composer outputs from the new tests, using RTK's tracking estimator:
ceil(chars / 4).composertokensrtk composertokensExamples of filtered output:
Test plan
cargo fmt --all && cargo clippy --all-targets && cargo testrtk composeroutput inspected through focused formatter/parser tests and savings report fixturesNotes:
cargo clippy --all-targetscompletes successfully but reports existing warnings outside this Composer change.CONTRIBUTING.md: this PR targetsdevelop, keeps a focused Composer scope, uses a conventional commit, and includes tests.