Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

L5 support broken? #104

Closed
kuramori opened this issue Nov 1, 2014 · 11 comments
Closed

L5 support broken? #104

kuramori opened this issue Nov 1, 2014 · 11 comments

Comments

@kuramori
Copy link

kuramori commented Nov 1, 2014

Hi! Just got following error when tried to execute php artisan scheduled:run or scheduled:summary
Latest laravel from "laravel/framework": "dev-master",
dispatcher from "indatus/dispatcher": "dev-master",

Fatal error: Call to undefined method App\Console\Kernel::all() in /home/vagrant/Code/gas/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 205

Call Stack:
0.0005 223472 1. {main}() /home/vagrant/Code/gas/artisan:0
0.1878 2488256 2. App\Console\Kernel->handle() /home/vagrant/Code/gas/artisan:46
0.1878 2488320 3. Illuminate\Foundation\Console\Kernel->handle() /home/vagrant/Code/gas/app/Console/Kernel.php:28
1.9346 14466744 4. Symfony\Component\Console\Application->run() /home/vagrant/Code/gas/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:69
1.9347 14467856 5. Symfony\Component\Console\Application->doRun() /home/vagrant/Code/gas/vendor/symfony/console/Symfony/Component/Console/Application.php:126
1.9348 14468776 6. Symfony\Component\Console\Application->doRunCommand() /home/vagrant/Code/gas/vendor/symfony/console/Symfony/Component/Console/Application.php:195
1.9348 14468944 7. Illuminate\Console\Command->run() /home/vagrant/Code/gas/vendor/symfony/console/Symfony/Component/Console/Application.php:874
1.9348 14469312 8. Symfony\Component\Console\Command\Command->run() /home/vagrant/Code/gas/vendor/laravel/framework/src/Illuminate/Console/Command.php:100
1.9350 14472848 9. Illuminate\Console\Command->execute() /home/vagrant/Code/gas/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:252
1.9350 14472960 10. Indatus\Dispatcher\Commands\Run->fire() /home/vagrant/Code/gas/vendor/laravel/framework/src/Illuminate/Console/Command.php:112
1.9464 14491880 11. Indatus\Dispatcher\Services\CommandService->runDue() /home/vagrant/Code/gas/vendor/indatus/dispatcher/src/Indatus/Dispatcher/Commands/Run.php:77
1.9532 14500720 12. Indatus\Dispatcher\Services\ScheduleService->getQueue() /home/vagrant/Code/gas/vendor/indatus/dispatcher/src/Indatus/Dispatcher/Services/CommandService.php:42
1.9599 14507104 13. Indatus\Dispatcher\Services\ScheduleService->getScheduledCommands() /home/vagrant/Code/gas/vendor/indatus/dispatcher/src/Indatus/Dispatcher/Services/ScheduleService.php:61
1.9626 14515224 14. Illuminate\Support\Facades\Artisan::all() /home/vagrant/Code/gas/vendor/indatus/dispatcher/src/Indatus/Dispatcher/Services/ScheduleService.php:38
1.9626 14515408 15. Illuminate\Support\Facades\Facade::__callStatic() /home/vagrant/Code/gas/vendor/indatus/dispatcher/src/Indatus/Dispatcher/Services/ScheduleService.php:38

@bkuhl
Copy link
Member

bkuhl commented Nov 1, 2014

Are you able to use Artisan::all() in your application anywhere? This is the first I've heard of this error. Is the Artisan facade registered in your application?

@kuramori
Copy link
Author

kuramori commented Nov 1, 2014

Nope, I can't. Artisan facade is registred and it's bound to contract 'Illuminate\Contracts\Console\Kernel'. Trying to trace through all interfaces/classes related to it I can't even find ::all() method.

@kuramori
Copy link
Author

kuramori commented Nov 3, 2014

Sorry to bother you, but haven't you check on that?
Maybe I missing something?
Just tried from the clean laravel install:
composer create-project laravel/laravel test dev-develop --prefer-dist
cd test
composer require indatus/dispatcher dev-master
add service provider
php artisan scheduled:summary
PHP Fatal error: Call to undefined method App\Console\Kernel::all() in ***/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 205

There is no method all() in Kernel. And as I remember Dispatcher worked fine just until whole Kernel concept was introduced.

Thanks!

@bkuhl
Copy link
Member

bkuhl commented Nov 4, 2014

Correct... Dispatcher hasn't been updated to be compatible with this concept yet. I'm not sure if I'll get time to look at this for another week or so. If you want to dive into it yourself, I'd welcome a pull request.

@threewordphrase
Copy link

+1 also having this issue. I'm happy to work on a PR but I don't know where to start. Any documentation about this change?

@bkuhl
Copy link
Member

bkuhl commented Nov 13, 2014

The latest changes out of the Laravel 5 develop branch (as of this issue creation) broke ones ability to build Laravel-specific packages by removing the Workbench functionality from Laravel's startup. This makes it difficult for me to test with, but not impossible. I'll try to revisit this sometime this afternoon.

@bkuhl
Copy link
Member

bkuhl commented Nov 14, 2014

It looks like in the latest changes in the L5 branch, Artisan::all() is no longer there. I've experimented with alternatives, but have run into a few issues I'm unsure about and haven't given it too much attention since it's the develop branch.

@bkuhl
Copy link
Member

bkuhl commented Nov 14, 2014

Currently I'm attempting to make Illuminate\Console\Application but it throws a...

exception 'ReflectionException' with message 'Class artisan does not exist' in /Users/bkuhl/Projects/dispatcher-l5/vendor/laravel/framework/src/Illuminate/Container/Container.php:745
Stack trace:
#0 /Users/bkuhl/Projects/dispatcher-l5/vendor/laravel/framework/src/Illuminate/Container/Container.php(745): ReflectionClass->__construct('artisan')
#1 /Users/bkuhl/Projects/dispatcher-l5/vendor/laravel/framework/src/Illuminate/Container/Container.php(650): Illuminate\Container\Container->build('artisan', Array)
#2 /Users/bkuhl/Projects/dispatcher-l5/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(503): Illuminate\Container\Container->make('artisan', Array)
#3 /Users/bkuhl/Projects/dispatcher-l5/vendor/indatus/dispatcher/src/Indatus/Dispatcher/Services/ScheduleService.php(46): Illuminate\Foundation\Application->make('Illuminate\\Cons...')
#4 /Users/bkuhl/Projects/dispatcher-l5/vendor/indatus/dispatcher/src/Indatus/Dispatcher/Services/ScheduleService.php(72): Indatus\Dispatcher\Services\ScheduleService->getScheduledCommands()

...investigation continues...

@bkuhl
Copy link
Member

bkuhl commented Nov 15, 2014

Taylor patched Laravel today to include a method that I needed in order to make this work. Can you please update to the latest develop for laravel and confirm that this works for you?

@kuramori
Copy link
Author

At first am really sorry, it's been a crazy week at work couldn't help you to solve this issue.
Just updated to latest commit for l5 and dispatcher and yes, all scheduled commands are working correct now.
Thank you!

@bkuhl
Copy link
Member

bkuhl commented Nov 15, 2014

It's no problem. Thanks for confirming everything is working. This couldn't have been fixed without Taylor making a small adjustment to Laravel: laravel/framework@8161491

@bkuhl bkuhl closed this as completed Nov 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants