Skip to content

Conversation

Copilot AI review requested due to automatic review settings December 20, 2025 10:59
@sreichel sreichel added the chore label Dec 20, 2025
@github-actions github-actions bot added Component: Core Relates to Mage_Core Component: Catalog Relates to Mage_Catalog Component: Reports Relates to Mage_Reports Component: CatalogInventory Relates to Mage_CatalogInventory Component: Checkout Relates to Mage_Checkout Component: Sales Relates to Mage_Sales Component: Usa Relates to Mage_Usa Component: Customer Relates to Mage_Customer Component: Eav Relates to Mage_Eav Component: Adminhtml Relates to Mage_Adminhtml Component: Sitemap Relates to Mage_Sitemap Component: Page Relates to Mage_Page Component: Cron Relates to Mage_Cron Component: Tag Relates to Mage_Tag Component: SalesRule Relates to Mage_SalesRule Component: Wishlist Relates to Mage_Wishlist Component: Tax Relates to Mage_Tax Component: Shipping Relates to Mage_Shipping Component: Rule Relates to Mage_Rule Component: Downloadable Relates to Mage_Downloadable Component: Bundle Relates to Mage_Bundle Component: Api2 Relates to Mage_Api2 Component: CatalogSearch Relates to Mage_CatalogSearch phpunit rector labels Dec 20, 2025
Copy link
Contributor

Copilot AI left a comment

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 applies the Rector rule MakeInheritedMethodVisibilitySameAsParentRector to ensure that overridden methods have the same visibility as their parent class definitions. The changes correct method visibility from public to protected across test files and core application code.

  • Changes method visibility from public to protected for overridden methods
  • Updates 15 test files to use protected for setUp() and tearDown() methods
  • Updates 66 core application files to use protected for framework hook methods like _construct(), _beforeSave(), _prepareLayout(), _toHtml(), etc.
  • Enables the Rector rule by removing it from the skip list in .rector.php

Reviewed changes

Copilot reviewed 83 out of 83 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/unit/Varien/ObjectTest.php Changed setUp() visibility from public to protected
tests/unit/Varien/Data/Form/Filter/DatetimeTest.php Changed setUp() visibility from public to protected
tests/unit/Varien/Data/Form/Filter/DateTest.php Changed setUp() visibility from public to protected
tests/unit/Mage/Uploader/Block/AbstractTest.php Changed setUp() visibility from public to protected
tests/unit/Mage/Rule/Model/AbstractTest.php Changed setUp() visibility from public to protected
tests/unit/Mage/Page/Block/Html/HeaderTest.php Changed setUp() visibility from public to protected
tests/unit/Mage/Log/Model/VisitorTest.php Changed setUp() visibility from public to protected
tests/unit/Mage/Core/Model/StoreTest.php Changed setUp() visibility from public to protected
tests/unit/Mage/Core/Model/Email/Template/AbstractTest.php Changed setUp() visibility from public to protected
tests/unit/Mage/Core/Helper/EnvironmentConfigLoaderTest.php Changed setup() visibility from public to protected (critical: incorrect method name)
tests/unit/Mage/Cms/Model/PageTest.php Changed setUp() visibility from public to protected
tests/unit/Mage/Catalog/Model/Resource/Eav/AttributeTest.php Changed setUp() visibility from public to protected
tests/unit/Mage/Adminhtml/Block/CacheTest.php Changed setUp() visibility from public to protected
tests/unit/Mage/AdminNotification/Model/FeedTest.php Changed setUp() visibility from public to protected
tests/unit/Error/ProcessorTest.php Changed setUp() and tearDown() visibility from public to protected
app/code/core/Mage/Wishlist/Model/Resource/Item/Collection.php Changed _construct() visibility from public to protected
app/code/core/Mage/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php Changed _construct() visibility from public to protected
app/code/core/Mage/Tax/Model/Resource/Class/Collection.php Changed _construct() visibility from public to protected
app/code/core/Mage/Tax/Model/Resource/Class.php Changed _construct() visibility from public to protected
app/code/core/Mage/Tax/Model/Class.php Changed _construct() visibility from public to protected
app/code/core/Mage/Tag/Model/Resource/Customer/Collection.php Changed _initSelect() visibility from public to protected
app/code/core/Mage/Sitemap/Model/Resource/Sitemap/Collection.php Changed _construct() visibility from public to protected
app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate/Collection.php Changed _initSelect() visibility from public to protected
app/code/core/Mage/SalesRule/Model/Resource/Rule/Collection.php Changed _initSelect() visibility from public to protected
app/code/core/Mage/SalesRule/Model/Resource/Coupon.php Changed _beforeSave() visibility from public to protected
app/code/core/Mage/Sales/Model/Order/Shipment/Track.php Changed _construct() visibility from public to protected
app/code/core/Mage/Sales/Model/Order/Shipment/Item.php Changed _construct() visibility from public to protected
app/code/core/Mage/Sales/Model/Order/Invoice/Item.php Changed _construct() visibility from public to protected
app/code/core/Mage/Sales/Model/Order/Creditmemo/Item.php Changed _construct() visibility from public to protected
app/code/core/Mage/Sales/Model/Entity/Order/Shipment/Track/Collection.php Changed _construct() visibility from public to protected
app/code/core/Mage/Sales/Model/Entity/Order/Item/Collection.php Changed _construct() visibility from public to protected
app/code/core/Mage/Rule/Model/Resource/Abstract.php Changed _beforeSave() visibility from public to protected
app/code/core/Mage/Reports/Model/Resource/Tax/Collection.php Changed _construct() visibility from public to protected
app/code/core/Mage/Page/Block/Html/Topmenu.php Changed _construct() visibility from public to protected
app/code/core/Mage/Page/Block/Html/Header.php Changed _construct() visibility from public to protected
app/code/core/Mage/Eav/Model/Entity/Attribute/Option/Swatch.php Changed _construct() visibility from public to protected
app/code/core/Mage/Eav/Model/Entity/Attribute/Option.php Changed _construct() visibility from public to protected
app/code/core/Mage/Downloadable/Model/Link/Purchased/Item.php Changed _beforeSave() visibility from public to protected
app/code/core/Mage/Downloadable/Model/Link/Purchased.php Changed _beforeSave() visibility from public to protected
app/code/core/Mage/Customer/Model/Customer.php Changed _construct() visibility from public to protected
app/code/core/Mage/Customer/Model/Config/Share.php Changed _beforeSave() visibility from public to protected
app/code/core/Mage/Customer/Block/Widget/Taxvat.php Changed _construct() visibility from public to protected
app/code/core/Mage/Customer/Block/Widget/Name.php Changed _construct() visibility from public to protected
app/code/core/Mage/Customer/Block/Widget/Gender.php Changed _construct() visibility from public to protected
app/code/core/Mage/Customer/Block/Widget/Dob.php Changed _construct() visibility from public to protected
app/code/core/Mage/Cron/Model/Schedule.php Changed _construct() visibility from public to protected
app/code/core/Mage/Cron/Model/Resource/Schedule/Collection.php Changed _construct() visibility from public to protected
app/code/core/Mage/Cron/Model/Resource/Schedule.php Changed _construct() visibility from public to protected
app/code/core/Mage/Core/Model/Resource/Translate/String.php Changed _afterLoad() visibility from public to protected
app/code/core/Mage/Core/Model/Resource/Store/Group/Collection.php Changed _beforeLoad() visibility from public to protected
app/code/core/Mage/Core/Model/Resource/Email/Template/Collection.php Changed _construct() visibility from public to protected
app/code/core/Mage/Core/Model/Resource/Design.php Changed _beforeSave() visibility from public to protected
app/code/core/Mage/Core/Block/Template/Zend.php Changed _construct() visibility from public to protected
app/code/core/Mage/Core/Block/Messages.php Changed _prepareLayout() visibility from public to protected
app/code/core/Mage/Checkout/Block/Multishipping/Link.php Changed _toHtml() visibility from public to protected
app/code/core/Mage/CatalogSearch/Model/Resource/Query.php Changed _beforeSave() visibility from public to protected
app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php Changed _prepareLayout() visibility from public to protected
app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php Changed _toHtml() visibility from public to protected
app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php Changed _getDefaultSourceModel() visibility from public to protected
app/code/core/Mage/Bundle/Model/Resource/Selection/Collection.php Changed _afterLoad() visibility from public to protected
app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tab/Users.php Changed _toHtml() visibility from public to protected
app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Grid.php Changed _prepareLayout() visibility from public to protected
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Shipping/Tablerate.php Changed _afterSave() visibility from public to protected
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custom.php Changed _afterSave() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Serializer.php Changed _construct() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php Changed _getValue() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Tag.php Changed _beforeToHtml() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/System/Store/Tree.php Changed _construct() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Tracking.php Changed _construct() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php Changed _prepareForm() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Sales.php Changed _beforeToHtml() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Report/Wishlist.php Changed _beforeToHtml() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Roleinfo.php Changed _beforeToHtml() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Customer/Online.php Changed _beforeToHtml() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php Changed _beforeToHtml() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Ajax/Serializer.php Changed _construct() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Update/Result.php Changed _toHtml() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Qty.php Changed _construct() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Error.php Changed _toHtml() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php Changed _prepareLayout() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php Changed _prepareLayout() visibility from public to protected
app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php Changed _beforeToHtml() visibility from public to protected
.rector.php Removed MakeInheritedMethodVisibilitySameAsParentRector from skip list to enable this rule
@sreichel sreichel added the review needed Problem should be verified label Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Component: Adminhtml Relates to Mage_Adminhtml Component: Api2 Relates to Mage_Api2 Component: Bundle Relates to Mage_Bundle Component: Catalog Relates to Mage_Catalog Component: CatalogInventory Relates to Mage_CatalogInventory Component: CatalogSearch Relates to Mage_CatalogSearch Component: Checkout Relates to Mage_Checkout Component: Core Relates to Mage_Core Component: Cron Relates to Mage_Cron Component: Customer Relates to Mage_Customer Component: Downloadable Relates to Mage_Downloadable Component: Eav Relates to Mage_Eav Component: Page Relates to Mage_Page Component: Reports Relates to Mage_Reports Component: Rule Relates to Mage_Rule Component: Sales Relates to Mage_Sales Component: SalesRule Relates to Mage_SalesRule Component: Shipping Relates to Mage_Shipping Component: Sitemap Relates to Mage_Sitemap Component: Tag Relates to Mage_Tag Component: Tax Relates to Mage_Tax Component: Usa Relates to Mage_Usa Component: Wishlist Relates to Mage_Wishlist phpunit rector review needed Problem should be verified

1 participant