Skip to content

Deployment error when upgrade Magento cloud 2.4.4 to php8.1

When updated .magento.app.yaml php version to 8.1, the deployment to magento cloud failed and showed the error below:

  Executing build hook...
    W: Installing dependencies from lock file (including require-dev)
    W: Verifying lock file contents can be installed on current platform.
    W: Your lock file does not contain a compatible set of packages. Please run composer update.
    W: 
    W:   Problem 1
    W:     - laminas/laminas-dependency-plugin is locked to version 2.3.0 and an update of this package was not requested.
    W:     - laminas/laminas-dependency-plugin 2.3.0 requires composer-plugin-api >=1.1.0 <2.3.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint.
    W:   Problem 2
    W:     - laminas/laminas-dependency-plugin 2.3.0 requires composer-plugin-api >=1.1.0 <2.3.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint.
    W:     - magento/product-community-edition 2.4.4-p1 requires laminas/laminas-dependency-plugin ^2.2.0 -> satisfiable by laminas/laminas-dependency-plugin[2.3.0].
    W:     - magento/product-community-edition is locked to version 2.4.4-p1 and an update of this package was not requested.
    W: 
  
  E: Error building project: Step failed with status code 2.

E: Error: Unable to build application, aborting.