fix(compat): preserve PHP 8.0 support without changing control guards
Tests / test (push) Successful in 59s
Tests / test (push) Successful in 59s
Replace trait constants and array_is_list usage with equivalent PHP 8.0 constructs. Add strict list/expiry regressions and make isolated reflection tests PHP 8.0 compatible. No control activation, threshold or configuration change.
This commit is contained in:
@@ -14,6 +14,7 @@ class IPSModule {
|
||||
require __DIR__.'/../../Batterie/module.php';
|
||||
use Belevo\EnelixEMS\Nachrichtenvertrag as N;
|
||||
$b=new Batterie();$read=new ReflectionMethod(Batterie::class,'baueVerbraucherdaten');$count=0;
|
||||
if (PHP_VERSION_ID < 80100) $read->setAccessible(true);
|
||||
function ck($v,$s){global$count;if(!$v)throw new RuntimeException('FAIL '.$s);$count++;echo "PASS $s\n";}
|
||||
$d=$read->invoke($b,17004);ck($d['Leistungsquelle']===N::LEISTUNGSQUELLE_BERECHNET,'partition source quality independent of hidden diagnostic variables');
|
||||
$b->buffers['V4FeedbackEstimated']='0';$d=$read->invoke($b,17004);ck($d['Leistungsquelle']===N::LEISTUNGSQUELLE_GEMESSEN,'ordinary physical source marked measured');
|
||||
|
||||
Reference in New Issue
Block a user