Why can't Composer load repositories recursively?#

You may run into problems when using custom repositories because Composer does not load the repositories of your requirements, so you have to redefine those repositories in all your composer.json files.

Before going into details as to why this is like that, you have to understand that the main use of custom VCS & package repositories is to temporarily try some things, or use a fork of a project until your pull request is merged, etc. You should not use them to keep track of private packages. For that you should rather look into Private Packagist which lets you configure all your private packages in one place, and avoids the slow-downs associated with inline VCS repositories.

There are three ways the dependency solver could work with custom repositories:

Found a typo? Something is wrong in this documentation? Fork and edit it!