I am designing a relatively large project in my company that is composed of several packages in PHP. Some of these packages are standard packages and others are bundles of Symfony applications.
When working with Composer, we usually point the name of a dependency to the branch or version being used - however, this dependency usually has to be in Github and listed in Packagist. (this is the normal flow, although there are alternatives)
In my case, I still do not want to have to commit any code, so the dependencies need to be local directories. I have already defined the composer.json
of dependency file like this:
{
"name": "rodrigorigotti/shared"
"autoload": {
"psr-0": {
"RodrigoRigotti": "src/"
}
}
}
And the project that contains this dependency has composer.json
like this:
{
"name": "rodrigorigotti/app",
"repositories": [
{
"type": "vcs",
"url": "/var/www/rodrigorigotti/shared"
}
],
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"rodrigorigotti/shared": "*"
},
"autoload": {
"psr-0": { "": "src/" }
},
}
(note: composer.json
files are WELL simplified for the purpose of the question)
However, when I run the command composer install
or composer update
in the application that has the dependency, I have received this error:
[InvalidArgumentException]
No driver found to handle VCS repository /var/www/rodrigorigotti/shared
Does anyone know how to solve it?