From 1aba8d968adb470703ef09f31e16e8177f2bca4c Mon Sep 17 00:00:00 2001 From: Jamie Bradley Date: Thu, 11 Apr 2024 11:32:07 +0100 Subject: [PATCH 1/2] Documentation Update for Laravel 11 I found that the EventServiceProvider is no longer used in Laravel 11. This commit introdues a section to inform Laravel 11 users of the alternative approach to registering the LogoutDiscourseUser listener against the Logout event. --- readme.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/readme.md b/readme.md index 8633c73..8c1ef7f 100644 --- a/readme.md +++ b/readme.md @@ -192,6 +192,25 @@ When a Laravel `User` logs out, to log out their Discourse session Simply add th ]; ``` +### Laravel 11 + +In Laravel 11, the use of the `EventServiceProvider` is discouraged and events [should be registered in the `AppServiceProvider`](https://laravel.com/docs/11.x/events#manually-registering-events). + +Therefore, the implementation is slightly different, and it should be registered within the `boot` method of the `AppServiceProvider` as per the example below. + +```php + /** + * Bootstrap any application services. + */ + public function boot(): void + { + Event::listen( + \Illuminate\Auth\Events\Logout::class, + \Spinen\Discourse\Listeners\LogoutDiscourseUser::class + ); + } +``` + ## Left to do * badges for user From 0b75c936f0da167850a1276e988cb12a6bfb6c1f Mon Sep 17 00:00:00 2001 From: Jimmy Puckett Date: Sun, 14 Apr 2024 17:39:51 -0400 Subject: [PATCH 2/2] Bumping version --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index c8e38b6..dedcc7d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.9.0 +2.9.1