LucaDegasperi OAuth2Server与Laravel 4一起使用作曲家更新

时间:2014-10-27 16:21:11

标签: git laravel-4 oauth xampp composer-php

我对Laravel很安静,我发现它非常好,很容易来自CodeIgniter背景。但今天我和Laravel及其作曲家一起偶然发现了我的第一大问题。

我刚刚从GIT克隆了Laravel网络项目。克隆后,我无法在我的本地XAMPP服务器上运行该应用程序。我可能它是一个依赖问题,所以我运行作曲家更新,这是我得到的错误:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Generating autoload files
{"error":
    {
        "type":"ErrorException",
        "message":"Declaration of LucaDegasperi\\OAuth2Server\\OAuth2ServerServiceProvider::boot() should be compatible with Illuminate\\Support\\ServiceProvider::boot()",
        "file":"C:\\xampp\\htdocs\\working_folder\\myproject\\vendor\\lucadegasperi\\oauth2-        server-laravel\\src\\OAuth2ServerServiceProvider.php",
        "line":177
    }
}
{"error":
   {
        "type":"ErrorException",
        "message":"Declaration of LucaDegasperi\\OAuth2Server\\OAuth2ServerServiceProvider::boot() should be compatible with Illuminate\\Support\\ServiceProvider::boot()",
        "file":"C:\\xampp\\htdocs\\working_folder\\myproject\\vendor\\lucadegasperi\\oauth2-server-laravel\\src\\OAuth2ServerServiceProvider.php",
        "line":177
    }
}

我已经在线研究了解决方案,但我没有机会修复它。以下是我尝试过的一些事情:

  • 更改了包lucadegasperi / oauth2-server-laravel
  • 的版本
  • 将dev的最小稳定性更改为稳定,反之亦然

所有修复尝试都会导致其他错误。

有谁知道这里可能出现什么问题,如果有,我该怎么做才能解决问题

1 个答案:

答案 0 :(得分:0)

毕竟我找到了解决方案。在Laravel Chat Room获得了一些帮助。 基本上我不得不在“dev-master”的composer.json文件中更改我的oAuth2server版本  的 “〜1.0.0”即可。这似乎适用于 Laravel 4.2 。 因此,如果你有同样的问题,只需尝试更改版本,看看你是否有运气。

否则我真的建议您在 Laravel Chat Room 中提问您的问题。我问了一分钟后得到了我的答复。