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