Skip to content

Feat: Support multiple aliases + tests; + Removal of params#59

Merged
Meldiron merged 1 commit intomainfrom
feat-multiple-aliases
Apr 17, 2026
Merged

Feat: Support multiple aliases + tests; + Removal of params#59
Meldiron merged 1 commit intomainfrom
feat-multiple-aliases

Conversation

@Meldiron
Copy link
Copy Markdown
Contributor

No description provided.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 17, 2026

Greptile Summary

This PR upgrades the HTTP alias system from a single-alias model (httpAliasPath: ?string + unused httpAliasParams: array) to a multi-alias model (httpAliases: array<string>), allowing httpAlias() to be called multiple times. It also removes the alias $params argument entirely (it was stored but never forwarded to Route::alias(), so it was effectively dead code). A new TestActionAliased fixture and an e2e test covering all three aliases and the primary path are included.

Confidence Score: 5/5

Safe to merge; the only concern is a breaking public-API removal that may require a semver bump.

All findings are P2. The logic change is correct and well-covered by the new e2e test. The removed $params was never forwarded to Route::alias(), so no functional regression exists. The breaking-API concern is worth noting but does not block merging by itself.

src/Platform/Scope/HTTP.php — public API methods removed without a deprecation shim.

Important Files Changed

Filename Overview
src/Platform/Scope/HTTP.php Replaces single-alias nullable string + params array with a growable string array; removes getHttpAliasPath(), getHttpAliasParams(), and the $params argument — a breaking public-API change.
src/Platform/Platform.php Iterates getHttpAliases() instead of the single-path guard; straightforward and correct change.
tests/Platform/TestActionAliased.php New test fixture registering three aliases on one action; consistent with existing test-action patterns.
tests/Platform/TestService.php Registers the new TestActionAliased fixture; trivial, correct change.
tests/e2e/HTTPServicesTest.php Adds testAliasedAction() that exercises all three aliases plus the primary path; good coverage.

Reviews (1): Last reviewed commit: "Support multiple aliases + tests; + Remo..." | Re-trigger Greptile

Comment on lines +78 to 83
public function httpAlias(string $path): self
{
$this->httpAliasPath = $path;
$this->httpAliasParams = $params;
$this->httpAliases[] = $path;

return $this;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Breaking API change without deprecation

getHttpAliasPath(), getHttpAliasParams(), and the $params argument on httpAlias() are all removed in one step, with no deprecation shim. Any downstream code calling getHttpAliasPath(), getHttpAliasParams(), or httpAlias($path, $params) will throw a fatal error at runtime. If the library follows semver, this warrants at minimum a major-version bump or a temporary compatibility shim (getHttpAliasPath() returning the first element of $httpAliases, etc.) before removal.

@Meldiron Meldiron merged commit d23af53 into main Apr 17, 2026
7 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.

2 participants