[英]How to determine the vendor/bin directory of Composer in a library?
[英]Composer is not copying on the specified bin-dir directory
我有時會遇到這個問題,在Windows上,在Mac上,在ubuntu上......
我有這個composer.json:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.2.*",
"zizaco/confide": "~4.0@dev",
"zizaco/entrust": "1.2.*@dev",
"guzzlehttp/guzzle": "~4.0"
},
"require-dev": {
"phpunit/phpunit": "4.1.4",
"behat/behat": "3.0.12",
"behat/mink": "1.5.0",
"behat/mink-extension": "2.0.0",
"behat/mink-goutte-driver": "1.0.9",
"codeception/verify": "0.2.7",
"codeception/specify": "0.3.6"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"bin-dir": "bin/",
"preferred-install": "dist"
},
"minimum-stability": "stable"
}
這是Laravel 4,有一些測試包。
在作曲家安裝或作曲家更新后,我的項目中沒有創建目錄“bin”。
我應該有一個用於phpunit的二進制文件,另一個用於behat。 所以我必須使用像vendor / behat / bin / behat和vendor / phpunit / phpunit / phpunit這樣的命令,這很痛苦。
知道為什么二進制文件不在“bin”文件夾中嗎?
昨天,一些項目用較少的包,我有二進制文件夾那里有phpunit二進制文件。 現在已經過去了。 我不明白。
今天也發生在我身上。 雖然我還沒弄清楚它為什么會發生,但是一個骯臟的解決方法是刪除vendor
文件夾並運行composer install
。
我在composer的git repo中找到了這個pull請求: https : //github.com/composer/composer/pull/5127
似乎重新創建二進制文件的功能將在Composer 1.1中發布
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.