Skip to content

Commit b59c487

Browse files
committed
Generic/DeprecatedFunctions: add test which will work for PHP 8.0+
Both functions used in the tests were removed in PHP 8.0, so when running the tests on PHP 8.0, nothing would be tested anymore.
1 parent ee7e4f0 commit b59c487

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Standards/Generic/Tests/PHP/DeprecatedFunctionsUnitTest.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
create_function(); // Deprecated PHP 7.2.
44
mbsplit(); // Deprecated PHP 7.3.
5+
libxml_disable_entity_loader(); // Deprecated PHP 8.0.

src/Standards/Generic/Tests/PHP/DeprecatedFunctionsUnitTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ public function getErrorList()
4040
$errors[4] = 1;
4141
}
4242

43+
if (PHP_VERSION_ID >= 80000) {
44+
$errors[5] = 1;
45+
}
46+
4347
return $errors;
4448

4549
}//end getErrorList()

0 commit comments

Comments
 (0)