codesnippetspro/code-snippets

PHP8.4 alpha 1 warnings - nullable is deprecated, the explicit nullable type must be used instead

Closed this issue · 1 comments

ipajen commented

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest stable version of Code Snippets.

Type of Bug

Unspecified

Description

Environment

  • WordPress: 6.6-RC2
  • PHP: 8.4.0alpha1
  • Server: Apache/2.4.59 (Win64) PHP/8.4.0alpha1 mod_fcgid/2.3.10-dev
  • Database: mysqli (Server: 8.3.0 / Client: mysqlnd 8.4.0alpha1)
  • Browser: Edge 126.0.0.0 (Windows 10/11)
  • Theme: Twenty Twenty-Four 1.1
  • MU-Plugins:
  • Plugins:
    • Code Snippets 3.6.5.1
    • WordPress Beta Tester 3.5.5

Maybe bit early but PHP 8.4 alpha1 has been released

PHP 8.4.0alpha1

PHP 8.4: Implicitly nullable parameter declarations deprecated
implicitly-marking-parameter-type-nullable-deprecated

Deprecated: Code_Snippets\REST_API\Snippets_REST_Controller::prepare_item_for_database(): Implicitly marking parameter $item as nullable is deprecated, the explicit nullable type must be used instead in C:\wamp64\www\wp\wp-content\plugins\code-snippets\php\rest-api\class-snippets-rest-controller.php on line 388

Steps to reproduce

  1. Run WordPress: 6.6-RC2 and PHP: 8.4.0alpha1
  2. Activate the Latest version of Code Snippet plugin
  3. Choose "Add New"

Isolating the problem

  • This bug happens with only the Code Snippets plugin active (Free or Pro).
  • This bug happens with a Blank WordPress theme active. For example: (Hello theme).
  • I can reproduce this bug consistently following the steps above.

Comment

Thanks!

Thank you for reporting this!