当使用'GrahamCampbell / Laravel-GitHub'时,如何修复'使用Http \ Adapter \ Guzzle6 \ Client :: buildClient()'的几个参数

问题描述 投票:1回答:1

我用laravel制作了一个用于管理教育机构的Web应用程序,因此我必须创建一个协作工作区。

我发现的想法是使用GitHub存储库,在网上搜索后我发现'GrahamCampbell / Laravel-GitHub'。 我像文档一样进行安装,但是当我测试时出现以下错误:

Too few arguments to function Http \ Adapter \ Guzzle6 \ Client :: buildClient (), 
0 passed in C: \ Users \ Fehmi \ Dropbox \ GRASP \ vendor \ php-http \ guzzle6-adapter \ src \ Client.php on line 31 and exactly 1 expected "
use GrahamCampbell\GitHub\Facades\GitHub;
class GitController extends Controller
{
   public function FuncName ()
   {
     dd(GitHub::me()->organizations());
   }
}

我的结果是

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_RECOVERABLE_ERROR)
Too few arguments to function Http\Adapter\Guzzle6\Client::buildClient(), 0 passed in C:\Users\Fehmi\Dropbox\GRASP\vendor\php-http\guzzle6-adapter\src\Client.php on line 31 and exactly 1 expected
laravel git github guzzle guzzle6
1个回答
0
投票

请务必使用最新的php-http/guzzle6-adapter版本。

只有qazxsw poi与qazxsw poi,它有一个qazxsw poi允许调用one from May 2016 has a line 31

$client = static::buildClient();只将issue fixed in PR 32强加为buildClient() with no parameters。 也许使用GrahamCampbell/Laravel-GitHub或至少a guzzle6 version可能会有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.