title: How do I use a Git submodule with a Composer loaded library?
body: <p>I have a Zend Framework 2 application. It contains some library code containing business logic and some other utilities that will be common to other applications that will be created later.</p>
  
  <p>My intention is to share it across projects using Composer. The question is, how do I do this properly and streamline the development? I will almost certainly need to make changes and additions to the library, from within the other project.</p>
  
  <p>I tried setting up <code>vendor/stuff</code> as a git submodule containing the package needed, and referencing it in the primary <code>composer.json</code> like this <a href="http://marekkalnik.tumblr.com/post/22929686367/composer-installing-package-from-local-git-repository" rel="noreferrer">(ref)</a>:</p>
  
  <pre class="lang-json prettyprint-override"><code>"repositories": [
      {
          "type": "git",
          "url": "vendor/stuff"
      }
  ],
  "require": {
      "stuff/library": "master"
  },
  </code></pre>
  
  <p>Composer isn't able to load it in this way. It complains that the package could not be found, presumably because it's ignoring the fact that the URL is both local and relative. Technically, it doesn't need to; the vendor/stuff folder was initialised separately through git submodule commands. </p>