Skip to content

Remove the dispatch event functions in model and view #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions migrations/54-60/removed-backward-incompatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,22 @@ $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

- 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 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:
$this->dispatchEvent($event);

// New:
$this->getDispatcher()->dispatch($event->getName(), $event);
```

## `getLogContentTypeParams` Method Removed from of `ActionlogsHelper`

- PR: https://github.com/joomla/joomla-cms/pull/45434
Expand Down