[英]Composer: install package directly, via command line
I need to install sofa/eloquence Laravel 5.2 package.我需要安装sofa/ eloquence Laravel 5.2包。 In the documentation there is the following instruction:在文档中有以下说明:
1. Require the package in your composer.json:
"require": {
"sofa/eloquence": "~5.2", // for Laravel 5.2.*
},
So, I guess that after requiring it in composer.json I will have to run the composer update
command.所以,我想在composer.json 中需要它之后,我将不得不运行composer update
命令。 But, this command will also try to update other packages that are already installed, right?但是,这个命令也会尝试更新已经安装的其他软件包,对吧?
What if I don't want that, how can I install "sofa/eloquence": "~5.2"
without touching anything else?如果我不想那样,我该如何安装"sofa/eloquence": "~5.2"
而不触及其他任何东西? For example, directly, via command line (or in any other way).例如,直接通过命令行(或以任何其他方式)。
In order to get a package without a composer.json file use:为了获得没有 composer.json 文件的包,请使用:
composer require sofa/eloquence:~5.2
You can find documentation here: https://getcomposer.org/doc/03-cli.md#require您可以在此处找到文档: https : //getcomposer.org/doc/03-cli.md#require
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.