Updated Index for Satori services.

This commit is contained in:
flash 2024-08-04 23:10:42 +00:00
parent b755646252
commit b0fe420526
4 changed files with 64 additions and 74 deletions

View file

@ -1,14 +1,12 @@
{ {
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Satori\\": "src" "Satori\\": "src"
} }
}, },
"require": { "require": {
"flashwave/index": "dev-master", "flashwave/index": "^0.2408.40014",
"flashwave/syokuhou": "dev-master", "flashwave/syokuhou": "^1.2",
"sentry/sdk": "^4.0" "sentry/sdk": "^4.0"
} }
} }

112
composer.lock generated
View file

@ -4,34 +4,30 @@
"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": "d5abb8ca3c597026b2d53f67c12b2681", "content-hash": "25cd4c9695654bac1ffda2ab6d6033de",
"packages": [ "packages": [
{ {
"name": "flashwave/index", "name": "flashwave/index",
"version": "dev-master", "version": "v0.2408.40014",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://patchii.net/flash/index.git", "url": "https://patchii.net/flash/index.git",
"reference": "e4c8ed711e045cffe840ba10a239ede14b0b171f" "reference": "fbca708fbd75e8ecc6b36b39c1307a67bf250808"
}, },
"require": { "require": {
"ext-mbstring": "*", "ext-mbstring": "*",
"php": ">=8.1" "php": ">=8.3"
}, },
"require-dev": { "require-dev": {
"phpstan/phpstan": "^1.10", "phpstan/phpstan": "^1.11",
"phpunit/phpunit": "^10.2" "phpunit/phpunit": "^11.2"
}, },
"suggest": { "suggest": {
"ext-mysqli": "Support for the Index\\Data\\MariaDB namespace (both mysqlnd and libmysql are supported).", "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-sqlite3": "Support for the Index\\Data\\SQLite namespace."
}, },
"default-branch": true,
"type": "library", "type": "library",
"autoload": { "autoload": {
"files": [
"index.php"
],
"psr-4": { "psr-4": {
"Index\\": "src" "Index\\": "src"
} }
@ -50,25 +46,24 @@
], ],
"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-04-10T23:40:14+00:00" "time": "2024-08-04T00:14:17+00:00"
}, },
{ {
"name": "flashwave/syokuhou", "name": "flashwave/syokuhou",
"version": "dev-master", "version": "v1.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://patchii.net/flash/syokuhou.git", "url": "https://patchii.net/flash/syokuhou.git",
"reference": "c1fe9371ada20fcea51c225cc53b9ceae4642bc4" "reference": "129a46c0d917382f9bc195cce278be51984eb87d"
}, },
"require": { "require": {
"flashwave/index": "dev-master", "flashwave/index": "^0.2408.40014",
"php": ">=8.2" "php": ">=8.3"
}, },
"require-dev": { "require-dev": {
"phpstan/phpstan": "^1.10", "phpstan/phpstan": "^1.11",
"phpunit/phpunit": "^10.4" "phpunit/phpunit": "^11.2"
}, },
"default-branch": true,
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -89,20 +84,20 @@
], ],
"description": "Configuration library for PHP.", "description": "Configuration library for PHP.",
"homepage": "https://railgun.sh/syokuhou", "homepage": "https://railgun.sh/syokuhou",
"time": "2024-01-04T02:12:49+00:00" "time": "2024-08-04T01:07:23+00:00"
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "2.6.2", "version": "2.7.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
"reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -117,8 +112,8 @@
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2", "bamarni/composer-bin-plugin": "^1.8.2",
"http-interop/http-factory-tests": "^0.9", "http-interop/http-factory-tests": "0.9.0",
"phpunit/phpunit": "^8.5.36 || ^9.6.15" "phpunit/phpunit": "^8.5.39 || ^9.6.20"
}, },
"suggest": { "suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
@ -189,7 +184,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/psr7/issues", "issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.6.2" "source": "https://github.com/guzzle/psr7/tree/2.7.0"
}, },
"funding": [ "funding": [
{ {
@ -205,7 +200,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-12-03T20:05:35+00:00" "time": "2024-07-18T11:15:46+00:00"
}, },
{ {
"name": "jean85/pretty-package-versions", "name": "jean85/pretty-package-versions",
@ -268,20 +263,20 @@
}, },
{ {
"name": "psr/http-factory", "name": "psr/http-factory",
"version": "1.0.2", "version": "1.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/http-factory.git", "url": "https://github.com/php-fig/http-factory.git",
"reference": "e616d01114759c4c489f93b099585439f795fe35" "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
"reference": "e616d01114759c4c489f93b099585439f795fe35", "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.0.0", "php": ">=7.1",
"psr/http-message": "^1.0 || ^2.0" "psr/http-message": "^1.0 || ^2.0"
}, },
"type": "library", "type": "library",
@ -305,7 +300,7 @@
"homepage": "https://www.php-fig.org/" "homepage": "https://www.php-fig.org/"
} }
], ],
"description": "Common interfaces for PSR-7 HTTP message factories", "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
"keywords": [ "keywords": [
"factory", "factory",
"http", "http",
@ -317,9 +312,9 @@
"response" "response"
], ],
"support": { "support": {
"source": "https://github.com/php-fig/http-factory/tree/1.0.2" "source": "https://github.com/php-fig/http-factory"
}, },
"time": "2023-04-10T20:10:41+00:00" "time": "2024-04-15T12:06:14+00:00"
}, },
{ {
"name": "psr/http-message", "name": "psr/http-message",
@ -525,16 +520,16 @@
}, },
{ {
"name": "sentry/sentry", "name": "sentry/sentry",
"version": "4.7.0", "version": "4.8.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/getsentry/sentry-php.git", "url": "https://github.com/getsentry/sentry-php.git",
"reference": "d6769b2a5e6bf19ed3bbfbf52328ceaf8e6fcb1f" "reference": "61770efd8b7888e0bdd7d234f0ba67b066e47d04"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/d6769b2a5e6bf19ed3bbfbf52328ceaf8e6fcb1f", "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/61770efd8b7888e0bdd7d234f0ba67b066e47d04",
"reference": "d6769b2a5e6bf19ed3bbfbf52328ceaf8e6fcb1f", "reference": "61770efd8b7888e0bdd7d234f0ba67b066e47d04",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -598,7 +593,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/getsentry/sentry-php/issues", "issues": "https://github.com/getsentry/sentry-php/issues",
"source": "https://github.com/getsentry/sentry-php/tree/4.7.0" "source": "https://github.com/getsentry/sentry-php/tree/4.8.1"
}, },
"funding": [ "funding": [
{ {
@ -610,20 +605,20 @@
"type": "custom" "type": "custom"
} }
], ],
"time": "2024-04-10T13:22:13+00:00" "time": "2024-07-16T13:45:27+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v3.4.0", "version": "v3.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git", "url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
"reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -632,7 +627,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "3.4-dev" "dev-main": "3.5-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/contracts", "name": "symfony/contracts",
@ -661,7 +656,7 @@
"description": "A generic function and convention to trigger deprecation notices", "description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0"
}, },
"funding": [ "funding": [
{ {
@ -677,20 +672,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-05-23T14:45:45+00:00" "time": "2024-04-18T09:32:20+00:00"
}, },
{ {
"name": "symfony/options-resolver", "name": "symfony/options-resolver",
"version": "v7.0.0", "version": "v7.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/options-resolver.git", "url": "https://github.com/symfony/options-resolver.git",
"reference": "700ff4096e346f54cb628ea650767c8130f1001f" "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/700ff4096e346f54cb628ea650767c8130f1001f", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/47aa818121ed3950acd2b58d1d37d08a94f9bf55",
"reference": "700ff4096e346f54cb628ea650767c8130f1001f", "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -728,7 +723,7 @@
"options" "options"
], ],
"support": { "support": {
"source": "https://github.com/symfony/options-resolver/tree/v7.0.0" "source": "https://github.com/symfony/options-resolver/tree/v7.1.1"
}, },
"funding": [ "funding": [
{ {
@ -744,17 +739,14 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-08-08T10:20:21+00:00" "time": "2024-05-31T14:57:53+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],
"aliases": [], "aliases": [],
"minimum-stability": "dev", "minimum-stability": "stable",
"stability-flags": { "stability-flags": [],
"flashwave/index": 20, "prefer-stable": false,
"flashwave/syokuhou": 20
},
"prefer-stable": true,
"prefer-lowest": false, "prefer-lowest": false,
"platform": [], "platform": [],
"platform-dev": [], "platform-dev": [],

View file

@ -1,7 +1,6 @@
<?php <?php
namespace Satori; namespace Satori;
use Index\Environment;
use Index\Data\DbTools; use Index\Data\DbTools;
use Syokuhou\SharpConfig; use Syokuhou\SharpConfig;
@ -9,11 +8,11 @@ define('SAT_ROOT', __DIR__);
define('SAT_DIR_MIGRATIONS', SAT_ROOT . '/database'); define('SAT_DIR_MIGRATIONS', SAT_ROOT . '/database');
define('SAT_DIR_PUBLIC', SAT_ROOT . '/public'); define('SAT_DIR_PUBLIC', SAT_ROOT . '/public');
define('SAT_DEBUG', is_file(SAT_ROOT . '/.debug')); define('SAT_DEBUG', is_file(SAT_ROOT . '/.debug'));
define('SAT_VERSION', '20231029'); define('SAT_VERSION', '20240805');
require_once SAT_ROOT . '/vendor/autoload.php'; require_once SAT_ROOT . '/vendor/autoload.php';
Environment::setDebug(SAT_DEBUG); error_reporting(SAT_DEBUG ? -1 : 0);
mb_internal_encoding('utf-8'); mb_internal_encoding('utf-8');
date_default_timezone_set('utc'); date_default_timezone_set('utc');

View file

@ -2,6 +2,7 @@
namespace Satori\Splatoon; namespace Satori\Splatoon;
use stdClass; use stdClass;
use DateTimeInterface;
use Index\XArray; use Index\XArray;
use Index\Http\Routing\{HttpGet,RouteHandler}; use Index\Http\Routing\{HttpGet,RouteHandler};
@ -60,9 +61,9 @@ class SplatoonRoutes extends RouteHandler {
$fest = new stdClass; $fest = new stdClass;
$fest->id = $festInfo->getId(); $fest->id = $festInfo->getId();
$fest->title = $festInfo->getTitle(); $fest->title = $festInfo->getTitle();
$fest->start = str_replace('+00:00', 'Z', date(\DateTime::ATOM, $festInfo->getStartTime())); $fest->start = str_replace('+00:00', 'Z', date(DateTimeInterface::ATOM, $festInfo->getStartTime()));
$fest->midterm = str_replace('+00:00', 'Z', date(\DateTime::ATOM, $festInfo->getMidTermTime())); $fest->midterm = str_replace('+00:00', 'Z', date(DateTimeInterface::ATOM, $festInfo->getMidTermTime()));
$fest->end = str_replace('+00:00', 'Z', date(\DateTime::ATOM, $festInfo->getEndTime())); $fest->end = str_replace('+00:00', 'Z', date(DateTimeInterface::ATOM, $festInfo->getEndTime()));
$fest->state = $festInfo->getState(); $fest->state = $festInfo->getState();
$fest->teams = XArray::select($festInfo->getTeams(), function($teamInfo) { $fest->teams = XArray::select($festInfo->getTeams(), function($teamInfo) {
$team = new stdClass; $team = new stdClass;
@ -112,8 +113,8 @@ class SplatoonRoutes extends RouteHandler {
$schedules[$gameMode]->schedule[] = $schedule = new stdClass; $schedules[$gameMode]->schedule[] = $schedule = new stdClass;
$schedule->periods = XArray::select($scheduleInfo->getTimePeriods(), function($periodInfo) { $schedule->periods = XArray::select($scheduleInfo->getTimePeriods(), function($periodInfo) {
$period = new stdClass; $period = new stdClass;
$period->start = str_replace('+00:00', 'Z', date(\DateTime::ATOM, $periodInfo->getStartTime())); $period->start = str_replace('+00:00', 'Z', date(DateTimeInterface::ATOM, $periodInfo->getStartTime()));
$period->end = str_replace('+00:00', 'Z', date(\DateTime::ATOM, $periodInfo->getEndTime())); $period->end = str_replace('+00:00', 'Z', date(DateTimeInterface::ATOM, $periodInfo->getEndTime()));
return $period; return $period;
}); });
@ -199,8 +200,8 @@ class SplatoonRoutes extends RouteHandler {
$fest->id = $festInfo->getLocalId(); $fest->id = $festInfo->getLocalId();
$fest->region = $festInfo->getRegion(); $fest->region = $festInfo->getRegion();
$fest->state = $festInfo->getState(); $fest->state = $festInfo->getState();
$fest->start = str_replace('+00:00', 'Z', date(\DateTime::ATOM, $festInfo->getStartTime())); $fest->start = str_replace('+00:00', 'Z', date(DateTimeInterface::ATOM, $festInfo->getStartTime()));
$fest->end = str_replace('+00:00', 'Z', date(\DateTime::ATOM, $festInfo->getEndTime())); $fest->end = str_replace('+00:00', 'Z', date(DateTimeInterface::ATOM, $festInfo->getEndTime()));
$fest->title = $festInfo->getTitle(); $fest->title = $festInfo->getTitle();
$fest->image = $festInfo->getImage(); $fest->image = $festInfo->getImage();
$fest->can_vote = $festInfo->canVote(); $fest->can_vote = $festInfo->canVote();