1
0
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:
Franz Liedke
2015-09-03 08:23:34 +02:00
parent bd47653377
commit 942db77416
8 changed files with 195 additions and 34 deletions

View 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.'
];
}
}
}