• Maybe bit early but PHP 8.4 alpha1 has been released and there is some PHP warnings, would be great if they could be fixed in future versions of the plugin. Thanks!

    PHP 8.4.0alpha1

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

    === 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: None activated
    – Plugins:
      * Loco Translate 2.6.10
      * WordPress Beta Tester 3.5.5

    Deprecated: Loco_admin_DebugController::selectPluralForm(): Implicitly marking parameter $eq as nullable is deprecated, the explicit nullable type must be used instead in C:\wamp64\www\wp\wp-content\plugins\loco-translate\src\admin\DebugController.php on line 374

    Deprecated: Loco_admin_DebugController::preloadScript(): Implicitly marking parameter $bundle as nullable is deprecated, the explicit nullable type must be used instead in C:\wamp64\www\wp\wp-content\plugins\loco-translate\src\admin\DebugController.php on line 518

    Deprecated: Loco_mvc_View::render(): Implicitly marking parameter $args as nullable is deprecated, the explicit nullable type must be used instead in C:\wamp64\www\wp\wp-content\plugins\loco-translate\src\mvc\View.php on line 193

    Deprecated: Loco_mvc_View::render(): Implicitly marking parameter $parent as nullable is deprecated, the explicit nullable type must be used instead in C:\wamp64\www\wp\wp-content\plugins\loco-translate\src\mvc\View.php on line 193

    Deprecated: Loco_fs_File::cloneWriteContext(): Implicitly marking parameter $context as nullable is deprecated, the explicit nullable type must be used instead in C:\wamp64\www\wp\wp-content\plugins\loco-translate\src\fs\File.php on line 131

    Deprecated: Loco_package_Locale::__construct(): Implicitly marking parameter $locale as nullable is deprecated, the explicit nullable type must be used instead in C:\wamp64\www\wp\wp-content\plugins\loco-translate\src\package\Locale.php on line 28


     

Viewing 1 replies (of 1 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Thanks for the detailed post. Yes, it’s early, but good to think about!

    I tend to follow WordPress’s lead on version increments, because (1) there’s no use supporting a higher PHP version than WordPress itself, and (2) supporting newer PHP versions often means dropping support for older versions.

    That latter point means that Loco Translate users can’t upgrade my plugin without also upgrading WordPress core. Some may not be able to, or want to, so I try to maintain the widest possible forward and backward compatibility. Currently this is PHP 5.6.20 to 8.3.

    According to their blog post, WP 6.6 will drop support for some older versions of PHP 7, leaving the minimum version 7.2.24. I will try to trail a little behind that for the above-mentioned reason, but if this is necessary to support PHP 8.4 then I’ll to follow suit at some point. The only question is when.

    Looking at the specific deprecation in your error logs, moving to a minimum version of PHP 7.1 should allow compatibility for 8.4 to be implemented (at least with respect to this feature). I guess that WordPress are working towards that too, but that doesn’t mean the time is now for me. As you say yourself. It’s a bit early still.

    I note that this compatibility table makes no mention of PHP 8.4 at all, and these statistics show that PHP 8.3 is only at 2.7%.

Viewing 1 replies (of 1 total)

The topic ‘PHP 8.4: Implicitly nullable parameter declarations deprecated’ is closed to new replies.