Laravel-swoole: Class 'SwooleTW\Http\LaravelServiceProvider' not found

Created on 31 Jul 2018  路  5Comments  路  Source: swooletw/laravel-swoole

  1. Please provide your PHP and Swoole version. (php -v and php --ri swoole)
    PHP 7.1.18 and swoole Version => 4.0.3

  2. Please provide your Laravel/Lumen version.
    Laravel Framework 5.4.36

  3. Which release version of this package are you using
    dev-master

  4. 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
  1. What did you expect to see?

vendor:push command create swoole_http.php and swoole_websocket.php in directory /config

  1. What did you see instead?
    none

Most helpful comment

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.

All 5 comments

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~

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Abbotton picture Abbotton  路  9Comments

codercms picture codercms  路  5Comments

amcsi picture amcsi  路  3Comments

hakuno picture hakuno  路  3Comments

storyn26383 picture storyn26383  路  5Comments