[英]How to reverse a global require in Composer?
A while ago, I added the Laravel framework via a global dependency to my environment through global require laravel/laravel
in Composer. 不久前,我通过Composer中的
global require laravel/laravel
通过对环境的全局依赖性添加了Laravel框架。 I'm having an issue though that when I try to edit and add further dependencies to Laravel's composer.json file, my IDE (I use Zend Studio) will not let me add futher dependencies, with an error of 我遇到了一个问题,当我尝试编辑并向Laravel的composer.json文件添加更多依赖项时,我的IDE(我使用Zend Studio)将不允许我添加其他依赖项,错误为
Composer.json in dependency package should not be modified.
I feel that if I took Laravel out of the global
dependency, it could solve the issue(?). 我觉得,如果我把Laravel排除在
global
依赖之外,那可以解决这个问题。
I'm not sure how to reverse the global require
though. 我不确定如何逆转
global require
。 I was hoping for something like global unrequire
, but to no avail. 我原本希望像
global unrequire
类的东西,但无济于事。 I also was hesitant to do it directly through the global .json file. 我也很犹豫直接通过全局.json文件执行此操作。 Is there a command that would remove an item from the dependency?
是否有一条命令将从依赖项中删除一项?
I don't know if the global require is actually causing the problem, but to remove the package you have to edit the global composer.json
and run composer update
. 我不知道全局需求是否真的导致了问题,但是要删除该软件包,您必须编辑全局
composer.json
并运行composer update
。
The global composer.json
can be found in the composer home directory which is usually: 全局
composer.json
可在composer主目录中找到,该目录通常为:
Linux: /home/<user>/.composer
Linux:/
/home/<user>/.composer
OSX: /Users/<user>/.composer
OSX:/
/Users/<user>/.composer
Windows: C:\\Users\\<user>\\AppData\\Roaming\\Composer
Windows:
C:\\Users\\<user>\\AppData\\Roaming\\Composer
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.