Composer VCS Different Directory Name

When using Composer to load a package from a VCS repository, is there a way to specify which folder to install the contents in to (similar to git clone <directory>)?

For example the repo is:

  • Workflow for developing Laravel Packages
  • How to correctly require a specific commit in Composer so that it would be available for dependent packages?
  • Git - Vendor folder modifications - .gitignore?
  • Composer create-project from bitbucket
  • ZF2 autoloading strategy for development and production with git/composer
  • Laravel 4.1 gives error Uncaught exception 'ReflectionException' with message 'Class FatalErrorException
  • https://github.com/organization/plugin_name.git
    

    And thus composer file reads:

    "repositories": [
        {
        "type": "vcs",
              "url": "https://github.com/organization/plugin_name.git"
    }]
    
    "require": {
    "organization/plugin_name": "dev-master",
    }
    

    Whereas the directory I want the contents to be is not “plugin_name” but something like “organization_plugin-title”.

    I have several repos (custom WP plugins) that have one name, but a different folder name within my WordPress MU setup, and I’d really like to not have to enable each one manually within the admin after updating my composer file.

  • How do I clone over HTTP a repository that has no info/refs?
  • Apply commit to multiple release branches - Git Rebase or Cherry-Pick?
  • Why git pull fails?
  • How can I automatically be warned if a specific file changes?
  • Pushing to a remote GitHub repository
  • git branch -r not showing all remote branches
  • One Solution collect form web for “Composer VCS Different Directory Name”

    Naturally answered my own question once I posted…

    In the repo’s composer.json file, the “name” field should be what you want the directory to be called when installed. I erroneously thought it had to be the name of the repo.

    Be sure to then edit the local install’s composer.json file so under the “required” section it is the same name as seen in the repo’s composer.json file

    Git Baby is a git and github fan, let's start git clone.