Support » Installing WordPress » PHP 8.1 issue with WP 6.1.1

  • Updated from PHP 8 to 8.1
    usinig WP 6.1.1
    and getting warning after warning like:

    PHP Deprecated: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/web/xxxxxxx/htdocs/xxxx/wp-includes/Requests/Cookie/Jar.php on line 63

    or
    PHP Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/web/xxxxxxx/htdocs/xxxx/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40

    • This topic was modified 5 days, 18 hours ago by treibstoff.
Viewing 4 replies - 1 through 4 (of 4 total)
  • WordPress is also fully compatible with PHP 8.1 in the latest version. See: https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/

    The bug you mentioned is already known: https://core.trac.wordpress.org/ticket/54504

    Thread Starter treibstoff

    (@treibstoff)

    Compatible??? But your Debug Log is flooded endless with these messages….. and you’re not able to discover in between warnings & mistakes from not updated Plugins or Themes???
    This Bug is known since nearly two years and eventually might be solved in WP 6.2, not before…..
    I’m just looking for a solution to get rid of this messages, without disabling the Debug.log…. just to be able to find other problems with for example older plugs…..
    I mean you just can’t work with WP-Cli under 8.1

    • This reply was modified 5 days, 16 hours ago by treibstoff.

    First of all: I am not responsible for WordPress, just as no one else here is alone. The forum in which you write is for volunteers to help other users clarify questions about this software developed by volunteers as open source. More details here: https://wordpress.org/support/guidelines/

    The best solution to avoid the messages in debug.log is to use PHP 8.0. As already written, the current version is not fully compatible with PHP 8.1. The one linked above is already being worked on by the developers as you can see, so one of the next releases will be more compatible with PHP 8.1.

    Also the WP CLI should run better with PHP 8.0.

    By the way, it also depends on the plugins you use and the theme. They also need to be compatible with the PHP version you are using. Unfortunately, many still are not. If you have questions about this, contact the respective developer via their support forum or (for commercial products) their support.

    Thread Starter treibstoff

    (@treibstoff)

    You see: Everywhere it’s written that WP is fully compatible with 8.1 ….
    But than, to be correct, it’s not.

    To make my WP installation ready for 8.1 (it is in 8.0) I need to find & locate mistakes in my plugs or theme to correct them by myself as far as possible.

    I see, there is no solution and have to switch back to 8.0

    thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.