Skip to content

Conversation

nikunjskd20
Copy link
Contributor

@nikunjskd20 nikunjskd20 commented May 11, 2019

Description (*)

To give region field a name like array Ex. name="somearray[region]" and getting data as array value.

Fixed Issues (if relevant)

  1. getRegionHtmlSelect does not have configuration #16445: IgetRegionHtmlSelect does not have configuration

Manual testing scenarios (*)

  1. ... create form with getRegionHtmlSelect() you will get a static name 'region'. developer can not pass any other value.
  2. ...

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)

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented May 11, 2019

CLA assistant check
All committers have signed the CLA.

@m2-assistant
Copy link

m2-assistant bot commented May 11, 2019

Hi @nikunjskd20. 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-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

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

@swnsma swnsma self-assigned this May 12, 2019
@swnsma swnsma self-requested a review May 12, 2019 09:57
Copy link
Contributor

@swnsma swnsma left a comment

Choose a reason for hiding this comment

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

Hi @nikunjskd20,
Thank you for your contribution!
Your PR looks good, but there are some things which need to be adjusted.

Please check my comment.
Please check failed static tests.

Copy link
Contributor

@swnsma swnsma left a comment

Choose a reason for hiding this comment

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

Hi @nikunjskd20,

Thank you for your changes!

We almost finish, but beforoe we here there are few thing which need to be done.
So, could you please:

  • add declare(strict_types=1); to the beginning of the file;
  • check my comments about minor changes request;
  • check and fix failed tests;

* @param string $title
* @return string
*/
public function getRegionSelect($value = null, $name = 'region', $id = 'state', $title = 'State/Province')
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please add typehints for method arguments and return typehint ?

Copy link
Contributor Author

@nikunjskd20 nikunjskd20 May 20, 2019

Choose a reason for hiding this comment

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

Is it necessary to add declare(strict_types=1); at the beginning of file?

Copy link
Contributor

Choose a reason for hiding this comment

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

According to Technical Guidelines #1.3.1, this is should be done.
But as we are introducing a new method, it is better to use strict types, as is described in #1.3 and where PHP is aiming (PSR-12).

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is better to use ?int $value = null, instead of string $value = null, to avoid double conversion to int.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, sure.

@swnsma swnsma self-requested a review May 21, 2019 14:46
@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

@nikunjskd20 thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@nikunjskd20
Copy link
Contributor Author

Hi @swnsma, do I need to do anything or this pull request will merge automatically?

@swnsma
Copy link
Contributor

swnsma commented May 22, 2019

Hi @nikunjskd20.
This PR will be checked with Magento QA and if everything is OK it will be merged by Magento.
But if there will be any problems, I will let you know :)

@VasylShvorak
Copy link
Contributor

✔️ QA passed

@p-bystritsky
Copy link
Contributor

@nikunjskd20, @swnsma please reduce the number of commits.

@m2-assistant
Copy link

m2-assistant bot commented Jun 7, 2019

Hi @nikunjskd20, 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.3 milestone Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants