Skip to content

Commit

Permalink
Setting minimum requirement of php version to 7.4 (Refleting changes …
Browse files Browse the repository at this point in the history
…in phpunit tests)
  • Loading branch information
Yannick243 authored and josaphatim committed Dec 16, 2023
1 parent 6752b00 commit 11ef61a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/crypt.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public static function hash_compare($a, $b) {
if (!is_string($a) || !is_string($b) || strlen($a) !== strlen($b)) {
return false;
}
/* requires PHP >= 5.6 */
/* requires PHP >= 7.4 */
if (Hm_Functions::function_exists('hash_equals')) {
return hash_equals($a, $b);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ini_set.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
ini_set('session.cache_limiter', 'nocache');

/* session hash mechanism */
if (version_compare(PHP_VERSION, 5.6, '==')) {
if (version_compare(PHP_VERSION, 7.4, '==')) {
ini_set('session.hash_function', 1);
}
else {
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/dispatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function setUp(): void {
* @runInSeparateProcess
*/
public function test_is_php_setup() {
if ((float) substr(phpversion(), 0, 3) >= 5.6) {
if ((float) substr(phpversion(), 0, 3) >= 7.4) {
$this->assertTrue(Hm_Dispatch::is_php_setup());
}
Hm_Functions::$exists = false;
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/mocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public static function c_setopt() { return true; }
public static function c_status() { return 200; }
public static function c_exec() { return self::$exec_res; }
public static function function_exists($func) {
if ((float) substr(phpversion(), 0, 3) < 5.6) {
if ((float) substr(phpversion(), 0, 3) < 7.4) {
return false;
}
return self::$exists;
Expand Down

0 comments on commit 11ef61a

Please sign in to comment.