Me, too.. that problem..
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Bus\Dispatcher::mapUsing()
I've it fixed by update The Base Controller file.
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
abstract class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}
My Solve is..
// $dispatcher->mapUsing(function($command)
// {
// return Dispatcher::simpleMapping(
// $command, 'App\Commands', 'App\Handlers\Commands'
// );
// });
I commented out. and still tracing. More I found, http://laravel.io/forum/03-19-2015-command-bus
5.2 Upgrade Guide
Separate Commands & Handlers
The Laravel 5.2 command bus now only supports self-handling commands and no longer supports separate commands and handlers.
If you would like to continue using separate commands and handlers, you may install a Laravel Collective package which provides backwards-compatible support for this: https://github.com/LaravelCollective/bus
Check any service providers you have registered to make sure they aren't calling that method on dispatcher
, including any package service providers.
I've worked out what causes this problem as I've just been through the same thing.
It's due to a missed step in the upgrade to 5.0.16. Specifically:
The App\Providers\BusServiceProvider may be removed from your service provider list in your app.php configuration file.
Seems that this is no longer used but not removing it doesn't cause any issues until the 5.2 upgrade.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community