Added dev php config and removed .env dependencies

This commit is contained in:
Alejandro Celaya
2019-12-17 21:20:24 +01:00
parent 9f2ede0b84
commit 0152f6fa1a
13 changed files with 32 additions and 47 deletions

View File

@@ -2,21 +2,12 @@
declare(strict_types=1);
use Symfony\Component\Dotenv\Dotenv;
use Zend\ServiceManager\ServiceManager;
chdir(dirname(__DIR__));
require 'vendor/autoload.php';
// If the Dotenv class exists, load env vars and enable errors
if (class_exists(Dotenv::class)) {
error_reporting(E_ALL);
ini_set('display_errors', '1');
$dotenv = new Dotenv(true);
$dotenv->load(__DIR__ . '/../.env');
}
// Build container
$config = require __DIR__ . '/config.php';
$container = new ServiceManager($config['dependencies']);