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

This commit is contained in:
mcndave committed 2021-03-24 13:50:51 +00:00
1 parent f6fadd715e
commit 23af120020
7 files changed
+81 -4

No files matched your search

-3
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
{
+6
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())
+5
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();
}
}