Unable to Upgrade PHP Language 7.3x to 7.4x in Flexible App Engine

281 Views Asked by At

Flexible App Engine, says that to specify a PHP language at runtime, it must be specified in the composer as such (https://cloud.google.com/appengine/docs/flexible/php/runtime): GCP

We have the same set up in out YML file and in our composer to specify the PHP language that looks like this:

"require": {
    "php": "^7.4",
}

When we run out bitbucket pipeline, it runs successfully, but it tells us that the PHP language has not been specified when it has. Can someone please explain how we can successfully set our PHP language in App Engine Flexible Environment.

Bitbucket Pipeline

We have tried specifying it in the config like this.

"config": {
    "platform": {
        "php": "7.4"
    },

We have tried specifying the language in the YML file like this.

runtime: php74
env: flex

Please assist.

2

There are 2 best solutions below

0
hakre On

From (an archived copy) of the reference URL provided in your question:

When you specify the PHP version, use the format MAJOR.MINOR.* and do not specify the release version. The PHP runtime is regularly updated to the latest release version and only supports one release version at a time, so specifying a release version can cause an error.

This bold highlight is already in the quoted docs.

Given you're using:

"require": {
    "php": "^7.4",
}

Then I'd say:

  1. Wrong format: ^MAJOR.MINOR is not MAJOR.MINOR.*
  2. Wrong version: The documentation archived from August 2022 states that there is PHP 7.2 and PHP 7.3 available. PHP 7.4 is not mentioned to be chosen from.

Under no circumstances I'd consider this configuration to work while not working unless proven that this is not a dead Google API.

0
GZim On

This is now resolved. GAE Flexible has released support for PHP 7.4x, PHP 8.0x, PHP 8.1x

https://cloud.google.com/appengine/docs/flexible/php/runtime