Feature Unit/System Tests b/c break Removal Code Review PR-7.0-dev Architecture Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
14 Feb 2025

Summary of Changes

This PR was first aimed at removing the LegacyPropertyManagementTrait entirely, but it is so widely used, that it is not realistic to do so for 6.0. So now this only removes the usage of the trait for the Table class in the core. 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

The trait should be removed with Joomla 8.0 definitely.

Testing Instructions

This PR touches a lot of core code paths, so please test these areas before and after applying the patch. Set Error Reporting to Maximum in Global Configuration and watch for PHP warnings, notices and deprecation messages. Behaviour should be the same before and after the patch, with no new errors.

Preparation

  • Use a site with the sample data installed (for example "Blog Sample Data" or the Testing Sample Data).
  • In Articles → Options → Integration, set Enable Workflow to Yes (needed for the workflow tests).
  • Make sure the Action Log plugins are enabled (they are by default).

1. General Table load/bind (Table::bind(), Table::load())

  • Create, edit, save, save as copy and delete an article, a category, a contact and a tag in the backend. All fields, including params, metadata, images and URLs, should be saved and reloaded correctly.

2. Users (User::load(), UserModel, GroupModel)

  • Log out and log in again, both frontend and backend.
  • In Users, create a test user and edit them. Check that their groups and params are kept.
  • Block the user, then Unblock them.
  • Create a user who needs activation (set Users → Options → New User Account Activation to Self, register on the frontend), then Activate them in the backend list.
  • Delete the test user.
  • Create a new user group, then delete it.
  • In Users → User Actions Log, check that the block, unblock, activate, delete and user-group delete actions were all logged correctly.

3. Menus (MenuModel, ItemModel)

  • Edit an existing Menu (Menus → Manage → Edit). The title, unique name and description should load correctly. Save it.
  • Edit a Menu Item. All fields and the link-type options should load. Save it.
  • Create a new menu item in a site menu and one in an administrator menu. Use Batch to copy and move a menu item to another menu.

4. Modules / Plugins / Languages / Mail Templates / Guided Tours

  • Edit and save a site module and an administrator module. Check that the params, position and menu assignment are kept.
  • Edit and save a plugin, for example Content - Email Cloaking, and change a parameter.
  • Edit and save a Content Language (System → Content Languages).
  • Edit a Mail Template (System → Mail Templates). The original (master) subject and body should show correctly. Save a modified version.
  • Edit and save a Guided Tour, then run that tour from the backend.

5. Workflows (StagesModel, TransitionModel, TransitionsModel)

  • Go to Content → Workflows, open the Stages list and then the Transitions list of the Basic Workflow. The workflow title should show in the page header.
  • Edit and save a transition.

6. Frontend editing (com_content / com_contact FormModel)

  • Log in on the frontend as a user who can edit articles. Edit an existing article and save it. All fields should load correctly.
  • Do the same for a contact, if your site has a frontend contact edit menu item.

7. Tags (com_tags TagModel)

  • Open a Tags → Tagged Items menu item on the frontend, using one tag and then several tags. The tag title, description and image should show.

8. Deleting categories (plg_content_joomla)

  • Try to trash and then delete a category that still has articles. You should get the error "…category X … has N items assigned" with the correct category title.
  • Try the same with a category that has no articles of its own but has a subcategory with articles. You should get the "has subcategory items" error with the correct title.
  • Delete an empty category. That should work.

9. Smart Search (Taxonomy, MapTable)

  • Go to Smart Search, click Clear Index, then Index. Indexing should finish without errors.
  • Open Smart Search → Content Maps. The taxonomy branches (Type, Category, Author, Language, …) and their nodes should be listed.
  • Search on the frontend. The results and the taxonomy filters should work.

10. Automated tests

  • Run the integration tests for Table, for example: libraries/vendor/bin/phpunit --testsuite Integration --filter TableTest. They should pass.
  • PHPStan should not report new errors. The removed baseline entries should no longer be needed.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org: joomla/Manual#615

  • No documentation changes for manual.joomla.org needed

avatar Hackwar Hackwar - open - 14 Feb 2025
avatar Hackwar Hackwar - change - 14 Feb 2025
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Feb 2025
Category ⇒ Administration com_finder com_languages com_menus com_modules com_plugins com_templates com_users com_workflow Front End com_contact com_content com_tags Libraries
avatar Hackwar Hackwar - change - 19 Feb 2025
Labels Added: PR-6.0-dev Code Review
avatar joomla-cms-bot joomla-cms-bot - change - 19 Feb 2025
Category Administration com_finder com_languages com_menus com_modules com_plugins com_templates com_users com_workflow Front End com_contact com_content com_tags Libraries ⇒ Administration com_finder com_languages com_menus com_modules com_plugins com_templates com_users com_workflow Front End com_contact com_content com_tags Libraries Unit Tests
avatar Hackwar Hackwar - change - 19 Feb 2025
Labels Added: Unit/System Tests
avatar joomla-cms-bot joomla-cms-bot - change - 12 Apr 2025
Category Administration com_finder com_languages com_menus com_modules com_plugins com_templates com_users com_workflow Front End com_contact com_content com_tags Libraries Unit Tests ⇒ Administration com_finder com_languages com_menus com_modules com_plugins com_users com_workflow Front End com_contact com_content com_tags Libraries Unit Tests
avatar HLeithner
HLeithner - comment - 7 May 2025

@Hackwar code review is not enough, you please write test instruction, in this case test all touched table/model classes

from code review it's ok

avatar joomla-cms-bot joomla-cms-bot - change - 8 May 2025
Category Administration com_finder com_languages com_menus com_modules com_plugins com_users com_workflow Front End com_contact com_content com_tags Libraries Unit Tests ⇒ Administration com_finder com_languages com_menus com_modules com_plugins com_users com_workflow Front End com_contact com_content com_tags Libraries Plugins Unit Tests
avatar Hackwar Hackwar - change - 8 May 2025
Title
…
[6.0] Remove LegacyPropertyManagementTrait from Table class
[6.0] Remove usage of LegacyPropertyManagementTrait from Table class
avatar Hackwar Hackwar - edited - 8 May 2025
avatar Hackwar Hackwar - change - 8 May 2025
The description was changed
avatar Hackwar Hackwar - edited - 8 May 2025
avatar Hackwar Hackwar - change - 28 Feb 2026
Title
…
[6.0] Remove usage of LegacyPropertyManagementTrait from Table class
[7.0] Remove usage of LegacyPropertyManagementTrait from Table class
avatar Hackwar Hackwar - edited - 28 Feb 2026
avatar Hackwar Hackwar - change - 10 Mar 2026
Labels Added: bug PR-7.0-dev
avatar Hackwar Hackwar - change - 20 Apr 2026
Labels Added: Feature b/c break Removal
Removed: bug PR-6.0-dev
avatar Hackwar Hackwar - change - 20 Apr 2026
The description was changed
avatar Hackwar Hackwar - edited - 20 Apr 2026
avatar github-actions[bot]
github-actions[bot] - comment - 21 Jun 2026

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

avatar laoneo laoneo - change - 23 Jun 2026
Labels Added: Conflicting Files Architecture
avatar github-actions[bot] github-actions[bot] - change - 23 Jun 2026
Labels Removed: Conflicting Files
avatar Hackwar Hackwar - change - 15 Oct 2026
The description was changed
avatar Hackwar Hackwar - edited - 15 Oct 2026
avatar Hackwar Hackwar - change - 15 Oct 2026
The description was changed
avatar Hackwar Hackwar - edited - 15 Oct 2026
avatar rdeutz rdeutz - change - 15 Oct 2026
Status Pending ⇒ Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 ⇒ 2026-10-15 13:06:14
Closed_By ⇒ rdeutz
avatar rdeutz rdeutz - close - 15 Oct 2026
avatar rdeutz rdeutz - merge - 15 Oct 2026

Add a Comment

Login with GitHub to post a comment