magento-engcom / import-export-improvements

Open Software License 3.0
31 stars 29 forks source link

Added $_customerCollection property to Storage class #144

Closed maxalmonte14 closed 5 years ago

maxalmonte14 commented 5 years ago

Description (*)

This PR solves the problem addressed in https://github.com/magento-engcom/import-export-improvements/issues/135

Fixed Issues (if relevant)

  1. https://github.com/magento-engcom/import-export-improvements/issues/135: Clean up Model/ResourceModel/Import/Customer/Storage.php

Manual testing scenarios (*)

  1. Run ./vendor/bin/phpstan analyse app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php as described in https://github.com/magento-engcom/import-export-improvements/issues/135, after this implementation the following error shouldn't be present
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   Storage.php
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------
  61     Access to an undefined property Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage::$_customerCollection.
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------

Contribution checklist (*)

dmanners commented 5 years ago

Hello, thank you for your pull request. I will start to process this PR and get back to you if I need any more information.

maxalmonte14 commented 5 years ago

Done, I removed the unused properties and made sure that StorageTest.php is passing, by running vendor/bin/phpunit app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php 👍

dmanners commented 5 years ago

Nice @maxalmonte14 I will update our tools and progress this.

maxalmonte14 commented 5 years ago

I added back the customerCollectionFactory property to the class and the parameter to the constructor method, I didn't realize the mistake in the first place, sorry!