Updated Index library.
This commit is contained in:
parent
4af67cc422
commit
fd085514e5
23 changed files with 183 additions and 320 deletions
|
@ -1,8 +1,6 @@
|
||||||
{
|
{
|
||||||
"require": {
|
"require": {
|
||||||
"flashwave/index": "^0.2408.40014",
|
"flashwave/index": "^0.2410",
|
||||||
"flashwave/sasae": "^1.1",
|
|
||||||
"flashwave/syokuhou": "^1.2",
|
|
||||||
"erusev/parsedown": "~1.6",
|
"erusev/parsedown": "~1.6",
|
||||||
"sentry/sdk": "^4.0",
|
"sentry/sdk": "^4.0",
|
||||||
"nesbot/carbon": "^3.7"
|
"nesbot/carbon": "^3.7"
|
||||||
|
|
337
composer.lock
generated
337
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": "2b09221cee42b366070c9da9bec346b6",
|
"content-hash": "95007e8e6950a46ba5ccde993824d8ca",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "carbonphp/carbon-doctrine-types",
|
"name": "carbonphp/carbon-doctrine-types",
|
||||||
|
@ -127,26 +127,39 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "flashwave/index",
|
"name": "flashwave/index",
|
||||||
"version": "v0.2408.182001",
|
"version": "v0.2410.191603",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://patchii.net/flash/index.git",
|
"url": "https://patchii.net/flash/index.git",
|
||||||
"reference": "5a1fdcccedf818897a3468d5457875fabfb2ce28"
|
"reference": "17cdb4d1c239241200d7e30968122a8cd8b26509"
|
||||||
},
|
},
|
||||||
"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": {
|
||||||
|
"files": [
|
||||||
|
"src/Cache/ArrayCache/_ndx.php",
|
||||||
|
"src/Cache/Memcached/_ndx.php",
|
||||||
|
"src/Cache/Valkey/_ndx.php",
|
||||||
|
"src/Db/MariaDb/_ndx.php",
|
||||||
|
"src/Db/NullDb/_ndx.php",
|
||||||
|
"src/Db/Sqlite/_ndx.php"
|
||||||
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Index\\": "src"
|
"Index\\": "src"
|
||||||
}
|
}
|
||||||
|
@ -165,85 +178,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-18T20:01:21+00:00"
|
"time": "2024-10-19T16:04:17+00:00"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "flashwave/sasae",
|
|
||||||
"version": "v1.1.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://patchii.net/flash/sasae.git",
|
|
||||||
"reference": "897a28e56926ad465bf0daf587caf3d92a311383"
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"flashwave/index": "^0.2408.40014",
|
|
||||||
"php": ">=8.3",
|
|
||||||
"twig/html-extra": "^3.12",
|
|
||||||
"twig/twig": "^3.12"
|
|
||||||
},
|
|
||||||
"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-09-01T20:38:47+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",
|
||||||
|
@ -684,16 +619,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/log",
|
"name": "psr/log",
|
||||||
"version": "3.0.1",
|
"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": "79dff0b268932c640297f5208d6298f71855c03e"
|
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/log/zipball/79dff0b268932c640297f5208d6298f71855c03e",
|
"url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||||
"reference": "79dff0b268932c640297f5208d6298f71855c03e",
|
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -728,9 +663,9 @@
|
||||||
"psr-3"
|
"psr-3"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/php-fig/log/tree/3.0.1"
|
"source": "https://github.com/php-fig/log/tree/3.0.2"
|
||||||
},
|
},
|
||||||
"time": "2024-08-21T13:31:24+00:00"
|
"time": "2024-09-11T13:17:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ralouphie/getallheaders",
|
"name": "ralouphie/getallheaders",
|
||||||
|
@ -1063,16 +998,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/mime",
|
"name": "symfony/mime",
|
||||||
"version": "v7.1.4",
|
"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": "ccaa6c2503db867f472a587291e764d6a1e58758"
|
"reference": "711d2e167e8ce65b05aea6b258c449671cdd38ff"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/mime/zipball/ccaa6c2503db867f472a587291e764d6a1e58758",
|
"url": "https://api.github.com/repos/symfony/mime/zipball/711d2e167e8ce65b05aea6b258c449671cdd38ff",
|
||||||
"reference": "ccaa6c2503db867f472a587291e764d6a1e58758",
|
"reference": "711d2e167e8ce65b05aea6b258c449671cdd38ff",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1127,7 +1062,7 @@
|
||||||
"mime-type"
|
"mime-type"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/mime/tree/v7.1.4"
|
"source": "https://github.com/symfony/mime/tree/v7.1.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1143,7 +1078,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-08-13T14:28:19+00:00"
|
"time": "2024-09-20T08:28:38+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/options-resolver",
|
"name": "symfony/options-resolver",
|
||||||
|
@ -1214,20 +1149,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": "*"
|
||||||
|
@ -1273,7 +1208,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": [
|
||||||
{
|
{
|
||||||
|
@ -1289,26 +1224,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"
|
||||||
|
@ -1357,7 +1291,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": [
|
||||||
{
|
{
|
||||||
|
@ -1373,24 +1307,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"
|
||||||
|
@ -1438,7 +1372,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": [
|
||||||
{
|
{
|
||||||
|
@ -1454,24 +1388,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": "*"
|
||||||
|
@ -1518,7 +1452,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": [
|
||||||
{
|
{
|
||||||
|
@ -1534,97 +1468,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",
|
|
||||||
"version": "v1.30.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
|
||||||
"reference": "10112722600777e02d2745716b70c5db4ca70442"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/10112722600777e02d2745716b70c5db4ca70442",
|
|
||||||
"reference": "10112722600777e02d2745716b70c5db4ca70442",
|
|
||||||
"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\\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-php81",
|
"name": "symfony/polyfill-php81",
|
||||||
"version": "v1.30.0",
|
"version": "v1.31.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-php81.git",
|
"url": "https://github.com/symfony/polyfill-php81.git",
|
||||||
"reference": "3fb075789fb91f9ad9af537c4012d523085bd5af"
|
"reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af",
|
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
|
||||||
"reference": "3fb075789fb91f9ad9af537c4012d523085bd5af",
|
"reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1"
|
"php": ">=7.2"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
|
@ -1667,7 +1528,7 @@
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0"
|
"source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1683,24 +1544,24 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-06-19T12:30:46+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": {
|
||||||
|
@ -1743,7 +1604,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": [
|
||||||
{
|
{
|
||||||
|
@ -1759,20 +1620,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": {
|
||||||
|
@ -1837,7 +1698,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": [
|
||||||
{
|
{
|
||||||
|
@ -1853,7 +1714,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",
|
||||||
|
@ -1935,23 +1796,23 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/html-extra",
|
"name": "twig/html-extra",
|
||||||
"version": "v3.12.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": "4cdfc6f419910ad6ef9c4c9fafbcd1d5793b4f4c"
|
"reference": "8229e750091171c1f11801a525927811c7ac5a7e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twigphp/html-extra/zipball/4cdfc6f419910ad6ef9c4c9fafbcd1d5793b4f4c",
|
"url": "https://api.github.com/repos/twigphp/html-extra/zipball/8229e750091171c1f11801a525927811c7ac5a7e",
|
||||||
"reference": "4cdfc6f419910ad6ef9c4c9fafbcd1d5793b4f4c",
|
"reference": "8229e750091171c1f11801a525927811c7ac5a7e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.0.2",
|
"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"
|
||||||
|
@ -1987,7 +1848,7 @@
|
||||||
"twig"
|
"twig"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/twigphp/html-extra/tree/v3.12.0"
|
"source": "https://github.com/twigphp/html-extra/tree/v3.13.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1999,20 +1860,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-08-18T17:25:19+00:00"
|
"time": "2024-09-03T13:08:40+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/twig",
|
"name": "twig/twig",
|
||||||
"version": "v3.12.0",
|
"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": "4d19472d4ac1838e0b1f0e029ce1fa4040eb34ea"
|
"reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/4d19472d4ac1838e0b1f0e029ce1fa4040eb34ea",
|
"url": "https://api.github.com/repos/twigphp/Twig/zipball/126b2c97818dbff0cdf3fbfc881aedb3d40aae72",
|
||||||
"reference": "4d19472d4ac1838e0b1f0e029ce1fa4040eb34ea",
|
"reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -2066,7 +1927,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.12.0"
|
"source": "https://github.com/twigphp/Twig/tree/v3.14.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -2078,22 +1939,22 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-08-29T09:51:12+00:00"
|
"time": "2024-09-09T17:55:12+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
{
|
{
|
||||||
"name": "phpstan/phpstan",
|
"name": "phpstan/phpstan",
|
||||||
"version": "1.12.0",
|
"version": "1.12.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpstan/phpstan.git",
|
"url": "https://github.com/phpstan/phpstan.git",
|
||||||
"reference": "384af967d35b2162f69526c7276acadce534d0e1"
|
"reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/384af967d35b2162f69526c7276acadce534d0e1",
|
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc2b9976bd8b0f84ec9b0e50cc35378551de7af0",
|
||||||
"reference": "384af967d35b2162f69526c7276acadce534d0e1",
|
"reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -2138,7 +1999,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-08-27T09:18:05+00:00"
|
"time": "2024-10-18T11:12:07+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
|
|
@ -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 ExistingTables_20231013_215920 implements IDbMigration {
|
final class ExistingTables_20231013_215920 implements DbMigration {
|
||||||
public function migrate(IDbConnection $conn): void {
|
public function migrate(DbConnection $conn): void {
|
||||||
$existingTables = [];
|
$existingTables = [];
|
||||||
$result = $conn->query('SHOW TABLES');
|
$result = $conn->query('SHOW TABLES');
|
||||||
while($result->next())
|
while($result->next())
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai;
|
namespace Makai;
|
||||||
|
|
||||||
use Index\Data\DbTools;
|
use Index\Config\Fs\FsConfig;
|
||||||
use Syokuhou\SharpConfig;
|
use Index\Db\DbBackends;
|
||||||
|
|
||||||
define('MKI_STARTUP', microtime(true));
|
define('MKI_STARTUP', microtime(true));
|
||||||
define('MKI_ROOT', __DIR__);
|
define('MKI_ROOT', __DIR__);
|
||||||
|
@ -19,7 +19,7 @@ error_reporting(MKI_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(MKI_ROOT . '/makai.cfg');
|
$cfg = FsConfig::fromFile(MKI_ROOT . '/makai.cfg');
|
||||||
|
|
||||||
if($cfg->hasValues('sentry:dsn'))
|
if($cfg->hasValues('sentry:dsn'))
|
||||||
(function($cfg) {
|
(function($cfg) {
|
||||||
|
@ -34,7 +34,7 @@ if($cfg->hasValues('sentry:dsn'))
|
||||||
});
|
});
|
||||||
})($cfg->scopeTo('sentry'));
|
})($cfg->scopeTo('sentry'));
|
||||||
|
|
||||||
$db = DbTools::create($cfg->getString('database:dsn', 'null:'));
|
$db = DbBackends::create($cfg->getString('database:dsn', 'null:'));
|
||||||
$db->execute('SET SESSION time_zone = \'+00:00\', sql_mode = \'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION\'');
|
$db->execute('SET SESSION time_zone = \'+00:00\', sql_mode = \'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION\'');
|
||||||
|
|
||||||
$makai = new MakaiContext($db);
|
$makai = new MakaiContext($db);
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai;
|
namespace Makai;
|
||||||
|
|
||||||
use Index\Http\Routing\{HttpGet,RouteHandler};
|
use Index\Http\Routing\{HttpGet,RouteHandler,RouteHandlerTrait};
|
||||||
|
|
||||||
|
class AssetsRoutes implements RouteHandler {
|
||||||
|
use RouteHandlerTrait;
|
||||||
|
|
||||||
class AssetsRoutes extends RouteHandler {
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private SiteInfo $siteInfo
|
private SiteInfo $siteInfo
|
||||||
) {}
|
) {}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai;
|
namespace Makai;
|
||||||
|
|
||||||
use Index\CSRFP;
|
use Index\CsrfToken;
|
||||||
|
|
||||||
final class CSRFPContainer {
|
final class CSRFPContainer {
|
||||||
private ?CSRFP $instance = null;
|
private ?CsrfToken $instance = null;
|
||||||
private string $secretKey = '';
|
private string $secretKey = '';
|
||||||
private string $identity = '';
|
private string $identity = '';
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ final class CSRFPContainer {
|
||||||
|| ($this->secretKey !== '' && $this->identity !== '');
|
|| ($this->secretKey !== '' && $this->identity !== '');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getInstance(): ?CSRFP {
|
public function getInstance(): ?CsrfToken {
|
||||||
if($this->instance === null)
|
if($this->instance === null)
|
||||||
$this->instance = new CSRFP($this->secretKey, $this->identity);
|
$this->instance = new CsrfToken($this->secretKey, $this->identity);
|
||||||
return $this->instance;
|
return $this->instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai\Contacts;
|
namespace Makai\Contacts;
|
||||||
|
|
||||||
use Index\Colour\Colour;
|
use Index\Colour\{Colour,ColourRgb};
|
||||||
use Index\Colour\ColourRGB;
|
use Index\Db\DbResult;
|
||||||
use Index\Data\IDbResult;
|
|
||||||
|
|
||||||
class ContactInfo {
|
class ContactInfo {
|
||||||
private string $name;
|
private string $name;
|
||||||
|
@ -15,7 +14,7 @@ class ContactInfo {
|
||||||
private string $display;
|
private string $display;
|
||||||
private ?string $link;
|
private ?string $link;
|
||||||
|
|
||||||
public function __construct(IDbResult $result) {
|
public function __construct(DbResult $result) {
|
||||||
$this->name = $result->getString(0);
|
$this->name = $result->getString(0);
|
||||||
$this->homePage = $result->getInteger(1) !== 0;
|
$this->homePage = $result->getInteger(1) !== 0;
|
||||||
$this->order = $result->getInteger(2);
|
$this->order = $result->getInteger(2);
|
||||||
|
@ -59,7 +58,7 @@ class ContactInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getColour(): Colour {
|
public function getColour(): Colour {
|
||||||
return ColourRGB::fromRawRGB($this->colour);
|
return ColourRgb::fromRawRgb($this->colour);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getColourRaw(): int {
|
public function getColourRaw(): int {
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai\Contacts;
|
namespace Makai\Contacts;
|
||||||
|
|
||||||
use Index\Data\DbStatementCache;
|
use Index\Db\{DbConnection,DbStatementCache};
|
||||||
use Index\Data\IDbConnection;
|
|
||||||
|
|
||||||
class Contacts {
|
class Contacts {
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai;
|
namespace Makai;
|
||||||
|
|
||||||
use Index\Http\Routing\{HttpGet,RouteHandler};
|
use Index\Http\Routing\{HttpGet,RouteHandler,RouteHandlerTrait};
|
||||||
use Sasae\SasaeEnvironment;
|
use Index\Templating\TplEnvironment;
|
||||||
use Makai\Contacts\Contacts;
|
use Makai\Contacts\Contacts;
|
||||||
use Makai\Projects\Projects;
|
use Makai\Projects\Projects;
|
||||||
|
|
||||||
class DeveloperRoutes extends RouteHandler {
|
class DeveloperRoutes implements RouteHandler {
|
||||||
|
use RouteHandlerTrait;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private SasaeEnvironment $templating,
|
private TplEnvironment $templating,
|
||||||
private Contacts $contacts,
|
private Contacts $contacts,
|
||||||
private Projects $projects
|
private Projects $projects
|
||||||
) {}
|
) {}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai;
|
namespace Makai;
|
||||||
|
|
||||||
use Index\Data\IDbConnection;
|
use Index\Db\DbConnection;
|
||||||
use Index\Data\Migration\{IDbMigrationRepo,DbMigrationManager,FsDbMigrationRepo};
|
use Index\Db\Migration\{DbMigrationRepo,DbMigrationManager,FsDbMigrationRepo};
|
||||||
use Sasae\SasaeEnvironment;
|
use Index\Templating\TplEnvironment;
|
||||||
|
|
||||||
final class MakaiContext {
|
final class MakaiContext {
|
||||||
private IDbConnection $dbConn;
|
private DbConnection $dbConn;
|
||||||
private SasaeEnvironment $templating;
|
private TplEnvironment $templating;
|
||||||
private CSRFPContainer $csrfp;
|
private CSRFPContainer $csrfp;
|
||||||
|
|
||||||
private SiteInfo $siteInfo;
|
private SiteInfo $siteInfo;
|
||||||
|
@ -16,7 +16,7 @@ final class MakaiContext {
|
||||||
private Projects\Projects $projects;
|
private Projects\Projects $projects;
|
||||||
private SSHKeys\SSHKeys $sshKeys;
|
private SSHKeys\SSHKeys $sshKeys;
|
||||||
|
|
||||||
public function __construct(IDbConnection $dbConn) {
|
public function __construct(DbConnection $dbConn) {
|
||||||
$this->dbConn = $dbConn;
|
$this->dbConn = $dbConn;
|
||||||
$this->siteInfo = new SiteInfo;
|
$this->siteInfo = new SiteInfo;
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ final class MakaiContext {
|
||||||
return $this->sshKeys;
|
return $this->sshKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDbConn(): IDbConnection {
|
public function getDbConn(): DbConnection {
|
||||||
return $this->dbConn;
|
return $this->dbConn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,16 +57,16 @@ final class MakaiContext {
|
||||||
return new DbMigrationManager($this->dbConn, 'fm_' . DbMigrationManager::DEFAULT_TABLE);
|
return new DbMigrationManager($this->dbConn, 'fm_' . DbMigrationManager::DEFAULT_TABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createMigrationRepo(): IDbMigrationRepo {
|
public function createMigrationRepo(): DbMigrationRepo {
|
||||||
return new FsDbMigrationRepo(MKI_DIR_MIGRATIONS);
|
return new FsDbMigrationRepo(MKI_DIR_MIGRATIONS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTemplating(): SasaeEnvironment {
|
public function getTemplating(): TplEnvironment {
|
||||||
return $this->templating;
|
return $this->templating;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function startTemplating(): void {
|
public function startTemplating(): void {
|
||||||
$this->templating = new SasaeEnvironment(
|
$this->templating = new TplEnvironment(
|
||||||
MKI_DIR_TEMPLATES,
|
MKI_DIR_TEMPLATES,
|
||||||
cache: MKI_DEBUG ? null : ['Makai', GitInfo::hash(true)],
|
cache: MKI_DEBUG ? null : ['Makai', GitInfo::hash(true)],
|
||||||
debug: MKI_DEBUG,
|
debug: MKI_DEBUG,
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai\Projects;
|
namespace Makai\Projects;
|
||||||
|
|
||||||
use Index\Colour\Colour;
|
use Index\Colour\{Colour,ColourRgb};
|
||||||
use Index\Colour\ColourRGB;
|
use Index\Db\DbResult;
|
||||||
use Index\Data\IDbResult;
|
|
||||||
|
|
||||||
class LanguageInfo {
|
class LanguageInfo {
|
||||||
private string $id;
|
private string $id;
|
||||||
private string $name;
|
private string $name;
|
||||||
private ?int $colour;
|
private ?int $colour;
|
||||||
|
|
||||||
public function __construct(IDbResult $result) {
|
public function __construct(DbResult $result) {
|
||||||
$this->id = $result->getString(0);
|
$this->id = $result->getString(0);
|
||||||
$this->name = $result->getString(1);
|
$this->name = $result->getString(1);
|
||||||
$this->colour = $result->isNull(2) ? null : $result->getInteger(2);
|
$this->colour = $result->isNull(2) ? null : $result->getInteger(2);
|
||||||
|
@ -29,7 +28,7 @@ class LanguageInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getColourRaw(): ?int {
|
public function getColourRaw(): ?int {
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
namespace Makai\Projects;
|
namespace Makai\Projects;
|
||||||
|
|
||||||
use Carbon\CarbonImmutable;
|
use Carbon\CarbonImmutable;
|
||||||
use Index\Colour\{Colour,ColourRGB};
|
use Index\Colour\{Colour,ColourRgb};
|
||||||
use Index\Data\IDbResult;
|
use Index\Db\DbResult;
|
||||||
|
|
||||||
class ProjectInfo {
|
class ProjectInfo {
|
||||||
private string $id;
|
private string $id;
|
||||||
|
@ -22,7 +22,7 @@ class ProjectInfo {
|
||||||
private ?int $archivedAt;
|
private ?int $archivedAt;
|
||||||
private ?int $deletedAt;
|
private ?int $deletedAt;
|
||||||
|
|
||||||
public function __construct(IDbResult $result) {
|
public function __construct(DbResult $result) {
|
||||||
$this->id = $result->getString(0);
|
$this->id = $result->getString(0);
|
||||||
$this->name = $result->getString(1);
|
$this->name = $result->getString(1);
|
||||||
$this->nameClean = $result->getString(2);
|
$this->nameClean = $result->getString(2);
|
||||||
|
@ -81,7 +81,7 @@ class ProjectInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getColourRaw(): ?int {
|
public function getColourRaw(): ?int {
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai\Projects;
|
namespace Makai\Projects;
|
||||||
|
|
||||||
use Index\Colour\Colour;
|
use Index\Colour\{Colour,ColourRgb};
|
||||||
use Index\Colour\ColourRGB;
|
use Index\Db\{DbConnection,DbStatementCache};
|
||||||
use Index\Data\DbStatementCache;
|
|
||||||
use Index\Data\IDbConnection;
|
|
||||||
|
|
||||||
class Projects {
|
class Projects {
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,6 +80,6 @@ class Projects {
|
||||||
if(!$result->next() || $result->isNull(0))
|
if(!$result->next() || $result->isNull(0))
|
||||||
return Colour::none();
|
return Colour::none();
|
||||||
|
|
||||||
return ColourRGB::fromRawRGB($result->getInteger(0));
|
return ColourRgb::fromRawRGB($result->getInteger(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai;
|
namespace Makai;
|
||||||
|
|
||||||
use Index\Http\Routing\{HttpRouter,IRouter,IRouteHandler};
|
use Index\Http\Routing\{HttpRouter,Router,RouteHandler};
|
||||||
use Sasae\SasaeEnvironment;
|
|
||||||
|
|
||||||
class RoutingContext {
|
class RoutingContext {
|
||||||
private HttpRouter $router;
|
private HttpRouter $router;
|
||||||
|
@ -12,11 +11,11 @@ class RoutingContext {
|
||||||
$this->router->use('/', fn($resp) => $resp->setPoweredBy('Makai'));
|
$this->router->use('/', fn($resp) => $resp->setPoweredBy('Makai'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRouter(): IRouter {
|
public function getRouter(): Router {
|
||||||
return $this->router;
|
return $this->router;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function register(IRouteHandler $handler): void {
|
public function register(RouteHandler $handler): void {
|
||||||
$this->router->register($handler);
|
$this->router->register($handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai;
|
namespace Makai;
|
||||||
|
|
||||||
use Index\Http\{HttpResponseBuilder,HttpRequest};
|
use Index\Http\{HtmlHttpErrorHandler,HttpResponseBuilder,HttpRequest};
|
||||||
use Index\Http\ErrorHandling\HtmlErrorHandler;
|
|
||||||
|
|
||||||
class RoutingErrorHandler extends HtmlErrorHandler {
|
class RoutingErrorHandler extends HtmlHttpErrorHandler {
|
||||||
public function handle(HttpResponseBuilder $response, HttpRequest $request, int $code, string $message): void {
|
public function handle(HttpResponseBuilder $response, HttpRequest $request, int $code, string $message): void {
|
||||||
if($code === 401 || $code === 403 || $code === 404 || $code === 500 || $code === 503) {
|
if($code === 401 || $code === 403 || $code === 404 || $code === 500 || $code === 503) {
|
||||||
$response->setTypeHTML();
|
$response->setTypeHTML();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
namespace Makai\SSHKeys;
|
namespace Makai\SSHKeys;
|
||||||
|
|
||||||
use Carbon\CarbonImmutable;
|
use Carbon\CarbonImmutable;
|
||||||
use Index\Data\IDbResult;
|
use Index\Db\DbResult;
|
||||||
|
|
||||||
class SSHKeyInfo {
|
class SSHKeyInfo {
|
||||||
private string $id;
|
private string $id;
|
||||||
|
@ -13,7 +13,7 @@ class SSHKeyInfo {
|
||||||
private int $createdAt;
|
private int $createdAt;
|
||||||
private ?int $deprecatedAt;
|
private ?int $deprecatedAt;
|
||||||
|
|
||||||
public function __construct(IDbResult $result) {
|
public function __construct(DbResult $result) {
|
||||||
$this->id = $result->getString(0);
|
$this->id = $result->getString(0);
|
||||||
$this->level = $result->getInteger(1);
|
$this->level = $result->getInteger(1);
|
||||||
$this->algo = $result->getString(2);
|
$this->algo = $result->getString(2);
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai\SSHKeys;
|
namespace Makai\SSHKeys;
|
||||||
|
|
||||||
use Index\Data\DbStatementCache;
|
use Index\Db\{DbConnection,DbStatementCache};
|
||||||
use Index\Data\IDbConnection;
|
|
||||||
|
|
||||||
class SSHKeys {
|
class SSHKeys {
|
||||||
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,9 +2,11 @@
|
||||||
namespace Makai\SSHKeys;
|
namespace Makai\SSHKeys;
|
||||||
|
|
||||||
use DateTimeInterface;
|
use DateTimeInterface;
|
||||||
use Index\Http\Routing\{HttpGet,RouteHandler};
|
use Index\Http\Routing\{HttpGet,RouteHandler,RouteHandlerTrait};
|
||||||
|
|
||||||
|
class SSHKeysRoutes implements RouteHandler {
|
||||||
|
use RouteHandlerTrait;
|
||||||
|
|
||||||
class SSHKeysRoutes extends RouteHandler {
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private SSHKeys $sshKeys
|
private SSHKeys $sshKeys
|
||||||
) {}
|
) {}
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Makai\Tools\Ascii;
|
namespace Makai\Tools\Ascii;
|
||||||
|
|
||||||
use Index\Http\Routing\{HttpGet,RouteHandler};
|
use Index\Http\Routing\{HttpGet,RouteHandler,RouteHandlerTrait};
|
||||||
use Sasae\SasaeEnvironment;
|
use Index\Templating\TplEnvironment;
|
||||||
|
|
||||||
|
class AsciiRoutes implements RouteHandler {
|
||||||
|
use RouteHandlerTrait;
|
||||||
|
|
||||||
class AsciiRoutes extends RouteHandler {
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private SasaeEnvironment $templating
|
private TplEnvironment $templating
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
#[HttpGet('/tools/ascii')]
|
#[HttpGet('/tools/ascii')]
|
||||||
|
|
|
@ -2,9 +2,11 @@
|
||||||
namespace Makai\Tools;
|
namespace Makai\Tools;
|
||||||
|
|
||||||
use Index\XString;
|
use Index\XString;
|
||||||
use Index\Http\Routing\{HttpGet,RouteHandler};
|
use Index\Http\Routing\{HttpGet,RouteHandler,RouteHandlerTrait};
|
||||||
|
|
||||||
|
class ToolsRoutes implements RouteHandler {
|
||||||
|
use RouteHandlerTrait;
|
||||||
|
|
||||||
class ToolsRoutes extends RouteHandler {
|
|
||||||
#[HttpGet('/tools/random')]
|
#[HttpGet('/tools/random')]
|
||||||
public function getRandomString($response, $request): string {
|
public function getRandomString($response, $request): string {
|
||||||
$response->setTypePlain();
|
$response->setTypePlain();
|
||||||
|
|
|
@ -3,14 +3,16 @@ namespace Makai\Tools\Whois;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use Memcached;
|
use Memcached;
|
||||||
use Index\Cache\CacheTools;
|
use Index\Cache\CacheBackends;
|
||||||
use Index\Http\Routing\{HttpGet,HttpPost,RouteHandler};
|
use Index\Http\Routing\{HttpGet,HttpPost,RouteHandler,RouteHandlerTrait};
|
||||||
use Sasae\SasaeEnvironment;
|
use Index\Templating\TplEnvironment;
|
||||||
use Makai\CSRFPContainer;
|
use Makai\CSRFPContainer;
|
||||||
|
|
||||||
class WhoisRoutes extends RouteHandler {
|
class WhoisRoutes implements RouteHandler {
|
||||||
|
use RouteHandlerTrait;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private SasaeEnvironment $templating,
|
private TplEnvironment $templating,
|
||||||
private CSRFPContainer $csrfp,
|
private CSRFPContainer $csrfp,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
@ -51,7 +53,7 @@ class WhoisRoutes extends RouteHandler {
|
||||||
$source = '';
|
$source = '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$cache = CacheTools::create('memcached://localhost');
|
$cache = CacheBackends::create('memcached://localhost');
|
||||||
|
|
||||||
$result = $cache->get($prefix . $hash);
|
$result = $cache->get($prefix . $hash);
|
||||||
if($result === null) {
|
if($result === null) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
use Index\Data\Migration\FsDbMigrationRepo;
|
use Index\Db\Migration\FsDbMigrationRepo;
|
||||||
|
|
||||||
require_once __DIR__ . '/../makai.php';
|
require_once __DIR__ . '/../makai.php';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
use Index\Data\Migration\FsDbMigrationRepo;
|
use Index\Db\Migration\FsDbMigrationRepo;
|
||||||
|
|
||||||
require_once __DIR__ . '/../makai.php';
|
require_once __DIR__ . '/../makai.php';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue