It looks like you didn't updated your composer.json file or your deployment is using the composer.lock file. Make sure your server is using Laravel 5.3 as well.
So make sure you run composer install first using the update composer.json file.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Dear All,
I've recently tried to update my project to Laravel 5.3 / PHP 7. Locally things work. When I try and deploy to Forge I get an error. (Nope: I am a pretty inexperienced programmer with just a few months under my belt, so have probably done something foolish when following the update instructions, so any help/guidance would be much appreciated).
The error: Declaration of Gordian\Providers\EventServiceProvider::boot() should be compatible with Illuminate\Foundation\Support\Providers\EventServiceProvider::boot(Illuminate\Contracts\Events\Dispatcher $events)
I have checked both boot methods and neither accepts a parameter. To be sure I got the code direct from the Laravel Github repository.
I am having the same problem with the Route & Broadcast Providers.
My Providers now look as follows:
namespace Gordian\Providers;
use Illuminate\Support\Facades\Event; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider { /** * The event listener mappings for the application. * * @var array / protected $listen = [ 'Gordian\Events\SomeEvent' => [ 'Gordian\Listeners\EventListener', ], ]; /* * Register any events for your application. * * @return void */ public function boot() { parent::boot(); // } }
And in the Illuminate folder...
namespace Illuminate\Foundation\Support\Providers;
use Illuminate\Support\Facades\Event; use Illuminate\Support\ServiceProvider;
class EventServiceProvider extends ServiceProvider { /** * The event handler mappings for the application. * * @var array */ protected $listen = [];
/**
* The subscriber classes to register.
*
* @var array
*/
protected $subscribe = [];
/**
* Register the application's event listeners.
*
* @return void
*/
public function boot()
{
foreach ($this->listens() as $event => $listeners) {
foreach ($listeners as $listener) {
Event::listen($event, $listener);
}
}
foreach ($this->subscribe as $subscriber) {
Event::subscribe($subscriber);
}
}
/**
* {@inheritdoc}
*/
public function register()
{
//
}
/**
* Get the events and handlers.
*
* @return array
*/
public function listens()
{
return $this->listen;
}
}
Any help you can provide would be gratefully received!
Please or to participate in this conversation.