Skip to content

replace Mage_Adminhtml_Block_Tax_Rate_Title_Fieldset - #5714

Draft
Hanmac wants to merge 2 commits into
OpenMage:mainfrom
Hanmac:taxFieldset
Draft

replace Mage_Adminhtml_Block_Tax_Rate_Title_Fieldset#5714
Hanmac wants to merge 2 commits into
OpenMage:mainfrom
Hanmac:taxFieldset

Conversation

@Hanmac

@Hanmac Hanmac commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description (*)

This replaces Mage_Adminhtml_Block_Tax_Rate_Title_Fieldset with a normal Fieldset
and uses Mage_Adminhtml_Block_Tax_Rate_Title as Varien_Data_Form_Element_Renderer_Interface.

Old Mage_Adminhtml_Block_Tax_Rate_Title_Fieldset might be removed.

Related Pull Requests

Fixed Issues (if relevant)

  • fixes OpenMage/magento-lts#<issue_number>

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All automated tests passed successfully (all builds are green, SonarCloud checks are not required to merge)

@Hanmac
Hanmac requested a review from sreichel July 31, 2026 08:11
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the admin Tax Rate form “Tax Titles” section by replacing the custom Mage_Adminhtml_Block_Tax_Rate_Title_Fieldset element usage with a standard form fieldset and rendering the titles via Mage_Adminhtml_Block_Tax_Rate_Title as a Varien_Data_Form_Element_Renderer_Interface.

Changes:

  • Update Mage_Adminhtml_Block_Tax_Rate_Title to implement Varien_Data_Form_Element_Renderer_Interface and render via toHtml().
  • Switch the Tax Rate form to use a normal fieldset and attach the titles renderer.
  • Mark the legacy Mage_Adminhtml_Block_Tax_Rate_Title_Fieldset as deprecated and adjust unit-test PhpStorm metadata + PHPStan baseline accordingly.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/unit/Traits/PhpStormMetaData/BlocksTrait.php Removes the unused tax_rate_title_fieldset alias/class from the PhpStorm metadata mapping lists.
app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title/Fieldset.php Marks the legacy fieldset element class as deprecated.
app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title.php Implements Varien_Data_Form_Element_Renderer_Interface so the block can render form elements.
app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php Replaces the custom fieldset-element insertion with a standard fieldset + element renderer approach.
.phpstan.dist.baselines/method.nonObject.php Removes the baseline ignore related to the old setLegend() call path.

Comment on lines +61 to +64
public function render(Varien_Data_Form_Element_Abstract $element)
{
return $this->toHtml();
}
Comment on lines +149 to +151
$form->addFieldset('tax_rate_title_fieldset', ['legend' => Mage::helper('tax')->__('Tax Titles')])
->addField('title', 'text', [])
->setRenderer($renderer);
Comment on lines 15 to +17
* @method string getLegend()
* @method $this setLegend(string $value)
* @deprecated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants