Composer遇到问题:Your requirements could not be resolved to an installable set of packages.

执行composer install或composer require的时候遇到

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

  Problem 1
    - This package requires php ^7.2 but your PHP version (7.1.13) does not satisfy that requirement.
  Problem 2
    - doctrine/lexer 1.1.0 requires php ^7.2 -> your PHP version (7.1.13) does not satisfy that requirement.
    - doctrine/lexer 1.1.0 requires php ^7.2 -> your PHP version (7.1.13) does not satisfy that requirement.
    - doctrine/lexer 1.1.0 requires php ^7.2 -> your PHP version (7.1.13) does not satisfy that requirement.
    - Installation request for doctrine/lexer (locked at 1.1.0) -> satisfiable by doctrine/lexer[1.1.0].

类似以上代码的报错时
用以下代码即可解决问题

composer install --ignore-platform-reqs 
或者 composer update --ignore-platform-reqs 
或者 composer require **** --ignore-platform-reqs

你可能感兴趣的:(Composer)