Skip to content
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

Remove declared properties accessed by magic getter in Paypal Config #2759

Merged
merged 2 commits into from
Nov 25, 2022

Conversation

elidrissidev
Copy link
Member

@elidrissidev elidrissidev commented Nov 24, 2022

Description (*)

In #2554, properties which were being set dynamically were added as class properties to support PHP 8.2. However in the case of app/code/core/Mage/Paypal/Model/Config.php, there is a magic getter (conveniently hidden in the center of the file 👀) which was accessing the properties from the paypal configuration which never gets called if the property is already declared on the class.

Related Pull Requests

  1. See phpstan: fixed "Access to an undefined property" #2554

Fixed Issues (if relevant)

  1. Fixes Problem during checkout with paypal express after upgrade from 19.4.16 to 19.4.19 #2756

Manual testing scenarios (*)

  1. Paypal checkout should now be working as normal.

Questions or comments

app/code/core/Mage/Paypal/Model/Config.php will need to be refactored to get rid of dynamic properties assignment, but as that can take more time and can potentially be breaking, I choose to just undo that change until we decide later.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added the Component: PayPal Relates to Mage_Paypal label Nov 24, 2022
@sreichel sreichel merged commit a559a55 into OpenMage:1.9.4.x Nov 25, 2022
@github-actions
Copy link
Contributor

Unit Test Results

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
7 runs  ±0  5 ✔️ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit a559a55. ± Comparison against base commit 73b970d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: PayPal Relates to Mage_Paypal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem during checkout with paypal express after upgrade from 19.4.16 to 19.4.19
3 participants