Updated to PHP 8.2 and use Composer for Index.
This commit is contained in:
parent
bda2b11eb5
commit
514e0068a2
5 changed files with 3232 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@
|
|||
/lib/index-dev
|
||||
/.debug
|
||||
/config/config.ini
|
||||
/vendor
|
||||
|
|
35
composer.json
Normal file
35
composer.json
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"flashwave/index": "dev-master",
|
||||
"flashwave/sasae": "dev-master",
|
||||
"chillerlan/php-qrcode": "^4.3",
|
||||
"symfony/mailer": "^6.0",
|
||||
"matomo/device-detector": "^6.1",
|
||||
"sentry/sdk": "^3.5"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"database"
|
||||
],
|
||||
"psr-4": {
|
||||
"Hanyuu\\": "src"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"post-install-cmd": [
|
||||
"./tools/migrate"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
"allow-plugins": {
|
||||
"composer/installers": true,
|
||||
"php-http/discovery": true
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.10"
|
||||
}
|
||||
}
|
3194
composer.lock
generated
Normal file
3194
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -13,17 +13,12 @@ define('HAU_CLI', PHP_SAPI === 'cli');
|
|||
define('HAU_DEBUG', is_file(HAU_ROOT . '/.debug'));
|
||||
define('HAU_DIR_PUBLIC', HAU_ROOT . '/public');
|
||||
define('HAU_DIR_SOURCE', HAU_ROOT . '/src');
|
||||
define('HAU_DIR_LIBRARIES', HAU_ROOT . '/lib');
|
||||
define('HAU_DIR_CONFIG', HAU_ROOT . '/config');
|
||||
define('HAU_DIR_MIGRATIONS', HAU_ROOT . '/database');
|
||||
define('HAU_DIR_TEMPLATES', HAU_ROOT . '/templates');
|
||||
|
||||
define('HAU_NDX_PATH', HAU_DIR_LIBRARIES . '/index');
|
||||
define('HAU_NDX_PATH_DEV', HAU_DIR_LIBRARIES . '/index-dev');
|
||||
require_once HAU_ROOT . '/vendor/autoload.php';
|
||||
|
||||
require_once (HAU_DEBUG && is_dir(HAU_NDX_PATH_DEV) ? HAU_NDX_PATH_DEV : HAU_NDX_PATH) . '/index.php';
|
||||
|
||||
Autoloader::addNamespace(__NAMESPACE__, HAU_DIR_SOURCE);
|
||||
Environment::setDebug(HAU_DEBUG);
|
||||
|
||||
mb_internal_encoding('utf-8');
|
||||
|
|
|
@ -22,6 +22,7 @@ class HanyuuContext {
|
|||
private IUsers $users;
|
||||
private Auth $auth;
|
||||
private ?TemplateContext $tpl = null;
|
||||
private ?IRouter $router = null;
|
||||
|
||||
public function __construct(IConfig $config, IDbConnection $dbConn) {
|
||||
$this->config = $config;
|
||||
|
|
Loading…
Reference in a new issue