composer require downloads the specified package, and downloads other packages at the same time

Example: hinkcmf5.1 frame

When we need to develop a function to export pdf documents, we will use composer to download packages (such as mpdf packages).

Use composer require mpdf/mpdf to download

If the current compsoer version is 1.x, we will be prompted to upgrade;

When we upgrade successfully, the version is 2.4,

Continue to use composer require mpdf/mpdf to download,

It was found that the composer.lock file was downloaded as the downloaded package,

But this is not what we want, it should be caused by the too high version of composer,

So we need to downgrade the version, I downgraded the version to 2.1.9,

Execute the command composer self-update 2.1.9,

Execute composer require mpdf/mpdf again, it is normal.

おすすめ

転載: blog.csdn.net/janthinasnail/article/details/126792193