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
38 lines
1.4 KiB
PHP
38 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Laminas\ConfigAggregator\ArrayProvider;
|
|
use Laminas\ConfigAggregator\ConfigAggregator;
|
|
use Laminas\ConfigAggregator\PhpFileProvider;
|
|
use Mezzio\Helper\ConfigProvider;
|
|
|
|
// To enable or disable caching, set the `ConfigAggregator::ENABLE_CACHE` boolean in
|
|
// `config/autoload/local.php`.
|
|
$cacheConfig = [
|
|
'config_cache_path' => 'data/cache/config-cache.php',
|
|
];
|
|
|
|
$aggregator = new ConfigAggregator([
|
|
\Mezzio\ConfigProvider::class,
|
|
\Mezzio\Tooling\ConfigProvider::class,
|
|
\Mezzio\Helper\ConfigProvider::class,
|
|
\Mezzio\Router\FastRouteRouter\ConfigProvider::class,
|
|
\Laminas\HttpHandlerRunner\ConfigProvider::class,
|
|
// Include cache configuration
|
|
new ArrayProvider($cacheConfig),
|
|
\Mezzio\Router\ConfigProvider::class,
|
|
\Laminas\Diactoros\ConfigProvider::class,
|
|
\AspirePress\AspireCloud\ConfigProvider::class,
|
|
// Load application config in a pre-defined order in such a way that local settings
|
|
// overwrite global settings. (Loaded as first to last):
|
|
// - `global.php`
|
|
// - `*.global.php`
|
|
// - `local.php`
|
|
// - `*.local.php`
|
|
new PhpFileProvider(realpath(__DIR__) . '/autoload/{{,*.}global,{,*.}local}.php'),
|
|
// Load development config if it exists
|
|
new PhpFileProvider(realpath(__DIR__) . '/development.config.php'),
|
|
], $cacheConfig['config_cache_path']);
|
|
|
|
return $aggregator->getMergedConfig();
|