php-gearman
php-gearman copied to clipboard
laravel 5.5 Call to undefined method Illuminate\Foundation\Application::share()
Warning: Ambiguous class resolution, "demi\gearman\laravel5\Console\SupervisorCommand" was found in both "./vendor/demi/php-gearman/laravel5/console/SupervisorCommand.php" and "./vendor/demi/php-gearman/laravel5/Console/SupervisorCommand.php", the first will be used.
Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover
In GearmanServiceProvider.php line 34:
Call to undefined method Illuminate\Foundation\Application::share()
//$this->app['command.gearman'] = $this->app->share( $this->app->singleton('command.gearman',
but another problem is: ` php artisan gearman
In BoundMethod.php line 135: Method demi\gearman\laravel5\Console\SupervisorCommand::handle() does not exist `
Maybe we need change "SupervisorCommand::fire" to "SupervisorCommand::handle"?
Fixed
In GearmanServiceProvider.php line 40:
Call to undefined method Illuminate\Foundation\Application::share()
Changed to $this->app->singleton('command.gearman', function ($app) { return new \demi\gearman\laravel5\Console\SupervisorCommand(); }); and is working but change is fine for Laravel 5.4?
I don't use Laravel very long time and don't have time for bug fixes... You can make pull-request 😀