我如何让作曲家使用我安装的更新版本的 php?我已经下载并在所有本地服务器中使用 php 5.4,但是当我下载 composer 时,它指向我的 mac 的默认 #!/usr/local/bin/env 版本,即 5.3.15。我尝试编辑composer可执行文件并更改使用的php,但它破坏了可执行文件。
我正在尝试使用 composer 安装 Laravel,因此下载了错误的版本。
这是我的作曲家可执行文件的顶部的样子,但下面有一堆奇怪的字符。
#!/usr/bin/env php
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view
* the license that is located at the bottom of this file.
*/
Phar::mapPhar('composer.phar');
define('COMPOSER_DEV_WARNING_TIME', 1366931166);
require 'phar://composer.phar/bin/composer';
用于 laravel 项目的 composer.json
{
"require": {
"laravel/framework": "4.0.*@dev"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-update-cmd": "php artisan optimize"
},
"minimum-stability": "dev"
}