Search code examples
phplaravelcomposer-phpzend-studio

Composer.json in dependency package should not be modified


I'm trying to add a dependency through my composer.json file in a remote Laravel Project I'm working on in Zend Studio, currently on my Development server. However, it seems to be locked from making changes (all of the inputs are grayed out), and there is an info box at the top that reads:

General: Composer.json in dependency package should not be modified

I haven't had this issue on my local environment, so I assume it's either an issue with Laravel not wanting to make changes on what it thinks is a live server, or if Zend Studio is raising the issue for the same reason. Is there some configuration file I need to change to do this the right way? Or is there something I'm doing currently that I should be doing differently with the composer file?


Solution

  • It sounds like the IDE thinks you are modifying a composer.json file that is a dependency of another package. And example of this is the Laravel framework itself. you have a composer.json file in the root of the project that requires laravel/framework but then there is another composer.json file in vendor/laravel/framework and if you attempt to modify the composer.json in vendor/laravel/framework I would assume you would get this message that you are attempting to modify a package that another package depends on.

    Does it somehow think that the remote project is somehow linked to your local? Is the composer.json file you are trying to modify called in by another composer file?