From 03cf09937ba36da4d8178bf8cd6ff4015d8b8190 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 12 Feb 2023 12:26:55 +0000 Subject: [PATCH] fixes --- composer.json | 2 +- composer.lock | 21 ++++++++++++--------- core/imageboard/image.php | 4 ++-- ext/autocomplete/main.php | 2 +- ext/rule34/main.php | 2 +- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 5caa462b..e298f5ab 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "bower-asset/jquery-timeago" : "^1.5", "bower-asset/js-cookie" : "^2.1", "psr/simple-cache" : "^1.0", - "sabre/cache" : "^2.0", + "sabre/cache" : "^2.0.1", "naroga/redis-cache": "dev-master" }, diff --git a/composer.lock b/composer.lock index c86643c8..85cf658f 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": "d010608b1d82774bd3444615496f254f", + "content-hash": "8c41348f24ac414b8a2f9efafc3d30b1", "packages": [ { "name": "bower-asset/jquery", @@ -449,16 +449,16 @@ }, { "name": "sabre/cache", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sabre-io/cache.git", - "reference": "8120da1320b4e0288fa2ff49cebb1a8221641faa" + "reference": "a843741b85025d8674bf4713121cae60172e6f86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/cache/zipball/8120da1320b4e0288fa2ff49cebb1a8221641faa", - "reference": "8120da1320b4e0288fa2ff49cebb1a8221641faa", + "url": "https://api.github.com/repos/sabre-io/cache/zipball/a843741b85025d8674bf4713121cae60172e6f86", + "reference": "a843741b85025d8674bf4713121cae60172e6f86", "shasum": "" }, "require": { @@ -469,9 +469,12 @@ "psr/simple-cache-implementation": "~1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.10.0", - "phpstan/phpstan": "^1.8", - "phpunit/phpunit": "^9.0" + "friendsofphp/php-cs-fixer": "^3.14.0", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-phpunit": "^1.3", + "phpstan/phpstan-strict-rules": "^1.4", + "phpunit/phpunit": "^9.6" }, "type": "library", "autoload": { @@ -508,7 +511,7 @@ "issues": "https://github.com/sabre-io/cache/issues", "source": "https://github.com/fruux/sabre-skel" }, - "time": "2022-08-23T08:05:52+00:00" + "time": "2023-02-09T23:47:10+00:00" }, { "name": "shish/eventtracer-php", diff --git a/core/imageboard/image.php b/core/imageboard/image.php index 4f5ece3b..b36d2cdd 100644 --- a/core/imageboard/image.php +++ b/core/imageboard/image.php @@ -159,7 +159,7 @@ class Image * @param String[] $tags * @return Image[] */ - #[Query(name: "posts", type: "[Post]", args: ["tags" => "[string]"])] + #[Query(name: "posts", type: "[Post!]!", args: ["tags" => "[string!]"])] public static function find_images(?int $start = 0, ?int $limit = null, array $tags=[]): array { $result = self::find_images_internal($start, $limit, $tags); @@ -466,7 +466,7 @@ class Image * * @return String[] */ - #[Field(name: "tags", type: "[string]")] + #[Field(name: "tags", type: "[string!]!")] public function get_tag_array(): array { global $database; diff --git a/ext/autocomplete/main.php b/ext/autocomplete/main.php index 8e4d50fd..5c222a1e 100644 --- a/ext/autocomplete/main.php +++ b/ext/autocomplete/main.php @@ -50,7 +50,7 @@ class AutoComplete extends Extension return []; } - # temporary workaround for https://github.com/sabre-io/cache/issues/48 + # memcache keys can't contain spaces $cache_key = str_replace(' ', '+', "autocomplete-$search"); $limitSQL = ""; $search = str_replace('_', '\_', $search); diff --git a/ext/rule34/main.php b/ext/rule34/main.php index 800eeae3..9e3758d7 100644 --- a/ext/rule34/main.php +++ b/ext/rule34/main.php @@ -105,7 +105,7 @@ class Rule34 extends Extension { global $database, $page, $user; - # Database might not be connected at this point... + # Database might not be connected at this point... #$database->set_timeout(DATABASE_TIMEOUT+15000); // deleting users can take a while if (function_exists("sd_notify_watchdog")) {