parent
6951f7796b
commit
7beae0ae05
2 changed files with 12 additions and 11 deletions
|
@ -1,5 +1,6 @@
|
|||
## v.3.0.1
|
||||
+ Fixed error with older mysql versions.
|
||||
+ Fixed config is compiled with the di container.
|
||||
+ Small installer update.
|
||||
|
||||
## v.3.0
|
||||
|
|
|
@ -46,12 +46,11 @@ $config = array_replace_recursive([
|
|||
$builder = new ContainerBuilder();
|
||||
|
||||
if (!$config['debug']) {
|
||||
$builder->enableCompilation(BASE_DIR.'/resources/cache/di/');
|
||||
$builder->writeProxiesToFile(true, BASE_DIR.'/resources/cache/proxies');
|
||||
$builder->enableCompilation(BASE_DIR.'/resources/cache/di');
|
||||
$builder->writeProxiesToFile(true, BASE_DIR.'/resources/cache/di');
|
||||
}
|
||||
|
||||
$builder->addDefinitions([
|
||||
'config' => value($config),
|
||||
View::class => factory(function (Container $container) {
|
||||
return ViewFactory::createAppInstance($container);
|
||||
}),
|
||||
|
@ -61,6 +60,7 @@ $builder->addDefinitions([
|
|||
$builder->addDefinitions(__DIR__.'/container.php');
|
||||
|
||||
$app = Bridge::create($builder->build());
|
||||
$app->getContainer()->set('config', $config);
|
||||
$app->setBasePath(parse_url($config['base_url'], PHP_URL_PATH) ?: '');
|
||||
|
||||
if (!$config['debug']) {
|
||||
|
|
Loading…
Reference in a new issue