Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Solutions to errors in installation of extensions caused by downward incompatibility of Composer2.0

Shulou Source: shulou.com Published: 2022-06-02 13:44:45 10月26日 Update

Editor to share with you the solution to the error caused by the downward incompatibility of Composer2.0. I hope you will get something after reading this article. Let's discuss it together.

Downward incompatibility of Composer 2.0 causes extension installation error

Recently, when you were deploying a server environment, you encountered a problem caused by the backward incompatibility of the Composer version. Record it.

Problem description

The background Api application is developed using ThinkPHP6.0 's multi-application mode, and when it is first deployed, it is always prompted that the controller cannot be found.

I was quite depressed at that time, how could I not find the controller? This exception usually occurs only when multi-application mode is not enabled, but it is clear that multi-application mode has been enabled and related extensions have been installed (Composer 2.0.x executes composer install without throwing an exception directly).

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

I looked back and compared my local version: 1.8 Composer found out that the Google 2.0 series was recently released, so I immediately thought about whether it was caused by the downward incompatibility of Composer.

Boy, it's really the compatibility problem:

Solution.

Since it is the compatibility problem caused by the high version, it is easy to reduce the version directly.

Downgrading Composer is very simple. You don't need to recompile and install it. You can simply use the following command:

Composer self-update 1.8.0

If you don't know which versions to choose from, you can check the official release history.

After reading this article, I believe you have a certain understanding of "the solution to the installation error caused by the downward incompatibility of Composer2.0". If you want to know more about it, please follow the industry information channel. Thank you for reading!

Tags: Version problem application mode method compatibility controller article control inadvertently depressed puzzled no method history background command done official more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Tech Info Docker Redmi Xiaomi