php / pecl-networking-gearman

PHP wrapper to libgearman
https://pecl.php.net/package/gearman
Other
33 stars 25 forks source link

Add syntactic sugar for improved PHP 8.4 compatibility #33

Open cracksalad opened 1 month ago

cracksalad commented 1 month ago

Fixed all implicit nullable types to be explicit because the implicit way is deprecated in PHP 8.4

esabol commented 1 month ago

What's the impact of this on people who are using PHP versions less than 8.4?

cracksalad commented 1 month ago

What's the impact of this on people who are using PHP versions less than 8.4?

As far as I know, prior to PHP 8.4 foo(?string $str = null) and foo(string $str = null) are exactly the same. The additional ? is just syntactic sugar. So it should be absolutly no difference for PHP < 8.4.

esabol commented 1 month ago

@cracksalad replied:

What's the impact of this on people who are using PHP versions less than 8.4?

As far as I know, prior to PHP 8.4 foo(?string $str = null) and foo(string $str = null) are exactly the same. The additional ? is just syntactic sugar. So it should be absolutly no difference for PHP < 8.4.

OK, that's good! 👍