Skip to content

Feat: Param aliases#53

Open
Meldiron wants to merge 2 commits intomasterfrom
feat-param-alias
Open

Feat: Param aliases#53
Meldiron wants to merge 2 commits intomasterfrom
feat-param-alias

Conversation

@Meldiron
Copy link
Copy Markdown
Contributor

@Meldiron Meldiron commented May 4, 2026

No description provided.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 4, 2026

Greptile Summary

This PR implements param aliases for CLI commands by adding an alias-fallback loop in getParams() (CLI.php lines 308–313) and exposing the aliases parameter through the utopia-php/servers dev branch. The core logic is correct: canonical key lookup runs first, then each declared alias is checked in order, so --e=foo resolves to the email param as expected.

Confidence Score: 4/5

Safe to merge once the utopia-php/servers dependency is pinned to a stable tagged release.

The alias-resolution logic in CLI.php is correct and the previously flagged P1 (alias lookup missing) is now addressed. The only remaining concern is the mutable dev-branch dependency in composer.json, which was already surfaced in a prior review thread and is a pre-merge blocker, not a code logic defect. No P0 or new P1 issues were found in the changed code.

composer.json — dev-branch dependency must be replaced with a stable version tag before merging.

Important Files Changed

Filename Overview
src/CLI/CLI.php Adds alias fallback loop in getParams() — correctly resolves param values from declared aliases when the canonical key is absent from $this->args.
tests/CLI/CLITest.php Adds testParamAliases covering the happy-path with a short alias (--e); missing coverage for second alias, canonical-wins-over-alias precedence, and multiple aliases provided simultaneously.
composer.json Pins utopia-php/servers to mutable dev branch dev-feat-param-aliases instead of a stable tag — already flagged in a previous review thread.
composer.lock Lock file updated consistently with the dev-branch constraint; utopia-php/di and utopia-php/validators bumped to newer patch releases.

Reviews (2): Last reviewed commit: "Fix failing tests" | Re-trigger Greptile

Comment thread composer.json
"require": {
"php": ">=7.4",
"utopia-php/servers": "0.3.*"
"utopia-php/servers": "dev-feat-param-aliases"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Dev-branch dependency should not be merged as-is

"utopia-php/servers": "dev-feat-param-aliases" pins the dependency to a mutable development branch rather than a tagged release. If the branch is force-pushed or rebased after this PR merges, composer install on a fresh checkout will silently pull different code. This should be updated to a stable version tag (e.g. "0.3.*" or a new patch release) once the feature branch is merged into utopia-php/servers.

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