Skip to content

[7.0] Remove LegacyPropertyManagementTrait from MVC classes#44907

Merged
laoneo merged 14 commits into
joomla:7.0-devfrom
Hackwar:6.0-mvc-propertytrait
Jun 23, 2026
Merged

[7.0] Remove LegacyPropertyManagementTrait from MVC classes#44907
laoneo merged 14 commits into
joomla:7.0-devfrom
Hackwar:6.0-mvc-propertytrait

Conversation

@Hackwar

@Hackwar Hackwar commented Feb 14, 2025

Copy link
Copy Markdown
Member

Summary of Changes

The LegacyPropertyManagementTrait has been deprecated for quite some time and will most likely be removed in 7.0. This removes its usage from the base model and view classes of the CMS. This might look like quite a big break in b/c, but if you followed Joomla core code since Joomla 2.5, it isn't actually that big. We've not been using it anywhere really, except for the ->get() method in the views, which calls the methods from the models. However this has always been an overwritten method in the view anyway and it also still exists after this change. This means that all those old view classes will still work like before. The code from the trait has been deprecated since Joomla 3.4.0, even though it has been moved around and with Joomla 4.0 has finally ended up in the legacy trait. From my perspective, it is time to do this after 11 years of it being deprecated: https://github.com/joomla/joomla-cms/blob/3.4.0/libraries/joomla/object/object.php

Testing Instructions

Codereview.

Link to documentations

Please select:

@Hackwar Hackwar added the b/c break This item changes the behavior in an incompatible why. HEADS UP label Feb 14, 2025
@heelc29

heelc29 commented Jun 11, 2025

Copy link
Copy Markdown
Contributor

tests failing because its still used here

$view->set('component_name', $this->input->get('component_name'));

@Hackwar

Hackwar commented Jun 11, 2025

Copy link
Copy Markdown
Member Author

Thanks, I removed that now.

@Hackwar Hackwar marked this pull request as ready for review June 11, 2025 11:56
@Hackwar

Hackwar commented Jun 23, 2025

Copy link
Copy Markdown
Member Author

Now that the documentation is also done, this one is ready for testing.

@bembelimen bembelimen added the bug label Aug 20, 2025
@vishalchincholi1

Copy link
Copy Markdown

I have tested this item ✅ successfully on 183ed38

A final search confirmed that LegacyPropertyManagementTrait is no longer used in the libraries/src/MVC directory.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44907.

@brianteeman

Copy link
Copy Markdown
Contributor

@vishalchincholi1 how did you test this? Reading the code is not enough

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Hackwar Hackwar changed the base branch from 6.0-dev to 7.0-dev February 28, 2026 14:29
@Hackwar Hackwar changed the title [6.0] Remove LegacyPropertyManagementTrait from MVC classes [7.0] Remove LegacyPropertyManagementTrait from MVC classes Feb 28, 2026
@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-7.0-dev labels Feb 28, 2026
@joomla-cms-bot joomla-cms-bot added Unit/System Tests and removed Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester labels Mar 10, 2026
@laoneo

laoneo commented May 19, 2026

Copy link
Copy Markdown
Member

I would say that this is too early as $this->get() is still used in extensions.

@Hackwar

Hackwar commented May 19, 2026

Copy link
Copy Markdown
Member Author

People are using $this->get() in the views, but that code also still works after this. The rest is rarely used.

@laoneo

laoneo commented May 20, 2026

Copy link
Copy Markdown
Member

You are right, missed the get function in the view class.

@laoneo laoneo added the Architecture Pull requests which improve the architecture. label Jun 18, 2026
@joomdonation

Copy link
Copy Markdown
Contributor

Looks OK for me from reviewing the code. So if tests pass, this could be merged

@laoneo laoneo added this to the Joomla! 7.0.0 milestone Jun 23, 2026
@laoneo laoneo merged commit f40646e into joomla:7.0-dev Jun 23, 2026
50 checks passed
@laoneo

laoneo commented Jun 23, 2026

Copy link
Copy Markdown
Member

Thanks!

@laoneo laoneo mentioned this pull request Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Architecture Pull requests which improve the architecture. b/c break This item changes the behavior in an incompatible why. HEADS UP Feature PR-7.0-dev Removal Removes functionality Unit/System Tests

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.