Home > Backend Development > PHP Tutorial > Dealing with PHP development version issues

Dealing with PHP development version issues

藏色散人
Release: 2023-04-09 16:50:01
forward
3745 people have browsed it
When installing an open source project, the author used PHP 7.1 locally for development, and I used PHP 7.0 locally, so a tragedy happened, and this error occurred: requires php ^7.1 -> your PHP version (7.0.13) does not satisfy that requirement..

1. Composer installation package

composer install error after

vagrant@homestead:~/Code/sample$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for doctrine/instantiator 1.1.0 -> satisfiable by doctrine/instantiator[1.1.0].
    - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.13) does not satisfy that requirement.
  Problem 2
    - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.13) does not satisfy that requirement.
    - phpunit/phpunit-mock-objects 2.3.8 requires doctrine/instantiator ^1.0.2 -> satisfiable by doctrine/instantiator[1.1.0].
    - Installation request for phpunit/phpunit-mock-objects 2.3.8 -> satisfiable by phpunit/phpunit-mock-objects[2.3.8].
Copy after login

2. Solution

Delete the composer.lock file and re-execute composer install, so that the composer.lock file can be regenerated. After the

composer package is automatically loaded, a composer.lock lock file will be generated. Therefore, after pulling other people's code from GitHub, this file needs to be deleted.

Recommended: "PHP Video Tutorial"

The above is the detailed content of Dealing with PHP development version issues. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template