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