2

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?

cchapman
  • 3,269
  • 10
  • 50
  • 68
  • 1
    It sounds like Zend Studio is being overprotective. Have you tried editing Laravel's composer.json directly (outside of Zend Studio) and re-running composer from the command line to complete the updates? If so, do you encounter any issues? – George Cummins Jan 28 '15 at 20:10
  • That sounds like it might be the issue. I'm running the `require` I need via the command line and everything seems to be running smoothly. I'll see if I can figure out how to change those settings in Zend Studio. – cchapman Jan 28 '15 at 20:27

1 Answers1

5

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

lukasgeiter
  • 147,337
  • 26
  • 332
  • 270
  • Thanks for that. I think I'm going to see if I can just add the dependencies via the command line since you mention it probably isn't the issue. Thank you very much. – cchapman Jan 28 '15 at 20:28