我正在测试laravel管腔中的pusher,但是Pusher \ Pusher出现错误:
我已经尝试过为其添加别名并注册它,但还是没有运气:
$app->alias('Pusher', Pusher\Pusher::class);
$app->register(Pusher\Pusher::class);
我还删除了我的供应商文件夹,并重新组合了我的作曲家依赖关系。
请参阅下面的composer.json
{
"name": "laravel/lumen",
"description": "The Laravel Lumen Framework.",
"keywords": ["framework", "laravel", "lumen"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.2",
"appzcoder/lumen-routes-list": "^1.1",
"dusterio/lumen-passport": "^0.2.15",
"google/cloud-text-to-speech": "^0.5.0",
"guzzlehttp/guzzle": "~5.3|~6.0",
"illuminate/mail": "6.0",
"illuminate/redis": "^6.2",
"laravel/lumen-framework": "^6.0",
"laravelista/lumen-vendor-publish": "6.0",
"league/flysystem": "^1.0",
"predis/predis": "^1.1",
"pusher/pusher-php-server": "~2.0",
"smalot/pdfparser": "^0.14.0",
"superbalist/flysystem-google-storage": "^7.2",
"superbalist/laravel-google-cloud-storage": "^2.2"
},
"require-dev": {
"fzaninotto/faker": "^1.4",
"phpunit/phpunit": "^8.0",
"mockery/mockery": "^1.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/"
]
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
答案 0 :(得分:0)
您需要升级pusher/pusher-php-server
sdk软件包版本3
或更高版本。版本3
中的Pusher PHP sdk使用名称空间。要了解更多信息,请访问他们的GitHub repo