- Various fixes bugs and missing code in project's skeleton

This commit is contained in:
mcndave committed 2025-07-17 18:37:46 +00:00
1 parent 7a48d707e0
commit dc52c88c03
9 files changed
+124 -10

No files matched your search

+3 -2
View File
@@ -8,6 +8,7 @@ use Notes\Attribute\Ignore;
use Notes\Route\Attribute\Object\Route;
use Notes\Security\Attribute\Security;
use Picea, Picea\Ui\Method\FormContext;
use Picea\Ui\Method\FormContextInterface;
use TheBugs\Email\MailerInterface;
use Storage\{ Cookie, Session };
use League\CommonMark\CommonMarkConverter;
@@ -212,7 +213,7 @@ trait ControllerTrait {
}
#[Ignore]
public function pushContext(FormContext $context) : FormContext
public function pushContext(FormContextInterface $context) : FormContextInterface
{
$this->contextList[$context->formName ?? uniqid("context_")] = $context;
@@ -220,7 +221,7 @@ trait ControllerTrait {
}
#[Ignore]
public function context(? string $name = null) : ? FormContext
public function context(? string $name = null) : ? FormContextInterface
{
return $name ? $this->contextList[$name] : array_values($this->contextList)[0] ?? null;
}
+4 -7
View File
@@ -27,18 +27,15 @@ class Kernel {
public array $paths = [];
public int $errorReporting = E_ALL & ~E_USER_DEPRECATED & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE;
public int $errorReporting = E_ALL & ~E_USER_DEPRECATED & ~E_DEPRECATED & ~E_NOTICE;
public array $definitionFilePaths;
public string $errorLogPath;
public string $projectPath;
public function __construct(string $projectPath)
{
$this->projectPath = $projectPath;
public function __construct(
public string $projectPath
) {
$this->setEnvironment();
$this->initializeEngine();
$this->setupContainer();