I'm trying to develop a PHP library (called foo/bar
) using Composer in dir /work/a
with the composer.json
contents:
{
"name": "foo/bar",
"require": {
"php": ">=7.2"
}
}
/work/a
is a git project and I'm on the branch mybranch
I'm trying to use this lib in another project locally (called testing/foobar
) using Composer in dir work/b
with the composer.json
contents:
{
"name": "testing/foobar",
"type": "project",
"repositories": [
{
"type": "vcs",
"url": "/work/a"
}
],
"require": {
"php": "^7.4",
"foo/bar": "mybranch"
}
}
When running $ composer install
in /work/b
I get the error:
[UnexpectedValueException]
Could not parse version constraint mybranch: Invalid version string "mybranch"