Skip to content

Conversation

@Thavarshan
Copy link
Owner

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

  • Implemented phpvm alias/phpvm unalias, alias resolution in install, use, and which, plus alias display in list.
  • Added alias parity improvements: pattern filtering (phpvm alias <pattern>), default alias fallback for phpvm use, and alias resolution in .phpvmrc.
  • Added latest/stable keyword resolution to latest installed PHP.
  • Added QA tooling: ShellCheck config, shfmt config, Makefile commands, QA runner, BATS tests, and CI workflow.
  • Updated built-in tests and BATS tests to validate alias behavior.

Open Questions and Pre-Merge TODOs

  • Should aliases be allowed to point to system? Yes — current validation permits system, which matches existing version handling.
  • Should phpvm alias accept pattern filtering (phpvm alias <pattern>)? Yes — now supported via pattern filtering.
  • Should aliases be resolved in .phpvmrc? Yes.phpvmrc now resolves aliases.
  • Should latest/stable be 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.

@Thavarshan Thavarshan self-assigned this Jan 15, 2026
Copilot AI review requested due to automatic review settings January 15, 2026 15:30
@Thavarshan Thavarshan added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 15, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Copy link
Contributor

Copilot AI left a 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/stable keyword 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.

@Thavarshan Thavarshan merged commit d0e216d into main Jan 15, 2026
16 checks passed
@Thavarshan Thavarshan deleted the feature/alias-qa-setup branch January 15, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants