Skip to content

Feat: Param aliases#61

Open
Meldiron wants to merge 4 commits intomainfrom
feat-param-aliases
Open

Feat: Param aliases#61
Meldiron wants to merge 4 commits intomainfrom
feat-param-aliases

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 adds an aliases parameter to Action::param() and forwards it to all three hook contexts (HTTP, CLI, Worker) via a named argument with a ?? [] fallback. The implementation is clean and consistent across all call sites, and test coverage was extended to verify both the metadata forwarding and the empty-array default.

Confidence Score: 5/5

Safe to merge once the dev-branch dependencies are replaced with stable releases (already flagged in a previous review thread).

Only P2 findings remain; the logic changes in Action.php and Platform.php are minimal, correct, and uniformly applied. The earlier P1-level concern about dev-branch dependencies was already raised in a previous thread and is not repeated here.

composer.json — branch name inconsistency for utopia-php/cli (feat-param-alias vs feat-param-aliases) and all four dependencies still on dev branches.

Important Files Changed

Filename Overview
src/Platform/Action.php Adds aliases as an optional named parameter to param(), storing it in both the options and params arrays — straightforward and consistent with existing field handling.
src/Platform/Platform.php Forwards aliases to all three $hook->param() call sites (HTTP, CLI, Worker) using a named argument with a ?? [] fallback for backward compatibility — consistent across all three init methods.
tests/e2e/HTTPServicesTest.php Adds aliases to the $actionParamKeys coverage loop and dedicated assertions for the alias values and empty-array default — addresses the previously flagged gap.
tests/Platform/TestActionWithParams.php Adds an email param with aliases and example to exercise the new feature in tests; callback signature updated accordingly.
composer.json All four utopia-php dependencies pinned to dev branches; utopia-php/cli uses branch dev-feat-param-alias (note the missing trailing 's') while the other three use dev-feat-param-aliases.
.github/workflows/tests.yml PHP 8.1 and 8.2 removed from the test matrix, aligning CI with the >=8.3 requirement already declared in composer.json.
composer.lock Lock file updated for all four utopia-php dev-branch pins plus minor bumps of several transitive dependencies; utopia-php/fetch removed as queue no longer depends on it.

Reviews (4): Last reviewed commit: "Remove 8.1 nad 8.2 support due to failin..." | Re-trigger Greptile

Comment thread composer.json
Comment thread src/Platform/Platform.php
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.

1 participant