• Resolved Mikhail Alferov

    (@malferov)


    When declaring a function or a method, adding a required parameter after optional parameters is deprecated since PHP 8.0.

    PHP Deprecated: Required parameter $value follows optional parameter $key in /woocommerce-checkout-manager/includes/model/class-wooccm-field.php on line 39

    PHP Deprecated: Required parameter $name follows optional parameter $prefix in /woocommerce-checkout-manager/includes/model/class-wooccm-field.php on line 59

    PHP Deprecated: Required parameter $key follows optional parameter $field in /woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 24

    PHP Deprecated: Required parameter $args follows optional parameter $field in /woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 191

    PHP Deprecated: Required parameter $value follows optional parameter $field in /woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 216

    etc…

    Need to check the code in the declaration of functions and methods and their calls.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Mikhail Alferov

    (@malferov)

    @quadlayers, any answer?

    Plugin Author quadlayers

    (@quadlayers)

    hello @malferov

    sorry for the delay

    ok we will check this to ensure php 8 compatibility

    thanks for the advice

    Plugin Author quadlayers

    (@quadlayers)

    can you share the complete error log?

    Thread Starter Mikhail Alferov

    (@malferov)

    @quadlayers, I gave comprehensive information about the errors that were in the log. There is no other data about plugin errors.

    Hey @malferov

    I think that @quadlayers was asking you to share the error log file, located in your server files

    You can contact your hosting provider, if can’t find it within server folders.

    When running WP CLI commands the following output is shown.

    Deprecated: Required parameter $key follows optional parameter $field in /home/wp-content/plugins/woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 216
    Deprecated: Required parameter $args follows optional parameter $field in /home/wp-content/plugins/woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 216
    Deprecated: Required parameter $value follows optional parameter $field in /home/wp-content/plugins/woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 216
    Deprecated: Required parameter $key follows optional parameter $field in /home/wp-content/plugins/woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 235
    Deprecated: Required parameter $args follows optional parameter $field in /home/wp-content/plugins/woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 235
    Deprecated: Required parameter $value follows optional parameter $field in /home/wp-content/plugins/woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 235
    Deprecated: Required parameter $key follows optional parameter $field in /home/wp-content/plugins/woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 261
    Deprecated: Required parameter $args follows optional parameter $field in /home/wp-content/plugins/woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 261
    Deprecated: Required parameter $value follows optional parameter $field in /home/wp-content/plugins/woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 261
    Deprecated: Required parameter $key follows optional parameter $field in /home/wp-content/plugins/woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 285
    Deprecated: Required parameter $args follows optional parameter $field in /home/wp-content/plugins/woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 285
    Deprecated: Required parameter $value follows optional parameter $field in /home/wp-content/plugins/woocommerce-checkout-manager/includes/view/frontend/class-wooccm-fields-filters.php on line 285

    Hello @tonyclemmey @malferov

    Please confirm if this is triggering some error on front/back end.

    Error log shared by @tonyclemmey is normal, deprecated features of PHP doesn’t means necessary that there’s an error, but means that some function is useless in latest version. (mostly because there’s a better way to do the same thing) so it will become unsupported in the future

    ->https://stackoverflow.com/questions/6822446/what-does-php-do-with-deprecated-functions

    So if you are not having any error on your website, there’s nothing to worry about.

    Of course we can expect an update on next plugin releases.

    Hey @sebastopolys

    Correct as you mentioned deprecated warnings should not break a site vs actual PHP errors. I am just sharing the warnings outputted if using debug or WP CLI. If you have multiple plugins with such warnings it can end up in 100s of lines very quickly.

    It would be great to clear up these warnings in future updates.

    Plugin Author quadlayers

    (@quadlayers)

    hello @tonyclemmey

    please update to 5.4.1 and let us know if the see any other warning

    Hi @quadlayers

    I have just updated to the latest version 5.4.1 as you instructed and I can confirm any deprecated warnings for this plugin on PHP 8 no longer exist.

    Thanks

    Plugin Author quadlayers

    (@quadlayers)

    thanks mate!

    have a nice day

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘PHP 8 Deprecated code’ is closed to new replies.