Open navarr opened 2 days ago
Hi @navarr ,
If you check the di.xml, these members are defined as part of the object pool. Could you please try to setup:di:compile
once more and let us know if you still see the error? I am unable to reproduce on a 2.4.7-p2 instance running PHP8.2.
Thanks, Spencer
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, Spencer
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