Laravel 5 - 由亚伯拉罕安装TwitterOAuth库

时间:2015-04-11 10:24:50

标签: laravel twitter-oauth

我正在尝试使用composer在laravel 5中安装亚伯拉罕的twitteroauth库(https://github.com/abraham/twitteroauth)。在composer.json中添加了像这样的项目

"require": {
    "laravel/framework": "5.0.*",
    "php": ">=5.4.0",
    "abraham/twitteroauth": "0.5.2"
},

当我运行作曲家更新时,我收到错误

- Installing abraham/twitteroauth (0.5.2)
  Loading from cache

Writing lock file
Generating autoload files

[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Foundation\Application::getCachedCompilePath()

Script php artisan clear-compiled handling the post-update-cmd event returned with an error

[RuntimeException]
Error Output:

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [packagesN]

欢迎任何帮助

1 个答案:

答案 0 :(得分:0)

这对您正在安装的库来说不是问题。

当Laravel v5.0.16发布时,已编译的脚本位置已更改且upgrade guide was released。不幸的问题是,通过运行作曲家更新,您将在不知道任何内容的情况下升级到5.0.16,因此您需要打开bootstrap/autoload.php并更改$compiledPath变量。

// Change the current variable to this instead
$compiledPath = __DIR__.'/../vendor/compiled.php';

这将让你再次为你工作。