I usually use Java to make IT projects with Maven as Dependency Management (DM). By requirements I have to implement DM in the company that I work in some projects made in PHP. One of the requirements is that they don't want to use any type of framework as symfony, laravel, zend, etc.
I was investigating some DM for PHP and found that the best option is Composer. I'm working on multilayer projects, something like that:
When I started to make this structure the first issue that I found is that Composer doesn't retrieve recursive dependencies, for that reason, I implemented Satis as Package Repository. I used Satis and not Packagist is because the projects are private projects and this implement SVN as Version Control System, and Packagist used GitHub for retrieve the source code of the projects.
After explain all implementation about that I done, I found some obstacles to follow with development of my multilayer structure.
My satis.json looks like
{
"name": "My Repository",
"homepage": "https://www.myrepository.com/",
"repositories": [
{ "type": "vcs", "url": "file:///C:/core/branches/core/" },
{ "type": "vcs", "url": "file:///C:/services/branches/services/" }
],
"require-all": true
}
Thanks for your help.
Satis does not accept file URLs to grap stuff from, but you can point to the SVN repository directly in your root project's composer.json
(because, as you already found out, Composer does not resolve these repositories recursively).
You don't have to depend on the package that is provided in this repository directly, you only have to mention it to make it available for updating stuff.
Local references are supported, just by specifying the file path.
I don't know how it works on Windows, but on unix/linux based systems the following works:
{
"repositories": [
{ "type": "vcs", "url": "/path/to/git/repo" }
]
}
References: