skip to Main Content

I’ve a composer project (magento 2, upgraded from php7 to php 8), if now i use php 8 (inside docker) run "composer udpate", it will shows

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

  Problem 1
    - Root composer.json requires mobiledetect/mobiledetectlib 2.8.39, found mobiledetect/mobiledetectlib[2.8.39] in the lock file but not in remote repositories, mak                 e sure you avoid updating this package to keep the one from the lock file.
  Problem 2
    - Root composer.json requires magento/composer-root-update-plugin 2.0.2 -> satisfiable by magento/composer-root-update-plugin[2.0.2].
    - magento/composer-root-update-plugin 2.0.2 requires composer/composer ^1.0 || ^2.0 -> found composer/composer[2.2.18] in the lock file but not in remote reposito                 ries, make sure you avoid updating this package to keep the one from the lock file.
  Problem 3
    - Root composer.json requires magento/ece-tools ^2002.1.11 -> satisfiable by magento/ece-tools[2002.1.11, 2002.1.12].
    - magento/ece-tools[2002.1.11, ..., 2002.1.12] require colinmollenhour/credis ^1.6.0 -> found colinmollenhour/credis[v1.13.0] in the lock file but not in remote r                 epositories, make sure you avoid updating this package to keep the one from the lock file.
  Problem 4
    - Root composer.json requires magento/magento-cloud-metapackage >=2.4.5 <2.4.6 -> satisfiable by magento/magento-cloud-metapackage[2.4.5].
    - magento/magento-cloud-metapackage 2.4.5 requires fastly/magento2 ^1.2.34 -> found fastly/magento2[1.2.187] in the lock file but not in remote repositories, make                  sure you avoid updating this package to keep the one from the lock file.

But it will work fine in php7.4(inside docker), do anyone know what’s the problem?

More info:
docker info

php72:
    container_name: web_php
    image: webmaketech/php74
    build: ./php72
    volumes:
      - ./src:/var/www
      - ./php72/php.ini:/usr/local/etc/php/php.ini
      - ./php72/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf
php810:
    container_name: web_php_810
    image: webmaketech/php810
    build: ./php810
    volumes:
      - ./src:/var/www
      - ./php810/php.ini:/usr/local/etc/php/php.ini
      - ./php810/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf

2

Answers


  1. Chosen as BEST ANSWER

    searched 2 days on internet, finally got solution

    composer config -g repo.packagist composer https://mirrors.aliyun.com/composer
    

    after run this command, i can process now


  2. You can ignore platform requirements. run the below command.

    composer udpate --ignore-platform-reqs
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search