Skip to content

magento/magento2#: Remove a redundant getMappedNums from a loop #27939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

atwixfirster
Copy link
Contributor

@atwixfirster atwixfirster commented Apr 22, 2020

Description (*)

Removes a redundant getMappedNums from a loop.

Before changes:

27939_01

After fix:

27939_02

Related Pull Requests

Fixed Issues (if relevant)

  1. magento/magento2#<issue_number>: Issue title

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

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)

Resolved issues:

  1. resolves [Issue] magento/magento2#: Remove a redundant getMappedNums from a loop #30031: magento/magento2#: Remove a redundant getMappedNums from a loop

@m2-assistant
Copy link

m2-assistant bot commented Apr 22, 2020

Hi @atwixfirster. 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.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@magento-engcom-team magento-engcom-team added Component: GraphQL GraphQL Release Line: 2.4 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Apr 22, 2020
@dmytro-ch dmytro-ch self-assigned this Apr 22, 2020
Copy link
Contributor

@dmytro-ch dmytro-ch left a comment

Choose a reason for hiding this comment

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

Hello @atwixfirster, thank you for the suggested improvement :)

Please note, due to Magento Definition of Done the changes must be covered by tests. Could you please cover your fix by the appropriate unit test?

Thank you!

@atwixfirster
Copy link
Contributor Author

Please note, due to Magento Definition of Done the changes must be covered by tests. Could you please cover your fix by the appropriate unit test?

done

Thank you, @dmytro-ch

Copy link
Contributor

@dmytro-ch dmytro-ch left a comment

Choose a reason for hiding this comment

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

@atwixfirster thank you for the updates!
Could you please just apply the following minor change in order to make sure the test is compatible with PHPUnit 8?

Thank you!

@dmytro-ch dmytro-ch added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: category of expertise Award: test coverage labels May 6, 2020
@atwixfirster atwixfirster force-pushed the framework-EnumLookup branch from 232dd5d to 1c87648 Compare May 6, 2020 14:58
@magento-engcom-team
Copy link
Contributor

Hi @dmytro-ch, thank you for the review.
ENGCOM-7528 has been created to process this Pull Request

@VladimirZaets VladimirZaets added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Jun 16, 2020
@engcom-Echo engcom-Echo self-assigned this Aug 12, 2020
@engcom-Echo
Copy link
Contributor

✔️ QA passed

"$ this-> enumDataMapper-> getMappedEnums ($ enumName);" it is possible to take out for "foreach" it will not influence logic but will reduce quantity of uses.

@engcom-Echo
Copy link
Contributor

@magento run all tests

@engcom-Echo
Copy link
Contributor

@magento run all tests

@magento-engcom-team
Copy link
Contributor

Hi @gabrieldagama, thank you for the review.
ENGCOM-7528 has been created to process this Pull Request

@engcom-Bravo
Copy link
Contributor

✔️ QA Passed

Manual Testing scenario

  1. Creare a Customer on Storefront, with the checkbox Subscribed fro Newsletter checked
  2. Perform a grphql query
query{
  customer{
    firstname
    lastname
    email
    is_subscribed
    created_at
    prefix
    wishlists{
      id
    }
  }
}
  1. See the response data

AR: The response contains all the correct information about the Customer, for example

{
  "data": {
    "customer": {
      "firstname": "Alan",
      "lastname": "Smithee",
      "email": "[email protected]",
      "is_subscribed": true,
      "created_at": "2020-09-25 13:34:27",
      "prefix": null,
      "wishlists": [
        {
          "id": "1"
        }
      ]
    }
  }
}

@engcom-Echo engcom-Echo added QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) and removed QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope labels Sep 29, 2020
@engcom-Bravo engcom-Bravo added QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope and removed QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) labels Sep 29, 2020
@magento-engcom-team magento-engcom-team merged commit 7df6613 into magento:2.4-develop Sep 30, 2020
@m2-assistant
Copy link

m2-assistant bot commented Sep 30, 2020

Hi @atwixfirster, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: category of expertise Award: test coverage Component: GraphQL GraphQL Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Issue] magento/magento2#: Remove a redundant getMappedNums from a loop
9 participants