mirror of
https://github.com/flarum/core.git
synced 2025-10-25 05:36:07 +02:00
Extract installation prerequisites into composable classes and use those in the web-based installer
This commit is contained in:
24
src/Install/Prerequisites/PhpVersion.php
Normal file
24
src/Install/Prerequisites/PhpVersion.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Install\Prerequisites;
|
||||
|
||||
class PhpVersion extends AbstractPrerequisite
|
||||
{
|
||||
public function check()
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '5.5.0', '<')) {
|
||||
$this->errors[] = [
|
||||
'message' => '<strong>PHP 5.5+</strong> is required.',
|
||||
'detail' => 'You are running version '.PHP_VERSION.'. Talk to your hosting provider about upgrading to the latest PHP version.'
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user