- Fixed a bug where LDAP entities were crashing the storage interface
This commit is contained in:
1 parent
f6fadd715e
commit
23af120020
7 files changed
+81
-4
No files matched your search
@@ -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
|
||||
{
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user