Clarify setup requirements around PHP version

Created on 20 March 2023, almost 2 years ago
Updated 21 March 2023, almost 2 years ago

Documentation location/URL

https://www.drupal.org/docs/official_docs/en/_local_development_guide.html β†’

Problem/Motivation

Someone new to Drupal flagged with me that following the steps here results in a bit of a roadblock.

If you run:
ddev composer create "drupal/recommended-project"

You get Drupal 10 (10.0.5 currently). Then if you try to run:
ddev composer require drush/drush

You get an error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/core 10.0.5 requires php >=8.1.0 -> your php version (8.0.28) does not satisfy that requirement.
    - drupal/core-recommended 10.0.5 requires drupal/core 10.0.5 -> satisfiable by drupal/core[10.0.5].
    - drupal/core-recommended is locked to version 10.0.5 and an update of this package was not requested.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require drush/drush:*" to figure out if any version is installable, or "composer require drush/drush:^2.1" if you know which you need.

This is because ddev is using php 8.0.28 by default. If you know what's going on, then it's easy to resolve. But if you are new you would have no idea what's going on.

Proposed resolution

Not sure what the ideal resolution is, but one option would be to have separate steps for installing D9 and D10, with some explanation about the php version required for D10?

Remaining tasks

  1. Agree on resolution
  2. Update docs
πŸ“Œ Task
Status

Fixed

Version

9.0

Component

Content

Created by

πŸ‡¦πŸ‡ΊAustralia pameeela

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024