The selected PHP version is invalid
Closed this issue · 2 comments
shawnhooper commented
Regardless of the value of the FORGE_PHP_VERSION
environment variable, or even if I remove it entirely from the preview-provision.yml file, I get this The selected PHP version is invalid.
error.
I've tried 8.2
, php82
, php8.2
, etc.
Here's the output in GitHub Actions:
INFO Start finding the server.
INFO Finding the associated site.
INFO ---> Site not found.
INFO Creating a new site.
FAIL ---> The selected PHP version is invalid.
Laravel\Forge\Exceptions\ValidationException
The given data failed to pass validation.
at /composer/vendor/laravel/forge-sdk/src/MakesHttpRequests.php:106
102▕ */
103▕ protected function handleRequestError(ResponseInterface $response)
104▕ {
105▕ if ($response->getStatusCode() == 422) {
➜ 106▕ throw new ValidationException(json_decode((string) $response->getBody(), true));
107▕ }
108▕
109▕ if ($response->getStatusCode() == 404) {
110▕ throw new NotFoundException();
shawnhooper commented
Disregard. I found the problem. Thanks.
mehrancodes commented
I think I should set the FORGE_PHP_VERSION's default to NULL to let Forge choose the installed default version, as this error happens when the selected version might not available on the server or when syntax is incorrect.