In composer, PHP's package management system, its possible to configure a repository. A repository is a system that composer will "ask" when it needs to find a package. i.e.
Composer: Hey, repository, where can I find the foo/bar
package
Repository: You can find foo/bar
(in this VCS repository|in this dist
zip file)
By default, composer will look at the packagist.org repository when it wants to find something.
Are the technical details (i.e. a protocal) of the above plain english description defined anywhere? Or, put a different way, is there a description of the packages.json
schema file anywhere?
The documentation is a little scant on this, saying only
The main repository type is the composer repository. It uses a single packages.json file that contains all of the package metadata.
And even this is (in certain contexts) inaccurate, as a packages.json
file can include other json
files to avoid a super large packages.json
.
Is this a well defined protocol, or is this a case of the composer source being the only source of truth on how a "composer repository" should behave?