Devlog — 2026-06-05 — VersionChangerController Fix
An issue was identified in VersionChangerController where the install process attempted to reuse the getDownloadUrl() route method by creating a standard Laravel Request object and passing it directly to the method.
The getDownloadUrl() method is designed as a route action and expects a GetDownloadUrlRequest instance. Because a regular Illuminate\Http\Request was passed instead, Laravel could not satisfy the method’s type requirements, resulting in a TypeError during execution.
To resolve this, the download URL resolution logic was separated from the request handling layer. A new protected helper method, resolveDownloadUrl(?string $type, ?string $version): array, was introduced to contain the shared business logic.
The getDownloadUrl() endpoint now reads the validated request parameters and delegates the actual resolution work to the helper method, preserving route validation behavior. The install() method was updated to call resolveDownloadUrl() directly, eliminating the need to construct or fake request objects internally.
As part of the cleanup, the unused Illuminate\Http\Request import was removed.
Modified file:
- panel/app/Http/Controllers/Api/Client/Servers/VersionChangerController.php
For future development, any controller methods that require the same resolution logic should call the helper directly rather than attempting to reuse route actions with manually constructed Request instances.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.