Skip to content

Conversation

thomas-kl1
Copy link
Member

The scope of this pull request is to fix two issues in the \Magento\Framework\Model\EntitySnapshot package. It makes more convenient the results of getAttributes.

Description (*)

The getAttributes method of the \Magento\Framework\Model\EntitySnapshot\AttributeProviderInterface has no standardized structure in its available implementations.
\Magento\Framework\Model\EntitySnapshot\AttributeProvider deal with a dictionary where \Magento\Eav\Model\AttributeProvider returns a simple list of attribute code.
I have assumed that the results should be a list of field (as described in the methods description).

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Jul 22, 2019

Hi @thomas-kl1. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

* @throws \Exception
*/
public function getAttributes($entityType)
public function getAttributes($entityType): array
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, we are not allowed to change public method signature according to our Backward Compatible Development Guide

@@ -48,14 +49,14 @@ public function __construct(
* @param object $entity
* @return void
*/
public function registerSnapshot($entityType, $entity)
public function registerSnapshot($entityType, $entity): void
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, we are not allowed to change public method signature according to our Backward Compatible Development Guide

@@ -65,7 +66,7 @@ public function registerSnapshot($entityType, $entity)
* @param object $entity
* @return bool
*/
public function isModified($entityType, $entity)
public function isModified($entityType, $entity): bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, we are not allowed to change public method signature according to our Backward Compatible Development Guide

* @throws \Exception
*/
public function getAttributes($entityType)
public function getAttributes($entityType): array
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, we are not allowed to change public method signature according to our Backward Compatible Development Guide

*/
public function getAttributes($entityType);
public function getAttributes($entityType): array;
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, we are not allowed to change public method signature according to our Backward Compatible Development Guide

@ghost ghost assigned sidolov Aug 15, 2019
@thomas-kl1 thomas-kl1 requested a review from sidolov August 19, 2019 11:42
@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-5690 has been created to process this Pull Request
✳️ @sidolov, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@m2-assistant
Copy link

m2-assistant bot commented Aug 30, 2019

Hi @thomas-kl1, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.4 milestone Aug 30, 2019
@VladimirZaets VladimirZaets added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants