我和我的同事正在尝试在我们的Laravel项目中使用本地的git。我使用的是Ubuntu,PHP5.5.9-1ubuntu4.9,他使用的是Debian和PHP5.4.39。
当我提取他提交的版本时,我在尝试运行composer update时出错
user@ubuntu:/var/www/frontend$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
PHP Fatal error: Class 'Illuminate\Support\Arr' not found in /var/www/frontend/vendor/laravel/framework/src/Illuminate/Support/helpers.php on line 182
Script php artisan clear-compiled handling the post-install-cmd event returned with an error [RuntimeException]
Error Output: PHP Fatal error: Class 'Illuminate\Support\Arr' not found in /var/www/frontend/vendor/laravel/framework/src/Illuminate/Support/helpers.php on line 182 我们在git上有供应商文件夹,因为没有它对我们来说不是一种选择。
我想问题是不同的php版本。是否有一种手动设置php版本的方法,以便composer获得正确的依赖关系?
发布于 2015-06-01 15:37:34
问题可能是:
用户签入项目,包括供应商文件夹。
后来供应商以某种方式添加到.gitignore中
没有人注意到新的文件没有被添加到回购程序中,魔法确保所有的东西都能像以前一样工作:D
发布于 2015-06-01 10:15:46
可以在要求部分中的composer.json文件中设置php版本。
"require": {
"php": ">=5.3.0",
},https://stackoverflow.com/questions/30570388
复制相似问题