- Removed E_STRICT error type, added some more content to skeleton and removed 'methods' of route attributes (replaced with 'method')

This commit is contained in:
mcndave committed 2026-07-08 12:11:11 +00:00
1 parent 6b1be4d245
commit 347e3c3b6c
6 files changed
+38 -14

No files matched your search

+14
View File
@@ -58,4 +58,18 @@ class File
return $path;
}
public static function assertFileExists(string $filepath) : void
{
if (! is_file($filepath)) {
throw new \InvalidArgumentException("File does not exist: {$filepath}");
}
}
public static function assertFolderExists(string $path) : void
{
if (! is_dir($path)) {
throw new \InvalidArgumentException("Folder does not exist: {$path}");
}
}
}
+16 -7
View File
@@ -24,7 +24,9 @@ class Kernel
public array $paths = [];
public int $errorReporting = E_ALL & ~E_USER_DEPRECATED & ~E_DEPRECATED & ~E_NOTICE;
public int $errorReportingDev = -1;
public int $errorReportingProd = E_ALL & ~E_USER_DEPRECATED & ~E_DEPRECATED /*& ~E_NOTICE*/;
public array $definitionFilePaths;
@@ -34,6 +36,8 @@ class Kernel
public string $projectPath
)
{
# Still not sure about adding a folder check each call just to add a basic project setup error ...
# File::assertFolderExists($this->projectPath);
$this->setEnvironment();
$this->initializeEngine();
$this->setupContainer();
@@ -41,7 +45,7 @@ class Kernel
$this->handleRequest();
}
public static function putenv($var, $value)
public static function putenv($var, $value) : void
{
putenv("$var=$value");
$_ENV[$var] = $value;
@@ -96,13 +100,17 @@ class Kernel
\Locale::setDefault($this->locale);
}
ini_set("log_errors", "1");
ini_set("error_log", $this->errorLogPath ?? getenv("LOGS_PATH") . DIRECTORY_SEPARATOR. date("Y-m").".log");
ini_set('display_errors', getenv("DEBUG") ? 'on' : 'on');
ini_set("log_errors", true);
ini_set('display_errors', getenv("DEBUG") ? 'on' : 'off');
error_reporting($this->errorReporting);
if (getenv("DEBUG")) {
error_reporting(getenv('ERROR_REPORTING_DEV') ?: $this->errorReportingDev);
}
else {
error_reporting(getenv('ERROR_REPORTING_PROD') ?: $this->errorReportingProd);
}
return $this;
}
@@ -114,7 +122,8 @@ class Kernel
if (getenv("APP_ENV") === "prod") {
if (getenv("CACHE_PATH")) {
# check if ACPU is there first, $containerBuilder->enableDefinitionCache();
# check if ACPU is there first,
$containerBuilder->enableDefinitionCache();
$containerBuilder->enableCompilation(getenv("CACHE_PATH") . "/di/");
# No proxies yet... $containerBuilder->writeProxiesToFile(true, getenv("CACHE_PATH") . "/di/");