lando / acquia

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

Acquia Recipe Always Uses Composer 2 #17

Closed anthonybarsotti closed 2 years ago

anthonybarsotti commented 3 years ago

I have an Acquia site that I'm trying to clone down into lando but the site needs Composer version ^1.0 and regardless of the version specified in the .lando.yml files' config.composer_version setting, it's still using version 2.0.12. I've tried destroying and rebuilding after updating the .lando.yml with several different values specified for the composer_version setting (I tried 1, '1', and '1.10.21') and it still used 2.0.12. I was able to get around this issue in my case by using the config.build.run_scripts: false option to disable acli pull:run-scripts which prevented it from using composer during the init step but I'm still curious as to why it wouldn't use version 1 based on my config.

Lando YML:

name: test
recipe: acquia
config:
  acli_version: master
  ah_application_uuid: // removed for security reasons
  ah_site_group: test
  php: '7.3'
  composer_version: 1
schmentle commented 3 years ago

I had this same issue and found this to work rather than putting it under config:

services:
  appserver:
    composer_version: 1-latest

But maybe the Lando team will give better advice on this and which option is best.

pirog commented 3 years ago

config.composer_version should work since that is what is documented. If it doesn't then that is a bug we should fix.

pirog commented 3 years ago

Yup i can replicate this. Fix incoming! Thanks for reporting it!

pirog commented 3 years ago

Ok this should be fixed in the next release!