From bd0fed5443d4a484e76c7a8b579ce2cbb6f2ba59 Mon Sep 17 00:00:00 2001 From: Allon Moritz Date: Mon, 5 May 2025 08:54:45 +0200 Subject: [PATCH 1/4] Remove the dispatch event functions in model and view --- .../54-60/removed-backward-incompatibility.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/migrations/54-60/removed-backward-incompatibility.md b/migrations/54-60/removed-backward-incompatibility.md index 137a14ad..25e74561 100644 --- a/migrations/54-60/removed-backward-incompatibility.md +++ b/migrations/54-60/removed-backward-incompatibility.md @@ -242,3 +242,19 @@ $table = new \Joomla\CMS\Table\Content($db); - PR: https://github.com/joomla/joomla-cms/pull/45425 - File: libraries/src/Application/WebApplication.php - Description: The `$item_associations` was added to the `WebApplication` class for improved PHP 8.2 compatibility and is not used at all. + +### dispatchEvent proxy functions removed in view and model + +- PR: https://github.com/joomla/joomla-cms/pull/45431 +- Files: + - libraries/src/MVC/Model/BaseDatabaseModel.php + - libraries/src/MVC/View/AbstractView.php +- Description: The `dispatchEvent` proxy functions are removed in the `BaseDatabaseModel` and `AbstractView` classes. The `getDispatcher` function therefor requires no a dispatcher injected, which is the default, when the component is booted through the application. + +```php +// Old in extending class from the BaseDatabaseModel or AbstractView classes: +$this->dispatchEvent($event); + +// New: +$this->getDispatcher()->dispatch($event->getName(), $event); +``` From 5bf99553fca838ca1ef38c4ec80e655c3935fedf Mon Sep 17 00:00:00 2001 From: Allon Moritz Date: Mon, 2 Jun 2025 17:18:51 +0200 Subject: [PATCH 2/4] Update migrations/54-60/removed-backward-incompatibility.md Co-authored-by: Richard Fath --- migrations/54-60/removed-backward-incompatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/54-60/removed-backward-incompatibility.md b/migrations/54-60/removed-backward-incompatibility.md index 25e74561..8d4d0d96 100644 --- a/migrations/54-60/removed-backward-incompatibility.md +++ b/migrations/54-60/removed-backward-incompatibility.md @@ -249,7 +249,7 @@ $table = new \Joomla\CMS\Table\Content($db); - Files: - libraries/src/MVC/Model/BaseDatabaseModel.php - libraries/src/MVC/View/AbstractView.php -- Description: The `dispatchEvent` proxy functions are removed in the `BaseDatabaseModel` and `AbstractView` classes. The `getDispatcher` function therefor requires no a dispatcher injected, which is the default, when the component is booted through the application. +- Description: The `dispatchEvent` proxy functions are removed in the `BaseDatabaseModel` and `AbstractView` classes. The `getDispatcher` function therefore requires now a dispatcher injected, which is the default when the component is booted through the application. ```php // Old in extending class from the BaseDatabaseModel or AbstractView classes: From 3adee8075bf3f0227a208a96ced0063dc78263a1 Mon Sep 17 00:00:00 2001 From: Richard Fath Date: Mon, 2 Jun 2025 17:28:03 +0200 Subject: [PATCH 3/4] Title capitalization --- migrations/54-60/removed-backward-incompatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/54-60/removed-backward-incompatibility.md b/migrations/54-60/removed-backward-incompatibility.md index bac6db68..5b374014 100644 --- a/migrations/54-60/removed-backward-incompatibility.md +++ b/migrations/54-60/removed-backward-incompatibility.md @@ -244,7 +244,7 @@ $table = new \Joomla\CMS\Table\Content($db); - File: libraries/src/Application/WebApplication.php - Description: The `$item_associations` was added to the `WebApplication` class for improved PHP 8.2 compatibility and is not used at all. -## dispatchEvent proxy functions removed in view and model +## `dispatchEvent` Proxy Functions Removed in View and Model - PR: https://github.com/joomla/joomla-cms/pull/45431 - Files: From 45beea49add4bd114feb0f51758f7a3bf3320031 Mon Sep 17 00:00:00 2001 From: Richard Fath Date: Mon, 2 Jun 2025 17:31:16 +0200 Subject: [PATCH 4/4] Fixing my mistake from conflict resolution --- migrations/54-60/removed-backward-incompatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/54-60/removed-backward-incompatibility.md b/migrations/54-60/removed-backward-incompatibility.md index 5b374014..d03eb59f 100644 --- a/migrations/54-60/removed-backward-incompatibility.md +++ b/migrations/54-60/removed-backward-incompatibility.md @@ -255,10 +255,10 @@ $table = new \Joomla\CMS\Table\Content($db); ```php // Old in extending class from the BaseDatabaseModel or AbstractView classes: $this->dispatchEvent($event); -``` // New: $this->getDispatcher()->dispatch($event->getName(), $event); +``` ## `getLogContentTypeParams` Method Removed from of `ActionlogsHelper`