- Minor bugfixes dones

This commit is contained in:
Dave M. 2023-03-23 15:07:35 +00:00
parent bf1bec644b
commit eda0ee6f33
3 changed files with 5 additions and 7 deletions

View File

@ -3,13 +3,11 @@
namespace Lean\Console\Controller;
use League\Route\Router;
use Picea\{ FileFetcher, Picea ,Caching\Opcache, Extension\UrlExtension };
use Picea\{FileFetcher, Picea, Caching\Opcache, Extension\UrlExtension, Ui\Method\FormHandler};
use Psr\Http\Message\{ ResponseInterface, ServerRequestInterface };
use Lean\Console\{ Form, Lib };
use Notes\Tell\Attribute\Language, Notes\Route\Attribute\Method\Route;
use function Home\View\{ _, lang, url, route, form };
#[Language("lean.caching")]
class Caching extends Console {
use Lib\ConsoleControllerTrait;
@ -20,7 +18,7 @@ class Caching extends Console {
$list = [];
if ( isset($this->picea) ) {
form(new Form\Caching\Picea($this->picea, $list), $this->pushContext(new Lib\FormContext($request, "caching.picea")));
new FormHandler($request, new Form\Caching\Picea($this->picea, $list), $this->pushContext(new Lib\FormContext($request, "caching.picea")));
}
return $this->renderView("lean-console/page/caching/picea", get_defined_vars());

View File

@ -25,7 +25,8 @@ class DatabaseMigration implements FormInterface
$context->tableExist = [];
foreach($this->migration->entities as $entity => $table) {
$adapter = $entity::resolveEntity()->sqlAdapter()->adapter();
$connection = $entity::resolveEntity()->sqlAdapter();
$adapter = $connection->adapter();
$tableName = $table->tableName();
$databaseName = $table->databaseName();
@ -34,7 +35,7 @@ class DatabaseMigration implements FormInterface
continue;
}
$tableEntity = $adapter->schemaTable($databaseName, $tableName);
$tableEntity = $adapter->schemaTable($connection, $databaseName, $tableName);
if ( $tableEntity ) {
foreach($tableEntity->columns as $field => $definition) {

View File

@ -13,7 +13,6 @@ use Notes\Security\Attribute\{ Security, Taxus };
use Picea;
#[Language("lean.route")]
#[Security(locked: false)]
#[Taxus("dev")]
#[\Notes\Route\Attribute\Object\Route(method: [ 'GET', 'POST', 'DELETE'] , base: "/~")]