From 462fb6448b766dc1cc5cc2696d7772bf67a8c731 Mon Sep 17 00:00:00 2001 From: Hannes Papenberg Date: Fri, 14 Feb 2025 21:02:20 +0100 Subject: [PATCH 1/3] Remove LegacyPropertyManagementTrait from MVC classes --- libraries/src/MVC/Model/BaseModel.php | 3 --- libraries/src/MVC/View/AbstractView.php | 5 ----- 2 files changed, 8 deletions(-) diff --git a/libraries/src/MVC/Model/BaseModel.php b/libraries/src/MVC/Model/BaseModel.php index 28bd72cb8d11e..b29d45465815c 100644 --- a/libraries/src/MVC/Model/BaseModel.php +++ b/libraries/src/MVC/Model/BaseModel.php @@ -11,7 +11,6 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\Object\LegacyErrorHandlingTrait; -use Joomla\CMS\Object\LegacyPropertyManagementTrait; use Joomla\Filesystem\Path; // phpcs:disable PSR1.Files.SideEffects @@ -29,8 +28,6 @@ abstract class BaseModel implements ModelInterface, StatefulModelInterface use StateBehaviorTrait; use LegacyModelLoaderTrait; use LegacyErrorHandlingTrait; - use LegacyPropertyManagementTrait; - /** * The model (base) name diff --git a/libraries/src/MVC/View/AbstractView.php b/libraries/src/MVC/View/AbstractView.php index 8c836bef1a97d..27a52de8f56c3 100644 --- a/libraries/src/MVC/View/AbstractView.php +++ b/libraries/src/MVC/View/AbstractView.php @@ -16,7 +16,6 @@ use Joomla\CMS\Language\LanguageAwareTrait; use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\CMS\Object\LegacyErrorHandlingTrait; -use Joomla\CMS\Object\LegacyPropertyManagementTrait; use Joomla\Event\DispatcherAwareInterface; use Joomla\Event\DispatcherAwareTrait; use Joomla\Event\DispatcherInterface; @@ -39,10 +38,6 @@ abstract class AbstractView implements ViewInterface, DispatcherAwareInterface, use DispatcherAwareTrait; use LanguageAwareTrait; use LegacyErrorHandlingTrait; - use LegacyPropertyManagementTrait { - get as private legacyGet; - } - /** * The active document object From 3dc88f09202cd80264a97c3fd5817fdb00208455 Mon Sep 17 00:00:00 2001 From: Hannes Papenberg Date: Wed, 19 Feb 2025 11:05:30 +0100 Subject: [PATCH 2/3] Fixing tests --- .../Cms/MVC/View/AbstractViewTest.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/tests/Unit/Libraries/Cms/MVC/View/AbstractViewTest.php b/tests/Unit/Libraries/Cms/MVC/View/AbstractViewTest.php index 2cece02716609..75cd908622eb1 100644 --- a/tests/Unit/Libraries/Cms/MVC/View/AbstractViewTest.php +++ b/tests/Unit/Libraries/Cms/MVC/View/AbstractViewTest.php @@ -132,25 +132,6 @@ public function display($tpl = null) $this->assertEquals($model, $view->getModel()); } - /** - * @testdox can get data - * - * @return void - * - * @since 4.2.0 - */ - public function testGetData() - { - $view = new class () extends AbstractView { - public function display($tpl = null) - { - } - }; - $view->set('unit', 'test'); - - $this->assertEquals('test', $view->get('unit')); - } - /** * @testdox can get data * From ed3c1c5689666a4497daa12ccce31d0a35b94db8 Mon Sep 17 00:00:00 2001 From: Hannes Papenberg Date: Wed, 11 Jun 2025 13:56:05 +0200 Subject: [PATCH 3/3] Removing usage in API com_config controller --- .../com_config/src/Controller/ComponentController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/components/com_config/src/Controller/ComponentController.php b/api/components/com_config/src/Controller/ComponentController.php index 092466d50cf28..d56a075c7d86a 100644 --- a/api/components/com_config/src/Controller/ComponentController.php +++ b/api/components/com_config/src/Controller/ComponentController.php @@ -80,7 +80,7 @@ public function displayList() // Push the model into the view (as default) $view->setModel($model, true); - $view->set('component_name', $this->input->get('component_name')); + $view->component_name = $this->input->get('component_name'); $view->document = $this->app->getDocument(); $view->displayList();