Home > Development Tools > composer > What should I do if Composer 2.0 is backwards incompatible and causes extension installation errors?

What should I do if Composer 2.0 is backwards incompatible and causes extension installation errors?

藏色散人
Release: 2021-03-02 15:50:16
forward
2223 people have browsed it

The following tutorial column of composer will introduce you to the solution to the extension installation error caused by the backward incompatibility of Composer 2.0. I hope it will be helpful to friends in need!

Composer 2.0 backwards incompatibility leads to extension installation errors

Recently, when deploying a server environment, I encountered a Issues caused by backward incompatibility of Composer version are recorded.

Problem description

The background Api application is developed using the multi-application mode of ThinkPHP6.0. When initially deployed, it always prompts that it cannot be found. to the controller.

I was quite depressed at the time, why couldn’t I find the controller? This exception usually only occurs when the multi-application mode is not turned on, but the multi-application mode is obviously turned on and the relevant extensions are installed (Composer 2.0.x does not directly throw an exception when executing composer install).

Just when I was puzzled, I accidentally saw that the version of Composer I am currently using is 2.0.x.

I went back and compared it with my local version: 1.8. After searching Google, I discovered that the Composer 2.0 series was only recently released, so I immediately thought whether it was caused by Composer’s backward incompatibility.

Hey guys, it’s really a problem caused by compatibility:

What should I do if Composer 2.0 is backwards incompatible and causes extension installation errors?

Solution

Since it’s a version Compatibility problems caused by excessively high values ​​​​can be easily solved, just lower the version.

Composer downgrading is very simple. There is no need to recompile and install. Just use the following command:

composer self-update 1.8.0
Copy after login

If you don’t know which versions are available, you can check the official release history.

The above is the detailed content of What should I do if Composer 2.0 is backwards incompatible and causes extension installation errors?. 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