Updated Index library in Mince.
This commit is contained in:
parent
cf87a2d592
commit
f0ddb6727e
31 changed files with 202 additions and 374 deletions
|
@ -1,8 +1,6 @@
|
||||||
{
|
{
|
||||||
"require": {
|
"require": {
|
||||||
"flashwave/index": "^0.2408.40014",
|
"flashwave/index": "^0.2410",
|
||||||
"flashwave/sasae": "^1.1",
|
|
||||||
"flashwave/syokuhou": "^1.2",
|
|
||||||
"ramsey/uuid": "^4.7",
|
"ramsey/uuid": "^4.7",
|
||||||
"sentry/sdk": "^4.0",
|
"sentry/sdk": "^4.0",
|
||||||
"nesbot/carbon": "^3.7"
|
"nesbot/carbon": "^3.7"
|
||||||
|
|
359
composer.lock
generated
359
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "1c95218980bc9a8618d881ff3609d3e8",
|
"content-hash": "c55991a4602fd82deb63b990f03b7455",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
|
@ -137,23 +137,28 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "flashwave/index",
|
"name": "flashwave/index",
|
||||||
"version": "v0.2408.40014",
|
"version": "v0.2410.51409",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://patchii.net/flash/index.git",
|
"url": "https://patchii.net/flash/index.git",
|
||||||
"reference": "fbca708fbd75e8ecc6b36b39c1307a67bf250808"
|
"reference": "c43c6eb334f85edf8fa7b5e4058b3ba35a27d960"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"php": ">=8.3"
|
"php": ">=8.3",
|
||||||
|
"twig/html-extra": "^3.13",
|
||||||
|
"twig/twig": "^3.14"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpstan/phpstan": "^1.11",
|
"phpstan/phpstan": "^1.11",
|
||||||
"phpunit/phpunit": "^11.2"
|
"phpunit/phpunit": "^11.2"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-mysqli": "Support for the Index\\Data\\MariaDB namespace (both mysqlnd and libmysql are supported).",
|
"ext-memcache": "Support for the Index\\Cache\\Memcached namespace (only if you can't use ext-memcached for some reason).",
|
||||||
"ext-sqlite3": "Support for the Index\\Data\\SQLite namespace."
|
"ext-memcached": "Support for the Index\\Cache\\Memcached namespace (you should use this instead of ext-memcache).",
|
||||||
|
"ext-mysqli": "Support for the Index\\Db\\MariaDb namespace (both mysqlnd and libmysql are supported).",
|
||||||
|
"ext-redis": "Support for the Index\\Cache\\Valkey namespace.",
|
||||||
|
"ext-sqlite3": "Support for the Index\\Db\\Sqlite namespace."
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -175,85 +180,7 @@
|
||||||
],
|
],
|
||||||
"description": "Composer package for the common library for my projects.",
|
"description": "Composer package for the common library for my projects.",
|
||||||
"homepage": "https://railgun.sh/index",
|
"homepage": "https://railgun.sh/index",
|
||||||
"time": "2024-08-04T00:14:17+00:00"
|
"time": "2024-10-05T14:10:08+00:00"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "flashwave/sasae",
|
|
||||||
"version": "v1.1.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://patchii.net/flash/sasae.git",
|
|
||||||
"reference": "ad63107a4387aa35c45bce71c2d6262a15b96f9d"
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"flashwave/index": "^0.2408.40014",
|
|
||||||
"php": ">=8.3",
|
|
||||||
"twig/html-extra": "^3.10",
|
|
||||||
"twig/twig": "^3.10"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpstan/phpstan": "^1.11",
|
|
||||||
"phpunit/phpunit": "^11.2"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Sasae\\": "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": "A wrapper for Twig with added common functionality.",
|
|
||||||
"homepage": "https://railgun.sh/sasae",
|
|
||||||
"time": "2024-08-04T00:48:17+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "flashwave/syokuhou",
|
|
||||||
"version": "v1.2.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://patchii.net/flash/syokuhou.git",
|
|
||||||
"reference": "129a46c0d917382f9bc195cce278be51984eb87d"
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"flashwave/index": "^0.2408.40014",
|
|
||||||
"php": ">=8.3"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpstan/phpstan": "^1.11",
|
|
||||||
"phpunit/phpunit": "^11.2"
|
|
||||||
},
|
|
||||||
"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": "2024-08-04T01:07:23+00:00"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/psr7",
|
"name": "guzzlehttp/psr7",
|
||||||
|
@ -432,16 +359,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nesbot/carbon",
|
"name": "nesbot/carbon",
|
||||||
"version": "3.7.0",
|
"version": "3.8.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||||
"reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139"
|
"reference": "bbd3eef89af8ba66a3aa7952b5439168fbcc529f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cb4374784c87d0a0294e8513a52eb63c0aff3139",
|
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bbd3eef89af8ba66a3aa7952b5439168fbcc529f",
|
||||||
"reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139",
|
"reference": "bbd3eef89af8ba66a3aa7952b5439168fbcc529f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -534,7 +461,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-07-16T22:29:20+00:00"
|
"time": "2024-08-19T06:22:39+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/clock",
|
"name": "psr/clock",
|
||||||
|
@ -694,16 +621,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/log",
|
"name": "psr/log",
|
||||||
"version": "3.0.0",
|
"version": "3.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-fig/log.git",
|
"url": "https://github.com/php-fig/log.git",
|
||||||
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
|
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
|
"url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||||
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
|
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -738,9 +665,9 @@
|
||||||
"psr-3"
|
"psr-3"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/php-fig/log/tree/3.0.0"
|
"source": "https://github.com/php-fig/log/tree/3.0.2"
|
||||||
},
|
},
|
||||||
"time": "2021-07-14T16:46:02+00:00"
|
"time": "2024-09-11T13:17:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ralouphie/getallheaders",
|
"name": "ralouphie/getallheaders",
|
||||||
|
@ -1024,16 +951,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sentry/sentry",
|
"name": "sentry/sentry",
|
||||||
"version": "4.8.1",
|
"version": "4.9.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/getsentry/sentry-php.git",
|
"url": "https://github.com/getsentry/sentry-php.git",
|
||||||
"reference": "61770efd8b7888e0bdd7d234f0ba67b066e47d04"
|
"reference": "788ec170f51ebb22f2809a1e3f78b19ccd39b70d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/61770efd8b7888e0bdd7d234f0ba67b066e47d04",
|
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/788ec170f51ebb22f2809a1e3f78b19ccd39b70d",
|
||||||
"reference": "61770efd8b7888e0bdd7d234f0ba67b066e47d04",
|
"reference": "788ec170f51ebb22f2809a1e3f78b19ccd39b70d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1097,7 +1024,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/getsentry/sentry-php/issues",
|
"issues": "https://github.com/getsentry/sentry-php/issues",
|
||||||
"source": "https://github.com/getsentry/sentry-php/tree/4.8.1"
|
"source": "https://github.com/getsentry/sentry-php/tree/4.9.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1109,7 +1036,7 @@
|
||||||
"type": "custom"
|
"type": "custom"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-07-16T13:45:27+00:00"
|
"time": "2024-08-08T14:40:50+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/clock",
|
"name": "symfony/clock",
|
||||||
|
@ -1254,16 +1181,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/mime",
|
"name": "symfony/mime",
|
||||||
"version": "v7.1.2",
|
"version": "v7.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/mime.git",
|
"url": "https://github.com/symfony/mime.git",
|
||||||
"reference": "26a00b85477e69a4bab63b66c5dce64f18b0cbfc"
|
"reference": "711d2e167e8ce65b05aea6b258c449671cdd38ff"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/mime/zipball/26a00b85477e69a4bab63b66c5dce64f18b0cbfc",
|
"url": "https://api.github.com/repos/symfony/mime/zipball/711d2e167e8ce65b05aea6b258c449671cdd38ff",
|
||||||
"reference": "26a00b85477e69a4bab63b66c5dce64f18b0cbfc",
|
"reference": "711d2e167e8ce65b05aea6b258c449671cdd38ff",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1318,7 +1245,7 @@
|
||||||
"mime-type"
|
"mime-type"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/mime/tree/v7.1.2"
|
"source": "https://github.com/symfony/mime/tree/v7.1.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1334,7 +1261,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-06-28T10:03:55+00:00"
|
"time": "2024-09-20T08:28:38+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/options-resolver",
|
"name": "symfony/options-resolver",
|
||||||
|
@ -1405,20 +1332,20 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
"version": "v1.30.0",
|
"version": "v1.31.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||||
"reference": "0424dff1c58f028c451efff2045f5d92410bd540"
|
"reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540",
|
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
|
||||||
"reference": "0424dff1c58f028c451efff2045f5d92410bd540",
|
"reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1"
|
"php": ">=7.2"
|
||||||
},
|
},
|
||||||
"provide": {
|
"provide": {
|
||||||
"ext-ctype": "*"
|
"ext-ctype": "*"
|
||||||
|
@ -1464,7 +1391,7 @@
|
||||||
"portable"
|
"portable"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0"
|
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1480,26 +1407,25 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-05-31T15:07:36+00:00"
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-intl-idn",
|
"name": "symfony/polyfill-intl-idn",
|
||||||
"version": "v1.30.0",
|
"version": "v1.31.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||||
"reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c"
|
"reference": "c36586dcf89a12315939e00ec9b4474adcb1d773"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c",
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773",
|
||||||
"reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c",
|
"reference": "c36586dcf89a12315939e00ec9b4474adcb1d773",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1",
|
"php": ">=7.2",
|
||||||
"symfony/polyfill-intl-normalizer": "^1.10",
|
"symfony/polyfill-intl-normalizer": "^1.10"
|
||||||
"symfony/polyfill-php72": "^1.10"
|
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-intl": "For best performance"
|
"ext-intl": "For best performance"
|
||||||
|
@ -1548,7 +1474,7 @@
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0"
|
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1564,24 +1490,24 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-05-31T15:07:36+00:00"
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-intl-normalizer",
|
"name": "symfony/polyfill-intl-normalizer",
|
||||||
"version": "v1.30.0",
|
"version": "v1.31.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||||
"reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb"
|
"reference": "3833d7255cc303546435cb650316bff708a1c75c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb",
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c",
|
||||||
"reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb",
|
"reference": "3833d7255cc303546435cb650316bff708a1c75c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1"
|
"php": ">=7.2"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-intl": "For best performance"
|
"ext-intl": "For best performance"
|
||||||
|
@ -1629,7 +1555,7 @@
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0"
|
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1645,24 +1571,24 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-05-31T15:07:36+00:00"
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-mbstring",
|
"name": "symfony/polyfill-mbstring",
|
||||||
"version": "v1.30.0",
|
"version": "v1.31.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||||
"reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c"
|
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c",
|
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341",
|
||||||
"reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c",
|
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1"
|
"php": ">=7.2"
|
||||||
},
|
},
|
||||||
"provide": {
|
"provide": {
|
||||||
"ext-mbstring": "*"
|
"ext-mbstring": "*"
|
||||||
|
@ -1709,7 +1635,7 @@
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0"
|
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1725,24 +1651,24 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-06-19T12:30:46+00:00"
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-php72",
|
"name": "symfony/polyfill-php81",
|
||||||
"version": "v1.30.0",
|
"version": "v1.31.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
"url": "https://github.com/symfony/polyfill-php81.git",
|
||||||
"reference": "10112722600777e02d2745716b70c5db4ca70442"
|
"reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/10112722600777e02d2745716b70c5db4ca70442",
|
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
|
||||||
"reference": "10112722600777e02d2745716b70c5db4ca70442",
|
"reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1"
|
"php": ">=7.2"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
|
@ -1756,80 +1682,7 @@
|
||||||
"bootstrap.php"
|
"bootstrap.php"
|
||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Polyfill\\Php72\\": ""
|
"Symfony\\Polyfill\\Php81\\": ""
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Nicolas Grekas",
|
|
||||||
"email": "p@tchwork.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Symfony Community",
|
|
||||||
"homepage": "https://symfony.com/contributors"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
|
|
||||||
"homepage": "https://symfony.com",
|
|
||||||
"keywords": [
|
|
||||||
"compatibility",
|
|
||||||
"polyfill",
|
|
||||||
"portable",
|
|
||||||
"shim"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"source": "https://github.com/symfony/polyfill-php72/tree/v1.30.0"
|
|
||||||
},
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"url": "https://symfony.com/sponsor",
|
|
||||||
"type": "custom"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://github.com/fabpot",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
|
||||||
"type": "tidelift"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"time": "2024-06-19T12:30:46+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "symfony/polyfill-php80",
|
|
||||||
"version": "v1.30.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
|
||||||
"reference": "77fa7995ac1b21ab60769b7323d600a991a90433"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433",
|
|
||||||
"reference": "77fa7995ac1b21ab60769b7323d600a991a90433",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=7.1"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"thanks": {
|
|
||||||
"name": "symfony/polyfill",
|
|
||||||
"url": "https://github.com/symfony/polyfill"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"files": [
|
|
||||||
"bootstrap.php"
|
|
||||||
],
|
|
||||||
"psr-4": {
|
|
||||||
"Symfony\\Polyfill\\Php80\\": ""
|
|
||||||
},
|
},
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"Resources/stubs"
|
"Resources/stubs"
|
||||||
|
@ -1840,10 +1693,6 @@
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
|
||||||
"name": "Ion Bazan",
|
|
||||||
"email": "ion.bazan@gmail.com"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Nicolas Grekas",
|
"name": "Nicolas Grekas",
|
||||||
"email": "p@tchwork.com"
|
"email": "p@tchwork.com"
|
||||||
|
@ -1853,7 +1702,7 @@
|
||||||
"homepage": "https://symfony.com/contributors"
|
"homepage": "https://symfony.com/contributors"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
"description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"compatibility",
|
"compatibility",
|
||||||
|
@ -1862,7 +1711,7 @@
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0"
|
"source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1878,24 +1727,24 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-05-31T15:07:36+00:00"
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-php83",
|
"name": "symfony/polyfill-php83",
|
||||||
"version": "v1.30.0",
|
"version": "v1.31.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-php83.git",
|
"url": "https://github.com/symfony/polyfill-php83.git",
|
||||||
"reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9"
|
"reference": "2fb86d65e2d424369ad2905e83b236a8805ba491"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9",
|
"url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/2fb86d65e2d424369ad2905e83b236a8805ba491",
|
||||||
"reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9",
|
"reference": "2fb86d65e2d424369ad2905e83b236a8805ba491",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1"
|
"php": ">=7.2"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
|
@ -1938,7 +1787,7 @@
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-php83/tree/v1.30.0"
|
"source": "https://github.com/symfony/polyfill-php83/tree/v1.31.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1954,20 +1803,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-06-19T12:35:24+00:00"
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/translation",
|
"name": "symfony/translation",
|
||||||
"version": "v7.1.3",
|
"version": "v7.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/translation.git",
|
"url": "https://github.com/symfony/translation.git",
|
||||||
"reference": "8d5e50c813ba2859a6dfc99a0765c550507934a1"
|
"reference": "235535e3f84f3dfbdbde0208ede6ca75c3a489ea"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/translation/zipball/8d5e50c813ba2859a6dfc99a0765c550507934a1",
|
"url": "https://api.github.com/repos/symfony/translation/zipball/235535e3f84f3dfbdbde0208ede6ca75c3a489ea",
|
||||||
"reference": "8d5e50c813ba2859a6dfc99a0765c550507934a1",
|
"reference": "235535e3f84f3dfbdbde0208ede6ca75c3a489ea",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -2032,7 +1881,7 @@
|
||||||
"description": "Provides tools to internationalize your application",
|
"description": "Provides tools to internationalize your application",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/translation/tree/v7.1.3"
|
"source": "https://github.com/symfony/translation/tree/v7.1.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -2048,7 +1897,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-07-26T12:41:01+00:00"
|
"time": "2024-09-16T06:30:38+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/translation-contracts",
|
"name": "symfony/translation-contracts",
|
||||||
|
@ -2130,23 +1979,23 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/html-extra",
|
"name": "twig/html-extra",
|
||||||
"version": "v3.10.0",
|
"version": "v3.13.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/twigphp/html-extra.git",
|
"url": "https://github.com/twigphp/html-extra.git",
|
||||||
"reference": "1c045fc28ace0dcaf464f8e0d4e2aca6347d5fda"
|
"reference": "8229e750091171c1f11801a525927811c7ac5a7e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twigphp/html-extra/zipball/1c045fc28ace0dcaf464f8e0d4e2aca6347d5fda",
|
"url": "https://api.github.com/repos/twigphp/html-extra/zipball/8229e750091171c1f11801a525927811c7ac5a7e",
|
||||||
"reference": "1c045fc28ace0dcaf464f8e0d4e2aca6347d5fda",
|
"reference": "8229e750091171c1f11801a525927811c7ac5a7e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.2.5",
|
"php": ">=8.0.2",
|
||||||
"symfony/deprecation-contracts": "^2.5|^3",
|
"symfony/deprecation-contracts": "^2.5|^3",
|
||||||
"symfony/mime": "^5.4|^6.4|^7.0",
|
"symfony/mime": "^5.4|^6.4|^7.0",
|
||||||
"twig/twig": "^3.0"
|
"twig/twig": "^3.13|^4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/phpunit-bridge": "^6.4|^7.0"
|
"symfony/phpunit-bridge": "^6.4|^7.0"
|
||||||
|
@ -2182,7 +2031,7 @@
|
||||||
"twig"
|
"twig"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/twigphp/html-extra/tree/v3.10.0"
|
"source": "https://github.com/twigphp/html-extra/tree/v3.13.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -2194,28 +2043,28 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-05-11T07:35:57+00:00"
|
"time": "2024-09-03T13:08:40+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/twig",
|
"name": "twig/twig",
|
||||||
"version": "v3.10.3",
|
"version": "v3.14.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/twigphp/Twig.git",
|
"url": "https://github.com/twigphp/Twig.git",
|
||||||
"reference": "67f29781ffafa520b0bbfbd8384674b42db04572"
|
"reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/67f29781ffafa520b0bbfbd8384674b42db04572",
|
"url": "https://api.github.com/repos/twigphp/Twig/zipball/126b2c97818dbff0cdf3fbfc881aedb3d40aae72",
|
||||||
"reference": "67f29781ffafa520b0bbfbd8384674b42db04572",
|
"reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.2.5",
|
"php": ">=8.0.2",
|
||||||
"symfony/deprecation-contracts": "^2.5|^3",
|
"symfony/deprecation-contracts": "^2.5|^3",
|
||||||
"symfony/polyfill-ctype": "^1.8",
|
"symfony/polyfill-ctype": "^1.8",
|
||||||
"symfony/polyfill-mbstring": "^1.3",
|
"symfony/polyfill-mbstring": "^1.3",
|
||||||
"symfony/polyfill-php80": "^1.22"
|
"symfony/polyfill-php81": "^1.29"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"psr/container": "^1.0|^2.0",
|
"psr/container": "^1.0|^2.0",
|
||||||
|
@ -2261,7 +2110,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/twigphp/Twig/issues",
|
"issues": "https://github.com/twigphp/Twig/issues",
|
||||||
"source": "https://github.com/twigphp/Twig/tree/v3.10.3"
|
"source": "https://github.com/twigphp/Twig/tree/v3.14.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -2273,7 +2122,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-05-16T10:04:27+00:00"
|
"time": "2024-09-09T17:55:12+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
use Index\Data\IDbConnection;
|
use Index\Db\DbConnection;
|
||||||
use Index\Data\Migration\IDbMigration;
|
use Index\Db\Migration\DbMigration;
|
||||||
|
|
||||||
final class ExistingStructure_20230816_161818 implements IDbMigration {
|
final class ExistingStructure_20230816_161818 implements DbMigration {
|
||||||
public function migrate(IDbConnection $conn): void {
|
public function migrate(DbConnection $conn): void {
|
||||||
$hasWhiteList2020 = false;
|
$hasWhiteList2020 = false;
|
||||||
$hasWhiteList2022 = false;
|
$hasWhiteList2022 = false;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
use Index\Data\IDbConnection;
|
use Index\Db\DbConnection;
|
||||||
use Index\Data\Migration\IDbMigration;
|
use Index\Db\Migration\DbMigration;
|
||||||
|
|
||||||
final class CreateServersTable_20230817_001507 implements IDbMigration {
|
final class CreateServersTable_20230817_001507 implements DbMigration {
|
||||||
public function migrate(IDbConnection $conn): void {
|
public function migrate(DbConnection $conn): void {
|
||||||
$conn->execute('
|
$conn->execute('
|
||||||
CREATE TABLE servers (
|
CREATE TABLE servers (
|
||||||
server_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
server_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
use Index\Data\IDbConnection;
|
use Index\Db\DbConnection;
|
||||||
use Index\Data\Migration\IDbMigration;
|
use Index\Db\Migration\DbMigration;
|
||||||
|
|
||||||
final class CreateNewTables_20230822_231052 implements IDbMigration {
|
final class CreateNewTables_20230822_231052 implements DbMigration {
|
||||||
public function migrate(IDbConnection $conn): void {
|
public function migrate(DbConnection $conn): void {
|
||||||
$conn->execute('
|
$conn->execute('
|
||||||
CREATE TABLE verifications (
|
CREATE TABLE verifications (
|
||||||
verify_code BINARY(10) NOT NULL,
|
verify_code BINARY(10) NOT NULL,
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
use Index\Data\IDbConnection;
|
use Index\Db\DbConnection;
|
||||||
use Index\Data\Migration\IDbMigration;
|
use Index\Db\Migration\DbMigration;
|
||||||
|
|
||||||
final class RemoveWhitelistTables_20230823_233728 implements IDbMigration {
|
final class RemoveWhitelistTables_20230823_233728 implements DbMigration {
|
||||||
public function migrate(IDbConnection $conn): void {
|
public function migrate(DbConnection $conn): void {
|
||||||
$conn->execute('DROP TABLE whitelist');
|
$conn->execute('DROP TABLE whitelist');
|
||||||
$conn->execute('DROP TABLE whitelist_2022');
|
$conn->execute('DROP TABLE whitelist_2022');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use Index\Data\DbTools;
|
use Index\Config\Fs\FsConfig;
|
||||||
use Syokuhou\SharpConfig;
|
use Index\Db\DbTools;
|
||||||
|
|
||||||
define('MCR_STARTUP', microtime(true));
|
define('MCR_STARTUP', microtime(true));
|
||||||
define('MCR_ROOT', __DIR__);
|
define('MCR_ROOT', __DIR__);
|
||||||
|
@ -19,7 +19,7 @@ error_reporting(MCR_DEBUG ? -1 : 0);
|
||||||
mb_internal_encoding('UTF-8');
|
mb_internal_encoding('UTF-8');
|
||||||
date_default_timezone_set('GMT');
|
date_default_timezone_set('GMT');
|
||||||
|
|
||||||
$cfg = SharpConfig::fromFile(MCR_ROOT . '/mince.cfg');
|
$cfg = FsConfig::fromFile(MCR_ROOT . '/mince.cfg');
|
||||||
|
|
||||||
if($cfg->hasValues('sentry:dsn'))
|
if($cfg->hasValues('sentry:dsn'))
|
||||||
(function($cfg) {
|
(function($cfg) {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use Index\CSRFP;
|
use Index\CsrfToken;
|
||||||
use Index\Http\Routing\HttpRouter;
|
use Index\Http\Routing\HttpRouter;
|
||||||
use Sasae\SasaeEnvironment;
|
use Index\Templating\TplEnvironment;
|
||||||
|
|
||||||
require_once __DIR__ . '/../mince.php';
|
require_once __DIR__ . '/../mince.php';
|
||||||
|
|
||||||
|
@ -17,12 +17,12 @@ if($authInfo->success) {
|
||||||
$userInfo = $users->getUser($authInfo->user_id);
|
$userInfo = $users->getUser($authInfo->user_id);
|
||||||
} else $userInfo = null;
|
} else $userInfo = null;
|
||||||
|
|
||||||
$csrfp = new CSRFP(
|
$csrfp = new CsrfToken(
|
||||||
$cfg->getString('csrfp:secret', 'wowof'),
|
$cfg->getString('csrfp:secret', 'wowof'),
|
||||||
$authInfo->success ? $authToken : $_SERVER['REMOTE_ADDR']
|
$authInfo->success ? $authToken : $_SERVER['REMOTE_ADDR']
|
||||||
);
|
);
|
||||||
|
|
||||||
$templating = new SasaeEnvironment(MCR_DIR_TPL, ['Mince'], debug: MCR_DEBUG);
|
$templating = new TplEnvironment(MCR_DIR_TPL, ['Mince'], debug: MCR_DEBUG);
|
||||||
$templating->addGlobal('globals', [
|
$templating->addGlobal('globals', [
|
||||||
'title' => 'Flashii Minecraft Servers',
|
'title' => 'Flashii Minecraft Servers',
|
||||||
'is_authed' => $userInfo !== null,
|
'is_authed' => $userInfo !== null,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use Carbon\CarbonImmutable;
|
use Carbon\CarbonImmutable;
|
||||||
use Index\Data\IDbResult;
|
use Index\Db\DbResult;
|
||||||
use Ramsey\Uuid\{Uuid,UuidInterface};
|
use Ramsey\Uuid\{Uuid,UuidInterface};
|
||||||
|
|
||||||
class AccountLinkInfo {
|
class AccountLinkInfo {
|
||||||
|
@ -13,7 +13,7 @@ class AccountLinkInfo {
|
||||||
private int $created
|
private int $created
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public static function fromResult(IDbResult $result): self {
|
public static function fromResult(DbResult $result): self {
|
||||||
return new AccountLinkInfo(
|
return new AccountLinkInfo(
|
||||||
userId: $result->getString(0),
|
userId: $result->getString(0),
|
||||||
uuid: $result->getString(1),
|
uuid: $result->getString(1),
|
||||||
|
|
|
@ -3,13 +3,13 @@ namespace Mince;
|
||||||
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Index\Data\{DbStatementCache,IDbConnection};
|
use Index\Db\{DbConnection,DbStatementCache};
|
||||||
use Ramsey\Uuid\UuidInterface;
|
use Ramsey\Uuid\UuidInterface;
|
||||||
|
|
||||||
class AccountLinks {
|
class AccountLinks {
|
||||||
private DbStatementCache $cache;
|
private DbStatementCache $cache;
|
||||||
|
|
||||||
public function __construct(IDbConnection $dbConn) {
|
public function __construct(DbConnection $dbConn) {
|
||||||
$this->cache = new DbStatementCache($dbConn);
|
$this->cache = new DbStatementCache($dbConn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use Carbon\CarbonImmutable;
|
use Carbon\CarbonImmutable;
|
||||||
use Index\Data\IDbResult;
|
use Index\Db\DbResult;
|
||||||
use Index\Net\IPAddress;
|
|
||||||
use Ramsey\Uuid\{Uuid,UuidInterface};
|
use Ramsey\Uuid\{Uuid,UuidInterface};
|
||||||
|
|
||||||
class AuthorisationInfo {
|
class AuthorisationInfo {
|
||||||
|
@ -16,7 +15,7 @@ class AuthorisationInfo {
|
||||||
private ?int $used,
|
private ?int $used,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public static function fromResult(IDbResult $result): self {
|
public static function fromResult(DbResult $result): self {
|
||||||
return new AuthorisationInfo(
|
return new AuthorisationInfo(
|
||||||
id: $result->getString(0),
|
id: $result->getString(0),
|
||||||
uuid: $result->getString(1),
|
uuid: $result->getString(1),
|
||||||
|
@ -39,14 +38,10 @@ class AuthorisationInfo {
|
||||||
return Uuid::fromBytes($this->uuid);
|
return Uuid::fromBytes($this->uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAddressRaw(): string {
|
public function getAddress(): string {
|
||||||
return $this->addr;
|
return $this->addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAddress(): IPAddress {
|
|
||||||
return IPAddress::parse($this->addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getRequestedTime(): int {
|
public function getRequestedTime(): int {
|
||||||
return $this->requested;
|
return $this->requested;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,15 +3,14 @@ namespace Mince;
|
||||||
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Index\Data\{DbStatementCache,IDbConnection};
|
use Index\Db\{DbConnection,DbStatementCache};
|
||||||
use Index\Net\IPAddress;
|
|
||||||
use Ramsey\Uuid\UuidInterface;
|
use Ramsey\Uuid\UuidInterface;
|
||||||
|
|
||||||
class Authorisations {
|
class Authorisations {
|
||||||
private IDbConnection $dbConn;
|
private DbConnection $dbConn;
|
||||||
private DbStatementCache $cache;
|
private DbStatementCache $cache;
|
||||||
|
|
||||||
public function __construct(IDbConnection $dbConn) {
|
public function __construct(DbConnection $dbConn) {
|
||||||
$this->dbConn = $dbConn;
|
$this->dbConn = $dbConn;
|
||||||
$this->cache = new DbStatementCache($dbConn);
|
$this->cache = new DbStatementCache($dbConn);
|
||||||
}
|
}
|
||||||
|
@ -38,7 +37,7 @@ class Authorisations {
|
||||||
public function getAuthorisation(
|
public function getAuthorisation(
|
||||||
?string $authId = null,
|
?string $authId = null,
|
||||||
AccountLinkInfo|UuidInterface|string|null $uuid = null,
|
AccountLinkInfo|UuidInterface|string|null $uuid = null,
|
||||||
IPAddress|string|null $remoteAddr = null
|
?string $remoteAddr = null
|
||||||
): AuthorisationInfo {
|
): AuthorisationInfo {
|
||||||
$hasAuthId = $authId !== null;
|
$hasAuthId = $authId !== null;
|
||||||
$hasUuid = $uuid !== null;
|
$hasUuid = $uuid !== null;
|
||||||
|
@ -64,9 +63,6 @@ class Authorisations {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($hasRemoteAddr) {
|
if($hasRemoteAddr) {
|
||||||
if($remoteAddr instanceof IPAddress)
|
|
||||||
$remoteAddr = (string)$remoteAddr;
|
|
||||||
|
|
||||||
$query .= sprintf(' %s auth_addr = INET6_ATON(?)', ++$args > 1 ? 'AND' : 'WHERE');
|
$query .= sprintf(' %s auth_addr = INET6_ATON(?)', ++$args > 1 ? 'AND' : 'WHERE');
|
||||||
$values[] = $remoteAddr;
|
$values[] = $remoteAddr;
|
||||||
}
|
}
|
||||||
|
@ -90,7 +86,7 @@ class Authorisations {
|
||||||
|
|
||||||
public function createAuthorisation(
|
public function createAuthorisation(
|
||||||
AccountLinkInfo|VerificationInfo|UuidInterface|string $uuid,
|
AccountLinkInfo|VerificationInfo|UuidInterface|string $uuid,
|
||||||
IPAddress|string|null $remoteAddr = null,
|
?string $remoteAddr = null,
|
||||||
bool $grant = false
|
bool $grant = false
|
||||||
): void {
|
): void {
|
||||||
if($uuid instanceof VerificationInfo) {
|
if($uuid instanceof VerificationInfo) {
|
||||||
|
@ -104,8 +100,6 @@ class Authorisations {
|
||||||
$uuid = $uuid->getUUIDRaw();
|
$uuid = $uuid->getUUIDRaw();
|
||||||
elseif($uuid instanceof UuidInterface)
|
elseif($uuid instanceof UuidInterface)
|
||||||
$uuid = $uuid->getBytes();
|
$uuid = $uuid->getBytes();
|
||||||
if($remoteAddr instanceof IPAddress)
|
|
||||||
$remoteAddr = (string)$remoteAddr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt = $this->cache->get(sprintf(
|
$stmt = $this->cache->get(sprintf(
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use Carbon\CarbonImmutable;
|
use Carbon\CarbonImmutable;
|
||||||
use Index\Data\IDbResult;
|
use Index\Db\DbResult;
|
||||||
|
|
||||||
class CapeInfo {
|
class CapeInfo {
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
@ -11,7 +11,7 @@ class CapeInfo {
|
||||||
private int $updated,
|
private int $updated,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public static function fromResult(IDbResult $result): self {
|
public static function fromResult(DbResult $result): self {
|
||||||
return new CapeInfo(
|
return new CapeInfo(
|
||||||
userId: $result->getString(0),
|
userId: $result->getString(0),
|
||||||
hash: $result->getString(1),
|
hash: $result->getString(1),
|
||||||
|
|
|
@ -3,12 +3,12 @@ namespace Mince;
|
||||||
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Index\Data\{DbStatementCache,IDbConnection};
|
use Index\Db\{DbConnection,DbStatementCache};
|
||||||
|
|
||||||
class Capes {
|
class Capes {
|
||||||
private DbStatementCache $cache;
|
private DbStatementCache $cache;
|
||||||
|
|
||||||
public function __construct(IDbConnection $dbConn) {
|
public function __construct(DbConnection $dbConn) {
|
||||||
$this->cache = new DbStatementCache($dbConn);
|
$this->cache = new DbStatementCache($dbConn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use stdClass;
|
use stdClass;
|
||||||
use Syokuhou\IConfig;
|
use Index\Config\Config;
|
||||||
|
|
||||||
final class ChatAuth {
|
final class ChatAuth {
|
||||||
public static function attempt(IConfig $config, string $cookie): object {
|
public static function attempt(Config $config, string $cookie): object {
|
||||||
if(!empty($cookie)) {
|
if(!empty($cookie)) {
|
||||||
$method = 'Misuzu';
|
$method = 'Misuzu';
|
||||||
$signature = sprintf('verify#%s#%s#%s', $method, $cookie, $_SERVER['REMOTE_ADDR']);
|
$signature = sprintf('verify#%s#%s#%s', $method, $cookie, $_SERVER['REMOTE_ADDR']);
|
||||||
|
|
|
@ -3,18 +3,20 @@ namespace Mince;
|
||||||
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Index\CSRFP;
|
use Index\CsrfToken;
|
||||||
use Index\Http\Routing\{RouteHandler,HttpGet,HttpMiddleware,HttpPost};
|
use Index\Http\Routing\{HttpGet,HttpMiddleware,HttpPost,RouteHandler,RouteHandlerTrait};
|
||||||
|
use Index\Templating\TplEnvironment;
|
||||||
use Ramsey\Uuid\Uuid;
|
use Ramsey\Uuid\Uuid;
|
||||||
use Sasae\SasaeEnvironment;
|
|
||||||
|
|
||||||
class ClientsRoutes extends RouteHandler {
|
class ClientsRoutes implements RouteHandler {
|
||||||
|
use RouteHandlerTrait;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private SasaeEnvironment $templating,
|
private TplEnvironment $templating,
|
||||||
private AccountLinks $accountLinks,
|
private AccountLinks $accountLinks,
|
||||||
private Authorisations $authorisations,
|
private Authorisations $authorisations,
|
||||||
private Verifications $verifications,
|
private Verifications $verifications,
|
||||||
private CSRFP $csrfp,
|
private CsrfToken $csrfp,
|
||||||
private object $authInfo
|
private object $authInfo
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use Index\Http\Routing\{HttpGet,RouteHandler};
|
use Index\Http\Routing\{HttpGet,RouteHandler,RouteHandlerTrait};
|
||||||
use Sasae\SasaeEnvironment;
|
use Index\Templating\TplEnvironment;
|
||||||
|
|
||||||
|
class HomeRoutes implements RouteHandler {
|
||||||
|
use RouteHandlerTrait;
|
||||||
|
|
||||||
class HomeRoutes extends RouteHandler {
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private SasaeEnvironment $templating,
|
private TplEnvironment $templating,
|
||||||
private Servers $servers,
|
private Servers $servers,
|
||||||
private object $userInfo,
|
private object $userInfo,
|
||||||
private string $loginUrl
|
private string $loginUrl
|
||||||
|
|
|
@ -3,7 +3,7 @@ namespace Mince;
|
||||||
|
|
||||||
use stdClass;
|
use stdClass;
|
||||||
use Index\Http\{HttpResponseBuilder,HttpRequest};
|
use Index\Http\{HttpResponseBuilder,HttpRequest};
|
||||||
use Index\Http\Routing\IRouter;
|
use Index\Http\Routing\Router;
|
||||||
use Ramsey\Uuid\{Uuid,UuidInterface};
|
use Ramsey\Uuid\{Uuid,UuidInterface};
|
||||||
|
|
||||||
final class MojangInterop {
|
final class MojangInterop {
|
||||||
|
@ -33,7 +33,7 @@ final class MojangInterop {
|
||||||
return $uuid->getVersion() === 4;
|
return $uuid->getVersion() === 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function registerRoutes(IRouter $router): void {
|
public static function registerRoutes(Router $router): void {
|
||||||
$router->get('/uuid', fn($response, $request) => self::uuidResolver($response, $request));
|
$router->get('/uuid', fn($response, $request) => self::uuidResolver($response, $request));
|
||||||
$router->get('/blockedservers', fn($response, $request) => self::proxyBlockServers($response, $request));
|
$router->get('/blockedservers', fn($response, $request) => self::proxyBlockServers($response, $request));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use Index\Http\{HttpResponseBuilder,HttpRequest};
|
use Index\Http\{HttpErrorHandler,HttpResponseBuilder,HttpRequest};
|
||||||
use Index\Http\ErrorHandling\IErrorHandler;
|
use Index\Templating\TplEnvironment;
|
||||||
use Sasae\SasaeEnvironment;
|
|
||||||
|
|
||||||
class RouterErrorHandler implements IErrorHandler {
|
class RouterErrorHandler implements HttpErrorHandler {
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private SasaeEnvironment $templating
|
private TplEnvironment $templating
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public function handle(HttpResponseBuilder $response, HttpRequest $request, int $code, string $message): void {
|
public function handle(HttpResponseBuilder $response, HttpRequest $request, int $code, string $message): void {
|
||||||
|
|
|
@ -5,10 +5,12 @@ use stdClass;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Stringable;
|
use Stringable;
|
||||||
use Index\Http\Routing\{HttpMiddleware,HttpPost,RouteHandler};
|
use Index\Http\Routing\{HttpMiddleware,HttpPost,RouteHandler,RouteHandlerTrait};
|
||||||
use Ramsey\Uuid\Uuid;
|
use Ramsey\Uuid\Uuid;
|
||||||
|
|
||||||
class RpcRoutes extends RouteHandler {
|
class RpcRoutes implements RouteHandler {
|
||||||
|
use RouteHandlerTrait;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private Users $users,
|
private Users $users,
|
||||||
private AccountLinks $accountLinks,
|
private AccountLinks $accountLinks,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use Carbon\CarbonImmutable;
|
use Carbon\CarbonImmutable;
|
||||||
use Index\Data\IDbResult;
|
use Index\Db\DbResult;
|
||||||
|
|
||||||
class ServerInfo {
|
class ServerInfo {
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
@ -17,7 +17,7 @@ class ServerInfo {
|
||||||
private ?int $deleted,
|
private ?int $deleted,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public static function fromResult(IDbResult $result): self {
|
public static function fromResult(DbResult $result): self {
|
||||||
return new ServerInfo(
|
return new ServerInfo(
|
||||||
id: $result->getString(0),
|
id: $result->getString(0),
|
||||||
name: $result->getString(1),
|
name: $result->getString(1),
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use Index\Data\{DbStatementCache,IDbConnection};
|
use Index\Db\{DbConnection,DbStatementCache};
|
||||||
|
|
||||||
class Servers {
|
class Servers {
|
||||||
//private IDbConnection $dbConn;
|
|
||||||
private DbStatementCache $cache;
|
private DbStatementCache $cache;
|
||||||
|
|
||||||
public function __construct(IDbConnection $dbConn) {
|
public function __construct(DbConnection $dbConn) {
|
||||||
//$this->dbConn = $dbConn;
|
|
||||||
$this->cache = new DbStatementCache($dbConn);
|
$this->cache = new DbStatementCache($dbConn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use Carbon\CarbonImmutable;
|
use Carbon\CarbonImmutable;
|
||||||
use Index\Data\IDbResult;
|
use Index\Db\DbResult;
|
||||||
|
|
||||||
class SkinInfo {
|
class SkinInfo {
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
@ -12,7 +12,7 @@ class SkinInfo {
|
||||||
private int $updated,
|
private int $updated,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public static function fromResult(IDbResult $result): self {
|
public static function fromResult(DbResult $result): self {
|
||||||
return new SkinInfo(
|
return new SkinInfo(
|
||||||
userId: $result->getString(0),
|
userId: $result->getString(0),
|
||||||
hash: $result->getString(1),
|
hash: $result->getString(1),
|
||||||
|
|
|
@ -3,14 +3,14 @@ namespace Mince;
|
||||||
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Index\Data\{DbStatementCache,IDbConnection};
|
use Index\Db\{DbConnection,DbStatementCache};
|
||||||
|
|
||||||
class Skins {
|
class Skins {
|
||||||
public const MODELS = ['classic', 'slim'];
|
public const MODELS = ['classic', 'slim'];
|
||||||
|
|
||||||
private DbStatementCache $cache;
|
private DbStatementCache $cache;
|
||||||
|
|
||||||
public function __construct(IDbConnection $dbConn) {
|
public function __construct(DbConnection $dbConn) {
|
||||||
$this->cache = new DbStatementCache($dbConn);
|
$this->cache = new DbStatementCache($dbConn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,23 +6,25 @@ use ImagickException;
|
||||||
use ImagickPixel;
|
use ImagickPixel;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Index\{CSRFP,XString};
|
use Index\{CsrfToken,XString};
|
||||||
use Index\Http\Routing\{RouteHandler,HttpGet,HttpMiddleware,HttpPost};
|
use Index\Http\Routing\{HttpGet,HttpMiddleware,HttpPost,RouteHandler,RouteHandlerTrait};
|
||||||
|
use Index\Templating\TplEnvironment;
|
||||||
use Ramsey\Uuid\{Uuid,UuidInterface};
|
use Ramsey\Uuid\{Uuid,UuidInterface};
|
||||||
use Sasae\SasaeEnvironment;
|
|
||||||
|
|
||||||
class SkinsRoutes extends RouteHandler {
|
class SkinsRoutes implements RouteHandler {
|
||||||
|
use RouteHandlerTrait;
|
||||||
|
|
||||||
private const TEXTURES_DIR = '/textures';
|
private const TEXTURES_DIR = '/textures';
|
||||||
private const TEXTURES_PATH = MCR_DIR_PUB . self::TEXTURES_DIR;
|
private const TEXTURES_PATH = MCR_DIR_PUB . self::TEXTURES_DIR;
|
||||||
|
|
||||||
private AccountLinkInfo $linkInfo;
|
private AccountLinkInfo $linkInfo;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private SasaeEnvironment $templating,
|
private TplEnvironment $templating,
|
||||||
private AccountLinks $accountLinks,
|
private AccountLinks $accountLinks,
|
||||||
private Skins $skins,
|
private Skins $skins,
|
||||||
private Capes $capes,
|
private Capes $capes,
|
||||||
private CSRFP $csrfp,
|
private CsrfToken $csrfp,
|
||||||
private object $authInfo,
|
private object $authInfo,
|
||||||
private string $baseUrl
|
private string $baseUrl
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use Index\Colour\{Colour,ColourRGB};
|
use Index\Colour\{Colour,ColourRgb};
|
||||||
use Index\Data\IDbResult;
|
use Index\Db\DbResult;
|
||||||
|
|
||||||
class UserInfo {
|
class UserInfo {
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
@ -11,7 +11,7 @@ class UserInfo {
|
||||||
private ?int $colour,
|
private ?int $colour,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public static function fromResult(IDbResult $result): self {
|
public static function fromResult(DbResult $result): self {
|
||||||
return new UserInfo(
|
return new UserInfo(
|
||||||
id: $result->getString(0),
|
id: $result->getString(0),
|
||||||
name: $result->getString(1),
|
name: $result->getString(1),
|
||||||
|
@ -36,6 +36,6 @@ class UserInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getColour(): Colour {
|
public function getColour(): Colour {
|
||||||
return $this->colour === null ? Colour::none() : ColourRGB::fromRawRGB($this->colour);
|
return $this->colour === null ? Colour::none() : ColourRgb::fromRawRGB($this->colour);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Index\Data\{DbStatementCache,IDbConnection};
|
use Index\Db\{DbConnection,DbStatementCache};
|
||||||
|
|
||||||
class Users {
|
class Users {
|
||||||
private DbStatementCache $cache;
|
private DbStatementCache $cache;
|
||||||
|
|
||||||
public function __construct(IDbConnection $dbConn) {
|
public function __construct(DbConnection $dbConn) {
|
||||||
$this->cache = new DbStatementCache($dbConn);
|
$this->cache = new DbStatementCache($dbConn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
namespace Mince;
|
namespace Mince;
|
||||||
|
|
||||||
use Carbon\CarbonImmutable;
|
use Carbon\CarbonImmutable;
|
||||||
use Index\Data\IDbResult;
|
use Index\Db\DbResult;
|
||||||
use Index\Net\IPAddress;
|
|
||||||
use Ramsey\Uuid\{Uuid,UuidInterface};
|
use Ramsey\Uuid\{Uuid,UuidInterface};
|
||||||
|
|
||||||
class VerificationInfo {
|
class VerificationInfo {
|
||||||
|
@ -15,7 +14,7 @@ class VerificationInfo {
|
||||||
private int $created,
|
private int $created,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public static function fromResult(IDbResult $result): self {
|
public static function fromResult(DbResult $result): self {
|
||||||
return new VerificationInfo(
|
return new VerificationInfo(
|
||||||
code: $result->getString(0),
|
code: $result->getString(0),
|
||||||
uuid: $result->getString(1),
|
uuid: $result->getString(1),
|
||||||
|
@ -41,14 +40,10 @@ class VerificationInfo {
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAddressRaw(): string {
|
public function getAddress(): string {
|
||||||
return $this->addr;
|
return $this->addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAddress(): IPAddress {
|
|
||||||
return IPAddress::parse($this->addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getCreatedTime(): int {
|
public function getCreatedTime(): int {
|
||||||
return $this->created;
|
return $this->created;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,17 +4,16 @@ namespace Mince;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Index\XString;
|
use Index\XString;
|
||||||
use Index\Data\{DbStatementCache,IDbConnection};
|
use Index\Db\{DbConnection,DbStatementCache};
|
||||||
use Index\Net\IPAddress;
|
|
||||||
use Ramsey\Uuid\UuidInterface;
|
use Ramsey\Uuid\UuidInterface;
|
||||||
|
|
||||||
class Verifications {
|
class Verifications {
|
||||||
private const CODE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';
|
private const CODE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';
|
||||||
|
|
||||||
private IDbConnection $dbConn;
|
private DbConnection $dbConn;
|
||||||
private DbStatementCache $cache;
|
private DbStatementCache $cache;
|
||||||
|
|
||||||
public function __construct(IDbConnection $dbConn) {
|
public function __construct(DbConnection $dbConn) {
|
||||||
$this->dbConn = $dbConn;
|
$this->dbConn = $dbConn;
|
||||||
$this->cache = new DbStatementCache($dbConn);
|
$this->cache = new DbStatementCache($dbConn);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +29,7 @@ class Verifications {
|
||||||
public function getVerification(
|
public function getVerification(
|
||||||
?string $code = null,
|
?string $code = null,
|
||||||
UuidInterface|string|null $uuid = null,
|
UuidInterface|string|null $uuid = null,
|
||||||
IPAddress|string|null $remoteAddr = null
|
?string $remoteAddr = null
|
||||||
): VerificationInfo {
|
): VerificationInfo {
|
||||||
$hasCode = $code !== null;
|
$hasCode = $code !== null;
|
||||||
$hasUuid = $uuid !== null;
|
$hasUuid = $uuid !== null;
|
||||||
|
@ -54,9 +53,6 @@ class Verifications {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($hasRemoteAddr) {
|
if($hasRemoteAddr) {
|
||||||
if($remoteAddr instanceof IPAddress)
|
|
||||||
$remoteAddr = (string)$remoteAddr;
|
|
||||||
|
|
||||||
$query .= sprintf(' %s verify_addr = INET6_ATON(?)', ++$args > 1 ? 'AND' : 'WHERE');
|
$query .= sprintf(' %s verify_addr = INET6_ATON(?)', ++$args > 1 ? 'AND' : 'WHERE');
|
||||||
$values[] = $remoteAddr;
|
$values[] = $remoteAddr;
|
||||||
}
|
}
|
||||||
|
@ -81,12 +77,10 @@ class Verifications {
|
||||||
public function createVerification(
|
public function createVerification(
|
||||||
UuidInterface|string $uuid,
|
UuidInterface|string $uuid,
|
||||||
string $name,
|
string $name,
|
||||||
IPAddress|string $remoteAddr
|
string $remoteAddr
|
||||||
): string {
|
): string {
|
||||||
if($uuid instanceof UuidInterface)
|
if($uuid instanceof UuidInterface)
|
||||||
$uuid = $uuid->getBytes();
|
$uuid = $uuid->getBytes();
|
||||||
if($remoteAddr instanceof IPAddress)
|
|
||||||
$remoteAddr = (string)$remoteAddr;
|
|
||||||
|
|
||||||
$code = self::generateCode();
|
$code = self::generateCode();
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
use Index\Data\Migration\DbMigrationManager;
|
use Index\Db\Migration\{DbMigrationManager,FsDbMigrationRepo};
|
||||||
use Index\Data\Migration\FsDbMigrationRepo;
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../mince.php';
|
require_once __DIR__ . '/../mince.php';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
use Index\Data\Migration\DbMigrationManager;
|
use Index\Db\Migration\DbMigrationManager;
|
||||||
use Index\Data\Migration\FsDbMigrationRepo;
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../mince.php';
|
require_once __DIR__ . '/../mince.php';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue