-
Notifications
You must be signed in to change notification settings - Fork 316
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
BUG: Fix Nullable Deprecated in PHP 8.4 #4086
Comments
As we still need to be compatible with PHP 7.4, we can't use public function __construct( WooCommerce $woocommerce = null ) { with public function __construct( $woocommerce = null ) { @BrookeDot would you be interested in opening a PR with that change? Thanks in advance! |
Uggg... PHP 7.4 😄 Confirmed the suggestion fixes the warning in PHP 8.4 and updated the PR. |
K, this made me curious and actually, we do have a better way to work around this PHP 7.4 limitation. Although it seems we can't use public function __construct( ?WooCommerce $woocommerce = null ) { Thank you very much! |
oh nice, I saw the PR Updated. |
Describe the bug
PHP 8.4 deprecated marking a parameter as
nullable
. ElasticPress now has the following PHP warning appear in the PHP logs:Here is the stack trace from Query Monitor
https://github.com/10up/ElasticPress/blob/develop/includes/classes/Feature/WooCommerce/OrdersAutosuggest.php#L52
Side note, I don't have WooCommerce installed.
Steps to Reproduce
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress and ElasticPress information
Elasticsearch
ElasticPress
PHP
Database
WordPress
Server
The text was updated successfully, but these errors were encountered: