当我尝试使用此部署脚本使用Forge进行部署时:
cd /home/forge/default
git pull origin master
cd /home/forge/default/server
composer install --no-interaction --no-dev --prefer-dist
php artisan migrate --force
它失败并抛出下面的错误。我在composer.json中使用这些依赖项,并且在require中没有dev依赖项。
Composer.json
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"nesbot/carbon": "~1.14",
"guzzlehttp/guzzle": "^6.0",
"tymon/jwt-auth": "0.5.*",
"barryvdh/laravel-cors": "^0.7.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
"barryvdh/laravel-debugbar": "~2.0"
},
错误
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Barryvdh\Debugbar\ServiceProvider' not found
如何解决此问题,以便部署不会引入开发依赖关系,但不必更改开发人员的提供程序设置?或者,我应该不打扰设置--no-dev并拉入所有内容?当我放弃时工作--no-dev flag。