Skip to content

Add removal of LegacyPropertyManagementTrait from MVC #486

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 1 commit 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
15 changes: 15 additions & 0 deletions migrations/54-60/removed-backward-incompatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@ echo $article->title;
- https://github.com/joomla/joomla-cms/pull/42890
- Description: The CMS Input namespace `\Joomla\CMS\Input` has been removed. The CMS core code has switched the code to the Framework Input library with the namespace `\Joomla\Input`, which is very much a drop-in replacement. This is especially of relevance if you are using the MVC classes, which now use the framework class. Make sure that your code imports the correct class.

## Removed `LegacyPropertyManagementTrait` from MVC classes

- PR: https://github.com/joomla/joomla-cms/pull/44907
- Description: The models and views of the Joomla MVC used the `LegacyPropertyManagementTrait` with the generic `set()` and `get()` methods. Since the trait is deprecated, its usage in the Joomla core is removed where possible. This affects all models and views, which will not contain a generic `set()` method anymore and in the case of the models also no generic `get()` method. You should instead write to the attributes directly. The views still contain a `get()` method, since that is overridden by the view class itself.

```php
// Old:
$this->set('key', 'value');
$var = $this->get('key', 'defaultValue');

// New:
$this->key = 'value';
$var = $this->key ?? 'defaultValue';
```

## UTC Used Instead of GMT

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