Skip to content

Fix-Wrong name conversion on getCustomerRegisterUrlUrl() at AuthenticationPopup.php - #36794

Open
Vasudev-22 wants to merge 8 commits into
magento:2.4-developfrom
Vasudev-22:issue-36735
Open

Fix-Wrong name conversion on getCustomerRegisterUrlUrl() at AuthenticationPopup.php#36794
Vasudev-22 wants to merge 8 commits into
magento:2.4-developfrom
Vasudev-22:issue-36735

Conversation

@Vasudev-22

@Vasudev-22 Vasudev-22 commented Jan 31, 2023

Copy link
Copy Markdown
Contributor

Description (*)

Wrong name conversion on getCustomerRegisterUrlUrl() at AuthenticationPopup.php
Changed this function to getCustomerRegisterUrl()

Related Pull Requests

#36735

Fixed Issues (if relevant)

  1. Fixes Wrong name conversion on getCustomerRegisterUrlUrl() at AuthenticationPopup.php #36735

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@m2-assistant

m2-assistant Bot commented Jan 31, 2023

Copy link
Copy Markdown

Hi @Vasudev-22. Thank you for your contribution
Here are 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

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.

For more details, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-community-project m2-community-project Bot added the Priority: P3 May be fixed according to the position in the backlog. label Jan 31, 2023
@m2-github-services m2-github-services added Partner: EY partners-contribution Pull Request is created by Magento Partner labels Jan 31, 2023
@Vasudev-22

Copy link
Copy Markdown
Contributor Author

@magento run all tests

@magento-automated-testing

Copy link
Copy Markdown

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@Den4ik Den4ik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Vasudev-22 Thanks for your PR. Change of public method name is not allowed by Backward compatibility policy. You may add new one private method with correct name and mark original @deprecated

@Vasudev-22

Copy link
Copy Markdown
Contributor Author

Hi @Den4ik ,

@Vasudev-22 Thanks for your PR. Change of public method name is not allowed by Backward compatibility policy. You may add new one private method with correct name and mark original @deprecated

I was updated that in PR

@Vasudev-22

Copy link
Copy Markdown
Contributor Author

@magento run all unit tests

@magento-automated-testing

Copy link
Copy Markdown

Failed to run the builds. Please try to re-run them later.

@Vasudev-22
Vasudev-22 requested a review from Den4ik February 8, 2023 01:58
@Vasudev-22

Copy link
Copy Markdown
Contributor Author

@magento run all tests

@magento-automated-testing

Copy link
Copy Markdown

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

*/
public function getCustomerRegisterUrlUrl()
{
return $this->getUrl('customer/account/create');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would call $this->getCustomerRegisterUrl(); here, to avoid code duplication.

@hostep hostep Feb 20, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Vasudev-22: can you take a look at this remark above also? Thanks! 🙂

As for the deprecation notice, I would put the following, to indicate which method to use instead:

     * @deprecated
     * @see getCustomerRegisterUrl

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@hostep , Updated.
Thanks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks 2 more remarks:

  • I would call return $this->getCustomerRegisterUrl(); here, instead of return $this->getUrl('customer/account/create'); to avoid code duplication.
  • Please replace @deprecated due to requirements just with @deprecated, I think you may have misunderstood @Den4ik's remark

Thank you!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@hostep Yes confused those comments, Now updated.
Thanks for pointing.

/**
* Get customer register url
*
* @deprecated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add deprecation comment due to requirements

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Den4ik , deprecation comment added.

@Vasudev-22

Copy link
Copy Markdown
Contributor Author

@magento run all tests

@magento-automated-testing

Copy link
Copy Markdown

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@hostep hostep removed their assignment Feb 20, 2023
@hostep hostep removed their assignment Feb 20, 2023
@Vasudev-22
Vasudev-22 requested review from Den4ik and hostep and removed request for Den4ik and hostep February 20, 2023 15:25
* Get customer register url
* @return string
*/
private function getCustomerRegisterUrl()

@hostep hostep Feb 20, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this one should be public instead of private, because the original method was also public?

Update: @Den4ik: I see you mentioned making it private in your earlier review. But won't we cause confusion with callers of the original method when we mark that one as deprecated and give no new method as alternative to call?

@hostep hostep removed their assignment Feb 20, 2023
@lbajsarowicz

Copy link
Copy Markdown
Contributor

@Vasudev-22 — every review point here was addressed except one, and it is still open: @hostep asked whether the replacement should be public rather than private, since the original getCustomerRegisterUrlUrl() was public and deprecating it without a callable public alternative leaves external callers with nowhere to go. I think hostep is right.

The typo is still on 2.4-develop (AuthenticationPopup.php:125, called at :77). If you would like to finish this yourself, say so. Otherwise I will take it over, make the new method public, and rebase — opening a separate PR from my fork crediting you.

@lbajsarowicz

Copy link
Copy Markdown
Contributor

Opened #41168 which continues this PR — rebased onto current 2.4-develop with your commits and authorship preserved, and with @hostep's outstanding point addressed: the replacement method is now public, so callers of the deprecated getCustomerRegisterUrlUrl() have a BC-safe alternative to move to.

@Vasudev-22 thanks for the original fix. @hostep @Den4ik #41168 should be ready for review.

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

Labels

Partner: EY partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog. Progress: review

Projects

Status: Review in Progress

Development

Successfully merging this pull request may close these issues.

Wrong name conversion on getCustomerRegisterUrlUrl() at AuthenticationPopup.php

5 participants