Skip to content

Deprecate Mage_Sales_Model_Entity_Quote_Item_Collection#5323

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/remove-mage-sales-model-collection
Draft

Deprecate Mage_Sales_Model_Entity_Quote_Item_Collection#5323
Copilot wants to merge 2 commits intomainfrom
copilot/remove-mage-sales-model-collection

Conversation

Copy link
Contributor

Copilot AI commented Mar 14, 2026

Mage_Sales_Model_Entity_Quote_Item_Collection is a stale EAV-era remnant. It contains debug profilers (TEST1/TEST2) and calls $item->importCatalogProduct() which doesn't exist. The actual implementation has long lived in Mage_Sales_Model_Resource_Quote_Item_Collection.

Changes

  • Model/Entity/Quote/Item/Collection.php: Replace ~130 lines of broken EAV logic with a deprecated stub extending the correct resource collection — matching the existing pattern of Mage_Sales_Model_Mysql4_Quote_Item_Collection.
// Before: broken EAV collection with TEST profilers and non-existent method calls
class Mage_Sales_Model_Entity_Quote_Item_Collection extends Mage_Eav_Model_Entity_Collection_Abstract { ... }

// After: deprecated alias preserving backward compatibility
/** @deprecated use Mage_Sales_Model_Resource_Quote_Item_Collection */
class Mage_Sales_Model_Entity_Quote_Item_Collection extends Mage_Sales_Model_Resource_Quote_Item_Collection {}
Original prompt

This section details on the original issue you should resolve

<issue_title>[FEAT] Mage_Sales_Model_Entity_Quote_Item_Collection should not exist</issue_title>
<issue_description>These profilers are kinda suspect:

Varien_Profiler::start('TEST1: ' . __METHOD__);
$productCollection = $this->_getProductCollection();
Varien_Profiler::stop('TEST1: ' . __METHOD__);

and this function doesn't exist:

$item->importCatalogProduct($itemProduct);

Probably a leftover from when Sales/Quote was an EAV.</issue_description>

Comments on the Issue (you are @copilot in this section)

@sreichel PR to remove?

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Co-authored-by: addison74 <8360474+addison74@users.noreply.github.com>
Copilot AI changed the title [WIP] [FEAT] Remove Mage_Sales_Model_Entity_Quote_Item_Collection Deprecate Mage_Sales_Model_Entity_Quote_Item_Collection Mar 14, 2026
Copilot AI requested a review from addison74 March 14, 2026 07:39
@github-actions github-actions bot added the Component: Sales Relates to Mage_Sales label Mar 14, 2026
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@github-actions
Copy link
Contributor

github-actions bot commented Mar 14, 2026

Test Results

970 tests  ±0   962 ✅ ±0   16s ⏱️ -1s
214 suites ±0     8 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 89cc19b. ± Comparison against base commit a793123.

♻️ This comment has been updated with latest results.

@sreichel
Copy link
Contributor

Remove it?

@Hanmac
Copy link
Contributor

Hanmac commented Mar 16, 2026

@sreichel probably remove everything like @fballiano did?

@sreichel
Copy link
Contributor

@Hanmac i dont know what Fab removed, but feel free to remove useless code.

@Hanmac
Copy link
Contributor

Hanmac commented Mar 18, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Sales Relates to Mage_Sales

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Mage_Sales_Model_Entity_Quote_Item_Collection should not exist

4 participants