Update PostgreSQL DB libs for PHP 8.1, update PHP version check

PHP version check now works with only max too, if called with (null,
'1.2.3') then php version will be checked <= 1.2.3

Debug Support has a to string print method printToString which tries to
print all types of var content as string (bool, int, float, resource,
object, etc)
Debug Support printAr supports ##HTMLPRE## style too (flag true)

DB/IO + PgSQL is changed from is_resource check to "false" check to be
compatible with new PHP 8.1 pgsql connect interface where all resources
are changed to objects PgSql\Connect|Resource|...
This commit is contained in:
Clemens Schwaighofer
2022-01-19 15:20:46 +09:00
parent 4a51f841c5
commit 33766e1e2d
10 changed files with 262 additions and 90 deletions

View File

@@ -29,14 +29,23 @@ final class CoreLibsCheckPHPVersionTest extends TestCase
'min 10' => ['10', '', false],
'min 10.0' => ['10.0', '', false],
'min 10.0.0' => ['10.0.0', '', false],
// max version, NOTE: update if php version bigger than 10
'max 10' => ['7', '10', true],
'max 10.0' => ['7', '10.0', true],
'max 10.0.0' => ['7', '10.0.0', true],
// max version
'max 7' => ['5', '7', false],
'max 7.4' => ['5', '7.4', false],
'max 7.4.1' => ['5', '7.4.1', false],
// min/max version, NOTE: update if php version bigger than 10
'min 7/max 10' => ['7', '10', true],
'min 7/max 10.0' => ['7', '10.0', true],
'min 7/max 10.0.0' => ['7', '10.0.0', true],
// min/max version
'min 5/max 7' => ['5', '7', false],
'min 5/max 7.4' => ['5', '7.4', false],
'min 5/max 7.4.1' => ['5', '7.4.1', false],
// max only
'max 7' => ['', '7', false],
'max 7.4' => ['', '7.4', false],
'max 7.4.1' => ['', '7.4.1', false],
// max over
'max 10' => ['', '10', true],
'max 10.0' => ['', '10.0', true],
'max 10.0.0' => ['', '10.0.0', true],
// TODO: add null tests
];
}