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:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Belevo\EnelixEMS\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class Php80ListsTest extends TestCase
|
||||
{
|
||||
public function testListValidationIsIdenticalOnSupportedPhpVersions(): void
|
||||
{
|
||||
$pipes = [];
|
||||
$process = proc_open([PHP_BINARY, __DIR__ . '/Php80Lists/checks.php'],
|
||||
[0 => ['pipe', 'r'], 1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes);
|
||||
self::assertIsResource($process);
|
||||
fclose($pipes[0]);
|
||||
$out = stream_get_contents($pipes[1]);
|
||||
$err = stream_get_contents($pipes[2]);
|
||||
fclose($pipes[1]);
|
||||
fclose($pipes[2]);
|
||||
self::assertSame(0, proc_close($process), $out . $err);
|
||||
self::assertSame('', $err);
|
||||
self::assertStringContainsString('PHP80_LISTS_OK ', $out);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user