- Some bugfixes made in skeleton dir and fixed 'email' route pattern
This commit is contained in:
1 parent
5769f600fe
commit
1a5d4dd0b2
5 files changed
+25
-22
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
@@ -15,7 +15,10 @@ use Notes\Breadcrumb\Breadcrumb;
|
||||
|
||||
use Storage\SessionMiddleware;
|
||||
|
||||
use Psr\Http\Message\{ ResponseInterface, ServerRequestInterface };
|
||||
use Ulmus\User\Middleware\{
|
||||
HeaderAuthenticationMiddleware,
|
||||
PostRequestAuthenticationMiddleware
|
||||
};
|
||||
|
||||
return [
|
||||
Lean\Routing::class => autowire(Lean\Routing::class),
|
||||
@@ -65,7 +68,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/]+');
|
||||
$router->addPatternMatcher('ids', '\b\d[\d,]*\b');
|
||||
|
||||
$routing = $container->get(Lean\Routing::class);
|
||||
|
||||
+14
-14
@@ -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%"
|
||||
|
||||
@@ -19,7 +19,7 @@ return [
|
||||
|
||||
'ulmus' => [
|
||||
'connections' => [
|
||||
'default' => [
|
||||
/*'default' => [
|
||||
'adapter' => getenv("DATABASE_ADAPTER"),
|
||||
'host' => getenv("DATABASE_HOST"),
|
||||
'port' => getenv("DATABASE_PORT"),
|
||||
@@ -29,9 +29,9 @@ 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")),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user