[wp-trac] [WordPress Trac] #57511: Deprecated: Return type of Requests_Cookie_Jar when activating PHP 8.1

WordPress Trac noreply at wordpress.org
Fri Jan 20 08:45:39 UTC 2023


#57511: Deprecated: Return type of Requests_Cookie_Jar when activating PHP 8.1
--------------------------+-----------------------------
 Reporter:  oldrup        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  6.1.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 If updating from PHP 8.0 to PHP 8.1, different variants of the following
 two errors are thrown when selecting "View details" in the plugins list.

 {{{

 Deprecated: Return type of Requests_Cookie_Jar::offsetUnset($key) should
 either be compatible with ArrayAccess::offsetUnset(mixed $offset): void,
 or the #[\ReturnTypeWillChange] attribute should be used to temporarily
 suppress the notice in /serverurl/wp-includes/Requests/Cookie/Jar.php on
 line 102

 Deprecated: Return type of Requests_Cookie_Jar::getIterator() should
 either be compatible with IteratorAggregate::getIterator(): Traversable,
 or the #[\ReturnTypeWillChange] attribute should be used to temporarily
 suppress the notice in /serverurl/wp-includes/Requests/Cookie/Jar.php on
 line 111
 }}}

 - WordPress 6.1.1.
 - All plugins disabled.
 - Tested with Twenty Sixteen and Blocksy theme.
 - No errors when downgrading to PHP 8.0.

 Please let me know if I can supply more details to help to get rid of
 these errors :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57511>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list