PHP version issue when trying to update core

Created on 22 November 2023, about 1 year ago
Updated 28 July 2024, 5 months ago

When trying to update Drupal 10.1.5 to 10.1.6 I get this message from Composer:

when I run: composer update "drupal/core-*" --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- drupal/core 10.1.5 requires php >=8.1.0 -> your php version (8.0.30) does not satisfy that requirement.
- drupal/core-recommended 10.1.5 requires drupal/core 10.1.5 -> satisfiable by drupal/core[10.1.5].
- Root composer.json requires drupal/core-recommended 10.1.5 -> satisfiable by drupal/core-recommended[10.1.5].

The server is set to php 8.1.25 and drupal status indicates it as 8.1.25 yet composer is saying it's 8.0.30

Where or how should I correct this?

πŸ’¬ Support request
Status

Closed: outdated

Version

11.0 πŸ”₯

Component
ComposerΒ  β†’

Last updated 28 days ago

No maintainer
Created by

πŸ‡ΏπŸ‡¦South Africa nravens

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Issue created by @nravens
  • πŸ‡ΏπŸ‡¦South Africa nravens
  • πŸ‡ΏπŸ‡¦South Africa nravens

    I seem to have resolved this by following these steps:
    In composer.json I added this
    "platform":{
    "php":"8.1.25"
    }
    below - "sort-packages": true,

    That solved the PHP version requirement but running composer "drupal/core-*" --with-all-dependencies said there was nothing to install

    Then I ran:
    composer require drupal/core-recommended:10.1.6 drupal/core-composer-scaffold:10.1.6 drupal/core-project-message:10.1.6 --update-with-all-dependencies

    This updated the site to 10.1.6

  • πŸ‡¬πŸ‡§United Kingdom longwave UK
    - drupal/core 10.1.5 requires php >=8.1.0 -> your php version (8.0.30) does not satisfy that requirement.
    

    This means that when you were running Composer you were using PHP 8.0.30. It is possible to have different versions of PHP on the command line and in the web server. What is the output of php -v?

  • Status changed to Closed: outdated 5 months ago
Production build 0.71.5 2024