Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Drupal10 recepite default composer version #75

Closed
cdt-team opened this issue Oct 31, 2023 · 2 comments
Closed

Problem with Drupal10 recepite default composer version #75

cdt-team opened this issue Oct 31, 2023 · 2 comments

Comments

@cdt-team
Copy link

cdt-team commented Oct 31, 2023

Hello for work correctly with Drupal 10 we should use at least Composer version 2.3.6 or higher, as suggest in the documentation

I try to install Drupal 10 as suggested in the lando recepit documentation, and if I install the dev repo composer version is set to 2.4.4, https://docs.lando.dev/drupal/getting-started.html:
lando composer create-project drupal/recommended-project:10.0.x-dev@dev tmp && cp -r tmp/. . && rm -rf tmp

but if i try to install the latest Drupal 10 version the composer version is 2.2.x, and I not find a correct way to override the composer version inside the .lando.yml
lando composer create-project drupal/recommended-project:10.x tmp && cp -r tmp/. . && rm -rf tmp

Here is my lando.yml file

name: d10-test
recipe: drupal10
excludes:
  - vendor
  - node_modules
  - modules/contrib
services:
  cache:
    type: redis
    persist: true
config:
  php: 8.2
  composer_version: 2-latest
  via: nginx
  webroot: web
tooling:
  redis-cli:
    service: cache
@pirog pirog added Needs Triage and removed drupal labels Oct 31, 2023
@pirog pirog transferred this issue from lando/lando Oct 31, 2023
@pfrenssen
Copy link

This is a bit puzzling. I had the same problem, and checking the logs at ~/.lando/logs I can see that the command /bin/sh /helpers/install-composer.sh 2-latest is always executed correctly. This should download the installer from https://getcomposer.org/installer and install it inside the appserver container at /usr/local/bin/composer.

I got it to work after messing about for a bit, but I could not retrace which change it was that solved it. Possibly there was another older composer binary present somewhere in the $PATH?

@reynoldsalec
Copy link
Sponsor Member

Duplicate of #31.

@pfrenssen note that install-composer.sh only runs when a compoer_version is passed in, so it could be that its not running 2-latest unless the user has specified that? I don't think we set that in the Drupal recipe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants