update minimum php requirement and return type added to Requirment class
This commit is contained in:
parent
93ec7f665f
commit
43b314bcff
|
|
@ -92,7 +92,7 @@ Take advantage of two of the hottest frameworks used in this project -- Laravel
|
||||||
|
|
||||||
* **SERVER**: Apache 2 or NGINX.
|
* **SERVER**: Apache 2 or NGINX.
|
||||||
* **RAM**: 3 GB or higher.
|
* **RAM**: 3 GB or higher.
|
||||||
* **PHP**: 7.3 or higher.
|
* **PHP**: 7.4 or higher.
|
||||||
* **For MySQL users**: 5.7.23 or higher.
|
* **For MySQL users**: 5.7.23 or higher.
|
||||||
* **For MariaDB users**: 10.2.7 or Higher.
|
* **For MariaDB users**: 10.2.7 or Higher.
|
||||||
* **Node**: 8.11.3 LTS or higher.
|
* **Node**: 8.11.3 LTS or higher.
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,9 @@ class Requirement {
|
||||||
/**
|
/**
|
||||||
* Check for the server requirements.
|
* Check for the server requirements.
|
||||||
*
|
*
|
||||||
* @param array $requirements
|
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function checkRequirements()
|
public function checkRequirements(): array
|
||||||
{
|
{
|
||||||
// Server Requirements
|
// Server Requirements
|
||||||
$requirements = [
|
$requirements = [
|
||||||
|
|
@ -73,14 +72,14 @@ class Requirement {
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function checkPHPversion()
|
public function checkPHPVersion(): array
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Minimum PHP Version Supported (Override is in installer.php config file).
|
* 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();
|
$currentPhpVersion = $this->getPhpVersionInfo();
|
||||||
$supported = false;
|
$supported = false;
|
||||||
|
|
@ -89,14 +88,12 @@ class Requirement {
|
||||||
$supported = true;
|
$supported = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpStatus = [
|
return [
|
||||||
'full' => $currentPhpVersion['full'],
|
'full' => $currentPhpVersion['full'],
|
||||||
'current' => $currentPhpVersion['version'],
|
'current' => $currentPhpVersion['version'],
|
||||||
'minimum' => $_minPhpVersion,
|
'minimum' => $_minPhpVersion,
|
||||||
'supported' => $supported
|
'supported' => $supported
|
||||||
];
|
];
|
||||||
|
|
||||||
return $phpStatus;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -104,7 +101,7 @@ class Requirement {
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private static function getPhpVersionInfo()
|
private static function getPhpVersionInfo(): array
|
||||||
{
|
{
|
||||||
$currentVersionFull = PHP_VERSION;
|
$currentVersionFull = PHP_VERSION;
|
||||||
preg_match("#^\d+(\.\d+)*#", $currentVersionFull, $filtered);
|
preg_match("#^\d+(\.\d+)*#", $currentVersionFull, $filtered);
|
||||||
|
|
@ -121,7 +118,7 @@ class Requirement {
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function composerInstall()
|
public function composerInstall(): array
|
||||||
{
|
{
|
||||||
$location = str_replace('\\', '/', getcwd());
|
$location = str_replace('\\', '/', getcwd());
|
||||||
$currentLocation = explode("/", $location);
|
$currentLocation = explode("/", $location);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue