mirror of
https://gh.wpcy.net/https://github.com/aspirepress/AspireCloud.git
synced 2026-07-16 11:26:56 +08:00
* Adding a baseline for PHPStan so the checks will pass even though we have not implemented some logic yet * Updated some of the tests and configuration that was left behind in the old namespacing
36 lines
1,000 B
PHP
36 lines
1,000 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
// turn on all errors
|
|
use AspirePress\AspireCloud\Helpers\ContainerHelper;
|
|
use AspirePress\AspireCloud\Helpers\DbHelper;
|
|
use Laminas\ServiceManager\ServiceManager;
|
|
use Mezzio\Application;
|
|
use Mezzio\MiddlewareFactory;
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
// autoloader
|
|
require dirname(__DIR__) . '/vendor/autoload.php';
|
|
|
|
/** @var ServiceManager $container */
|
|
$container = require __DIR__ . '/../config/container.php';
|
|
|
|
/** @var Application $app */
|
|
$app = $container->get(Application::class);
|
|
$factory = $container->get(MiddlewareFactory::class);
|
|
|
|
// Load Routes
|
|
(require 'config/routes.php')($app, $factory, $container);
|
|
|
|
$config = $container->get('config');
|
|
$dbSchema = DbHelper::DB_NAME;
|
|
$config['database']['schema'] = $dbSchema;
|
|
|
|
putenv("DB_SCHEMA={$dbSchema}");
|
|
$container->setAllowOverride(true);
|
|
$container->setService('config', $config);
|
|
$container->setAllowOverride(false);
|
|
|
|
ContainerHelper::registerContainer($container);
|