Wixel / GUMP

A fast, extensible & stand-alone PHP input validation class that allows you to validate any data
https://wixelhq.com
MIT License
1.17k stars 341 forks source link

Deprecation warning with PHP 8 #318

Closed ghost closed 2 years ago

ghost commented 3 years ago

Just upgraded to PHP 8 on my local and seeing this warning on a number of lines in gump.class.php:

Deprecated: Required parameter $value follows optional parameter $params in /Volumes/WIP/local/localhost/vendor/wixel/gump/gump.class.php on line 1159

Deprecated: Required parameter $value follows optional parameter $params in /Volumes/WIP/local/localhost/vendor/wixel/gump/gump.class.php on line 1232

Deprecated: Required parameter $value follows optional parameter $params in /Volumes/WIP/local/localhost/vendor/wixel/gump/gump.class.php on line 1259

Deprecated: Required parameter $value follows optional parameter $params in /Volumes/WIP/local/localhost/vendor/wixel/gump/gump.class.php on line 1276

... etc, etc, etc

Looks like there are a number of methods which have a required parameter following an optional parameter. This practice, of course, nullifies the fact of any optionality of the preceding parameter.

micabal commented 2 years ago

This should be merged with https://github.com/Wixel/GUMP/pull/324

filisko commented 2 years ago

Fixed now in https://github.com/Wixel/GUMP/pull/334

Will be released in 2.0.0 with support for php8.