From e25de14bd311b983064f973c503d44d704caedec Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Sun, 3 May 2026 10:30:45 +0200 Subject: [PATCH] add documentation about events hook change --- docs/en/appendices/5-4-migration-guide.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/en/appendices/5-4-migration-guide.md b/docs/en/appendices/5-4-migration-guide.md index a7440c2660..b97e5406ae 100644 --- a/docs/en/appendices/5-4-migration-guide.md +++ b/docs/en/appendices/5-4-migration-guide.md @@ -34,6 +34,14 @@ The CakePHP version header in help output is now only shown when the CakePHP version can be determined. When used outside a CakePHP application (where the version is reported as `unknown`), the header is omitted. +### Events + +Events being registered in either `Application::events()` or `Plugin::events()` +now work in both web and CLI contexts. It is therefore highly recommended to +move your event listeners from the `config/bootstrap.php` file to the +`events()` method in your `Application` or `Plugin` class. +See [Application and Plugin Events](../core-libraries/events#registering-event-listeners) for more details. + ### I18n - `Number::parseFloat()` now returns `null` instead of `0.0` when parsing