-
Notifications
You must be signed in to change notification settings - Fork 48
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? |
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: