Skip to content

Feat: Param aliases#78

Merged
ChiragAgg5k merged 4 commits intomainfrom
feat-param-aliases
May 5, 2026
Merged

Feat: Param aliases#78
ChiragAgg5k merged 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

  • Adds alias resolution in Server::getArguments: when the canonical param key is absent from the payload, the server now iterates a configured aliases list and uses the first match, leaving canonical key priority intact when present. The logic is correct and safe (!empty() guard handles params without an aliases key).
  • testParamAliases covers four meaningful scenarios (canonical, first alias, second alias, canonical-wins-over-alias); the only gap is a missing test for the "no canonical and no alias present → fall back to default" code path.
  • utopia-php/servers is bumped from 0.3.* to the pinned stable 0.4.0, which carries the new aliases param API this feature depends on.

Confidence Score: 5/5

Safe to merge — the alias resolution logic is correct, the dependency is pinned to a stable release, and existing test coverage is comprehensive.

Only a P2 coverage gap was found; no logic bugs, no security concerns, and no breaking changes to existing behaviour.

No files require special attention; tests/Queue/E2E/Adapter/Base.php has a minor missing test case for the default-fallback scenario.

Important Files Changed

Filename Overview
src/Queue/Server.php Adds alias resolution loop in getArguments: when canonical key is absent from payload and aliases are configured, iterates aliases in order and uses first match. Logic is correct — canonical always wins, !empty() guard is safe when aliases key is absent.
tests/Queue/E2E/Adapter/Base.php Adds testParamAliases covering canonical key, first alias, second alias, and canonical-wins-over-alias scenarios. Missing a test for the "no canonical and no alias present → use default" path.
tests/Queue/servers/tests.php Adds test_alias switch case that asserts the injected $aliasValue param matches the expected value field from the raw payload.
composer.json Bumps utopia-php/servers from 0.3.* to the pinned stable release 0.4.0, which carries the new aliases param API required by this feature.
composer.lock Routine dependency bumps alongside the utopia-php/servers 0.4.0 upgrade; no unexpected changes.

Reviews (3): Last reviewed commit: "Use stable servers 0.4.0" | Re-trigger Greptile

Comment thread composer.json Outdated
Comment thread phpunit.xml Outdated
@ChiragAgg5k ChiragAgg5k merged commit f85ca00 into main May 5, 2026
8 checks passed
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.

3 participants