lando / acquia

The Official Acquia Lando Plugin
https://docs.lando.dev/acquia
GNU General Public License v3.0
2 stars 6 forks source link

The application requires the version "^8.0" or greater. #45

Open cfortin opened 2 years ago

cfortin commented 2 years ago

Ubuntu 20.04.4 LTS PHP (local) 7.4.29

I powered up a client's Drupal 8 Aquia BLT project today to be met with << The application requires the version "^8.0" or greater. >>

name: mggv2
recipe: acquia
config:
  acli_version: latest
  ah_application_uuid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  ah_site_group: mggv2
  php: 7.4
  xdebug: true
tooling:
  blt:
    service: appserver
    cmd: /app/vendor/bin/blt
services:
  appserver:
    type: php:7.4
    build_as_root:
      - apt update && apt install libgmp-dev -y && docker-php-ext-install gmp
      - docker-php-ext-enable gmp
    xdebug: "debug,develop"
    config:
      php: /app/config/php/php.ini/php74.ini
    overrides:
      environment:
        # Support debugging CLI with XDEBUG.
        PHP_IDE_CONFIG: "serverName=mggv2.lndo.site"
        XDEBUG_SESSION_START: lando

Updating both 7.4 refs to 8.1 and attempting to rebuild, produces :

PHP Parse error:  syntax error, unexpected token "match" in /app/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiff.php on line 699

Parse error: syntax error, unexpected token "match" in /app/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiff.php on line 699

ERROR ==>  message=, stack=Error
    at /snapshot/cli/lib/shell.js
From previous event:
    at Shell.sh (/snapshot/cli/lib/shell.js)
    at Object.dc (/snapshot/cli/lib/bootstrap.js)
    at compose (/snapshot/cli/lib/bootstrap.js)
From previous event:
    at /snapshot/cli/lib/router.js
    at processImmediate (internal/timers.js:464:21)
From previous event:
    at Object.run (/snapshot/cli/lib/router.js)
    at run (/snapshot/cli/lib/engine.js)
    at /snapshot/cli/lib/router.js
From previous event:
    at Object.eventWrapper (/snapshot/cli/lib/router.js)
    at Engine.engineCmd (/snapshot/cli/lib/engine.js)
    at Engine.run (/snapshot/cli/lib/engine.js)
    at Object.runBuild (/snapshot/cli/plugins/lando-services/lib/utils.js)
    at AsyncEvents.<anonymous> (/snapshot/cli/plugins/lando-services/app.js)
    at AsyncEvents.handle (/snapshot/cli/lib/events.js)
    at /snapshot/cli/lib/events.js
From previous event:
    at AsyncEvents.emit (/snapshot/cli/lib/events.js)
From previous event:
    at App.start (/snapshot/cli/lib/app.js)
    at /snapshot/cli/lib/app.js
From previous event:
    at App.rebuild (/snapshot/cli/lib/app.js)
    at Object.run (/snapshot/cli/plugins/lando-core/tasks/rebuild.js)
From previous event:
    at /snapshot/cli/lib/cli.js
From previous event:
    at Object.handler (/snapshot/cli/lib/cli.js)
    at Object.runCommand (/snapshot/cli/node_modules/yargs/lib/command.js:238:44)
    at Object.parseArgs [as _parseArgs] (/snapshot/cli/node_modules/yargs/yargs.js:1063:30)
    at Function.get [as argv] (/snapshot/cli/node_modules/yargs/yargs.js:1004:21)
    at Cli.init (/snapshot/cli/lib/cli.js)
    at Cli.run (/snapshot/cli/lib/cli.js)
    at Object.<anonymous> (/snapshot/cli/bin/lando.js)
    at Module._compile (pkg/prelude/bootstrap.js:1887:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.runMain (pkg/prelude/bootstrap.js:1940:12)
    at internal/main/run_main_module.js:17:47, __stackCleaned__=true

Have I entered vicious cycle territory? Any help would be very much appreciated! Thank you!

cfortin commented 2 years ago

Acquia BLT versions 12 and 13 require Drupal 9.x so I can't upgrade from BLT 11.7.0.

I haven't changed anything, either locally or in my lando config, apart from upgrading to latest version and trying again.

rubenvarela commented 2 years ago

Check #44 for fix in the replies.

Check #43 for an idea to prevent this.

cfortin commented 2 years ago

Thank you very much @rubenvarela

rubenvarela commented 2 years ago

@cfortin Of course!

Been dealing with it on a bunch of sites.

cfortin commented 2 years ago

As per @rubenvarela and @labboy0276 's excellent contributions elsewhere, I fixed this by changing this entry:

config:
  acli_version: latest

to:

config:
  acli_version: 1.30.1

and a quick rebuild:

rm -rf vendor/ and lando rebuild

Thanks again guys!