php – Composer没有复制指定的bin-dir目录

我有时会遇到这个问题,在
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二进制文件.现在已经过去了.我不明白.

最佳答案 今天也发生在我身上.虽然我还没弄清楚它为什么会发生,但是一个肮脏的解决方法是删除供应商文件夹并运行composer install.

点赞