-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add alias support and QA tooling #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Thavarshan <[email protected]>
Co-authored-by: Thavarshan <[email protected]>
Co-authored-by: Thavarshan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9939c934b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds alias management functionality to phpvm (achieving parity with nvm) and introduces comprehensive QA tooling including linting, formatting, and automated testing. The changes implement phpvm alias/phpvm unalias commands, alias resolution in install/use/which commands, alias display in list, latest/stable keyword support, and a full QA infrastructure with ShellCheck, shfmt, Makefile, BATS tests, and CI workflow.
Changes:
- Implemented alias management system with create, list, and delete operations
- Added alias resolution to existing commands (install, use, which, auto)
- Introduced
latest/stablekeyword support for latest installed PHP version - Added comprehensive QA tooling: ShellCheck config, shfmt config, Makefile, qa.sh runner, BATS test suite, and CI workflow
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| phpvm.sh | Core alias functionality: resolution, creation, listing, deletion; placeholder stubs for exec/run/ls-remote/cache; main() updates for new commands |
| tests/test_helper.bash | BATS test setup with mock PHP installation helper |
| tests/01_core.bats | Core functionality tests including alias resolution |
| tests/02_features.bats | Feature tests for alias management and placeholders |
| tests/03_error_handling.bats | Error handling tests for validation and edge cases |
| tests/README.md | Comprehensive test suite documentation |
| TESTING.md | Testing guide covering all test infrastructure |
| README.MD | Updated with alias commands and cache dir documentation |
| NVM_FEATURE_GAPS.md | Comprehensive feature gap analysis document |
| FEATURE_CHECKLIST.md | Quick reference checklist for feature parity tracking |
| CONTRIBUTING.md | Development setup guide |
| ANALYSIS_README.md | Summary of feature analysis documents |
| CHANGELOG.md | Release notes for alias features and QA tooling |
| Makefile | Development commands for lint, format, test |
| qa.sh | QA runner script for all quality checks |
| .shellcheckrc | ShellCheck linter configuration |
| .shfmt.config | shfmt formatter configuration |
| .vscode/settings.json | VS Code editor settings for shell development |
| .github/workflows/quality.yml | CI workflow for quality assurance |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… jobs to trigger on push to main
Purpose
Add alias management to phpvm (parity with nvm) and introduce QA tooling (linting, formatting, and tests) to support safe feature expansion. No linked issues yet.
Approach
phpvm alias/phpvm unalias, alias resolution ininstall,use, andwhich, plus alias display inlist.phpvm alias <pattern>), default alias fallback forphpvm use, and alias resolution in.phpvmrc.latest/stablekeyword resolution to latest installed PHP.Open Questions and Pre-Merge TODOs
system? Yes — current validation permitssystem, which matches existing version handling.phpvm aliasaccept pattern filtering (phpvm alias <pattern>)? Yes — now supported via pattern filtering..phpvmrc? Yes —.phpvmrcnow resolves aliases.latest/stablebe resolved from remote versions (nvm-style), not just installed versions?Learning
Reviewed current nvm alias behavior and adapted it for phpvm’s file-based alias storage. Implemented with bash helpers and expanded tests using BATS plus static analysis via ShellCheck and formatting via shfmt.