added php version control to console

This commit is contained in:
Denis Duliçi
2020-06-28 00:24:03 +03:00
parent a18bc710e7
commit 1f5901d3c7
4 changed files with 26 additions and 60 deletions

View File

@@ -1,4 +1,5 @@
<?php
/**
* @package Akaunting
* @copyright 2017-2020 Akaunting. All rights reserved.
@@ -6,19 +7,11 @@
* @link https://akaunting.com
*/
// Define minimum supported PHP version
define('AKAUNTING_PHP', '7.2.5');
// Check PHP version
if (version_compare(PHP_VERSION, AKAUNTING_PHP, '<')) {
die('Your host needs to use PHP ' . AKAUNTING_PHP . ' or higher to run Akaunting');
}
// Register the auto-loader
require(__DIR__.'/bootstrap/autoload.php');
require(__DIR__ . '/bootstrap/autoload.php');
// Load the app
$app = require_once(__DIR__.'/bootstrap/app.php');
$app = require_once(__DIR__ . '/bootstrap/app.php');
// Run the app
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);