- Fixed a bug where LDAP entities were crashing the storage interface

This commit is contained in:
Dave M. 2021-03-24 13:50:51 +00:00
parent f6fadd715e
commit 23af120020
7 changed files with 81 additions and 4 deletions

View File

@ -0,0 +1,32 @@
{
"lean": {
"label": "Lean",
"dashboard": "Dashboard"
},
"storage": {
"label": "Stockage",
"summary": "Sommaire",
"database": "Base de données",
"session": "Session"
},
"templating": {
"label": "Templating",
"picea": "Picea"
},
"caching": {
"label": "Caching"
},
"request": {
"label": "Request",
"routes": "Routes"
},
"email": {
"label": "Email",
"routes": "Activity"
}
}

View File

@ -0,0 +1,12 @@
{
"title": "Request -- LEAN",
"page-title": "LEAN - Request",
"route": {
"header": "List of active routes",
"name": "Name",
"uri": "URI",
"methods": "HTTP Methods",
"target": "class::method()"
}
}

View File

@ -2,6 +2,6 @@
"title" : "Setup -- LEAN",
"breadcrumb" : {
"index" : "Negundo"
"index" : ""
}
}

View File

@ -0,0 +1,25 @@
{
"title": "Storage -- LEAN",
"page-title": "LEAN - Storage",
"database": {
"header": "List of databases",
"name": "Database",
"adapter": "Adapter",
"host": "Hostname:port",
"username": "Username",
"connection": "Connection",
"table": {
"header": "Tables details",
"fields": "{$count} fields",
"name": "Name",
"actions": "Actions",
"table-fields" : "Fields in table",
"create": "Create table",
"createAll": "Create all tables",
"query": "SQL Query"
}
}
}

View File

@ -19,9 +19,6 @@ class Console {
/**
* @Route("/", "name" => "lean.console:home")
* @param ServerRequestInterface $request
* @param array $arguments
* @return ResponseInterface
*/
public function home(ServerRequestInterface $request, array $arguments) : ResponseInterface
{

View File

@ -24,6 +24,12 @@ class Database implements FormInterface
$context->tableExist = [];
foreach($this->migration->entities as $entity => $table) {
$tableName = $table->tableName();
$databaseName = $table->databaseName();
if ( ! $tableName || ! $databaseName ) {
continue;
}
$table = Table::repository()->where(Table::field('name'), $table->tableName())
->where(Table::field('schema'), $table->databaseName())

View File

@ -22,6 +22,11 @@ class DatabaseMigrations
$name = $file->getBasename("." . $file->getExtension());
$subNs = substr($file->getPath(), strlen($folder));
$entity = rtrim($namespace, "\\") . ( $subNs ? "\\$subNs" : "" ) . "\\{$name}";
if ( ! method_exists($entity, 'resolveEntity') ) {
continue;
}
$this->entities[$entity] = $entity::resolveEntity();
}
}