php-gearman icon indicating copy to clipboard operation
php-gearman copied to clipboard

laravel 5.5 Call to undefined method Illuminate\Foundation\Application::share()

Open gozhhu opened this issue 7 years ago • 4 comments

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()

gozhhu avatar Dec 10 '17 14:12 gozhhu

//$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"?

gozhhu avatar Dec 17 '17 08:12 gozhhu

Fixed

demisang avatar Jan 29 '18 18:01 demisang

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?

sanket-mahure avatar Apr 20 '18 07:04 sanket-mahure

I don't use Laravel very long time and don't have time for bug fixes... You can make pull-request 😀

demisang avatar Apr 22 '18 12:04 demisang