简体   繁体   中英

Trying to update composer packages with PHP 8

On my dev machine I have PHP 8, I'm trying to get Composer to upgrade some packages but it keeps giving errors about the PHP version despite all the packages having updates that support PHP 8.

I've no idea how to get around this issue?

Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires abraham/twitteroauth ^1.2 -> satisfiable by abraham/twitteroauth[1.2.0].
    - abraham/twitteroauth 1.2.0 requires php ^7.2 || ^7.3 || ^7.4 -> your php version (8.0.9) does not satisfy that requirement.
  Problem 2
    - guzzlehttp/guzzle 7.0.1 requires php ^7.2.5 -> your php version (8.0.9) does not satisfy that requirement.
    - google/apiclient v2.7.2 requires guzzlehttp/guzzle ~5.3.1||~6.0||~7.0 -> satisfiable by guzzlehttp/guzzle[7.0.1].
    - google/apiclient is locked to version v2.7.2 and an update of this package was not requested.

Tried forcing a newer version that I want and still doesn't work:

composer update abraham/twitteroauth:3.0.0
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires abraham/twitteroauth ^1.2, 3.0.0, found abraham/twitteroauth[dev-dependabot/npm_and_yarn/concurrently-6.2.1, dev-dependabot/npm_and_yarn/path-parse-1.0.7, dev-dependabot/npm_and_yarn/prettier/plugin-php-0.17.3, dev-dependabot/composer/phpmd/phpmd-2.10.2, dev-dependabot/composer/phpunit/phpunit-9.5.8, dev-main, dev-master, dev-subdomains, 0.2.1, ..., 0.9.2, 1.0.0, ..., v1.x-dev, 2.0.0, 2.0.1, 2.0.2, 3.0.0, 3.1.0] but it does not match the constraint.
composer install --ignore-platform-reqs

答案是:更新到 composer.json 中想要的版本。

"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM