Compare commits
No commits in common. "e286644fdd7184c9dba058cf6d168610808e8362" and "50bde319a7fcc65dcdd65d93934c10458573bfac" have entirely different histories.
e286644fdd
...
50bde319a7
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,2 @@
|
|||||||
vendor
|
vendor
|
||||||
.env
|
.env
|
||||||
*.log
|
|
@ -1,14 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Infrastructure\Database;
|
|
||||||
|
|
||||||
use Medoo\Medoo;
|
|
||||||
use App\Infrastructure\Config\Config;
|
|
||||||
|
|
||||||
class DatabaseFactory
|
|
||||||
{
|
|
||||||
public static function createDatabase(): Medoo
|
|
||||||
{
|
|
||||||
return new Medoo(Config::getDatabaseConfig());
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Infrastructure\Logger;
|
|
||||||
|
|
||||||
use Monolog\Logger;
|
|
||||||
use Monolog\Handler\StreamHandler;
|
|
||||||
use App\Infrastructure\Config\Config;
|
|
||||||
|
|
||||||
class LoggerFactory
|
|
||||||
{
|
|
||||||
public static function createLogger(): Logger
|
|
||||||
{
|
|
||||||
$logger = new Logger('FinanceCore');
|
|
||||||
$logLevel = Config::getLogLevel();
|
|
||||||
$logger->pushHandler(new StreamHandler(__DIR__ . '/../../../storage/logs/app.log', Logger::toMonologLevel($logLevel)));
|
|
||||||
|
|
||||||
return $logger;
|
|
||||||
}
|
|
||||||
}
|
|
@ -4,10 +4,5 @@
|
|||||||
"vlucas/phpdotenv": "^5.6",
|
"vlucas/phpdotenv": "^5.6",
|
||||||
"symfony/http-foundation": "^7.1",
|
"symfony/http-foundation": "^7.1",
|
||||||
"catfan/medoo": "^2.1"
|
"catfan/medoo": "^2.1"
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"App\\": "app/"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user