parent
b11c6b9f34
commit
e4d35d74e3
|
@ -5,6 +5,7 @@ namespace Icinga\Module\Director\Db;
|
|||
use DirectoryIterator;
|
||||
use Exception;
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Exception\IcingaException;
|
||||
use Icinga\Module\Director\Data\Db\DbConnection;
|
||||
|
||||
class Migrations
|
||||
|
@ -23,6 +24,13 @@ class Migrations
|
|||
|
||||
public function __construct(DbConnection $connection)
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '5.4.0') < 0) {
|
||||
throw new IcingaException(
|
||||
"PHP version 5.4.x is required for Director >= 1.4.0, you're running %s."
|
||||
. ' Please either upgrade PHP or downgrade Icinga Director',
|
||||
PHP_VERSION
|
||||
);
|
||||
}
|
||||
$this->connection = $connection;
|
||||
$this->db = $connection->getDbAdapter();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue