简体   繁体   中英

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. 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

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(?).

I'm not sure how to reverse the global require though. I was hoping for something like global unrequire , but to no avail. I also was hesitant to do it directly through the global .json file. 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 .

The global composer.json can be found in the composer home directory which is usually:

Linux: /home/<user>/.composer
OSX: /Users/<user>/.composer
Windows: C:\\Users\\<user>\\AppData\\Roaming\\Composer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM