Switched to Composer for Index.

This commit is contained in:
flash 2023-10-21 14:35:09 +00:00
parent 997aebc735
commit ac021d7409
5 changed files with 124 additions and 9 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/config.ini
/public/robots.txt
/lib/index-dev
/vendor

13
composer.json Normal file
View File

@ -0,0 +1,13 @@
{
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"flashwave/index": "dev-master",
"flashwave/syokuhou": "dev-master"
},
"autoload": {
"psr-4": {
"Uiharu\\": "src"
}
}
}

107
composer.lock generated Normal file
View File

@ -0,0 +1,107 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "d909826a501788db19148054e389ec5f",
"packages": [
{
"name": "flashwave/index",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://git.flash.moe/flash/index.git",
"reference": "82a350a5c719cc83aa22382201683a68a2629f2a"
},
"require": {
"ext-mbstring": "*",
"php": ">=8.1"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.2"
},
"suggest": {
"ext-mysqli": "Support for the Index\\Data\\MariaDB namespace (both mysqlnd and libmysql are supported).",
"ext-sqlite3": "Support for the Index\\Data\\SQLite namespace."
},
"default-branch": true,
"type": "library",
"autoload": {
"files": [
"index.php"
],
"psr-4": {
"Index\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"bsd-3-clause-clear"
],
"authors": [
{
"name": "flashwave",
"email": "packagist@flash.moe",
"homepage": "https://flash.moe",
"role": "mom"
}
],
"description": "Composer package for the common library for my projects.",
"homepage": "https://railgun.sh/index",
"time": "2023-09-15T22:44:36+00:00"
},
{
"name": "flashwave/syokuhou",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://git.flash.moe/flash/syokuhou.git",
"reference": "b3470ad8605b0484294c73cd95be6e7ba4551e5a"
},
"require": {
"flashwave/index": "dev-master",
"php": ">=8.2"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.4"
},
"default-branch": true,
"type": "library",
"autoload": {
"psr-4": {
"Syokuhou\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"bsd-3-clause-clear"
],
"authors": [
{
"name": "flashwave",
"email": "packagist@flash.moe",
"homepage": "https://flash.moe",
"role": "mom"
}
],
"description": "Configuration library for PHP.",
"homepage": "https://railgun.sh/syokuhou",
"time": "2023-10-20T21:26:38+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": {
"flashwave/index": 20,
"flashwave/syokuhou": 20
},
"prefer-stable": true,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.3.0"
}

View File

@ -18,7 +18,7 @@
</div>
</div>
<div class="uiharu-footer">
<a href="https://flash.moe" target="_blank" rel="noopener">Flashwave</a> 2021-2023
<a href="https://flash.moe" target="_blank" rel="noopener">flashwave</a> 2021-2023
</div>
</div>
</div>

View File

@ -1,7 +1,6 @@
<?php
namespace Uiharu;
use Index\Autoloader;
use Index\Environment;
use Index\Data\ConnectionFailedException;
use Index\Data\DbTools;
@ -12,15 +11,10 @@ define('UIH_DEBUG', is_file(UIH_ROOT . '/.debug'));
define('UIH_PUBLIC', UIH_ROOT . '/public');
define('UIH_SOURCE', UIH_ROOT . '/src');
define('UIH_LIBRARY', UIH_ROOT . '/lib');
define('UIH_VERSION', '20230609');
define('UIH_VERSION', '20231021');
define('UIH_NDX_PATH', UIH_LIBRARY . '/index');
define('UIH_NDX_PATH_DEV', UIH_LIBRARY . '/index-dev');
require_once UIH_ROOT . '/vendor/autoload.php';
require_once (UIH_DEBUG && is_dir(UIH_NDX_PATH_DEV) ? UIH_NDX_PATH_DEV : UIH_NDX_PATH) . '/index.php';
Autoloader::addNamespace('Masterminds', UIH_LIBRARY . '/html5-php/src');
Autoloader::addNamespace(__NAMESPACE__, UIH_SOURCE);
Environment::setDebug(UIH_DEBUG);
mb_internal_encoding('utf-8');