I use cloud build trigger to build my first APP Engine, but I keep receiving following message.
"There is no PHP runtime version specified in composer.json, or
we don’t support the version you specified. Google App Engine
uses the latest 7.3.x version."
I already tried following settings but still don’t work.
composer.json:
"require": {
"php": "^8.1",
In app.yalm:
runtime: php81
In cloudbuild.yaml:
steps:
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: 'bash'
args:
- '-c'
- |
gcloud config set app/cloud_build_timeout 3600
&& gcloud app deploy -q --promote -v=$BUILD_ID
--project=$PROJECT_ID
timeout: '3600s'
And I tried following commend:
composer require php 8.1.*
composer clearcache
composer update
2
Answers
As mentioned in this document
Version handling in buildpack running behind the scene is inconsistent. Issue is discussed here https://github.com/GoogleCloudPlatform/buildpacks/issues/336
In general
"php": "^8.1.*"
should work.If you are dealing with Laravel + App Engine you can check https://github.com/firevel/firevel