From fd085514e5767b84c4bf3cd4bd3e87d95988fec6 Mon Sep 17 00:00:00 2001 From: flashwave Date: Mon, 21 Oct 2024 20:50:01 +0000 Subject: [PATCH] Updated Index library. --- composer.json | 4 +- composer.lock | 337 +++++------------- .../2023_10_13_215920_existing_tables.php | 8 +- makai.php | 8 +- src/AssetsRoutes.php | 6 +- src/CSRFPContainer.php | 8 +- src/Contacts/ContactInfo.php | 9 +- src/Contacts/Contacts.php | 5 +- src/DeveloperRoutes.php | 10 +- src/MakaiContext.php | 20 +- src/Projects/LanguageInfo.php | 9 +- src/Projects/ProjectInfo.php | 8 +- src/Projects/Projects.php | 10 +- src/RoutingContext.php | 7 +- src/RoutingErrorHandler.php | 5 +- src/SSHKeys/SSHKeyInfo.php | 4 +- src/SSHKeys/SSHKeys.php | 5 +- src/SSHKeys/SSHKeysRoutes.php | 6 +- src/Tools/Ascii/AsciiRoutes.php | 10 +- src/Tools/ToolsRoutes.php | 6 +- src/Tools/Whois/WhoisRoutes.php | 14 +- tools/migrate | 2 +- tools/new-migration | 2 +- 23 files changed, 183 insertions(+), 320 deletions(-) diff --git a/composer.json b/composer.json index 77374a1..3110492 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,6 @@ { "require": { - "flashwave/index": "^0.2408.40014", - "flashwave/sasae": "^1.1", - "flashwave/syokuhou": "^1.2", + "flashwave/index": "^0.2410", "erusev/parsedown": "~1.6", "sentry/sdk": "^4.0", "nesbot/carbon": "^3.7" diff --git a/composer.lock b/composer.lock index 2ee57bf..195f340 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "2b09221cee42b366070c9da9bec346b6", + "content-hash": "95007e8e6950a46ba5ccde993824d8ca", "packages": [ { "name": "carbonphp/carbon-doctrine-types", @@ -127,26 +127,39 @@ }, { "name": "flashwave/index", - "version": "v0.2408.182001", + "version": "v0.2410.191603", "source": { "type": "git", "url": "https://patchii.net/flash/index.git", - "reference": "5a1fdcccedf818897a3468d5457875fabfb2ce28" + "reference": "17cdb4d1c239241200d7e30968122a8cd8b26509" }, "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": { + "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": { "Index\\": "src" } @@ -165,85 +178,7 @@ ], "description": "Composer package for the common library for my projects.", "homepage": "https://railgun.sh/index", - "time": "2024-08-18T20:01:21+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" + "time": "2024-10-19T16:04:17+00:00" }, { "name": "guzzlehttp/psr7", @@ -684,16 +619,16 @@ }, { "name": "psr/log", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "79dff0b268932c640297f5208d6298f71855c03e" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/79dff0b268932c640297f5208d6298f71855c03e", - "reference": "79dff0b268932c640297f5208d6298f71855c03e", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { @@ -728,9 +663,9 @@ "psr-3" ], "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", @@ -1063,16 +998,16 @@ }, { "name": "symfony/mime", - "version": "v7.1.4", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "ccaa6c2503db867f472a587291e764d6a1e58758" + "reference": "711d2e167e8ce65b05aea6b258c449671cdd38ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/ccaa6c2503db867f472a587291e764d6a1e58758", - "reference": "ccaa6c2503db867f472a587291e764d6a1e58758", + "url": "https://api.github.com/repos/symfony/mime/zipball/711d2e167e8ce65b05aea6b258c449671cdd38ff", + "reference": "711d2e167e8ce65b05aea6b258c449671cdd38ff", "shasum": "" }, "require": { @@ -1127,7 +1062,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.1.4" + "source": "https://github.com/symfony/mime/tree/v7.1.5" }, "funding": [ { @@ -1143,7 +1078,7 @@ "type": "tidelift" } ], - "time": "2024-08-13T14:28:19+00:00" + "time": "2024-09-20T08:28:38+00:00" }, { "name": "symfony/options-resolver", @@ -1214,20 +1149,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": "*" @@ -1273,7 +1208,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": [ { @@ -1289,26 +1224,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" @@ -1357,7 +1291,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": [ { @@ -1373,24 +1307,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" @@ -1438,7 +1372,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": [ { @@ -1454,24 +1388,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": "*" @@ -1518,7 +1452,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": [ { @@ -1534,97 +1468,24 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+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" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af" + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af", - "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -1667,7 +1528,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { @@ -1683,24 +1544,24 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+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": { @@ -1743,7 +1604,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": [ { @@ -1759,20 +1620,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": { @@ -1837,7 +1698,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": [ { @@ -1853,7 +1714,7 @@ "type": "tidelift" } ], - "time": "2024-07-26T12:41:01+00:00" + "time": "2024-09-16T06:30:38+00:00" }, { "name": "symfony/translation-contracts", @@ -1935,23 +1796,23 @@ }, { "name": "twig/html-extra", - "version": "v3.12.0", + "version": "v3.13.0", "source": { "type": "git", "url": "https://github.com/twigphp/html-extra.git", - "reference": "4cdfc6f419910ad6ef9c4c9fafbcd1d5793b4f4c" + "reference": "8229e750091171c1f11801a525927811c7ac5a7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/html-extra/zipball/4cdfc6f419910ad6ef9c4c9fafbcd1d5793b4f4c", - "reference": "4cdfc6f419910ad6ef9c4c9fafbcd1d5793b4f4c", + "url": "https://api.github.com/repos/twigphp/html-extra/zipball/8229e750091171c1f11801a525927811c7ac5a7e", + "reference": "8229e750091171c1f11801a525927811c7ac5a7e", "shasum": "" }, "require": { "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" @@ -1987,7 +1848,7 @@ "twig" ], "support": { - "source": "https://github.com/twigphp/html-extra/tree/v3.12.0" + "source": "https://github.com/twigphp/html-extra/tree/v3.13.0" }, "funding": [ { @@ -1999,20 +1860,20 @@ "type": "tidelift" } ], - "time": "2024-08-18T17:25:19+00:00" + "time": "2024-09-03T13:08:40+00:00" }, { "name": "twig/twig", - "version": "v3.12.0", + "version": "v3.14.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "4d19472d4ac1838e0b1f0e029ce1fa4040eb34ea" + "reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/4d19472d4ac1838e0b1f0e029ce1fa4040eb34ea", - "reference": "4d19472d4ac1838e0b1f0e029ce1fa4040eb34ea", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/126b2c97818dbff0cdf3fbfc881aedb3d40aae72", + "reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72", "shasum": "" }, "require": { @@ -2066,7 +1927,7 @@ ], "support": { "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": [ { @@ -2078,22 +1939,22 @@ "type": "tidelift" } ], - "time": "2024-08-29T09:51:12+00:00" + "time": "2024-09-09T17:55:12+00:00" } ], "packages-dev": [ { "name": "phpstan/phpstan", - "version": "1.12.0", + "version": "1.12.7", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "384af967d35b2162f69526c7276acadce534d0e1" + "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/384af967d35b2162f69526c7276acadce534d0e1", - "reference": "384af967d35b2162f69526c7276acadce534d0e1", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc2b9976bd8b0f84ec9b0e50cc35378551de7af0", + "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0", "shasum": "" }, "require": { @@ -2138,7 +1999,7 @@ "type": "github" } ], - "time": "2024-08-27T09:18:05+00:00" + "time": "2024-10-18T11:12:07+00:00" } ], "aliases": [], diff --git a/database/2023_10_13_215920_existing_tables.php b/database/2023_10_13_215920_existing_tables.php index c642744..a72f558 100644 --- a/database/2023_10_13_215920_existing_tables.php +++ b/database/2023_10_13_215920_existing_tables.php @@ -1,9 +1,9 @@ query('SHOW TABLES'); while($result->next()) diff --git a/makai.php b/makai.php index 37870af..57d6aac 100644 --- a/makai.php +++ b/makai.php @@ -1,8 +1,8 @@ hasValues('sentry:dsn')) (function($cfg) { @@ -34,7 +34,7 @@ if($cfg->hasValues('sentry:dsn')) }); })($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\''); $makai = new MakaiContext($db); diff --git a/src/AssetsRoutes.php b/src/AssetsRoutes.php index 8667183..b23471b 100644 --- a/src/AssetsRoutes.php +++ b/src/AssetsRoutes.php @@ -1,9 +1,11 @@ secretKey !== '' && $this->identity !== ''); } - public function getInstance(): ?CSRFP { + public function getInstance(): ?CsrfToken { if($this->instance === null) - $this->instance = new CSRFP($this->secretKey, $this->identity); + $this->instance = new CsrfToken($this->secretKey, $this->identity); return $this->instance; } diff --git a/src/Contacts/ContactInfo.php b/src/Contacts/ContactInfo.php index eeb47a5..aa70fd9 100644 --- a/src/Contacts/ContactInfo.php +++ b/src/Contacts/ContactInfo.php @@ -1,9 +1,8 @@ name = $result->getString(0); $this->homePage = $result->getInteger(1) !== 0; $this->order = $result->getInteger(2); @@ -59,7 +58,7 @@ class ContactInfo { } public function getColour(): Colour { - return ColourRGB::fromRawRGB($this->colour); + return ColourRgb::fromRawRgb($this->colour); } public function getColourRaw(): int { diff --git a/src/Contacts/Contacts.php b/src/Contacts/Contacts.php index 66a0bc4..622c790 100644 --- a/src/Contacts/Contacts.php +++ b/src/Contacts/Contacts.php @@ -1,13 +1,12 @@ cache = new DbStatementCache($dbConn); } diff --git a/src/DeveloperRoutes.php b/src/DeveloperRoutes.php index c25603a..585f61a 100644 --- a/src/DeveloperRoutes.php +++ b/src/DeveloperRoutes.php @@ -1,14 +1,16 @@ dbConn = $dbConn; $this->siteInfo = new SiteInfo; @@ -44,7 +44,7 @@ final class MakaiContext { return $this->sshKeys; } - public function getDbConn(): IDbConnection { + public function getDbConn(): DbConnection { return $this->dbConn; } @@ -57,16 +57,16 @@ final class MakaiContext { return new DbMigrationManager($this->dbConn, 'fm_' . DbMigrationManager::DEFAULT_TABLE); } - public function createMigrationRepo(): IDbMigrationRepo { + public function createMigrationRepo(): DbMigrationRepo { return new FsDbMigrationRepo(MKI_DIR_MIGRATIONS); } - public function getTemplating(): SasaeEnvironment { + public function getTemplating(): TplEnvironment { return $this->templating; } public function startTemplating(): void { - $this->templating = new SasaeEnvironment( + $this->templating = new TplEnvironment( MKI_DIR_TEMPLATES, cache: MKI_DEBUG ? null : ['Makai', GitInfo::hash(true)], debug: MKI_DEBUG, diff --git a/src/Projects/LanguageInfo.php b/src/Projects/LanguageInfo.php index 7b0e7d4..8a0f1af 100644 --- a/src/Projects/LanguageInfo.php +++ b/src/Projects/LanguageInfo.php @@ -1,16 +1,15 @@ id = $result->getString(0); $this->name = $result->getString(1); $this->colour = $result->isNull(2) ? null : $result->getInteger(2); @@ -29,7 +28,7 @@ class LanguageInfo { } 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 { diff --git a/src/Projects/ProjectInfo.php b/src/Projects/ProjectInfo.php index 34a55f9..c1c09ba 100644 --- a/src/Projects/ProjectInfo.php +++ b/src/Projects/ProjectInfo.php @@ -2,8 +2,8 @@ namespace Makai\Projects; use Carbon\CarbonImmutable; -use Index\Colour\{Colour,ColourRGB}; -use Index\Data\IDbResult; +use Index\Colour\{Colour,ColourRgb}; +use Index\Db\DbResult; class ProjectInfo { private string $id; @@ -22,7 +22,7 @@ class ProjectInfo { private ?int $archivedAt; private ?int $deletedAt; - public function __construct(IDbResult $result) { + public function __construct(DbResult $result) { $this->id = $result->getString(0); $this->name = $result->getString(1); $this->nameClean = $result->getString(2); @@ -81,7 +81,7 @@ class ProjectInfo { } 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 { diff --git a/src/Projects/Projects.php b/src/Projects/Projects.php index 7b65af6..9667cfb 100644 --- a/src/Projects/Projects.php +++ b/src/Projects/Projects.php @@ -1,15 +1,13 @@ cache = new DbStatementCache($dbConn); } @@ -82,6 +80,6 @@ class Projects { if(!$result->next() || $result->isNull(0)) return Colour::none(); - return ColourRGB::fromRawRGB($result->getInteger(0)); + return ColourRgb::fromRawRGB($result->getInteger(0)); } } diff --git a/src/RoutingContext.php b/src/RoutingContext.php index 351e2cf..025cf1e 100644 --- a/src/RoutingContext.php +++ b/src/RoutingContext.php @@ -1,8 +1,7 @@ router->use('/', fn($resp) => $resp->setPoweredBy('Makai')); } - public function getRouter(): IRouter { + public function getRouter(): Router { return $this->router; } - public function register(IRouteHandler $handler): void { + public function register(RouteHandler $handler): void { $this->router->register($handler); } diff --git a/src/RoutingErrorHandler.php b/src/RoutingErrorHandler.php index 970d4dc..0c9f79f 100644 --- a/src/RoutingErrorHandler.php +++ b/src/RoutingErrorHandler.php @@ -1,10 +1,9 @@ setTypeHTML(); diff --git a/src/SSHKeys/SSHKeyInfo.php b/src/SSHKeys/SSHKeyInfo.php index 108794b..b5cb851 100644 --- a/src/SSHKeys/SSHKeyInfo.php +++ b/src/SSHKeys/SSHKeyInfo.php @@ -2,7 +2,7 @@ namespace Makai\SSHKeys; use Carbon\CarbonImmutable; -use Index\Data\IDbResult; +use Index\Db\DbResult; class SSHKeyInfo { private string $id; @@ -13,7 +13,7 @@ class SSHKeyInfo { private int $createdAt; private ?int $deprecatedAt; - public function __construct(IDbResult $result) { + public function __construct(DbResult $result) { $this->id = $result->getString(0); $this->level = $result->getInteger(1); $this->algo = $result->getString(2); diff --git a/src/SSHKeys/SSHKeys.php b/src/SSHKeys/SSHKeys.php index f2637ee..9933cca 100644 --- a/src/SSHKeys/SSHKeys.php +++ b/src/SSHKeys/SSHKeys.php @@ -1,13 +1,12 @@ cache = new DbStatementCache($dbConn); } diff --git a/src/SSHKeys/SSHKeysRoutes.php b/src/SSHKeys/SSHKeysRoutes.php index 222137a..cc94ac2 100644 --- a/src/SSHKeys/SSHKeysRoutes.php +++ b/src/SSHKeys/SSHKeysRoutes.php @@ -2,9 +2,11 @@ namespace Makai\SSHKeys; 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( private SSHKeys $sshKeys ) {} diff --git a/src/Tools/Ascii/AsciiRoutes.php b/src/Tools/Ascii/AsciiRoutes.php index 5813528..b71f475 100644 --- a/src/Tools/Ascii/AsciiRoutes.php +++ b/src/Tools/Ascii/AsciiRoutes.php @@ -1,12 +1,14 @@ setTypePlain(); diff --git a/src/Tools/Whois/WhoisRoutes.php b/src/Tools/Whois/WhoisRoutes.php index 7c105c8..6f7b483 100644 --- a/src/Tools/Whois/WhoisRoutes.php +++ b/src/Tools/Whois/WhoisRoutes.php @@ -3,14 +3,16 @@ namespace Makai\Tools\Whois; use Exception; use Memcached; -use Index\Cache\CacheTools; -use Index\Http\Routing\{HttpGet,HttpPost,RouteHandler}; -use Sasae\SasaeEnvironment; +use Index\Cache\CacheBackends; +use Index\Http\Routing\{HttpGet,HttpPost,RouteHandler,RouteHandlerTrait}; +use Index\Templating\TplEnvironment; use Makai\CSRFPContainer; -class WhoisRoutes extends RouteHandler { +class WhoisRoutes implements RouteHandler { + use RouteHandlerTrait; + public function __construct( - private SasaeEnvironment $templating, + private TplEnvironment $templating, private CSRFPContainer $csrfp, ) {} @@ -51,7 +53,7 @@ class WhoisRoutes extends RouteHandler { $source = ''; try { - $cache = CacheTools::create('memcached://localhost'); + $cache = CacheBackends::create('memcached://localhost'); $result = $cache->get($prefix . $hash); if($result === null) { diff --git a/tools/migrate b/tools/migrate index ec2670e..b7205eb 100755 --- a/tools/migrate +++ b/tools/migrate @@ -1,6 +1,6 @@ #!/usr/bin/env php