Please provide your PHP and Swoole version. (php -v and php --ri swoole)
PHP 7.1.18 and swoole Version => 4.0.3
Please provide your Laravel/Lumen version.
Laravel Framework 5.4.36
Which release version of this package are you using
dev-master
What did you do? If possible, provide a recipe for reproducing the error.
I'm using Laravel 5.4
After installing swoole extension, require package with composer and add the service provider.
I run vendor:push command
php artisan vendor:publish --tag=laravel-swoole
and error happened
In ProviderRepository.php line 208:
Class 'SwooleTW\Http\LaravelServiceProvider' not found
vendor:push command create swoole_http.php and swoole_websocket.php in directory /config
Hi @adon988 ,
Can you check your package version and run composer dump-autoload to check it again?
Here's the my result for what I did with a fresh new laravel project.
composer require swooletw/laravel-swoole
Using version ^2.4 for swooletw/laravel-swoole
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Installing predis/predis (v1.1.1): Loading from cache
- Installing swooletw/laravel-swoole (v2.4.1): Loading from cache
predis/predis suggests installing ext-phpiredis (Allows faster serialization and deserialization of the Redis protocol)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nunomaduro/collision
Discovered Package: swooletw/laravel-swoole
Package manifest generated successfully.
php artisan vendor:publish --tag laravel-swoole
Copied File [/vendor/swooletw/laravel-swoole/config/swoole_http.php] To [/config/swoole_http.php]
Copied File [/vendor/swooletw/laravel-swoole/config/swoole_websocket.php] To [/config/swoole_websocket.php]
Copied File [/vendor/swooletw/laravel-swoole/routes/websocket.php] To [/routes/websocket.php]
Publishing complete.
same to me.
In package.json:
"swooletw/laravel-swoole": "^3.0"
And the namespace is
HuangYi\Swoole
v3.0 is a wrong version from the original parent repo but I don't know why it affected this repo's release. I have deleted the wrong released version v3.0.
Can you require this package again? The latest correct version for now should be v2.4.1.
It works.
My laravel-swoole is 3.0 as well~
v2.4.1 is work~ Thanks~
Most helpful comment
v3.0is a wrong version from the original parent repo but I don't know why it affected this repo's release. I have deleted the wrong released versionv3.0.Can you require this package again? The latest correct version for now should be
v2.4.1.