-
Notifications
You must be signed in to change notification settings - Fork 77
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
ParadoxLabsSubscriptionManager triggers deprecated notice on PHP 8.2 #1252
Comments
Hi @navarr , If you check the di.xml, these members are defined as part of the object pool. Could you please try to Thanks, |
I mis-titled this but I definitely still see the same error, since this functionality is deprecated. I've prepared a PR #1253 that resolves this error. I'm guessing these classes aren't in the constructor so that there's not a hard dependency on ParadoxLabs. Technically the correct approach would be to separate the functionality that requires ParadoxLabs into a second, optional, module that can have that hard dependency - though I can imagine why that approach wasn't taken. |
Thanks for the PR @navarr ! Odd that I seem to be incapable of reproducing this on PHP8.2 and above... but your point stands, and there's certainly no harm in explicitly declaring those variables ahead of time. Just FYI, we typically won't merge user-submitted PRs directly, but we can cherry pick your commit into our next release branch so you get proper credit for the fix 🙂 Thanks again, |
Add undefined properties to ParadoxLabsSubscriptionManager (php8.2 compatibility)
What I expected
PLP To load
What happened instead
Exception #0 (Exception): Deprecated Functionality: Creation of dynamic property Amazon\Pay\Model\Subscription\ParadoxLabsSubscriptionManager::$quoteManager is deprecated in /var/www/html/vendor/amzn/amazon-pay-magento-2-module/Model/Subscription/SubscriptionManagerFactory.php on line 67
Steps to reproduce the issue
This happened when I loaded a PLP with the Amazon Pay module installed.
Looking at the class, it appears incomplete. While the error I'm getting is deprecated functionality, if those methods were actually called it'd likely be NPE since I don't see those properties declared or set anywhere.
Your setup
The text was updated successfully, but these errors were encountered: