Using custom Git repository alongside Packagist in Composer
composer-php
Solution
I was just missing the `minimum-stability` setting:
{
"minimum-stability": "dev",
"require": {
"doctrine/orm": "dev-default-lockmode"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/BenMorel/doctrine2.git"
}
]
}
Doctrine DBAL was correctly pulled from Packagist, this was not the problem. The real issue was that this package is not released as stable yet.
As often, the answer is in the error message, which I overlooked:
The package is not available in a stable-enough version according to your minimum-stability setting
Problem
I want to try modifications I've made on the Doctrine ORM in my local project before submitting a pull request. I have pushed my modifications on the `default-lockmode` branch in my GitHub repository clone, then added the following to composer.json: ``` { "require": { "doctrine/orm": "dev-default-lockmode" }, "repositories": [ { "type": "vcs", "url": "https://github.com/BenMorel/doctrine2.git" } ] } ``` I thought this would favour the `doctrine/orm` package found in my Git repository over the one from Packagist, but still load the other packages from Packagist. However, when I run `composer update`, I get the following error: Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for doctrine/orm dev-default-lockmode -> satisfiable by doctrine/orm[dev-default-lockmode]. - doctrine/orm dev-default-lockmode requires doctrine/dbal >=2.5-dev,<2.6-dev -> no matching package found. Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting So it looks like it's expecting to find all packages in my GitHub repository now. Is it possible to use a custom repository just for `doctrine/orm`, but still use Packagist for all the others?