update minimum php requirement and return type added to Requirment class

This commit is contained in:
AmooAti 2021-12-12 01:34:56 +03:30
parent 93ec7f665f
commit 43b314bcff
2 changed files with 8 additions and 11 deletions

View File

@ -92,7 +92,7 @@ Take advantage of two of the hottest frameworks used in this project -- Laravel
* **SERVER**: Apache 2 or NGINX.
* **RAM**: 3 GB or higher.
* **PHP**: 7.3 or higher.
* **PHP**: 7.4 or higher.
* **For MySQL users**: 5.7.23 or higher.
* **For MariaDB users**: 10.2.7 or Higher.
* **Node**: 8.11.3 LTS or higher.

View File

@ -5,10 +5,9 @@ class Requirement {
/**
* Check for the server requirements.
*
* @param array $requirements
* @return array
*/
public function checkRequirements()
public function checkRequirements(): array
{
// Server Requirements
$requirements = [
@ -73,14 +72,14 @@ class Requirement {
*
* @return array
*/
public function checkPHPversion()
public function checkPHPVersion(): array
{
/**
* Minimum PHP Version Supported (Override is in installer.php config file).
*
* @var _minPhpVersion
* @var string _minPhpVersion
*/
$_minPhpVersion = '7.3.0';
$_minPhpVersion = '7.4.0';
$currentPhpVersion = $this->getPhpVersionInfo();
$supported = false;
@ -89,14 +88,12 @@ class Requirement {
$supported = true;
}
$phpStatus = [
return [
'full' => $currentPhpVersion['full'],
'current' => $currentPhpVersion['version'],
'minimum' => $_minPhpVersion,
'supported' => $supported
];
return $phpStatus;
}
/**
@ -104,7 +101,7 @@ class Requirement {
*
* @return array
*/
private static function getPhpVersionInfo()
private static function getPhpVersionInfo(): array
{
$currentVersionFull = PHP_VERSION;
preg_match("#^\d+(\.\d+)*#", $currentVersionFull, $filtered);
@ -121,7 +118,7 @@ class Requirement {
*
* @return array
*/
public function composerInstall()
public function composerInstall(): array
{
$location = str_replace('\\', '/', getcwd());
$currentLocation = explode("/", $location);