Switched to Composer for Index.

This commit is contained in:
flash 2023-10-21 14:16:40 +00:00
parent d28010a293
commit 227754dbff
4 changed files with 122 additions and 4 deletions

1
.gitignore vendored
View file

@ -4,3 +4,4 @@
/.debug
/config/config.ini
/public/robots.txt
/vendor

View file

@ -1,7 +1,6 @@
<?php
namespace Awaki;
use Index\Autoloader;
use Index\Environment;
use Index\Data\ConnectionFailedException;
use Index\Data\DbTools;
@ -10,14 +9,12 @@ define('AWK_STARTUP', microtime(true));
define('AWK_ROOT', __DIR__);
define('AWK_DEBUG', is_file(AWK_ROOT . '/.debug'));
define('AWK_DIR_SRC', AWK_ROOT . '/src');
define('AWK_DIR_LIB', AWK_ROOT . '/lib');
define('AWK_DIR_PUB', AWK_ROOT . '/public');
define('AWK_DIR_CFG', AWK_ROOT . '/config');
define('AWK_DIR_DBM', AWK_ROOT . '/database');
require_once AWK_DIR_LIB . '/index/index.php';
require_once AWK_ROOT . '/vendor/autoload.php';
Autoloader::addNamespace(__NAMESPACE__, AWK_DIR_SRC);
Environment::setDebug(AWK_DEBUG);
$config = parse_ini_file(AWK_DIR_CFG . '/config.ini', true);

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": {
"Awaki\\": "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"
}