[wp-trac] [WordPress Trac] #60786: [PHP 8.4] Fix implicit nullable parameter type depcation

WordPress Trac noreply at wordpress.org
Fri Mar 15 20:23:38 UTC 2024


#60786: [PHP 8.4] Fix implicit nullable parameter type depcation
-------------------------------+-----------------------------
 Reporter:  ayeshrajans        |      Owner:  (none)
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  General            |    Version:  trunk
 Severity:  normal             |   Keywords:  php84 has-patch
  Focuses:  php-compatibility  |
-------------------------------+-----------------------------
 In PHP 8.4, declaring function/method parameters with a default value of
 `null` is deprecated if the type is not nullable.
 [https://wiki.php.net/rfc/deprecate-implicitly-nullable-types RFC] and
 [https://php.watch/versions/8.4/implicitly-marking-parameter-type-
 nullable-deprecated PHP 8.4: Implicitly nullable parameter declarations
 deprecated]

 Out current minimum PHP requirement is PHP 7.0, but nullable types are
 only supported in PHP 7.1 and later.

 Submitting the PR with the fixes and to start a conversation, but merging
 these changes without bumping minimum PHP requirement to 7.1 will break
 things on PHP 7.0.

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


More information about the wp-trac mailing list