WB Gamification 1.5.1 - PHP 8.0/8.1 compatibility hotfix
PHP compatibility hotfix
Fixes a fatal error that crashed sites on PHP 8.1 and below, and restores full PHP 8.0 support.
Fixed
- Fatal
E_COMPILE_ERRORon PHP 8.1 and below.KudosEngine::send()declared atrue|WP_Errorreturn type. The standalonetrueliteral type only exists in PHP 8.2+, so on PHP 8.0/8.1 it was parsed as a class name (WBGam\Engine\true) and crashed the whole site (Cannot use 'WBGam\Engine\true' as class name as it is reserved). Changed tobool|WP_Error. Eventvalue object usedreadonlyproperties (PHP 8.1+). Broke parsing on PHP 8.0. Properties are now plainpublic; immutability is enforced by convention.OpenApiCommand::error()used theneverreturn type (PHP 8.1+). Changed tovoid.
Changed
- Minimum supported PHP lowered from 8.1 to 8.0. CI now lints PHP 8.0 through 8.4.
Verification
php -lclean on PHP 8.0 / 8.1 / 8.2 / 8.3 / 8.4 (source + shipped vendor).- Local-CI green; GitHub CI (CI + Tests workflows) all green.
Upgrade strongly recommended for any site on PHP 8.1 or below. No schema changes.