Compare commits

...

6 Commits

8 changed files with 52 additions and 168 deletions

View File

@ -21,49 +21,21 @@
"laminas/laminas-httphandlerrunner": "2.14.x-dev",
"vlucas/phpdotenv": "^3.4@dev",
"middlewares/whoops": "dev-master",
"mcnd/storage": "dev-master",
"mcnd/lean-console": "dev-master",
"mcnd/ulmus": "dev-master",
"mcnd/tell": "dev-master",
"mcnd/dump": "dev-master",
"mcnd/event": "dev-master",
"mcnd/thebugs": "dev-master",
"mcnd/taxus": "dev-master",
"mcnd/notes": "dev-master",
"mcnd/dump": "~1.0.0",
"mcnd/storage": "~1.0.0",
"mcnd/event": "~1.0.0",
"mcnd/tell": "~1.0.0",
"mcnd/ulmus": "^1.0 || ^2.0",
"mcnd/kash": "~1.0.0",
"mcnd/taxus": "1.1.0",
"mcnd/notes": "^2.1.1",
"mcnd/thebugs": "^1.0.0",
"psr/simple-cache": "*"
},
"repositories": [
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/event.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/the-bugs.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/storage.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/ulmus.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/notes.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/tell.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/lean-console.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/dump.git"
"type": "composer",
"url": "https://git.mcnd.ca/api/packages/mcndave/composer"
}
],
"autoload": {

View File

@ -2,7 +2,6 @@
use Tell\I18n;
use Psr\Container\ContainerInterface;
use Notes\Tell\LanguageHandler;
use function DI\autowire, DI\create, DI\get, DI\add;

View File

@ -65,7 +65,7 @@ return [
}
}
$router->addPatternMatcher('email', '[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n]+');
$router->addPatternMatcher('email', '[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n/]+');
$routing = $container->get(Lean\Routing::class);
$routing->registerRoute($container, getenv('URL_BASE'));

View File

@ -5,7 +5,8 @@ CRON_KEY = dev
# Route
URL_BASE = ""
APP_URL = "dev.mcnd.ca"
APP_URL = "myapp.ca"
ASSET_PATH = "static/"
# Path
CACHE_DIR = "var/cache"
@ -23,19 +24,18 @@ DEFAULT_TIME = "fr.UTF-8"
DEFAULT_TIME_FALLBACK = "french.UTF-8"
# Database
#SQLITE_PATH = "var/home.sqlite3"
#SQLITE_ADAPTER = "SQLite"
#SQLITE_PRAGMA_BEGIN = "foreign_keys=ON,synchronous=NORMAL"
#SQLITE_PRAGMA_DEBUG_BEGIN = "journal_mode=WAL"
#SQLITE_PRAGMA_CLOSE = "analysis_limit=500,optimize"
SQLITE_PATH = "var/myapp.sqlite3"
SQLITE_ADAPTER = "SQLite"
SQLITE_PRAGMA_BEGIN = "foreign_keys=ON,synchronous=NORMAL"
SQLITE_PRAGMA_DEBUG_BEGIN = "journal_mode=WAL"
SQLITE_PRAGMA_CLOSE = "analysis_limit=500,optimize"
DATABASE_PORT = ""
DATABASE_HOST = ""
DATABASE_NAME = ""
DATABASE_USERNAME = ""
DATABASE_PASSWORD = ""
DATABASE_CHARSET = "utf8"
DATABASE_ADAPTER = "MariaDB"
#DATABASE_PORT = ""
#DATABASE_HOST = ""
#DATABASE_NAME = ""
#DATABASE_USERNAME = ""
#DATABASE_PASSWORD = ""
#DATABASE_CHARSET = "utf8"
#DATABASE_ADAPTER = "MariaDB"
LEAN_RANDOM = "%RAND64%"

View File

@ -25,20 +25,20 @@
"league/oauth2-client": "dev-master",
"php-di/php-di": "dev-master",
"league/commonmark": "^2.7@dev",
"assets-package/ace": "dev-master",
"assets-package/ace": "1.0.0",
"mcnd/dump": "dev-master",
"mcnd/storage": "dev-master",
"mcnd/cli": "dev-master",
"mcnd/event": "dev-master",
"mcnd/ulmus": "dev-master",
"mcnd/ulmus-api": "dev-master",
"mcnd/ulmus-user": "dev-master",
"mcnd/ulmus": "^1.0 || ^2.0",
"mcnd/ulmus-api": "^1.3.0",
"mcnd/ulmus-user": "~1.1.2",
"mcnd/picea": "dev-master",
"mcnd/picea-ui": "dev-master",
"mcnd/picea-asset": "dev-master",
"mcnd/picea-asset": "~1.0.2",
"mcnd/cronard": "dev-master",
"mcnd/lean-api": "dev-master",
"mcnd/lean-console": "dev-master",
"mcnd/lean-console": "~1.3.2",
"mcnd/kash": "dev-master",
"mcnd/taxus": "dev-master",
"mcnd/notes": "dev-master",
@ -47,101 +47,13 @@
},
"repositories": [
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/cronard.git"
"type": "composer",
"url": "https://git.mcnd.ca/api/packages/mcndave/composer"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/cli.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/dump.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/storage.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/lean.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/lean-api.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/lean-console.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/ulmus.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/ulmus-api.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/ulmus-user.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/ulmus-api-gitea.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/picea.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/storage.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/picea-ui.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/picea-asset.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/notes.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/the-bugs.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/tell.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/taxus.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/dump.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/kash.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/event.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/negundo-client.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/assets-package/ace.git"
}
{
"type": "composer",
"url": "https://git.mcnd.ca/api/packages/assets-package/composer"
}
],
"autoload": {
"psr-4": {

View File

@ -19,7 +19,7 @@ return [
'ulmus' => [
'connections' => [
'default' => [
/*'default' => [
'adapter' => getenv("DATABASE_ADAPTER"),
'host' => getenv("DATABASE_HOST"),
'port' => getenv("DATABASE_PORT"),
@ -29,18 +29,18 @@ return [
'settings' => [
'charset' => getenv("DATABASE_CHARSET"),
],
],
],*/
'sqlite' => [
'default' => [
'adapter' => getenv("SQLITE_ADAPTER"),
'path' => getenv('PROJECT_PATH') . DIRECTORY_SEPARATOR . getenv("SQLITE_PATH"),
'pragma' => explode(',', getenv("SQLITE_PRAGMA")),
'pragma_begin' => array_merge(
explode(',', getenv("SQLITE_PRAGMA_BEGIN")), explode(',', getenv('DEBUG') ? getenv("SQLITE_PRAGMA_DEBUG_BEGIN") : "")
),
'pragma_close' => array_merge(
explode(',', getenv("SQLITE_PRAGMA_CLOSE")), explode(',', getenv('DEBUG') ? getenv("SQLITE_PRAGMA_DEBUG_CLOSE") : "")
),
explode(',', getenv("SQLITE_PRAGMA_BEGIN")), explode(',', getenv('DEBUG') ? getenv("SQLITE_PRAGMA_DEBUG_BEGIN") : "")
),
'pragma_close' => array_merge(
explode(',', getenv("SQLITE_PRAGMA_CLOSE")), explode(',', getenv('DEBUG') ? getenv("SQLITE_PRAGMA_DEBUG_CLOSE") : "")
),
],
]
]

View File

@ -8,7 +8,7 @@ try {
new class($projectPath) extends %NAMESPACE%\Kernel {};
}
catch(\Throwable $t) {
echo sprintf("%s in <strong>%s</strong> <pre>%s</pre>", $t->getMessage(), $t->getFile() . ":" . $t->getLine(), getenv('DEBUG') ? $t->getTraceAsString() : "");
echo sprintf("%s<hr><small>%s:%d</small><br><pre>%s</pre>", $t->getMessage(), $t->getFile(), $t->getLine(), getenv('DEBUG') ? var_export($t->getTrace(), true) : "");
error_log($t->getMessage());
header("HTTP/1.1 500 Internal Server Error");
}

View File

@ -7,6 +7,7 @@ use Storage\Session;
use Ulmus\User\Entity\User;
use Notes\Route\Attribute\Object\Route;
use Notes\Security\Attribute\Security;
use DI\Attribute\Inject;
use %NAMESPACE%\{ Entity, Lib, Form };
@ -18,9 +19,9 @@ use Notes\Attribute\Ignore;use Ulmus\User\Entity\UserInterface;
trait ControllerTrait {
use \Lean\ControllerTrait;
#[Ignore]
#[Inject]
public ? UserInterface $user;
#[Ignore]
#[Inject]
protected EventManager $eventManager;
}