简体   繁体   中英

How to configure composer install path?

I have just published my php helpers library in https://packagist.org/ (repo: https://github.com/eacevedof/prj_theframework_helpers ).

Using this command: composer require theframework/helpers the installation goes fine but i don't feel comfortable with the install path:

I wish this were the final composer path: /vendor/theframework/helpers/ but is: /theframework/helpers/theframework/helpers/

this is my composer.json:

{
  "version":"0.0.2",
  "updated":"20170514",
  "name": "theframework/helpers",
  "type":"library",
  "description": "Library for helping to create html elements using objects",
  "minimum-stability": "stable",
  "keywords": [
    "helpers","html elements","view helpers"
  ],
  "homepage": "https://github.com/eacevedof/prj_theframework_helpers",
  "license": "MIT",
  "authors": [
    {
        "name": "Eduardo Acevedo Farje",
        "email": "eacevedof@gmail.com",
        "homepage": "http://eduardoaf.com",
        "role": "Developer",
        "github":"https://github.com/eacevedof/",
        "site":"helpers.theframework.es"             
    }
  ],
  "require": {
    "php": ">=5.3.0"
  },
  "autoload": {
    "files": ["theframework/helpers/autoload.php"]
  }    
}

How can i fix this?.

Thanx in advance.

Move the files in your repository to the root, rather than placing them in subdirectories. vendor/foo/bar is basically your package root, and since your package (git repo) contains foo/bar again, you end up with vendor/foo/bar/foo/bar .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM