-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fatal Error on 2.9.5 #2894
Comments
Experienced the same issue here today also - I have had to revert back to v2.9.4 for the site to function again. |
+1 |
Hello @ainsleyclark The fatal error is triggered because our plugin uses a previous version of psr/log , as defined in woocommerce-paypal-payments/blob/trunk/composer.json with "psr/log": "^1.1" . The more recent version that would be compatible with PHP 8.2 is this one: https://packagist.org/packages/psr/log#3.0.0. The Psr/log version 3.0.0 requires PHP version 8.0.0 or higher and uses Union types in its arguments, which PayPal Payments doesn’t support yet. Most likely, some other plugin on your site implements the library psr/log in version 3.0.0 which is not compatible with the version used in PayPal Payments. The first step would be to isolate the cause of the conflict, so you may want to perform a full conflict test to understand which other plugin may be involved. We recommend temporarily activating the default theme Storefront and disabling all other plugins except for WooCommerce and PayPal Payments, and then enabling other plugins one by one to see when the error occurs. Once you know which other plugin implements this version of the dependency, you could potentially ask the other plugin developer to consider downgrading the dependency version. Should you need any more help, feel free to reach out. Kind Regards, |
I have the same issue; no one will be downgrading for PayPal. I suggest PayPal upgrade or see customers move on to other payment options—just a thought. |
Hi @SydeKrystian, Thanks for your reply. I understand the plugin currently relies on psr/log "^1.1". Upgrading to a version compatible with PHP 8.2 (such as 2.x or 3.x) should maintain backwards compatibility unless there are specific constraints within the plugin. Running a full conflict test is resource-intensive, and the issue seems related to dependency management rather than a conflict with other plugins. Thank you. |
I'm not sure if it's related to the same error, but after updating to hosting to PHP 8.2 and updating Woocommerce Paypal Payments to 2.9.5 on the same day, my kinsta hosting error log is flooding with these errors and I haven't had any sales since I did the updates 3 days ago (which is rare) even though my front and backend of the site don't display any errors or issues for me:
How do I isolate what plugin could be conflicting if the front end works fine, and the error log doesn’t follow any pattern of how frequently the error is occuring?` Is this related to the same issue and if so should I downgrade to 2.9.4 oe reverse the PHP 8.2 to 8.1 again? |
This error stems from a longstanding conflict between dependency versions, not solely from PayPal Payments. Our plugin depends on This is a dependency conflict and not a bug in PayPal Payments. Compatibility issues of this nature always involve at least two parties. The error points to PayPal Payments because it relies on a specific version of A long-term solution is in development: We’re working to scope the dependencies to prevent such conflicts, regardless of what other plugins do. However even after we addressed this, your other plugins that currently clash with PayPal Payments still have the potential to clash with other plugins. This is an issue with the entire plugin ecosystem and a balancing act. @lvvvvvl This is an unrelated issue. The root cause is improper gateway instantiation by a third-party plugin, like the "Cardlink" payment plugin. The error points to PayPal Payments because it uses a WooCommerce core function ( To summarize, in both cases, the errors trace back to external factors:
I will close this issue as a duplicate of #1518, but a proper solution for this dependency conflict can be expected sometime in Q1 2025. |
Here we are in 2025 experiencing this issue because of support for PHP 7.4 which reached end of life in 2022. Come on. We are stuck on 2.9.4 until this is properly addressed. We run over 100 plugins on a large network and this is the only plugin that causes a fatal error due to this. Please, support PHP 8.x properly and scope your dependencies correctly. |
Describe the Bug
After updating to
v2.9.5
I receive the following error which has bricked a production site:Fatal error: Declaration of WooCommerce\WooCommerce\Logging\Logger\WooCommerceLogger::log($level, $message, array $context = []) must be compatible with Psr\Log\LoggerTrait::log($level, Stringable|string $message, array $context = []): void in /var/www/my-website/wp-content/plugins/woocommerce-paypal-payments/modules/woocommerce-logging/src/Logger/WooCommerceLogger.php on line 58
The text was updated successfully, but these errors were encountered: