This commit is contained in:
Dave Mc Nicoll 2024-10-17 18:21:00 +00:00
commit 0cc9a8a893
4 changed files with 38 additions and 54 deletions

View File

@ -2,6 +2,10 @@
use Ulmus\Container\AdapterProxy; use Ulmus\Container\AdapterProxy;
use Psr\Container\ContainerInterface;
use Ulmus\ConnectionAdapter;
use function DI\autowire, DI\create, DI\get, DI\add; use function DI\autowire, DI\create, DI\get, DI\add;
return [ return [

View File

@ -6,10 +6,7 @@ use function DI\autowire, DI\create, DI\get;
$dir = getenv("META_PATH") . "/definitions"; $dir = getenv("META_PATH") . "/definitions";
return array_merge( return [
Lean\Lean::autoloadDefinitionsFromComposerExtra(),
[
'%APPKEY%' => [ '%APPKEY%' => [
'picea' => [ 'picea' => [
'context' => "%ESCAPED_NAMESPACE%\\View", 'context' => "%ESCAPED_NAMESPACE%\\View",
@ -46,18 +43,4 @@ return array_merge(
], ],
'app.middlewares' => [], 'app.middlewares' => [],
], ];
require("$dir/auth.php"),
require("$dir/storage.php"),
require("$dir/security.php"),
require("$dir/env/" . getenv('APP_ENV') . ".php"),
[
'config' => function () {
return array_merge_recursive(
Lean\Lean::autoloadConfigFromComposerExtra(),
require(getenv("META_PATH")."/config.php")
);
}
]
);

View File

@ -19,7 +19,6 @@ return [
AdapterProxy::class => function (ContainerInterface $c) { AdapterProxy::class => function (ContainerInterface $c) {
return new AdapterProxy( return new AdapterProxy(
$c->get('lean:adapter.sqlite'),
$c->get(ConnectionAdapter::class) $c->get(ConnectionAdapter::class)
); );
}, },

View File

@ -23,8 +23,6 @@ new class(dirname(__DIR__)) extends \Lean\Kernel {
{ {
$this->errorLogPath = getenv("LOGS_PATH") . DIRECTORY_SEPARATOR. date("Y-m").".log"; $this->errorLogPath = getenv("LOGS_PATH") . DIRECTORY_SEPARATOR. date("Y-m").".log";
$this->definitionFilePaths = Lean::getDefinitionsPathsFromComposer();
return parent::initializeEngine(); return parent::initializeEngine();
} }