Skip to content

Commit

Permalink
Fix #80: Added a check on current server's php.ini's 'max_execution_t…
Browse files Browse the repository at this point in the history
…ime' requiring it to exceed the time specified / tested application's comfortable installation time

Co-authored-by: Alexander Makarov <[email protected]>
  • Loading branch information
rossaddison and samdark authored Nov 13, 2024
1 parent 8b66d2e commit 475b6fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

- Enh #71: Improve requirements array validation (@vjik)
- Enh #78: Improve result appearance (@luizcmarin)

- Enh #80: Added a check on current server's php.ini's 'max_execution_time' requiring it to exceed the time specified / tested application's comfortable installation time. (@rossaddison)

## 1.0.0 June 15, 2024

- Initial release.
12 changes: 12 additions & 0 deletions src/RequirementsChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,18 @@ public function checkUploadMaxFileSize(?string $min = null, ?string $max = null)
return ($minCheckResult && $maxCheckResult);
}


/**
* Checks if the `php.ini` setting `max_execution_time` exceeds the execution time specified.
* @param string|null $max Maximum execution time.
* @return bool True on success.
*/
public function checkMaxExecutionTime(?string $max = null): bool
{
$maxExecutionTime = ini_get('max_exection_time');
return $max === null || $maxExecutionTime <= $max;
}

/**
* Renders a view file.
* This method includes the view file as a PHP script
Expand Down

0 comments on commit 475b6fa

Please sign in to comment.