Skip to content

Feat: Param aliases#78

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

Feat: Param aliases#78
Meldiron wants to merge 3 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

Adds param alias resolution to the queue server: when a canonical payload key is absent, Server::getArguments now falls back through a list of aliases (in declaration order) to find the value. Four worker configurations and a new E2E test suite cover canonical, first-alias, second-alias, and canonical-beats-alias scenarios.

Confidence Score: 5/5

Safe to merge once the utopia-php/servers dev-branch dependency is replaced with a stable release.

No P0 or P1 findings. The core alias-resolution logic in Server.php is straightforward and handles all edge cases (canonical present, alias fallback, none found). The dev-branch dependency was already flagged in a prior review thread. All other changes are consistent test scaffolding.

composer.json — dev-branch dependency on utopia-php/servers must be replaced before merging (already flagged).

Important Files Changed

Filename Overview
src/Queue/Server.php Adds alias resolution in getArguments: when the canonical key is absent from the payload, iterates over $param['aliases'] in order and uses the first matching key. Logic is correct and safe.
tests/Queue/E2E/Adapter/Base.php Adds testParamAliases covering canonical key, first-alias, second-alias, and canonical-wins scenarios; consistent with existing testEvents pattern.
tests/Queue/servers/tests.php Adds ?string $aliasValue = null to handleRequest and a test_alias switch case that asserts the resolved alias value matches the expected value.
tests/Queue/servers/AMQP/worker.php Adds aliasValue param with aliases ['alias_value', 'aliased'] to the job definition, consistent across all four worker files.
composer.json Pins utopia-php/servers to a dev-branch alias (dev-feat-param-aliases as 0.3.99); intended as a temporary dependency until the corresponding servers PR is merged and tagged.

Reviews (2): Last reviewed commit: "Remove more leftover" | Re-trigger Greptile

Comment thread composer.json
"php-amqplib/php-amqplib": "^3.7",
"utopia-php/di": "0.3.*",
"utopia-php/servers": "0.3.*",
"utopia-php/servers": "dev-feat-param-aliases as 0.3.99",
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 must be replaced before merging

utopia-php/servers is pinned to dev-feat-param-aliases as 0.3.99, a feature branch alias that is not a stable release. Any consumer running composer update or a fresh composer install will receive whatever is on that branch at that moment, making the build non-reproducible and potentially broken once the branch is rebased or deleted. This should be replaced with a concrete stable version (e.g. "0.3.*" or a specific tag) after the corresponding utopia-php/servers PR is merged and tagged.

Comment thread phpunit.xml Outdated
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