From 38501ce4f265c423f9ab9480809b167ec854b4ba Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 25 Dec 2019 21:35:34 -0500 Subject: [PATCH 01/50] Add Newsie to documented clients --- docs/en/040_Compatible_Clients.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/en/040_Compatible_Clients.md b/docs/en/040_Compatible_Clients.md index 279c25f5..b61e8211 100644 --- a/docs/en/040_Compatible_Clients.md +++ b/docs/en/040_Compatible_Clients.md @@ -224,6 +224,16 @@ The Arsse does not at this time have any first party clients. However, because T

+ + Newsie + Ubuntu Touch + ✔ + ✘ + ✘ + +

Does not support HTTP authentication.

+ + ReadKit macOS From fb2602fe04d6b8db6791dce763d515c941872bfa Mon Sep 17 00:00:00 2001 From: "J. King" Date: Fri, 27 Dec 2019 09:00:22 -0500 Subject: [PATCH 02/50] Don't load actual configuration during CLI tests --- lib/CLI.php | 8 ++++++-- tests/cases/CLI/TestCLI.php | 31 ++++++++++--------------------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/lib/CLI.php b/lib/CLI.php index 702b9f52..58bacedf 100644 --- a/lib/CLI.php +++ b/lib/CLI.php @@ -147,6 +147,7 @@ USAGE_TEXT; return ""; } + /** @codeCoverageIgnore */ protected function loadConf(): bool { $conf = file_exists(BASE."config.php") ? new Conf(BASE."config.php") : new Conf; Arsse::load($conf); @@ -219,7 +220,8 @@ USAGE_TEXT; } protected function userManage($args): int { - switch ($this->command(["add", "remove", "set-pass", "unset-pass", "list", "auth"], $args)) { + $cmd = $this->command(["add", "remove", "set-pass", "unset-pass", "list", "auth"], $args); + switch ($cmd) { case "add": return $this->userAddOrSetPassword("add", $args[""], $args[""]); case "set-pass": @@ -247,8 +249,10 @@ USAGE_TEXT; case "list": case "": return $this->userList(); + default: + throw new Exception("constantUnknown", $cmd); // @codeCoverageIgnore } - } // @codeCoverageIgnore + } protected function userAddOrSetPassword(string $method, string $user, string $password = null, string $oldpass = null): int { $passwd = Arsse::$user->$method(...array_slice(func_get_args(), 1)); diff --git a/tests/cases/CLI/TestCLI.php b/tests/cases/CLI/TestCLI.php index 0009d405..a0b4197a 100644 --- a/tests/cases/CLI/TestCLI.php +++ b/tests/cases/CLI/TestCLI.php @@ -18,9 +18,10 @@ use JKingWeb\Arsse\ImportExport\OPML; /** @covers \JKingWeb\Arsse\CLI */ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { public function setUp(): void { - self::clearData(false); + self::clearData(); $this->cli = \Phake::partialMock(CLI::class); \Phake::when($this->cli)->logError->thenReturn(null); + \Phake::when($this->cli)->loadConf->thenReturn(true); } public function assertConsole(CLI $cli, string $command, int $exitStatus, string $output = "", bool $pattern = false) { @@ -34,27 +35,15 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exitStatus, $cli->dispatch($argv)); } - public function assertLoaded(bool $loaded) { - $r = new \ReflectionClass(Arsse::class); - $props = array_keys($r->getStaticProperties()); - foreach ($props as $prop) { - if ($loaded) { - $this->assertNotNull(Arsse::$$prop, "Global $prop object should be loaded"); - } else { - $this->assertNull(Arsse::$$prop, "Global $prop object should not be loaded"); - } - } - } - public function testPrintVersion() { $this->assertConsole($this->cli, "arsse.php --version", 0, Arsse::VERSION); - $this->assertLoaded(false); + \Phake::verify($this->cli, \Phake::times(0))->loadConf; } /** @dataProvider provideHelpText */ public function testPrintHelp(string $cmd, string $name) { $this->assertConsole($this->cli, $cmd, 0, str_replace("arsse.php", $name, CLI::USAGE)); - $this->assertLoaded(false); + \Phake::verify($this->cli, \Phake::times(0))->loadConf; } public function provideHelpText(): iterable { @@ -73,7 +62,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when($srv)->watch->thenReturn(new \DateTimeImmutable); \Phake::when($this->cli)->getInstance(Service::class)->thenReturn($srv); $this->assertConsole($this->cli, "arsse.php daemon", 0); - $this->assertLoaded(true); + \Phake::verify($this->cli)->loadConf; \Phake::verify($srv)->watch(true); \Phake::verify($this->cli)->getInstance(Service::class); } @@ -83,7 +72,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when($srv)->watch->thenReturn(new \DateTimeImmutable); \Phake::when($this->cli)->getInstance(Service::class)->thenReturn($srv); $this->assertConsole($this->cli, "arsse.php feed refresh-all", 0); - $this->assertLoaded(true); + \Phake::verify($this->cli)->loadConf; \Phake::verify($srv)->watch(false); \Phake::verify($this->cli)->getInstance(Service::class); } @@ -94,7 +83,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when(Arsse::$db)->feedUpdate(1, true)->thenReturn(true); \Phake::when(Arsse::$db)->feedUpdate(2, true)->thenThrow(new \JKingWeb\Arsse\Feed\Exception("http://example.com/", new \PicoFeed\Client\InvalidUrlException)); $this->assertConsole($this->cli, $cmd, $exitStatus, $output); - $this->assertLoaded(true); + \Phake::verify($this->cli)->loadConf; \Phake::verify(Arsse::$db)->feedUpdate; } @@ -113,7 +102,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when($conf)->exportFile("bad.conf", true)->thenThrow(new \JKingWeb\Arsse\Conf\Exception("fileUnwritable")); \Phake::when($this->cli)->getInstance(Conf::class)->thenReturn($conf); $this->assertConsole($this->cli, $cmd, $exitStatus); - $this->assertLoaded(false); + \Phake::verify($this->cli, \Phake::times(0))->loadConf; \Phake::verify($conf)->exportFile($file, true); } @@ -288,7 +277,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when($opml)->exportFile("bad.opml", $user, $flat)->thenThrow(new \JKingWeb\Arsse\ImportExport\Exception("fileUnwritable")); \Phake::when($this->cli)->getInstance(OPML::class)->thenReturn($opml); $this->assertConsole($this->cli, $cmd, $exitStatus); - $this->assertLoaded(true); + \Phake::verify($this->cli)->loadConf; \Phake::verify($opml)->exportFile($file, $user, $flat); } @@ -329,7 +318,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when($opml)->importFile("bad.opml", $user, $flat, $replace)->thenThrow(new \JKingWeb\Arsse\ImportExport\Exception("fileUnreadable")); \Phake::when($this->cli)->getInstance(OPML::class)->thenReturn($opml); $this->assertConsole($this->cli, $cmd, $exitStatus); - $this->assertLoaded(true); + \Phake::verify($this->cli)->loadConf; \Phake::verify($opml)->importFile($file, $user, $flat, $replace); } From c4ee7254cda44961f0b2ea88647b35a8a67df821 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 8 Jan 2020 12:02:43 -0500 Subject: [PATCH 03/50] Refactor some tests to use data providers --- lib/REST/NextcloudNews/V1_2.php | 1 + tests/cases/REST/NextcloudNews/TestV1_2.php | 322 +++++++++----------- 2 files changed, 145 insertions(+), 178 deletions(-) diff --git a/lib/REST/NextcloudNews/V1_2.php b/lib/REST/NextcloudNews/V1_2.php index 8e850d28..f0d2177a 100644 --- a/lib/REST/NextcloudNews/V1_2.php +++ b/lib/REST/NextcloudNews/V1_2.php @@ -14,6 +14,7 @@ use JKingWeb\Arsse\AbstractException; use JKingWeb\Arsse\Db\ExceptionInput; use JKingWeb\Arsse\Feed\Exception as FeedException; use JKingWeb\Arsse\Misc\HTTP; +use JKingWeb\Arsse\REST\Exception; use JKingWeb\Arsse\REST\Exception404; use JKingWeb\Arsse\REST\Exception405; use Psr\Http\Message\ServerRequestInterface; diff --git a/tests/cases/REST/NextcloudNews/TestV1_2.php b/tests/cases/REST/NextcloudNews/TestV1_2.php index 9c8fd5a5..090e90fe 100644 --- a/tests/cases/REST/NextcloudNews/TestV1_2.php +++ b/tests/cases/REST/NextcloudNews/TestV1_2.php @@ -16,13 +16,13 @@ use JKingWeb\Arsse\Db\ExceptionInput; use JKingWeb\Arsse\Db\Transaction; use JKingWeb\Arsse\REST\NextcloudNews\V1_2; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\ServerRequest; use Zend\Diactoros\Response\JsonResponse as Response; use Zend\Diactoros\Response\EmptyResponse; /** @covers \JKingWeb\Arsse\REST\NextcloudNews\V1_2 */ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { protected $h; + protected $transaction; protected $feeds = [ // expected sample output of a feed list from the database, and the resultant expected transformation by the REST handler 'db' => [ [ @@ -298,10 +298,16 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { ], ]; - protected function req(string $method, string $target, string $data = "", array $headers = [], bool $authenticated = true): ResponseInterface { + protected function req(string $method, string $target, $data = "", array $headers = [], bool $authenticated = true, bool $body = true): ResponseInterface { $prefix = "/index.php/apps/news/api/v1-2"; $url = $prefix.$target; - $req = $this->serverRequest($method, $url, $prefix, $headers, [], $data, "application/json", [], $authenticated ? "john.doe@example.com" : ""); + if ($body) { + $params = []; + } else { + $params = $data; + $data = []; + } + $req = $this->serverRequest($method, $url, $prefix, $headers, [], $data, "application/json", $params, $authenticated ? "john.doe@example.com" : ""); return $this->h->dispatch($req); } @@ -313,7 +319,9 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { Arsse::$user->id = "john.doe@example.com"; // create a mock database interface Arsse::$db = \Phake::mock(Database::class); - \Phake::when(Arsse::$db)->begin->thenReturn(\Phake::mock(Transaction::class)); + $this->transaction = \Phake::mock(Transaction::class); + \Phake::when(Arsse::$db)->begin->thenReturn($this->transaction); + //initialize a handler $this->h = new V1_2(); } @@ -330,50 +338,37 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("GET", "/", "", [], false)); } - public function testRespondToInvalidPaths() { - $errs = [ - 404 => [ - ['GET', "/"], - ['PUT', "/"], - ['POST', "/"], - ['DELETE', "/"], - ['GET', "/folders/1/invalid"], - ['PUT', "/folders/1/invalid"], - ['POST', "/folders/1/invalid"], - ['DELETE', "/folders/1/invalid"], - ['GET', "/version/invalid"], - ['PUT', "/version/invalid"], - ['POST', "/version/invalid"], - ['DELETE', "/version/invalid"], - ], - 405 => [ - 'GET' => [ - ['PUT', "/version"], - ['POST', "/version"], - ['DELETE', "/version"], - ], - 'GET, POST' => [ - ['PUT', "/folders"], - ['DELETE', "/folders"], - ], - 'PUT, DELETE' => [ - ['GET', "/folders/1"], - ['POST', "/folders/1"], - ], - ], + /** @dataProvider provideInvalidPaths */ + public function testRespondToInvalidPaths($path, $method, $code, $allow = null) { + $exp = new EmptyResponse($code, $allow ? ['Allow' => $allow] : []); + $this->assertMessage($exp, $this->req($method, $path)); + } + + public function provideInvalidPaths() { + return [ + ["/", "GET", 404], + ["/", "POST", 404], + ["/", "PUT", 404], + ["/", "DELETE", 404], + ["/", "OPTIONS", 404], + ["/version/invalid", "GET", 404], + ["/version/invalid", "POST", 404], + ["/version/invalid", "PUT", 404], + ["/version/invalid", "DELETE", 404], + ["/version/invalid", "OPTIONS", 404], + ["/folders/1/invalid", "GET", 404], + ["/folders/1/invalid", "POST", 404], + ["/folders/1/invalid", "PUT", 404], + ["/folders/1/invalid", "DELETE", 404], + ["/folders/1/invalid", "OPTIONS", 404], + ["/version", "POST", 405, "GET"], + ["/version", "PUT", 405, "GET"], + ["/version", "DELETE", 405, "GET"], + ["/folders", "PUT", 405, "GET, POST"], + ["/folders", "DELETE", 405, "GET, POST"], + ["/folders/1", "GET", 405, "PUT, DELETE"], + ["/folders/1", "POST", 405, "PUT, DELETE"], ]; - foreach ($errs[404] as $req) { - $exp = new EmptyResponse(404); - list($method, $path) = $req; - $this->assertMessage($exp, $this->req($method, $path), "$method call to $path did not return 404."); - } - foreach ($errs[405] as $allow => $cases) { - $exp = new EmptyResponse(405, ['Allow' => $allow]); - foreach ($cases as $req) { - list($method, $path) = $req; - $this->assertMessage($exp, $this->req($method, $path), "$method call to $path did not return 405."); - } - } } public function testRespondToInvalidInputTypes() { @@ -384,24 +379,21 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("PUT", "/folders/1", '', ['Content-Type' => null])); } - public function testRespondToOptionsRequests() { + /** @dataProvider provideOptionsRequests */ + public function testRespondToOptionsRequests(string $url, string $allow, string $accept) { $exp = new EmptyResponse(204, [ - 'Allow' => "HEAD,GET,POST", - 'Accept' => "application/json", + 'Allow' => $allow, + 'Accept' => $accept, ]); - $this->assertMessage($exp, $this->req("OPTIONS", "/feeds")); - $exp = new EmptyResponse(204, [ - 'Allow' => "DELETE", - 'Accept' => "application/json", - ]); - $this->assertMessage($exp, $this->req("OPTIONS", "/feeds/2112")); - $exp = new EmptyResponse(204, [ - 'Allow' => "HEAD,GET", - 'Accept' => "application/json", - ]); - $this->assertMessage($exp, $this->req("OPTIONS", "/user")); - $exp = new EmptyResponse(404); - $this->assertMessage($exp, $this->req("OPTIONS", "/invalid/path")); + $this->assertMessage($exp, $this->req("OPTIONS", $url)); + } + + public function provideOptionsRequests() { + return [ + ["/feeds", "HEAD,GET,POST", "application/json"], + ["/feeds/2112", "DELETE", "application/json"], + ["/user", "HEAD,GET", "application/json"], + ]; } public function testListFolders() { @@ -413,56 +405,40 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { ['id' => 1, 'name' => "Software"], ['id' => 12, 'name' => "Hardware"], ]; - \Phake::when(Arsse::$db)->folderList(Arsse::$user->id, null, false)->thenReturn(new Result([]))->thenReturn(new Result($this->v($list))); - $exp = new Response(['folders' => []]); - $this->assertMessage($exp, $this->req("GET", "/folders")); + \Phake::when(Arsse::$db)->folderList(Arsse::$user->id, null, false)->thenReturn(new Result($this->v($list))); $exp = new Response(['folders' => $out]); $this->assertMessage($exp, $this->req("GET", "/folders")); } - public function testAddAFolder() { - $in = [ - ["name" => "Software"], - ["name" => "Hardware"], + /** @dataProvider provideFolderCreations */ + public function testAddAFolder(array $input, bool $body, $output, ResponseInterface $exp) { + if ($output instanceof ExceptionInput) { + \Phake::when(Arsse::$db)->folderAdd->thenThrow($output); + } else { + \Phake::when(Arsse::$db)->folderAdd->thenReturn($output); + \Phake::when(Arsse::$db)->folderPropertiesGet->thenReturn($this->v(['id' => $output, 'name' => $input['name'], 'parent' => null])); + } + $act = $this->req("POST", "/folders", $input, [], true, $body); + $this->assertMessage($exp, $act); + \Phake::verify(Arsse::$db)->folderAdd(Arsse::$user->id, $input); + if ($output instanceof ExceptionInput) { + \Phake::verify(Arsse::$db, \Phake::times(0))->folderPropertiesGet; + } else { + \Phake::verify(Arsse::$db)->folderPropertiesGet(Arsse::$user->id, $output); + } + } + + public function provideFolderCreations() { + return [ + [['name' => "Software"], true, 1, new Response(['folders' => [['id'=> 1, 'name' => "Software"]]])], + [['name' => "Software"], false, 1, new Response(['folders' => [['id'=> 1, 'name' => "Software"]]])], + [['name' => "Hardware"], true, "2", new Response(['folders' => [['id'=> 2, 'name' => "Hardware"]]])], + [['name' => "Hardware"], false, "2", new Response(['folders' => [['id'=> 2, 'name' => "Hardware"]]])], + [['name' => "Software"], true, new ExceptionInput("constraintViolation"), new EmptyResponse(409)], + [['name' => ""], true, new ExceptionInput("whitespace"), new EmptyResponse(422)], + [['name' => " "], true, new ExceptionInput("whitespace"), new EmptyResponse(422)], + [['name' => null], true, new ExceptionInput("missing"), new EmptyResponse(422)], ]; - $db = [ - ['id' => 1, 'name' => "Software", 'parent' => null], - ['id' => "2", 'name' => "Hardware", 'parent' => null], - ]; - $out = [ - ['id' => 1, 'name' => "Software"], - ['id' => 2, 'name' => "Hardware"], - ]; - // set of various mocks for testing - \Phake::when(Arsse::$db)->folderAdd($this->anything(), $this->anything())->thenThrow(new \Exception); - \Phake::when(Arsse::$db)->folderAdd(Arsse::$user->id, $in[0])->thenReturn(1)->thenThrow(new ExceptionInput("constraintViolation")); // error on the second call - \Phake::when(Arsse::$db)->folderAdd(Arsse::$user->id, $in[1])->thenReturn(2)->thenThrow(new ExceptionInput("constraintViolation")); // error on the second call - \Phake::when(Arsse::$db)->folderPropertiesGet(Arsse::$user->id, 1)->thenReturn($this->v($db[0])); - \Phake::when(Arsse::$db)->folderPropertiesGet(Arsse::$user->id, 2)->thenReturn($this->v($db[1])); - // set up mocks that produce errors - \Phake::when(Arsse::$db)->folderAdd(Arsse::$user->id, [])->thenThrow(new ExceptionInput("missing")); - \Phake::when(Arsse::$db)->folderAdd(Arsse::$user->id, ['name' => ""])->thenThrow(new ExceptionInput("missing")); - \Phake::when(Arsse::$db)->folderAdd(Arsse::$user->id, ['name' => " "])->thenThrow(new ExceptionInput("whitespace")); - // correctly add two folders, using different means - $exp = new Response(['folders' => [$out[0]]]); - $this->assertMessage($exp, $this->req("POST", "/folders", json_encode($in[0]))); - $exp = new Response(['folders' => [$out[1]]]); - $this->assertMessage($exp, $this->req("POST", "/folders?name=Hardware")); - \Phake::verify(Arsse::$db)->folderAdd(Arsse::$user->id, $in[0]); - \Phake::verify(Arsse::$db)->folderAdd(Arsse::$user->id, $in[1]); - \Phake::verify(Arsse::$db)->folderPropertiesGet(Arsse::$user->id, 1); - \Phake::verify(Arsse::$db)->folderPropertiesGet(Arsse::$user->id, 2); - // test bad folder names - $exp = new EmptyResponse(422); - $this->assertMessage($exp, $this->req("POST", "/folders")); - $this->assertMessage($exp, $this->req("POST", "/folders", '{"name":""}')); - $this->assertMessage($exp, $this->req("POST", "/folders", '{"name":" "}')); - $this->assertMessage($exp, $this->req("POST", "/folders", '{"name":{}}')); - // try adding the same two folders again - $exp = new EmptyResponse(409); - $this->assertMessage($exp, $this->req("POST", "/folders?name=Software")); - $exp = new EmptyResponse(409); - $this->assertMessage($exp, $this->req("POST", "/folders", json_encode($in[1]))); } public function testRemoveAFolder() { @@ -475,32 +451,26 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db, \Phake::times(2))->folderRemove(Arsse::$user->id, 1); } - public function testRenameAFolder() { - $in = [ - ["name" => "Software"], - ["name" => "Software"], - ["name" => ""], - ["name" => " "], - [], + /** @dataProvider provideFolderRenamings */ + public function testRenameAFolder(array $input, int $id, $output, ResponseInterface $exp) { + if ($output instanceof ExceptionInput) { + \Phake::when(Arsse::$db)->folderPropertiesSet->thenThrow($output); + } else { + \Phake::when(Arsse::$db)->folderPropertiesSet->thenReturn($output); + } + $act = $this->req("PUT", "/folders/$id", $input); + $this->assertMessage($exp, $act); + \Phake::verify(Arsse::$db)->folderPropertiesSet(Arsse::$user->id, $id, $input); + } + public function provideFolderRenamings() { + return [ + [['name' => "Software"], 1, true, new EmptyResponse(204)], + [['name' => "Software"], 2, new ExceptionInput("constraintViolation"), new EmptyResponse(409)], + [['name' => "Software"], 3, new ExceptionInput("subjectMissing"), new EmptyResponse(404)], + [['name' => ""], 2, new ExceptionInput("whitespace"), new EmptyResponse(422)], + [['name' => " "], 2, new ExceptionInput("whitespace"), new EmptyResponse(422)], + [['name' => null], 2, new ExceptionInput("missing"), new EmptyResponse(422)], ]; - \Phake::when(Arsse::$db)->folderPropertiesSet(Arsse::$user->id, 1, $in[0])->thenReturn(true); - \Phake::when(Arsse::$db)->folderPropertiesSet(Arsse::$user->id, 2, $in[1])->thenThrow(new ExceptionInput("constraintViolation")); - \Phake::when(Arsse::$db)->folderPropertiesSet(Arsse::$user->id, 1, $in[2])->thenThrow(new ExceptionInput("missing")); - \Phake::when(Arsse::$db)->folderPropertiesSet(Arsse::$user->id, 1, $in[3])->thenThrow(new ExceptionInput("whitespace")); - \Phake::when(Arsse::$db)->folderPropertiesSet(Arsse::$user->id, 1, $in[4])->thenReturn(true); // this should be stopped by the handler before the request gets to the database - \Phake::when(Arsse::$db)->folderPropertiesSet(Arsse::$user->id, 3, $this->anything())->thenThrow(new ExceptionInput("subjectMissing")); // folder ID 3 does not exist - $exp = new EmptyResponse(204); - $this->assertMessage($exp, $this->req("PUT", "/folders/1", json_encode($in[0]))); - $exp = new EmptyResponse(409); - $this->assertMessage($exp, $this->req("PUT", "/folders/2", json_encode($in[1]))); - $exp = new EmptyResponse(422); - $this->assertMessage($exp, $this->req("PUT", "/folders/1", json_encode($in[2]))); - $exp = new EmptyResponse(422); - $this->assertMessage($exp, $this->req("PUT", "/folders/1", json_encode($in[3]))); - $exp = new EmptyResponse(422); - $this->assertMessage($exp, $this->req("PUT", "/folders/1", json_encode($in[4]))); - $exp = new EmptyResponse(404); - $this->assertMessage($exp, $this->req("PUT", "/folders/3", json_encode($in[0]))); } public function testRetrieveServerVersion() { @@ -530,52 +500,48 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("GET", "/feeds")); } - public function testAddASubscription() { - $in = [ - ['url' => "http://example.com/news.atom", 'folderId' => 3], - ['url' => "http://example.org/news.atom", 'folderId' => 8], - ['url' => "http://example.net/news.atom", 'folderId' => 8], - ['url' => "http://example.net/news.atom", 'folderId' => -1], - [], + /** @dataProvider provideNewSubscriptions */ + public function testAddASubscription(array $input, $id, int $latestEdition, array $output, $moveOutcome, ResponseInterface $exp) { + if ($id instanceof \Exception) { + \Phake::when(Arsse::$db)->subscriptionAdd->thenThrow($id); + } else { + \Phake::when(Arsse::$db)->subscriptionAdd->thenReturn($id); + } + if ($moveOutcome instanceof \Exception) { + \Phake::when(Arsse::$db)->subscriptionPropertiesSet->thenThrow($moveOutcome); + } else { + \Phake::when(Arsse::$db)->subscriptionPropertiesSet->thenReturn($moveOutcome); + } + \Phake::when(Arsse::$db)->subscriptionPropertiesGet->thenReturn($this->v($output)); + \Phake::when(Arsse::$db)->editionLatest->thenReturn($latestEdition); + $act = $this->req("POST", "/feeds", $input); + $this->assertMessage($exp, $act); + \Phake::verify(Arsse::$db)->subscriptionAdd(Arsse::$user->id, $input['url'] ?? ""); + if ($id instanceof \Exception) { + \Phake::verify(Arsse::$db, \Phake::times(0))->subscriptionPropertiesSet; + \Phake::verify(Arsse::$db, \Phake::times(0))->subscriptionPropertiesGet; + \Phake::verify(Arsse::$db, \Phake::times(0))->editionLatest; + } else { + \Phake::verify(Arsse::$db)->subscriptionPropertiesGet(Arsse::$user->id, $id); + \Phake::verify(Arsse::$db)->editionLatest(Arsse::$user->id, (new Context)->subscription($id)); + if ($input['folderId'] ?? 0) { + \Phake::verify(Arsse::$db)->subscriptionPropertiesSet(Arsse::$user->id, $id, ['folder' => (int) $input['folderId']]); + } else { + \Phake::verify(Arsse::$db, \Phake::times(0))->subscriptionPropertiesSet; + } + } + } + + public function provideNewSubscriptions() { + $feedException = new \JKingWeb\Arsse\Feed\Exception("", new \PicoFeed\Reader\SubscriptionNotFoundException); + return [ + [['url' => "http://example.com/news.atom", 'folderId' => 3], 2112, 0, $this->feeds['db'][0], new ExceptionInput("idMissing"), new Response(['feeds' => [$this->feeds['rest'][0]]])], + [['url' => "http://example.org/news.atom", 'folderId' => 8], 42, 4758915, $this->feeds['db'][1], true, new Response(['feeds' => [$this->feeds['rest'][1]], 'newestItemId' => 4758915])], + [['url' => "http://example.com/news.atom", 'folderId' => 3], new ExceptionInput("constraintViolation"), 0, $this->feeds['db'][0], new ExceptionInput("idMissing"), new EmptyResponse(409)], + [['url' => "http://example.org/news.atom", 'folderId' => 8], new ExceptionInput("constraintViolation"), 4758915, $this->feeds['db'][1], true, new EmptyResponse(409)], + [[], $feedException, 0, [], false, new EmptyResponse(422)], + [['url' => "http://example.net/news.atom", 'folderId' => -1], 47, 2112, $this->feeds['db'][2], new ExceptionInput("typeViolation"), new Response(['feeds' => [$this->feeds['rest'][2]], 'newestItemId' => 2112])], ]; - $out = [ - ['feeds' => [$this->feeds['rest'][0]]], - ['feeds' => [$this->feeds['rest'][1]], 'newestItemId' => 4758915], - ['feeds' => [$this->feeds['rest'][2]], 'newestItemId' => 2112], - ]; - // set up the necessary mocks - \Phake::when(Arsse::$db)->subscriptionAdd(Arsse::$user->id, "http://example.com/news.atom")->thenReturn(2112)->thenThrow(new ExceptionInput("constraintViolation")); // error on the second call - \Phake::when(Arsse::$db)->subscriptionAdd(Arsse::$user->id, "http://example.org/news.atom")->thenReturn(42)->thenThrow(new ExceptionInput("constraintViolation")); // error on the second call - \Phake::when(Arsse::$db)->subscriptionAdd(Arsse::$user->id, "")->thenThrow(new \JKingWeb\Arsse\Feed\Exception("", new \PicoFeed\Reader\SubscriptionNotFoundException)); - \Phake::when(Arsse::$db)->subscriptionPropertiesGet(Arsse::$user->id, 2112)->thenReturn($this->v($this->feeds['db'][0])); - \Phake::when(Arsse::$db)->subscriptionPropertiesGet(Arsse::$user->id, 42)->thenReturn($this->v($this->feeds['db'][1])); - \Phake::when(Arsse::$db)->subscriptionPropertiesGet(Arsse::$user->id, 47)->thenReturn($this->v($this->feeds['db'][2])); - \Phake::when(Arsse::$db)->editionLatest(Arsse::$user->id, (new Context)->subscription(2112))->thenReturn(0); - \Phake::when(Arsse::$db)->editionLatest(Arsse::$user->id, (new Context)->subscription(42))->thenReturn(4758915); - \Phake::when(Arsse::$db)->editionLatest(Arsse::$user->id, (new Context)->subscription(47))->thenReturn(2112); - \Phake::when(Arsse::$db)->subscriptionPropertiesSet(Arsse::$user->id, 2112, ['folder' => 3])->thenThrow(new ExceptionInput("idMissing")); // folder ID 3 does not exist - \Phake::when(Arsse::$db)->subscriptionPropertiesSet(Arsse::$user->id, 42, ['folder' => 8])->thenReturn(true); - \Phake::when(Arsse::$db)->subscriptionPropertiesSet(Arsse::$user->id, 47, ['folder' => -1])->thenThrow(new ExceptionInput("typeViolation")); // folder ID -1 is invalid - // set up a mock for a bad feed which succeeds the second time - \Phake::when(Arsse::$db)->subscriptionAdd(Arsse::$user->id, "http://example.net/news.atom")->thenThrow(new \JKingWeb\Arsse\Feed\Exception("http://example.net/news.atom", new \PicoFeed\Client\InvalidUrlException()))->thenReturn(47); - // add the subscriptions - $exp = new Response($out[0]); - $this->assertMessage($exp, $this->req("POST", "/feeds", json_encode($in[0]))); - $exp = new Response($out[1]); - $this->assertMessage($exp, $this->req("POST", "/feeds", json_encode($in[1]))); - // try to add them a second time - $exp = new EmptyResponse(409); - $this->assertMessage($exp, $this->req("POST", "/feeds", json_encode($in[0]))); - $this->assertMessage($exp, $this->req("POST", "/feeds", json_encode($in[1]))); - // try to add a bad feed - $exp = new EmptyResponse(422); - $this->assertMessage($exp, $this->req("POST", "/feeds", json_encode($in[2]))); - // try again (this will succeed), with an invalid folder ID - $exp = new Response($out[2]); - $this->assertMessage($exp, $this->req("POST", "/feeds", json_encode($in[3]))); - // try to add no feed - $exp = new EmptyResponse(422); - $this->assertMessage($exp, $this->req("POST", "/feeds", json_encode($in[4]))); } public function testRemoveASubscription() { From 14ef33879bbaec4c62bd47b92d9eefaa6abc2448 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sun, 19 Jan 2020 18:13:32 -0500 Subject: [PATCH 04/50] Re-arrange database tests by engine --- tests/cases/REST/NextcloudNews/TestV1_2.php | 1 + tests/phpunit.dist.xml | 28 ++++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/tests/cases/REST/NextcloudNews/TestV1_2.php b/tests/cases/REST/NextcloudNews/TestV1_2.php index 090e90fe..af3d9d54 100644 --- a/tests/cases/REST/NextcloudNews/TestV1_2.php +++ b/tests/cases/REST/NextcloudNews/TestV1_2.php @@ -462,6 +462,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $act); \Phake::verify(Arsse::$db)->folderPropertiesSet(Arsse::$user->id, $id, $input); } + public function provideFolderRenamings() { return [ [['name' => "Software"], 1, true, new EmptyResponse(204)], diff --git a/tests/phpunit.dist.xml b/tests/phpunit.dist.xml index 97084427..6732b56a 100644 --- a/tests/phpunit.dist.xml +++ b/tests/phpunit.dist.xml @@ -59,54 +59,52 @@ cases/Feed/TestFetching.php cases/Feed/TestFeed.php - + cases/Db/TestTransaction.php cases/Db/TestResultAggregate.php cases/Db/TestResultEmpty.php - + cases/Database/TestDatabase.php + + cases/Db/SQLite3/TestResult.php cases/Db/SQLite3/TestStatement.php cases/Db/SQLite3/TestCreation.php cases/Db/SQLite3/TestDriver.php cases/Db/SQLite3/TestUpdate.php - + cases/Db/SQLite3/TestDatabase.php cases/Db/SQLite3PDO/TestResult.php cases/Db/SQLite3PDO/TestStatement.php cases/Db/SQLite3PDO/TestCreation.php cases/Db/SQLite3PDO/TestDriver.php cases/Db/SQLite3PDO/TestUpdate.php - + cases/Db/SQLite3PDO/TestDatabase.php + + cases/Db/PostgreSQL/TestResult.php cases/Db/PostgreSQL/TestStatement.php cases/Db/PostgreSQL/TestCreation.php cases/Db/PostgreSQL/TestDriver.php cases/Db/PostgreSQL/TestUpdate.php - + cases/Db/PostgreSQL/TestDatabase.php cases/Db/PostgreSQLPDO/TestResult.php cases/Db/PostgreSQLPDO/TestStatement.php cases/Db/PostgreSQLPDO/TestCreation.php cases/Db/PostgreSQLPDO/TestDriver.php cases/Db/PostgreSQLPDO/TestUpdate.php - + cases/Db/PostgreSQLPDO/TestDatabase.php + + cases/Db/MySQL/TestResult.php cases/Db/MySQL/TestStatement.php cases/Db/MySQL/TestCreation.php cases/Db/MySQL/TestDriver.php cases/Db/MySQL/TestUpdate.php - + cases/Db/MySQL/TestDatabase.php cases/Db/MySQLPDO/TestResult.php cases/Db/MySQLPDO/TestStatement.php cases/Db/MySQLPDO/TestCreation.php cases/Db/MySQLPDO/TestDriver.php cases/Db/MySQLPDO/TestUpdate.php - - - cases/Database/TestDatabase.php - cases/Db/SQLite3/TestDatabase.php - cases/Db/SQLite3PDO/TestDatabase.php - cases/Db/PostgreSQL/TestDatabase.php - cases/Db/PostgreSQLPDO/TestDatabase.php - cases/Db/MySQL/TestDatabase.php cases/Db/MySQLPDO/TestDatabase.php From 2fa2799b64fd12f08fbfbc0a815279a0606aba67 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 20 Jan 2020 00:34:02 -0500 Subject: [PATCH 05/50] Require PHP 7.1 in Composer In reality we have unwittingly required PHP 7.1 for some time --- composer.json | 11 +- composer.lock | 355 +++++++++++++++++++------------ vendor-bin/csfixer/composer.lock | 43 ++-- vendor-bin/daux/composer.lock | 82 +++---- vendor-bin/phpunit/composer.lock | 47 ++-- vendor-bin/robo/composer.lock | 52 ++--- 6 files changed, 337 insertions(+), 253 deletions(-) diff --git a/composer.json b/composer.json index 3fdd1c71..0fef64b7 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ ], "require": { - "php": "7.*", + "php": "^7.1", "ext-intl": "*", "ext-json": "*", "ext-hash": "*", @@ -27,12 +27,17 @@ "hosteurope/password-generator": "1.*", "docopt/docopt": "1.*", "jkingweb/druuid": "3.*", - "zendframework/zend-diactoros": "2.*", - "zendframework/zend-httphandlerrunner": "1.*" + "laminas/laminas-diactoros": "2.*", + "laminas/laminas-httphandlerrunner": "1.*" }, "require-dev": { "bamarni/composer-bin-plugin": "*" }, + "config": { + "platform": { + "php": "7.1.33" + } + }, "scripts": { "post-install-cmd": ["@composer bin all install"], "post-update-cmd": ["@composer bin all update"] diff --git a/composer.lock b/composer.lock index c33f781e..bc0f82a0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c2b0698669d89268ffb995a5e1d6667a", + "content-hash": "356cebec1e1e689b4249b661f787b7d9", "packages": [ { "name": "docopt/docopt", - "version": "1.0.2", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/docopt/docopt.php.git", - "reference": "d2ee65c2fe4be78f945a48edd02be45843b39423" + "reference": "bf3683a16e09fa1665e493eb4d5a29469e132a4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/docopt/docopt.php/zipball/d2ee65c2fe4be78f945a48edd02be45843b39423", - "reference": "d2ee65c2fe4be78f945a48edd02be45843b39423", + "url": "https://api.github.com/repos/docopt/docopt.php/zipball/bf3683a16e09fa1665e493eb4d5a29469e132a4f", + "reference": "bf3683a16e09fa1665e493eb4d5a29469e132a4f", "shasum": "" }, "require": { @@ -44,13 +44,13 @@ "role": "Developer" } ], - "description": "Port of Python's docopt for PHP 5.3", + "description": "Port of Python's docopt for PHP >=5.3", "homepage": "http://github.com/docopt/docopt.php", "keywords": [ "cli", "docs" ], - "time": "2015-10-30T03:21:23+00:00" + "time": "2019-12-03T02:48:46+00:00" }, { "name": "hosteurope/password-generator", @@ -138,17 +138,212 @@ "time": "2017-02-09T14:17:01+00:00" }, { - "name": "p3k/picofeed", - "version": "v0.1.38", + "name": "laminas/laminas-diactoros", + "version": "2.2.2", "source": { "type": "git", - "url": "https://github.com/aaronpk/picoFeed.git", - "reference": "989c0bcf2eac016a4104abce1aadff791fc287ab" + "url": "https://github.com/laminas/laminas-diactoros.git", + "reference": "95178c4751d737cdf9ab0a9f70a42754ac860e7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aaronpk/picoFeed/zipball/989c0bcf2eac016a4104abce1aadff791fc287ab", - "reference": "989c0bcf2eac016a4104abce1aadff791fc287ab", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/95178c4751d737cdf9ab0a9f70a42754ac860e7b", + "reference": "95178c4751d737cdf9ab0a9f70a42754ac860e7b", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^7.1", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0" + }, + "conflict": { + "phpspec/prophecy": "<1.9.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "replace": { + "zendframework/zend-diactoros": "self.version" + }, + "require-dev": { + "ext-curl": "*", + "ext-dom": "*", + "ext-libxml": "*", + "http-interop/http-factory-tests": "^0.5.0", + "laminas/laminas-coding-standard": "~1.0.0", + "php-http/psr7-integration-tests": "dev-master", + "phpunit/phpunit": "^7.5.18" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev", + "dev-develop": "2.2.x-dev", + "dev-release-1.8": "1.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php", + "src/functions/create_uploaded_file.legacy.php", + "src/functions/marshal_headers_from_sapi.legacy.php", + "src/functions/marshal_method_from_sapi.legacy.php", + "src/functions/marshal_protocol_version_from_sapi.legacy.php", + "src/functions/marshal_uri_from_sapi.legacy.php", + "src/functions/normalize_server.legacy.php", + "src/functions/normalize_uploaded_files.legacy.php", + "src/functions/parse_cookie_header.legacy.php" + ], + "psr-4": { + "Laminas\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://laminas.dev", + "keywords": [ + "http", + "laminas", + "psr", + "psr-7" + ], + "time": "2020-01-07T19:39:26+00:00" + }, + { + "name": "laminas/laminas-httphandlerrunner", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-httphandlerrunner.git", + "reference": "296f5ff35074dd981d1570a66b95596c81808087" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/296f5ff35074dd981d1570a66b95596c81808087", + "reference": "296f5ff35074dd981d1570a66b95596c81808087", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^7.1", + "psr/http-message": "^1.0", + "psr/http-message-implementation": "^1.0", + "psr/http-server-handler": "^1.0" + }, + "replace": { + "zendframework/zend-httphandlerrunner": "self.version" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-diactoros": "^1.7 || ^2.1.1", + "phpunit/phpunit": "^7.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev", + "dev-develop": "1.2.x-dev" + }, + "laminas": { + "config-provider": "Laminas\\HttpHandlerRunner\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Laminas\\HttpHandlerRunner\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.", + "homepage": "https://laminas.dev", + "keywords": [ + "components", + "laminas", + "mezzio", + "psr-15", + "psr-7" + ], + "time": "2019-12-31T17:06:16+00:00" + }, + { + "name": "laminas/laminas-zendframework-bridge", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-zendframework-bridge.git", + "reference": "0fb9675b84a1666ab45182b6c5b29956921e818d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/0fb9675b84a1666ab45182b6c5b29956921e818d", + "reference": "0fb9675b84a1666ab45182b6c5b29956921e818d", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev", + "dev-develop": "1.1.x-dev" + }, + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" + } + }, + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ZendFrameworkBridge\\": "src//" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "keywords": [ + "ZendFramework", + "autoloading", + "laminas", + "zf" + ], + "time": "2020-01-07T22:58:31+00:00" + }, + { + "name": "p3k/picofeed", + "version": "v0.1.35", + "source": { + "type": "git", + "url": "https://github.com/aaronpk/picofeed.git", + "reference": "b2a48acb026df91d2e21dfc8b4edbc1fc48f01f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aaronpk/picofeed/zipball/b2a48acb026df91d2e21dfc8b4edbc1fc48f01f1", + "reference": "b2a48acb026df91d2e21dfc8b4edbc1fc48f01f1", "shasum": "" }, "require": { @@ -187,8 +382,8 @@ } ], "description": "Modern library to handle RSS/Atom feeds", - "homepage": "https://github.com/miniflux/picoFeed", - "time": "2017-11-30T00:16:58+00:00" + "homepage": "https://github.com/aaronpk/picoFeed", + "time": "2019-01-17T17:26:41+00:00" }, { "name": "psr/http-factory", @@ -345,128 +540,6 @@ ], "time": "2018-10-30T16:46:14+00:00" }, - { - "name": "zendframework/zend-diactoros", - "version": "2.1.5", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "6dcf9e760a6b476f3e9d80abbc9ce9c4aa921f9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/6dcf9e760a6b476f3e9d80abbc9ce9c4aa921f9c", - "reference": "6dcf9e760a6b476f3e9d80abbc9ce9c4aa921f9c", - "shasum": "" - }, - "require": { - "php": "^7.1", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "ext-dom": "*", - "ext-libxml": "*", - "http-interop/http-factory-tests": "^0.5.0", - "php-http/psr7-integration-tests": "dev-master", - "phpunit/phpunit": "^7.0.2", - "zendframework/zend-coding-standard": "~1.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev", - "dev-develop": "2.2.x-dev", - "dev-release-1.8": "1.8.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php" - ], - "psr-4": { - "Zend\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "PSR HTTP Message implementations", - "keywords": [ - "http", - "psr", - "psr-7" - ], - "time": "2019-10-10T17:38:20+00:00" - }, - { - "name": "zendframework/zend-httphandlerrunner", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-httphandlerrunner.git", - "reference": "75fb12751fe9d6e392cce1ee0d687dacae2db787" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-httphandlerrunner/zipball/75fb12751fe9d6e392cce1ee0d687dacae2db787", - "reference": "75fb12751fe9d6e392cce1ee0d687dacae2db787", - "shasum": "" - }, - "require": { - "php": "^7.1", - "psr/http-message": "^1.0", - "psr/http-message-implementation": "^1.0", - "psr/http-server-handler": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0.2", - "zendframework/zend-coding-standard": "~1.0.0", - "zendframework/zend-diactoros": "^1.7 || ^2.1.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev", - "dev-develop": "1.2.x-dev" - }, - "zf": { - "config-provider": "Zend\\HttpHandlerRunner\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Zend\\HttpHandlerRunner\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.", - "keywords": [ - "ZendFramework", - "components", - "expressive", - "psr-15", - "psr-7", - "zf" - ], - "time": "2019-02-19T18:20:34+00:00" - }, { "name": "zendframework/zendxml", "version": "1.2.0", @@ -511,6 +584,7 @@ "xml", "zf" ], + "abandoned": "laminas/laminas-xml", "time": "2019-01-22T19:42:14+00:00" } ], @@ -561,11 +635,14 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "7.*", + "php": "^7.1", "ext-intl": "*", "ext-json": "*", "ext-hash": "*", "ext-dom": "*" }, - "platform-dev": [] + "platform-dev": [], + "platform-overrides": { + "php": "7.1.33" + } } diff --git a/vendor-bin/csfixer/composer.lock b/vendor-bin/csfixer/composer.lock index 6bf072a5..721b3e35 100644 --- a/vendor-bin/csfixer/composer.lock +++ b/vendor-bin/csfixer/composer.lock @@ -8,24 +8,23 @@ "packages": [ { "name": "composer/semver", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e" + "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/46d9139568ccb8d9e7cdd4539cab7347568a5e2e", - "reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e", + "url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de", + "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5", - "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + "phpunit/phpunit": "^4.5 || ^5.0.5" }, "type": "library", "extra": { @@ -66,7 +65,7 @@ "validation", "versioning" ], - "time": "2019-03-19T17:25:45+00:00" + "time": "2020-01-13T12:06:48+00:00" }, { "name": "composer/xdebug-handler", @@ -571,16 +570,16 @@ }, { "name": "symfony/console", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "dae5ef273d700771168ab889d9f8a19b2d206656" + "reference": "fe6e3cd889ca64172d7a742a2eb058541404ef47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/dae5ef273d700771168ab889d9f8a19b2d206656", - "reference": "dae5ef273d700771168ab889d9f8a19b2d206656", + "url": "https://api.github.com/repos/symfony/console/zipball/fe6e3cd889ca64172d7a742a2eb058541404ef47", + "reference": "fe6e3cd889ca64172d7a742a2eb058541404ef47", "shasum": "" }, "require": { @@ -643,11 +642,11 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-12-01T10:51:15+00:00" + "time": "2019-12-17T13:20:22+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -775,7 +774,7 @@ }, { "name": "symfony/filesystem", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -825,7 +824,7 @@ }, { "name": "symfony/finder", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -874,7 +873,7 @@ }, { "name": "symfony/options-resolver", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", @@ -1217,16 +1216,16 @@ }, { "name": "symfony/process", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "1568a2e8370fbc7416ef64eb5a698e4a05db5ff4" + "reference": "ea2dc31b59d63abd9bc2356ac72eb7b3f3469f0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1568a2e8370fbc7416ef64eb5a698e4a05db5ff4", - "reference": "1568a2e8370fbc7416ef64eb5a698e4a05db5ff4", + "url": "https://api.github.com/repos/symfony/process/zipball/ea2dc31b59d63abd9bc2356ac72eb7b3f3469f0e", + "reference": "ea2dc31b59d63abd9bc2356ac72eb7b3f3469f0e", "shasum": "" }, "require": { @@ -1262,7 +1261,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-11-28T14:20:16+00:00" + "time": "2019-12-10T11:06:55+00:00" }, { "name": "symfony/service-contracts", @@ -1324,7 +1323,7 @@ }, { "name": "symfony/stopwatch", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", diff --git a/vendor-bin/daux/composer.lock b/vendor-bin/daux/composer.lock index 116c2b28..4bbbe450 100644 --- a/vendor-bin/daux/composer.lock +++ b/vendor-bin/daux/composer.lock @@ -79,16 +79,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.4.1", + "version": "6.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "0895c932405407fd3a7368b6910c09a24d26db11" + "reference": "43ece0e75098b7ecd8d13918293029e555a50f82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11", - "reference": "0895c932405407fd3a7368b6910c09a24d26db11", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82", + "reference": "43ece0e75098b7ecd8d13918293029e555a50f82", "shasum": "" }, "require": { @@ -103,12 +103,13 @@ "psr/log": "^1.1" }, "suggest": { + "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.3-dev" + "dev-master": "6.5-dev" } }, "autoload": { @@ -141,7 +142,7 @@ "rest", "web service" ], - "time": "2019-10-23T15:58:00+00:00" + "time": "2019-12-23T11:57:10+00:00" }, { "name": "guzzlehttp/promises", @@ -391,16 +392,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.3", + "version": "1.9.5", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", "shasum": "" }, "require": { @@ -435,7 +436,7 @@ "object", "object graph" ], - "time": "2019-08-09T12:45:53+00:00" + "time": "2020-01-17T21:11:47+00:00" }, { "name": "psr/container", @@ -578,16 +579,16 @@ }, { "name": "scrivo/highlight.php", - "version": "v9.15.10.0", + "version": "v9.17.1.0", "source": { "type": "git", "url": "https://github.com/scrivo/highlight.php.git", - "reference": "9ad3adb4456dc91196327498dbbce6aa1ba1239e" + "reference": "5451a9ad6d638559cf2a092880f935c39776134e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/9ad3adb4456dc91196327498dbbce6aa1ba1239e", - "reference": "9ad3adb4456dc91196327498dbbce6aa1ba1239e", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/5451a9ad6d638559cf2a092880f935c39776134e", + "reference": "5451a9ad6d638559cf2a092880f935c39776134e", "shasum": "" }, "require": { @@ -597,7 +598,8 @@ }, "require-dev": { "phpunit/phpunit": "^4.8|^5.7", - "symfony/finder": "^2.8" + "symfony/finder": "^3.4", + "symfony/var-dumper": "^3.4" }, "suggest": { "ext-dom": "Needed to make use of the features in the utilities namespace" @@ -625,7 +627,7 @@ { "name": "Vladimir Jimenez", "homepage": "https://allejo.io", - "role": "Contributor" + "role": "Maintainer" }, { "name": "Martin Folkers", @@ -641,20 +643,20 @@ "highlight.php", "syntax" ], - "time": "2019-08-27T04:27:48+00:00" + "time": "2019-12-13T21:54:06+00:00" }, { "name": "symfony/console", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f0aea3df20d15635b3cb9730ca5eea1c65b7f201" + "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f0aea3df20d15635b3cb9730ca5eea1c65b7f201", - "reference": "f0aea3df20d15635b3cb9730ca5eea1c65b7f201", + "url": "https://api.github.com/repos/symfony/console/zipball/82437719dab1e6bdd28726af14cb345c2ec816d0", + "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0", "shasum": "" }, "require": { @@ -717,20 +719,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-12-01T10:06:17+00:00" + "time": "2019-12-17T10:32:23+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "8bccc59e61b41963d14c3dbdb23181e5c932a1d5" + "reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8bccc59e61b41963d14c3dbdb23181e5c932a1d5", - "reference": "8bccc59e61b41963d14c3dbdb23181e5c932a1d5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/fcae1cff5b57b2a9c3aabefeb1527678705ddb62", + "reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62", "shasum": "" }, "require": { @@ -772,11 +774,11 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2019-11-28T13:33:56+00:00" + "time": "2019-12-19T15:57:49+00:00" }, { "name": "symfony/intl", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/intl.git", @@ -851,7 +853,7 @@ }, { "name": "symfony/mime", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", @@ -1263,16 +1265,16 @@ }, { "name": "symfony/process", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "51c0135ef3f44c5803b33dc60e96bf4f77752726" + "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/51c0135ef3f44c5803b33dc60e96bf4f77752726", - "reference": "51c0135ef3f44c5803b33dc60e96bf4f77752726", + "url": "https://api.github.com/repos/symfony/process/zipball/b84501ad50adb72a94fb460a5b5c91f693e99c9b", + "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b", "shasum": "" }, "require": { @@ -1308,7 +1310,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-11-28T13:33:56+00:00" + "time": "2019-12-06T10:06:46+00:00" }, { "name": "symfony/service-contracts", @@ -1370,16 +1372,16 @@ }, { "name": "symfony/yaml", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "76de473358fe802578a415d5bb43c296cf09d211" + "reference": "a08832b974dd5fafe3085a66d41fe4c84bb2628c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/76de473358fe802578a415d5bb43c296cf09d211", - "reference": "76de473358fe802578a415d5bb43c296cf09d211", + "url": "https://api.github.com/repos/symfony/yaml/zipball/a08832b974dd5fafe3085a66d41fe4c84bb2628c", + "reference": "a08832b974dd5fafe3085a66d41fe4c84bb2628c", "shasum": "" }, "require": { @@ -1425,7 +1427,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2019-11-12T14:51:11+00:00" + "time": "2019-12-10T10:33:21+00:00" }, { "name": "webuni/commonmark-table-extension", diff --git a/vendor-bin/phpunit/composer.lock b/vendor-bin/phpunit/composer.lock index 392331bc..02f49dd1 100644 --- a/vendor-bin/phpunit/composer.lock +++ b/vendor-bin/phpunit/composer.lock @@ -201,16 +201,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.3", + "version": "1.9.5", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", "shasum": "" }, "require": { @@ -245,7 +245,7 @@ "object", "object graph" ], - "time": "2019-08-09T12:45:53+00:00" + "time": "2020-01-17T21:11:47+00:00" }, { "name": "phake/phake", @@ -461,16 +461,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.2", + "version": "4.3.4", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", "shasum": "" }, "require": { @@ -482,6 +482,7 @@ "require-dev": { "doctrine/instantiator": "^1.0.5", "mockery/mockery": "^1.0", + "phpdocumentor/type-resolver": "0.4.*", "phpunit/phpunit": "^6.4" }, "type": "library", @@ -508,7 +509,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-09-12T14:27:41+00:00" + "time": "2019-12-28T18:55:12+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -559,33 +560,33 @@ }, { "name": "phpspec/prophecy", - "version": "1.9.0", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203" + "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc", + "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", + "phpspec/phpspec": "^2.5 || ^3.2", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { @@ -618,7 +619,7 @@ "spy", "stub" ], - "time": "2019-10-03T11:07:50+00:00" + "time": "2019-12-22T21:05:45+00:00" }, { "name": "phpunit/php-code-coverage", @@ -874,16 +875,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.0", + "version": "8.5.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab" + "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3ee1c1fd6fc264480c25b6fb8285edefe1702dab", - "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/018b6ac3c8ab20916db85fa91bf6465acb64d1e0", + "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0", "shasum": "" }, "require": { @@ -953,7 +954,7 @@ "testing", "xunit" ], - "time": "2019-12-06T05:41:38+00:00" + "time": "2020-01-08T08:49:49+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", diff --git a/vendor-bin/robo/composer.lock b/vendor-bin/robo/composer.lock index 7c5979c1..73268710 100644 --- a/vendor-bin/robo/composer.lock +++ b/vendor-bin/robo/composer.lock @@ -786,16 +786,16 @@ }, { "name": "pear/archive_tar", - "version": "1.4.8", + "version": "1.4.9", "source": { "type": "git", "url": "https://github.com/pear/Archive_Tar.git", - "reference": "442bdffb7edb84c898cfd94f7ac8500e49d5bbb5" + "reference": "c5b00053770e1d72128252c62c2c1a12c26639f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/442bdffb7edb84c898cfd94f7ac8500e49d5bbb5", - "reference": "442bdffb7edb84c898cfd94f7ac8500e49d5bbb5", + "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/c5b00053770e1d72128252c62c2c1a12c26639f0", + "reference": "c5b00053770e1d72128252c62c2c1a12c26639f0", "shasum": "" }, "require": { @@ -848,7 +848,7 @@ "archive", "tar" ], - "time": "2019-10-21T13:31:24+00:00" + "time": "2019-12-04T10:17:28+00:00" }, { "name": "pear/console_getopt", @@ -943,16 +943,16 @@ }, { "name": "pear/pear_exception", - "version": "v1.0.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/pear/PEAR_Exception.git", - "reference": "8c18719fdae000b690e3912be401c76e406dd13b" + "reference": "dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/8c18719fdae000b690e3912be401c76e406dd13b", - "reference": "8c18719fdae000b690e3912be401c76e406dd13b", + "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7", + "reference": "dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7", "shasum": "" }, "require": { @@ -968,9 +968,9 @@ } }, "autoload": { - "psr-0": { - "PEAR": "" - } + "classmap": [ + "PEAR/" + ] }, "notification-url": "https://packagist.org/downloads/", "include-path": [ @@ -994,7 +994,7 @@ "keywords": [ "exception" ], - "time": "2015-02-10T20:07:52+00:00" + "time": "2019-12-10T10:24:42+00:00" }, { "name": "psr/container", @@ -1094,16 +1094,16 @@ }, { "name": "symfony/console", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f0aea3df20d15635b3cb9730ca5eea1c65b7f201" + "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f0aea3df20d15635b3cb9730ca5eea1c65b7f201", - "reference": "f0aea3df20d15635b3cb9730ca5eea1c65b7f201", + "url": "https://api.github.com/repos/symfony/console/zipball/82437719dab1e6bdd28726af14cb345c2ec816d0", + "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0", "shasum": "" }, "require": { @@ -1166,11 +1166,11 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-12-01T10:06:17+00:00" + "time": "2019-12-17T10:32:23+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -1298,7 +1298,7 @@ }, { "name": "symfony/filesystem", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -1348,7 +1348,7 @@ }, { "name": "symfony/finder", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -1679,16 +1679,16 @@ }, { "name": "symfony/yaml", - "version": "v4.4.1", + "version": "v4.4.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "76de473358fe802578a415d5bb43c296cf09d211" + "reference": "a08832b974dd5fafe3085a66d41fe4c84bb2628c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/76de473358fe802578a415d5bb43c296cf09d211", - "reference": "76de473358fe802578a415d5bb43c296cf09d211", + "url": "https://api.github.com/repos/symfony/yaml/zipball/a08832b974dd5fafe3085a66d41fe4c84bb2628c", + "reference": "a08832b974dd5fafe3085a66d41fe4c84bb2628c", "shasum": "" }, "require": { @@ -1734,7 +1734,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2019-11-12T14:51:11+00:00" + "time": "2019-12-10T10:33:21+00:00" } ], "packages-dev": [], From 9e1087914ceb61bfde256e6e781ba587195d925f Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 20 Jan 2020 00:36:42 -0500 Subject: [PATCH 06/50] Change tool dependencies to "dev" type --- vendor-bin/csfixer/composer.json | 2 +- vendor-bin/csfixer/composer.lock | 6 +++--- vendor-bin/daux/composer.json | 2 +- vendor-bin/daux/composer.lock | 6 +++--- vendor-bin/phpunit/composer.json | 2 +- vendor-bin/phpunit/composer.lock | 6 +++--- vendor-bin/robo/composer.json | 4 +--- vendor-bin/robo/composer.lock | 6 +++--- 8 files changed, 16 insertions(+), 18 deletions(-) diff --git a/vendor-bin/csfixer/composer.json b/vendor-bin/csfixer/composer.json index 3fd8b5d7..c49c0755 100644 --- a/vendor-bin/csfixer/composer.json +++ b/vendor-bin/csfixer/composer.json @@ -1,5 +1,5 @@ { - "require": { + "require-dev": { "friendsofphp/php-cs-fixer": "^2.8" } } diff --git a/vendor-bin/csfixer/composer.lock b/vendor-bin/csfixer/composer.lock index 721b3e35..bfe93215 100644 --- a/vendor-bin/csfixer/composer.lock +++ b/vendor-bin/csfixer/composer.lock @@ -4,8 +4,9 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3fb53f1e3b4dd21c4d1e88c3ffd570ca", - "packages": [ + "content-hash": "dec0bf343ea4650da0303df8dfb2ab40", + "packages": [], + "packages-dev": [ { "name": "composer/semver", "version": "1.5.1", @@ -1372,7 +1373,6 @@ "time": "2019-11-18T17:27:11+00:00" } ], - "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], diff --git a/vendor-bin/daux/composer.json b/vendor-bin/daux/composer.json index 723bdf0e..75452ad2 100644 --- a/vendor-bin/daux/composer.json +++ b/vendor-bin/daux/composer.json @@ -1,5 +1,5 @@ { - "require": { + "require-dev": { "daux/daux.io": "^0.11" } } diff --git a/vendor-bin/daux/composer.lock b/vendor-bin/daux/composer.lock index 4bbbe450..c53a0572 100644 --- a/vendor-bin/daux/composer.lock +++ b/vendor-bin/daux/composer.lock @@ -4,8 +4,9 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6d944ffdc165b3e6f14e71a82b67a57d", - "packages": [ + "content-hash": "c1f427736a854f73400b9e527724a254", + "packages": [], + "packages-dev": [ { "name": "daux/daux.io", "version": "0.11.1", @@ -1557,7 +1558,6 @@ "time": "2018-03-20T13:36:33+00:00" } ], - "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], diff --git a/vendor-bin/phpunit/composer.json b/vendor-bin/phpunit/composer.json index cf21bc19..bfb4453b 100644 --- a/vendor-bin/phpunit/composer.json +++ b/vendor-bin/phpunit/composer.json @@ -1,5 +1,5 @@ { - "require": { + "require-dev": { "phpunit/phpunit": "^8.0", "dms/phpunit-arraysubset-asserts": "^0.1", "phake/phake": "^3.0", diff --git a/vendor-bin/phpunit/composer.lock b/vendor-bin/phpunit/composer.lock index 02f49dd1..3c3867b5 100644 --- a/vendor-bin/phpunit/composer.lock +++ b/vendor-bin/phpunit/composer.lock @@ -4,8 +4,9 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1b9c1eee014ebc012eb65b77de64c784", - "packages": [ + "content-hash": "af132f4314b7e577912ffde57af60aab", + "packages": [], + "packages-dev": [ { "name": "clue/arguments", "version": "v2.0.0", @@ -1811,7 +1812,6 @@ "time": "2015-12-17T08:42:14+00:00" } ], - "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], diff --git a/vendor-bin/robo/composer.json b/vendor-bin/robo/composer.json index 58e4932b..54a362d2 100644 --- a/vendor-bin/robo/composer.json +++ b/vendor-bin/robo/composer.json @@ -1,9 +1,7 @@ { - "require": { + "require-dev": { "consolidation/robo": "^1.1", "pear/archive_tar": "^1.4", "symfony/process": "^3.0" - }, - "require-dev": { } } diff --git a/vendor-bin/robo/composer.lock b/vendor-bin/robo/composer.lock index 73268710..49fe7d99 100644 --- a/vendor-bin/robo/composer.lock +++ b/vendor-bin/robo/composer.lock @@ -4,8 +4,9 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d95cf402fed434140db8ae87c3c8bf32", - "packages": [ + "content-hash": "a4e3a5e9da2703b2a1acc144e941a4ac", + "packages": [], + "packages-dev": [ { "name": "consolidation/annotated-command", "version": "2.12.0", @@ -1737,7 +1738,6 @@ "time": "2019-12-10T10:33:21+00:00" } ], - "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], From 0565553d4a80dc952232710eff62c06d1d20a11b Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 20 Jan 2020 00:38:38 -0500 Subject: [PATCH 07/50] Change PHP requirement in manual --- docs/en/020_Getting_Started/010_Requirements.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/020_Getting_Started/010_Requirements.md b/docs/en/020_Getting_Started/010_Requirements.md index ba1b06d5..f7818699 100644 --- a/docs/en/020_Getting_Started/010_Requirements.md +++ b/docs/en/020_Getting_Started/010_Requirements.md @@ -1,7 +1,7 @@ The Arsse has the following requirements: -- A Linux server running Nginx or Apache 2.4 (tested on Ubuntu 16.04 and 18.04) -- PHP 7.0.7 or later with the following extensions: +- A Linux server running Nginx or Apache 2.4 +- PHP 7.1.0 or later with the following extensions: - [intl](http://php.net/manual/en/book.intl.php), [json](http://php.net/manual/en/book.json.php), [hash](http://php.net/manual/en/book.hash.php), and [dom](http://php.net/manual/en/book.dom.php) - [simplexml](http://php.net/manual/en/book.simplexml.php), and [iconv](http://php.net/manual/en/book.iconv.php) - One of: From 5838af892f6c05d455ebe4672644cb6d75e17411 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 20 Jan 2020 10:40:05 -0500 Subject: [PATCH 08/50] Replace references to Zend with Laminas --- CHANGELOG | 6 ++++++ arsse.php | 2 +- lib/REST.php | 4 ++-- lib/REST/Fever/API.php | 6 +++--- lib/REST/NextcloudNews/V1_2.php | 4 ++-- lib/REST/NextcloudNews/Versions.php | 4 ++-- lib/REST/TinyTinyRSS/API.php | 4 ++-- lib/REST/TinyTinyRSS/Icon.php | 2 +- tests/cases/Misc/TestHTTP.php | 4 ++-- tests/cases/REST/Fever/TestAPI.php | 8 ++++---- tests/cases/REST/NextcloudNews/TestV1_2.php | 4 ++-- tests/cases/REST/NextcloudNews/TestVersions.php | 6 +++--- tests/cases/REST/TestREST.php | 10 +++++----- tests/cases/REST/TinyTinyRSS/TestAPI.php | 6 +++--- tests/cases/REST/TinyTinyRSS/TestIcon.php | 4 ++-- tests/lib/AbstractTest.php | 6 +++--- 16 files changed, 43 insertions(+), 37 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7aac0189..f5618ba8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +Version 0.8.3 (2020-??-??) +========================== + +Changes: +- Officially require PHP 7.1 (effectively required since version 0.8.0) + Version 0.8.2 (2019-12-07) ========================== diff --git a/arsse.php b/arsse.php index 0cfa0ae4..1fe1870a 100644 --- a/arsse.php +++ b/arsse.php @@ -25,7 +25,7 @@ if (\PHP_SAPI === "cli") { $conf = file_exists(BASE."config.php") ? new Conf(BASE."config.php") : new Conf; Arsse::load($conf); // handle Web requests - $emitter = new \Zend\HttpHandlerRunner\Emitter\SapiEmitter; + $emitter = new \Laminas\HttpHandlerRunner\Emitter\SapiEmitter; $response = (new REST)->dispatch(); $emitter->emit($response); } diff --git a/lib/REST.php b/lib/REST.php index 07389baf..b375f3c9 100644 --- a/lib/REST.php +++ b/lib/REST.php @@ -11,8 +11,8 @@ use JKingWeb\Arsse\Misc\URL; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\ServerRequestFactory; -use Zend\Diactoros\Response\EmptyResponse; +use Laminas\Diactoros\ServerRequestFactory; +use Laminas\Diactoros\Response\EmptyResponse; class REST { const API_LIST = [ diff --git a/lib/REST/Fever/API.php b/lib/REST/Fever/API.php index 1569c928..21565985 100644 --- a/lib/REST/Fever/API.php +++ b/lib/REST/Fever/API.php @@ -14,9 +14,9 @@ use JKingWeb\Arsse\Db\ExceptionInput; use JKingWeb\Arsse\Misc\HTTP; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\Response\JsonResponse; -use Zend\Diactoros\Response\XmlResponse; -use Zend\Diactoros\Response\EmptyResponse; +use Laminas\Diactoros\Response\JsonResponse; +use Laminas\Diactoros\Response\XmlResponse; +use Laminas\Diactoros\Response\EmptyResponse; class API extends \JKingWeb\Arsse\REST\AbstractHandler { const LEVEL = 3; diff --git a/lib/REST/NextcloudNews/V1_2.php b/lib/REST/NextcloudNews/V1_2.php index f0d2177a..90e7009e 100644 --- a/lib/REST/NextcloudNews/V1_2.php +++ b/lib/REST/NextcloudNews/V1_2.php @@ -19,8 +19,8 @@ use JKingWeb\Arsse\REST\Exception404; use JKingWeb\Arsse\REST\Exception405; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\Response\JsonResponse as Response; -use Zend\Diactoros\Response\EmptyResponse; +use Laminas\Diactoros\Response\JsonResponse as Response; +use Laminas\Diactoros\Response\EmptyResponse; class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler { const REALM = "Nextcloud News API v1-2"; diff --git a/lib/REST/NextcloudNews/Versions.php b/lib/REST/NextcloudNews/Versions.php index 78d4ac7f..a8db7a71 100644 --- a/lib/REST/NextcloudNews/Versions.php +++ b/lib/REST/NextcloudNews/Versions.php @@ -8,8 +8,8 @@ namespace JKingWeb\Arsse\REST\NextcloudNews; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\Response\JsonResponse as Response; -use Zend\Diactoros\Response\EmptyResponse; +use Laminas\Diactoros\Response\JsonResponse as Response; +use Laminas\Diactoros\Response\EmptyResponse; class Versions implements \JKingWeb\Arsse\REST\Handler { public function __construct() { diff --git a/lib/REST/TinyTinyRSS/API.php b/lib/REST/TinyTinyRSS/API.php index 56a24374..4049a2a0 100644 --- a/lib/REST/TinyTinyRSS/API.php +++ b/lib/REST/TinyTinyRSS/API.php @@ -20,8 +20,8 @@ use JKingWeb\Arsse\Db\ResultEmpty; use JKingWeb\Arsse\Feed\Exception as FeedException; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\Response\JsonResponse as Response; -use Zend\Diactoros\Response\EmptyResponse; +use Laminas\Diactoros\Response\JsonResponse as Response; +use Laminas\Diactoros\Response\EmptyResponse; class API extends \JKingWeb\Arsse\REST\AbstractHandler { const LEVEL = 14; // emulated API level diff --git a/lib/REST/TinyTinyRSS/Icon.php b/lib/REST/TinyTinyRSS/Icon.php index 0415bf2c..c5c9030e 100644 --- a/lib/REST/TinyTinyRSS/Icon.php +++ b/lib/REST/TinyTinyRSS/Icon.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\REST\TinyTinyRSS; use JKingWeb\Arsse\Arsse; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\Response\EmptyResponse as Response; +use Laminas\Diactoros\Response\EmptyResponse as Response; class Icon extends \JKingWeb\Arsse\REST\AbstractHandler { public function __construct() { diff --git a/tests/cases/Misc/TestHTTP.php b/tests/cases/Misc/TestHTTP.php index 70d1316b..8430ddaa 100644 --- a/tests/cases/Misc/TestHTTP.php +++ b/tests/cases/Misc/TestHTTP.php @@ -13,9 +13,9 @@ use Psr\Http\Message\ResponseInterface; class TestHTTP extends \JKingWeb\Arsse\Test\AbstractTest { /** @dataProvider provideMediaTypes */ public function testMatchMediaType(string $header, array $types, bool $exp) { - $msg = (new \Zend\Diactoros\Request)->withHeader("Content-Type", $header); + $msg = (new \Laminas\Diactoros\Request)->withHeader("Content-Type", $header); $this->assertSame($exp, HTTP::matchType($msg, ...$types)); - $msg = (new \Zend\Diactoros\Response)->withHeader("Content-Type", $header); + $msg = (new \Laminas\Diactoros\Response)->withHeader("Content-Type", $header); $this->assertSame($exp, HTTP::matchType($msg, ...$types)); } diff --git a/tests/cases/REST/Fever/TestAPI.php b/tests/cases/REST/Fever/TestAPI.php index ad54243c..f7cd3c53 100644 --- a/tests/cases/REST/Fever/TestAPI.php +++ b/tests/cases/REST/Fever/TestAPI.php @@ -15,10 +15,10 @@ use JKingWeb\Arsse\Db\ExceptionInput; use JKingWeb\Arsse\Db\Transaction; use JKingWeb\Arsse\REST\Fever\API; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\ServerRequest; -use Zend\Diactoros\Response\JsonResponse; -use Zend\Diactoros\Response\XmlResponse; -use Zend\Diactoros\Response\EmptyResponse; +use Laminas\Diactoros\ServerRequest; +use Laminas\Diactoros\Response\JsonResponse; +use Laminas\Diactoros\Response\XmlResponse; +use Laminas\Diactoros\Response\EmptyResponse; /** @covers \JKingWeb\Arsse\REST\Fever\API */ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { diff --git a/tests/cases/REST/NextcloudNews/TestV1_2.php b/tests/cases/REST/NextcloudNews/TestV1_2.php index af3d9d54..9aa3c8e9 100644 --- a/tests/cases/REST/NextcloudNews/TestV1_2.php +++ b/tests/cases/REST/NextcloudNews/TestV1_2.php @@ -16,8 +16,8 @@ use JKingWeb\Arsse\Db\ExceptionInput; use JKingWeb\Arsse\Db\Transaction; use JKingWeb\Arsse\REST\NextcloudNews\V1_2; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\Response\JsonResponse as Response; -use Zend\Diactoros\Response\EmptyResponse; +use Laminas\Diactoros\Response\JsonResponse as Response; +use Laminas\Diactoros\Response\EmptyResponse; /** @covers \JKingWeb\Arsse\REST\NextcloudNews\V1_2 */ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { diff --git a/tests/cases/REST/NextcloudNews/TestVersions.php b/tests/cases/REST/NextcloudNews/TestVersions.php index 2fc40b80..7c65ddbf 100644 --- a/tests/cases/REST/NextcloudNews/TestVersions.php +++ b/tests/cases/REST/NextcloudNews/TestVersions.php @@ -8,9 +8,9 @@ namespace JKingWeb\Arsse\TestCase\REST\NextcloudNews; use JKingWeb\Arsse\REST\NextcloudNews\Versions; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\ServerRequest; -use Zend\Diactoros\Response\JsonResponse as Response; -use Zend\Diactoros\Response\EmptyResponse; +use Laminas\Diactoros\ServerRequest; +use Laminas\Diactoros\Response\JsonResponse as Response; +use Laminas\Diactoros\Response\EmptyResponse; /** @covers \JKingWeb\Arsse\REST\NextcloudNews\Versions */ class TestVersions extends \JKingWeb\Arsse\Test\AbstractTest { diff --git a/tests/cases/REST/TestREST.php b/tests/cases/REST/TestREST.php index 36c1753a..249e80c1 100644 --- a/tests/cases/REST/TestREST.php +++ b/tests/cases/REST/TestREST.php @@ -15,11 +15,11 @@ use JKingWeb\Arsse\REST\NextcloudNews\V1_2 as NCN; use JKingWeb\Arsse\REST\TinyTinyRSS\API as TTRSS; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\Request; -use Zend\Diactoros\Response; -use Zend\Diactoros\ServerRequest; -use Zend\Diactoros\Response\TextResponse; -use Zend\Diactoros\Response\EmptyResponse; +use Laminas\Diactoros\Request; +use Laminas\Diactoros\Response; +use Laminas\Diactoros\ServerRequest; +use Laminas\Diactoros\Response\TextResponse; +use Laminas\Diactoros\Response\EmptyResponse; /** @covers \JKingWeb\Arsse\REST */ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { diff --git a/tests/cases/REST/TinyTinyRSS/TestAPI.php b/tests/cases/REST/TinyTinyRSS/TestAPI.php index d3a275ac..f25c4ccb 100644 --- a/tests/cases/REST/TinyTinyRSS/TestAPI.php +++ b/tests/cases/REST/TinyTinyRSS/TestAPI.php @@ -16,9 +16,9 @@ use JKingWeb\Arsse\Db\ExceptionInput; use JKingWeb\Arsse\Db\Transaction; use JKingWeb\Arsse\REST\TinyTinyRSS\API; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\ServerRequest; -use Zend\Diactoros\Response\JsonResponse as Response; -use Zend\Diactoros\Response\EmptyResponse; +use Laminas\Diactoros\ServerRequest; +use Laminas\Diactoros\Response\JsonResponse as Response; +use Laminas\Diactoros\Response\EmptyResponse; /** @covers \JKingWeb\Arsse\REST\TinyTinyRSS\API * @covers \JKingWeb\Arsse\REST\TinyTinyRSS\Exception */ diff --git a/tests/cases/REST/TinyTinyRSS/TestIcon.php b/tests/cases/REST/TinyTinyRSS/TestIcon.php index d7f50626..fd330945 100644 --- a/tests/cases/REST/TinyTinyRSS/TestIcon.php +++ b/tests/cases/REST/TinyTinyRSS/TestIcon.php @@ -11,8 +11,8 @@ use JKingWeb\Arsse\User; use JKingWeb\Arsse\Database; use JKingWeb\Arsse\REST\TinyTinyRSS\Icon; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\ServerRequest; -use Zend\Diactoros\Response\EmptyResponse as Response; +use Laminas\Diactoros\ServerRequest; +use Laminas\Diactoros\Response\EmptyResponse as Response; /** @covers \JKingWeb\Arsse\REST\TinyTinyRSS\Icon */ class TestIcon extends \JKingWeb\Arsse\Test\AbstractTest { diff --git a/tests/lib/AbstractTest.php b/tests/lib/AbstractTest.php index 1581b0a6..bb0c688f 100644 --- a/tests/lib/AbstractTest.php +++ b/tests/lib/AbstractTest.php @@ -18,9 +18,9 @@ use Psr\Http\Message\MessageInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\ServerRequest; -use Zend\Diactoros\Response\JsonResponse; -use Zend\Diactoros\Response\XmlResponse; +use Laminas\Diactoros\ServerRequest; +use Laminas\Diactoros\Response\JsonResponse; +use Laminas\Diactoros\Response\XmlResponse; /** @coversNothing */ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { From bbace7a0acfa0e4ab7abf8c519ea385ad417bc45 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 20 Jan 2020 13:34:03 -0500 Subject: [PATCH 09/50] Use void and nullable return types where practical --- lib/Arsse.php | 2 +- lib/CLI.php | 4 +- lib/Database.php | 8 +- lib/Db/AbstractResult.php | 2 +- lib/Db/MySQL/Driver.php | 2 +- lib/Db/MySQL/PDODriver.php | 2 +- lib/Db/PostgreSQL/Driver.php | 2 +- lib/Db/PostgreSQL/PDODriver.php | 2 +- lib/Db/SQLite3/Driver.php | 4 +- lib/Db/SQLite3/PDODriver.php | 2 +- lib/Feed.php | 2 +- lib/Misc/Date.php | 8 +- lib/Misc/ValueInfo.php | 2 +- lib/REST/Fever/API.php | 4 +- lib/REST/TinyTinyRSS/Search.php | 2 +- lib/User/Internal/Driver.php | 6 +- tests/cases/CLI/TestCLI.php | 30 ++--- tests/cases/Conf/TestConf.php | 32 ++--- tests/cases/Database/SeriesArticle.php | 120 +++++++++--------- tests/cases/Database/SeriesCleanup.php | 20 +-- tests/cases/Database/SeriesFeed.php | 20 +-- tests/cases/Database/SeriesFolder.php | 92 +++++++------- tests/cases/Database/SeriesLabel.php | 96 +++++++------- tests/cases/Database/SeriesMeta.php | 14 +- tests/cases/Database/SeriesMiscellany.php | 12 +- tests/cases/Database/SeriesSession.php | 24 ++-- tests/cases/Database/SeriesSubscription.php | 92 +++++++------- tests/cases/Database/SeriesTag.php | 100 +++++++-------- tests/cases/Database/SeriesToken.php | 24 ++-- tests/cases/Database/SeriesUser.php | 38 +++--- tests/cases/Database/TestDatabase.php | 4 +- tests/cases/Db/BaseDriver.php | 70 +++++----- tests/cases/Db/BaseResult.php | 18 +-- tests/cases/Db/BaseStatement.php | 18 +-- tests/cases/Db/BaseUpdate.php | 24 ++-- tests/cases/Db/MySQL/TestCreation.php | 2 +- tests/cases/Db/MySQL/TestStatement.php | 2 +- tests/cases/Db/MySQLPDO/TestCreation.php | 2 +- tests/cases/Db/PostgreSQL/TestCreation.php | 4 +- tests/cases/Db/PostgreSQLPDO/TestCreation.php | 4 +- tests/cases/Db/SQLite3/TestCreation.php | 26 ++-- tests/cases/Db/SQLite3PDO/TestCreation.php | 26 ++-- tests/cases/Db/TestResultAggregate.php | 14 +- tests/cases/Db/TestResultEmpty.php | 10 +- tests/cases/Db/TestTransaction.php | 6 +- tests/cases/Exception/TestException.php | 14 +- tests/cases/Feed/TestFeed.php | 34 ++--- tests/cases/Feed/TestFetching.php | 18 +-- tests/cases/ImportExport/TestFile.php | 4 +- tests/cases/ImportExport/TestImportExport.php | 16 +-- tests/cases/ImportExport/TestOPML.php | 8 +- tests/cases/Lang/TestBasic.php | 10 +- tests/cases/Lang/TestComplex.php | 24 ++-- tests/cases/Lang/TestErrors.php | 24 ++-- tests/cases/Misc/TestContext.php | 12 +- tests/cases/Misc/TestDate.php | 8 +- tests/cases/Misc/TestHTTP.php | 4 +- tests/cases/Misc/TestQuery.php | 16 +-- tests/cases/Misc/TestURL.php | 8 +- tests/cases/Misc/TestValueInfo.php | 16 +-- tests/cases/REST/Fever/TestAPI.php | 28 ++-- tests/cases/REST/Fever/TestUser.php | 6 +- tests/cases/REST/NextcloudNews/TestV1_2.php | 66 +++++----- .../cases/REST/NextcloudNews/TestVersions.php | 8 +- tests/cases/REST/TestREST.php | 18 +-- tests/cases/REST/TinyTinyRSS/TestAPI.php | 78 ++++++------ tests/cases/REST/TinyTinyRSS/TestIcon.php | 8 +- tests/cases/REST/TinyTinyRSS/TestSearch.php | 2 +- tests/cases/Service/TestSerial.php | 8 +- tests/cases/Service/TestService.php | 12 +- tests/cases/Service/TestSubprocess.php | 8 +- tests/cases/TestArsse.php | 4 +- tests/cases/User/TestInternal.php | 22 ++-- tests/cases/User/TestUser.php | 22 ++-- tests/lib/AbstractTest.php | 12 +- tests/lib/DatabaseDrivers/MySQL.php | 4 +- tests/lib/DatabaseDrivers/MySQLPDO.php | 4 +- tests/lib/DatabaseDrivers/PostgreSQL.php | 6 +- tests/lib/DatabaseDrivers/PostgreSQLPDO.php | 4 +- tests/lib/DatabaseDrivers/SQLite3.php | 4 +- tests/lib/DatabaseDrivers/SQLite3PDO.php | 4 +- 81 files changed, 771 insertions(+), 771 deletions(-) diff --git a/lib/Arsse.php b/lib/Arsse.php index c122e897..6e120392 100644 --- a/lib/Arsse.php +++ b/lib/Arsse.php @@ -18,7 +18,7 @@ class Arsse { /** @var User */ public static $user; - public static function load(Conf $conf) { + public static function load(Conf $conf): void { static::$lang = static::$lang ?? new Lang; static::$conf = $conf; static::$lang->set($conf->lang); diff --git a/lib/CLI.php b/lib/CLI.php index 58bacedf..017ad461 100644 --- a/lib/CLI.php +++ b/lib/CLI.php @@ -160,7 +160,7 @@ USAGE_TEXT; return ($file === "-" ? null : $file) ?? $stdinOrStdout; } - public function dispatch(array $argv = null) { + public function dispatch(array $argv = null): int { $argv = $argv ?? $_SERVER['argv']; $argv0 = array_shift($argv); $args = \Docopt::handle($this->usage($argv0), [ @@ -210,7 +210,7 @@ USAGE_TEXT; } // @codeCoverageIgnore /** @codeCoverageIgnore */ - protected function logError(string $msg) { + protected function logError(string $msg): void { fwrite(STDERR, $msg.\PHP_EOL); } diff --git a/lib/Database.php b/lib/Database.php index bcca3eb0..eadabd70 100644 --- a/lib/Database.php +++ b/lib/Database.php @@ -218,7 +218,7 @@ class Database { } /** Retrieve a value from the metadata table. If the key is not set null is returned */ - public function metaGet(string $key) { + public function metaGet(string $key): ?string { return $this->db->prepare("SELECT value from arsse_meta where \"key\" = ?", "str")->run($key)->getValue(); } @@ -284,7 +284,7 @@ class Database { } /** Retrieves the hashed password of a user */ - public function userPasswordGet(string $user) { + public function userPasswordGet(string $user): ?string { if (!Arsse::$user->authorize($user, __FUNCTION__)) { throw new User\ExceptionAuthz("notAuthorized", ["action" => __FUNCTION__, "user" => $user]); } elseif (!$this->userExists($user)) { @@ -617,7 +617,7 @@ class Database { } /** Ensures an operation to rename and/or move a folder does not result in a conflict or circular dependence, and raises an exception otherwise */ - protected function folderValidateMove(string $user, $id = null, $parent = null, string $name = null) { + protected function folderValidateMove(string $user, $id = null, $parent = null, string $name = null): ?int { $errData = ["action" => $this->caller(), "field" => "parent", 'id' => $parent]; if (!$id) { // the root cannot be moved @@ -932,7 +932,7 @@ class Database { } /** Returns the time at which any of a user's subscriptions (or a specific subscription) was last refreshed, as a DateTimeImmutable object */ - public function subscriptionRefreshed(string $user, int $id = null) { + public function subscriptionRefreshed(string $user, int $id = null): ?\DateTimeInterface { if (!Arsse::$user->authorize($user, __FUNCTION__)) { throw new User\ExceptionAuthz("notAuthorized", ["action" => __FUNCTION__, "user" => $user]); } diff --git a/lib/Db/AbstractResult.php b/lib/Db/AbstractResult.php index 6086cf68..4ae62bbb 100644 --- a/lib/Db/AbstractResult.php +++ b/lib/Db/AbstractResult.php @@ -22,7 +22,7 @@ abstract class AbstractResult implements Result { } } - public function getRow() { + public function getRow(): ?array { if ($this->valid()) { $out = $this->cur; $this->next(); diff --git a/lib/Db/MySQL/Driver.php b/lib/Db/MySQL/Driver.php index 0f8712b5..6be8c3f4 100644 --- a/lib/Db/MySQL/Driver.php +++ b/lib/Db/MySQL/Driver.php @@ -158,7 +158,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { return class_exists("mysqli"); } - protected function makeConnection(string $db, string $user, string $password, string $host, int $port, string $socket) { + protected function makeConnection(string $db, string $user, string $password, string $host, int $port, string $socket): void { $this->db = mysqli_init(); $this->db->options(\MYSQLI_OPT_CONNECT_TIMEOUT, ceil(Arsse::$conf->dbTimeoutConnect)); @$this->db->real_connect($host, $user, $password, $db, $port, $socket); diff --git a/lib/Db/MySQL/PDODriver.php b/lib/Db/MySQL/PDODriver.php index 4439b33c..a2947104 100644 --- a/lib/Db/MySQL/PDODriver.php +++ b/lib/Db/MySQL/PDODriver.php @@ -18,7 +18,7 @@ class PDODriver extends Driver { return class_exists("PDO") && in_array("mysql", \PDO::getAvailableDrivers()); } - protected function makeConnection(string $db, string $user, string $password, string $host, int $port, string $socket) { + protected function makeConnection(string $db, string $user, string $password, string $host, int $port, string $socket): void { $dsn = "mysql:".implode(";", [ "charset=utf8mb4", "dbname=$db", diff --git a/lib/Db/PostgreSQL/Driver.php b/lib/Db/PostgreSQL/Driver.php index 94497ddf..f06518ec 100644 --- a/lib/Db/PostgreSQL/Driver.php +++ b/lib/Db/PostgreSQL/Driver.php @@ -181,7 +181,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { return \extension_loaded("pgsql"); } - protected function makeConnection(string $user, string $pass, string $db, string $host, int $port, string $service) { + protected function makeConnection(string $user, string $pass, string $db, string $host, int $port, string $service): void { $dsn = $this->makeconnectionString(false, $user, $pass, $db, $host, $port, $service); set_error_handler(function(int $code, string $msg) { $msg = substr($msg, 62); diff --git a/lib/Db/PostgreSQL/PDODriver.php b/lib/Db/PostgreSQL/PDODriver.php index c754a38f..fe6f0a55 100644 --- a/lib/Db/PostgreSQL/PDODriver.php +++ b/lib/Db/PostgreSQL/PDODriver.php @@ -18,7 +18,7 @@ class PDODriver extends Driver { return class_exists("PDO") && in_array("pgsql", \PDO::getAvailableDrivers()); } - protected function makeConnection(string $user, string $pass, string $db, string $host, int $port, string $service) { + protected function makeConnection(string $user, string $pass, string $db, string $host, int $port, string $service): void { $dsn = $this->makeconnectionString(true, $user, $pass, $db, $host, $port, $service); try { $this->db = new \PDO("pgsql:$dsn", $user, $pass, [ diff --git a/lib/Db/SQLite3/Driver.php b/lib/Db/SQLite3/Driver.php index d0866c02..d76dedd1 100644 --- a/lib/Db/SQLite3/Driver.php +++ b/lib/Db/SQLite3/Driver.php @@ -69,13 +69,13 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { return class_exists("SQLite3"); } - protected function makeConnection(string $file, string $key) { + protected function makeConnection(string $file, string $key): void { $this->db = new \SQLite3($file, \SQLITE3_OPEN_READWRITE | \SQLITE3_OPEN_CREATE, $key); // enable exceptions $this->db->enableExceptions(true); } - protected function setTimeout(int $msec) { + protected function setTimeout(int $msec): void { $this->exec("PRAGMA busy_timeout = $msec"); } diff --git a/lib/Db/SQLite3/PDODriver.php b/lib/Db/SQLite3/PDODriver.php index 12ffc973..c590d510 100644 --- a/lib/Db/SQLite3/PDODriver.php +++ b/lib/Db/SQLite3/PDODriver.php @@ -16,7 +16,7 @@ class PDODriver extends AbstractPDODriver { return class_exists("PDO") && in_array("sqlite", \PDO::getAvailableDrivers()); } - protected function makeConnection(string $file, string $key) { + protected function makeConnection(string $file, string $key): void { $this->db = new \PDO("sqlite:".$file, "", "", [ \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, ]); diff --git a/lib/Feed.php b/lib/Feed.php index 767063c1..859bd06e 100644 --- a/lib/Feed.php +++ b/lib/Feed.php @@ -390,7 +390,7 @@ class Feed { return $offset; } - protected function computeLastModified() { + protected function computeLastModified(): ?\DateTimeInterface { if (!$this->modified) { return $this->lastModified; // @codeCoverageIgnore } diff --git a/lib/Misc/Date.php b/lib/Misc/Date.php index f4b34850..0b519dc4 100644 --- a/lib/Misc/Date.php +++ b/lib/Misc/Date.php @@ -21,19 +21,19 @@ class Date { return $out; } - public static function normalize($date, string $inFormat = null) { + public static function normalize($date, string $inFormat = null): ?\DateTimeInterface { return ValueInfo::normalize($date, ValueInfo::T_DATE, $inFormat); } - public static function add($interval, $date = "now") { + public static function add($interval, $date = "now"): ?\DateTimeInterface { return self::modify("add", $interval, $date); } - public static function sub($interval, $date = "now") { + public static function sub($interval, $date = "now"): ?\DateTimeInterface { return self::modify("sub", $interval, $date); } - protected static function modify(string $func, $interval, $date) { + protected static function modify(string $func, $interval, $date): ?\DateTimeInterface { $date = self::normalize($date); $interval = (!$interval instanceof \DateInterval) ? ValueInfo::normalize($interval, ValueInfo::T_INTERVAL) : $interval; return $date ? $date->$func($interval) : null; diff --git a/lib/Misc/ValueInfo.php b/lib/Misc/ValueInfo.php index 1b3d2608..75a81bae 100644 --- a/lib/Misc/ValueInfo.php +++ b/lib/Misc/ValueInfo.php @@ -499,7 +499,7 @@ class ValueInfo { } } - public static function bool($value, bool $default = null) { + public static function bool($value, bool $default = null): ?bool { if (is_null($value) || ValueInfo::str($value) & ValueInfo::WHITE) { return $default; } diff --git a/lib/REST/Fever/API.php b/lib/REST/Fever/API.php index 21565985..776490c9 100644 --- a/lib/REST/Fever/API.php +++ b/lib/REST/Fever/API.php @@ -306,7 +306,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { return $listSaved; } - protected function setUnread() { + protected function setUnread(): void { $lastUnread = Arsse::$db->articleList(Arsse::$user->id, (new Context)->limit(1), ["marked_date"], ["marked_date desc"])->getValue(); if (!$lastUnread) { // there are no articles @@ -322,7 +322,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { Arsse::$db->articleMark(Arsse::$user->id, ['read' => false], $c); } - protected function getRefreshTime() { + protected function getRefreshTime(): ?int { return Date::transform(Arsse::$db->subscriptionRefreshed(Arsse::$user->id), "unix"); } diff --git a/lib/REST/TinyTinyRSS/Search.php b/lib/REST/TinyTinyRSS/Search.php index f7913616..929ef4d8 100644 --- a/lib/REST/TinyTinyRSS/Search.php +++ b/lib/REST/TinyTinyRSS/Search.php @@ -32,7 +32,7 @@ class Search { "" => "searchTerms", ]; - public static function parse(string $search, Context $context = null) { + public static function parse(string $search, Context $context = null): ?Context { // normalize the input $search = strtolower(trim(preg_replace("<\s+>", " ", $search))); // set initial state diff --git a/lib/User/Internal/Driver.php b/lib/User/Internal/Driver.php index d50777a1..c9e78d1c 100644 --- a/lib/User/Internal/Driver.php +++ b/lib/User/Internal/Driver.php @@ -40,7 +40,7 @@ class Driver implements \JKingWeb\Arsse\User\Driver { return Arsse::$db->userExists($user); } - public function userAdd(string $user, string $password = null) { + public function userAdd(string $user, string $password = null): ?string { if (isset($password)) { // only add the user if the password is not null; the user manager will retry with a generated password if null is returned Arsse::$db->userAdd($user, $password); @@ -56,7 +56,7 @@ class Driver implements \JKingWeb\Arsse\User\Driver { return Arsse::$db->userList(); } - public function userPasswordSet(string $user, string $newPassword = null, string $oldPassword = null) { + public function userPasswordSet(string $user, string $newPassword = null, string $oldPassword = null): ?string { // do nothing: the internal database is updated regardless of what the driver does (assuming it does not throw an exception) return $newPassword; } @@ -71,7 +71,7 @@ class Driver implements \JKingWeb\Arsse\User\Driver { } } - protected function userPasswordGet(string $user) { + protected function userPasswordGet(string $user): ?string { return Arsse::$db->userPasswordGet($user); } } diff --git a/tests/cases/CLI/TestCLI.php b/tests/cases/CLI/TestCLI.php index a0b4197a..a350ce1e 100644 --- a/tests/cases/CLI/TestCLI.php +++ b/tests/cases/CLI/TestCLI.php @@ -24,7 +24,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when($this->cli)->loadConf->thenReturn(true); } - public function assertConsole(CLI $cli, string $command, int $exitStatus, string $output = "", bool $pattern = false) { + public function assertConsole(CLI $cli, string $command, int $exitStatus, string $output = "", bool $pattern = false): void { $argv = \Clue\Arguments\split($command); $output = strlen($output) ? $output.\PHP_EOL : ""; if ($pattern) { @@ -35,13 +35,13 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exitStatus, $cli->dispatch($argv)); } - public function testPrintVersion() { + public function testPrintVersion():void { $this->assertConsole($this->cli, "arsse.php --version", 0, Arsse::VERSION); \Phake::verify($this->cli, \Phake::times(0))->loadConf; } /** @dataProvider provideHelpText */ - public function testPrintHelp(string $cmd, string $name) { + public function testPrintHelp(string $cmd, string $name):void { $this->assertConsole($this->cli, $cmd, 0, str_replace("arsse.php", $name, CLI::USAGE)); \Phake::verify($this->cli, \Phake::times(0))->loadConf; } @@ -57,7 +57,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testStartTheDaemon() { + public function testStartTheDaemon():void { $srv = \Phake::mock(Service::class); \Phake::when($srv)->watch->thenReturn(new \DateTimeImmutable); \Phake::when($this->cli)->getInstance(Service::class)->thenReturn($srv); @@ -67,7 +67,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify($this->cli)->getInstance(Service::class); } - public function testRefreshAllFeeds() { + public function testRefreshAllFeeds():void { $srv = \Phake::mock(Service::class); \Phake::when($srv)->watch->thenReturn(new \DateTimeImmutable); \Phake::when($this->cli)->getInstance(Service::class)->thenReturn($srv); @@ -78,7 +78,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideFeedUpdates */ - public function testRefreshAFeed(string $cmd, int $exitStatus, string $output) { + public function testRefreshAFeed(string $cmd, int $exitStatus, string $output):void { Arsse::$db = \Phake::mock(Database::class); \Phake::when(Arsse::$db)->feedUpdate(1, true)->thenReturn(true); \Phake::when(Arsse::$db)->feedUpdate(2, true)->thenThrow(new \JKingWeb\Arsse\Feed\Exception("http://example.com/", new \PicoFeed\Client\InvalidUrlException)); @@ -95,7 +95,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideDefaultConfigurationSaves */ - public function testSaveTheDefaultConfiguration(string $cmd, int $exitStatus, string $file) { + public function testSaveTheDefaultConfiguration(string $cmd, int $exitStatus, string $file):void { $conf = \Phake::mock(Conf::class); \Phake::when($conf)->exportFile("php://output", true)->thenReturn(true); \Phake::when($conf)->exportFile("good.conf", true)->thenReturn(true); @@ -116,7 +116,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserList */ - public function testListUsers(string $cmd, array $list, int $exitStatus, string $output) { + public function testListUsers(string $cmd, array $list, int $exitStatus, string $output):void { // FIXME: Phake is somehow unable to mock the User class correctly, so we use PHPUnit's mocks instead Arsse::$user = $this->createMock(User::class); Arsse::$user->method("list")->willReturn($list); @@ -135,7 +135,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserAdditions */ - public function testAddAUser(string $cmd, int $exitStatus, string $output) { + public function testAddAUser(string $cmd, int $exitStatus, string $output):void { // FIXME: Phake is somehow unable to mock the User class correctly, so we use PHPUnit's mocks instead Arsse::$user = $this->createMock(User::class); Arsse::$user->method("add")->will($this->returnCallback(function($user, $pass = null) { @@ -158,7 +158,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserAuthentication */ - public function testAuthenticateAUser(string $cmd, int $exitStatus, string $output) { + public function testAuthenticateAUser(string $cmd, int $exitStatus, string $output):void { // FIXME: Phake is somehow unable to mock the User class correctly, so we use PHPUnit's mocks instead Arsse::$user = $this->createMock(User::class); Arsse::$user->method("auth")->will($this->returnCallback(function($user, $pass) { @@ -192,7 +192,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserRemovals */ - public function testRemoveAUser(string $cmd, int $exitStatus, string $output) { + public function testRemoveAUser(string $cmd, int $exitStatus, string $output):void { // FIXME: Phake is somehow unable to mock the User class correctly, so we use PHPUnit's mocks instead Arsse::$user = $this->createMock(User::class); Arsse::$user->method("remove")->will($this->returnCallback(function($user) { @@ -212,7 +212,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserPasswordChanges */ - public function testChangeAUserPassword(string $cmd, int $exitStatus, string $output) { + public function testChangeAUserPassword(string $cmd, int $exitStatus, string $output):void { $passwordChange = function($user, $pass = null) { switch ($user) { case "jane.doe@example.com": @@ -242,7 +242,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserPasswordClearings */ - public function testClearAUserPassword(string $cmd, int $exitStatus, string $output) { + public function testClearAUserPassword(string $cmd, int $exitStatus, string $output):void { $passwordClear = function($user) { switch ($user) { case "jane.doe@example.com": @@ -270,7 +270,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideOpmlExports */ - public function testExportToOpml(string $cmd, int $exitStatus, string $file, string $user, bool $flat) { + public function testExportToOpml(string $cmd, int $exitStatus, string $file, string $user, bool $flat):void { $opml = \Phake::mock(OPML::class); \Phake::when($opml)->exportFile("php://output", $user, $flat)->thenReturn(true); \Phake::when($opml)->exportFile("good.opml", $user, $flat)->thenReturn(true); @@ -311,7 +311,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideOpmlImports */ - public function testImportFromOpml(string $cmd, int $exitStatus, string $file, string $user, bool $flat, bool $replace) { + public function testImportFromOpml(string $cmd, int $exitStatus, string $file, string $user, bool $flat, bool $replace):void { $opml = \Phake::mock(OPML::class); \Phake::when($opml)->importFile("php://input", $user, $flat, $replace)->thenReturn(true); \Phake::when($opml)->importFile("good.opml", $user, $flat, $replace)->thenReturn(true); diff --git a/tests/cases/Conf/TestConf.php b/tests/cases/Conf/TestConf.php index f52d3b35..d10d1d4c 100644 --- a/tests/cases/Conf/TestConf.php +++ b/tests/cases/Conf/TestConf.php @@ -38,12 +38,12 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testLoadDefaultValues() { + public function testLoadDefaultValues():void { $this->assertInstanceOf(Conf::class, new Conf); } /** @depends testLoadDefaultValues */ - public function testImportFromArray() { + public function testImportFromArray():void { $arr = [ 'lang' => "xx", 'purgeFeeds' => "P2D", @@ -54,7 +54,7 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { } /** @depends testImportFromArray */ - public function testImportFromFile() { + public function testImportFromFile():void { $conf = new Conf; $conf->importFile(self::$path."confGood"); $this->assertEquals("xx", $conf->lang); @@ -63,43 +63,43 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { } /** @depends testImportFromFile */ - public function testImportFromMissingFile() { + public function testImportFromMissingFile():void { $this->assertException("fileMissing", "Conf"); $conf = new Conf(self::$path."confMissing"); } /** @depends testImportFromFile */ - public function testImportFromEmptyFile() { + public function testImportFromEmptyFile():void { $this->assertException("fileCorrupt", "Conf"); $conf = new Conf(self::$path."confEmpty"); } /** @depends testImportFromFile */ - public function testImportFromFileWithoutReadPermission() { + public function testImportFromFileWithoutReadPermission():void { $this->assertException("fileUnreadable", "Conf"); $conf = new Conf(self::$path."confUnreadable"); } /** @depends testImportFromFile */ - public function testImportFromFileWhichIsNotAnArray() { + public function testImportFromFileWhichIsNotAnArray():void { $this->assertException("fileCorrupt", "Conf"); $conf = new Conf(self::$path."confNotArray"); } /** @depends testImportFromFile */ - public function testImportFromFileWhichIsNotPhp() { + public function testImportFromFileWhichIsNotPhp():void { $this->assertException("fileCorrupt", "Conf"); // this should not print the output of the non-PHP file $conf = new Conf(self::$path."confNotPHP"); } /** @depends testImportFromFile */ - public function testImportFromCorruptFile() { + public function testImportFromCorruptFile():void { $this->assertException("fileCorrupt", "Conf"); $conf = new Conf(self::$path."confCorrupt"); } - public function testImportBogusValue() { + public function testImportBogusValue():void { $arr = [ 'dbAutoUpdate' => "yes, please", ]; @@ -108,7 +108,7 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { $conf->import($arr); } - public function testImportBogusDriver() { + public function testImportBogusDriver():void { $arr = [ 'dbDriver' => "this driver does not exist", ]; @@ -117,7 +117,7 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { $conf->import($arr); } - public function testExportToArray() { + public function testExportToArray():void { $conf = new Conf; $conf->lang = ["en", "fr"]; // should not be exported: not scalar $conf->dbSQLite3File = "test.db"; // should be exported: value changed @@ -138,7 +138,7 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { /** @depends testExportToArray * @depends testImportFromFile */ - public function testExportToFile() { + public function testExportToFile():void { $conf = new Conf; $conf->lang = ["en", "fr"]; // should not be exported: not scalar $conf->dbSQLite3File = "test.db"; // should be exported: value changed @@ -159,19 +159,19 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { } /** @depends testExportToFile */ - public function testExportToStdout() { + public function testExportToStdout():void { $conf = new Conf(self::$path."confGood"); $conf->exportFile(self::$path."confGood"); $this->expectOutputString(file_get_contents(self::$path."confGood")); $conf->exportFile("php://output"); } - public function testExportToFileWithoutWritePermission() { + public function testExportToFileWithoutWritePermission():void { $this->assertException("fileUnwritable", "Conf"); (new Conf)->exportFile(self::$path."confUnreadable"); } - public function testExportToFileWithoutCreatePermission() { + public function testExportToFileWithoutCreatePermission():void { $this->assertException("fileUncreatable", "Conf"); (new Conf)->exportFile(self::$path."confForbidden/conf"); } diff --git a/tests/cases/Database/SeriesArticle.php b/tests/cases/Database/SeriesArticle.php index 26fc4f02..b560527c 100644 --- a/tests/cases/Database/SeriesArticle.php +++ b/tests/cases/Database/SeriesArticle.php @@ -13,7 +13,7 @@ use JKingWeb\Arsse\Misc\Date; use JKingWeb\Arsse\Misc\ValueInfo; trait SeriesArticle { - protected function setUpSeriesArticle() { + protected function setUpSeriesArticle():void { $this->data = [ 'arsse_users' => [ 'columns' => [ @@ -408,12 +408,12 @@ trait SeriesArticle { $this->user = "john.doe@example.net"; } - protected function tearDownSeriesArticle() { + protected function tearDownSeriesArticle():void { unset($this->data, $this->matches, $this->fields, $this->checkTables, $this->user); } /** @dataProvider provideContextMatches */ - public function testListArticlesCheckingContext(Context $c, array $exp) { + public function testListArticlesCheckingContext(Context $c, array $exp):void { $ids = array_column($ids = Arsse::$db->articleList("john.doe@example.com", $c, ["id"], ["id"])->getAll(), "id"); sort($ids); sort($exp); @@ -516,7 +516,7 @@ trait SeriesArticle { ]; } - public function testRetrieveArticleIdsForEditions() { + public function testRetrieveArticleIdsForEditions():void { $exp = [ 1 => 1, 2 => 2, @@ -553,17 +553,17 @@ trait SeriesArticle { $this->assertEquals($exp, Arsse::$db->editionArticle(...range(1, 1001))); } - public function testListArticlesOfAMissingFolder() { + public function testListArticlesOfAMissingFolder():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->articleList($this->user, (new Context)->folder(1)); } - public function testListArticlesOfAMissingSubscription() { + public function testListArticlesOfAMissingSubscription():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->articleList($this->user, (new Context)->subscription(1)); } - public function testListArticlesCheckingProperties() { + public function testListArticlesCheckingProperties():void { $this->user = "john.doe@example.org"; // check that the different fieldset groups return the expected columns foreach ($this->fields as $column) { @@ -577,7 +577,7 @@ trait SeriesArticle { } /** @dataProvider provideOrderedLists */ - public function testListArticlesCheckingOrder(array $sortCols, array $exp) { + public function testListArticlesCheckingOrder(array $sortCols, array $exp):void { $act = ValueInfo::normalize(array_column(iterator_to_array(Arsse::$db->articleList("john.doe@example.com", null, ["id"], $sortCols)), "id"), ValueInfo::T_INT | ValueInfo::M_ARRAY); $this->assertSame($exp, $act); } @@ -595,17 +595,17 @@ trait SeriesArticle { ]; } - public function testListArticlesWithoutAuthority() { + public function testListArticlesWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->articleList($this->user); } - public function testMarkNothing() { + public function testMarkNothing():void { $this->assertSame(0, Arsse::$db->articleMark($this->user, [])); } - public function testMarkAllArticlesUnread() { + public function testMarkAllArticlesUnread():void { Arsse::$db->articleMark($this->user, ['read'=>false]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -616,7 +616,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesRead() { + public function testMarkAllArticlesRead():void { Arsse::$db->articleMark($this->user, ['read'=>true]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -631,7 +631,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesUnstarred() { + public function testMarkAllArticlesUnstarred():void { Arsse::$db->articleMark($this->user, ['starred'=>false]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -642,7 +642,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesStarred() { + public function testMarkAllArticlesStarred():void { Arsse::$db->articleMark($this->user, ['starred'=>true]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -657,7 +657,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesUnreadAndUnstarred() { + public function testMarkAllArticlesUnreadAndUnstarred():void { Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>false]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -671,7 +671,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesReadAndStarred() { + public function testMarkAllArticlesReadAndStarred():void { Arsse::$db->articleMark($this->user, ['read'=>true,'starred'=>true]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -689,7 +689,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesUnreadAndStarred() { + public function testMarkAllArticlesUnreadAndStarred():void { Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -707,7 +707,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesReadAndUnstarred() { + public function testMarkAllArticlesReadAndUnstarred():void { Arsse::$db->articleMark($this->user, ['read'=>true,'starred'=>false]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -725,7 +725,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testSetNoteForAllArticles() { + public function testSetNoteForAllArticles():void { Arsse::$db->articleMark($this->user, ['note'=>"New note"]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -744,7 +744,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkATreeFolder() { + public function testMarkATreeFolder():void { Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(7)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -755,7 +755,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkALeafFolder() { + public function testMarkALeafFolder():void { Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(8)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -764,12 +764,12 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAMissingFolder() { + public function testMarkAMissingFolder():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(42)); } - public function testMarkASubscription() { + public function testMarkASubscription():void { Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->subscription(13)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -778,12 +778,12 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAMissingSubscription() { + public function testMarkAMissingSubscription():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(2112)); } - public function testMarkAnArticle() { + public function testMarkAnArticle():void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->article(20)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -792,7 +792,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleArticles() { + public function testMarkMultipleArticles():void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->articles([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -802,7 +802,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleArticlessUnreadAndStarred() { + public function testMarkMultipleArticlessUnreadAndStarred():void { Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->articles([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -815,16 +815,16 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkTooManyMultipleArticles() { + public function testMarkTooManyMultipleArticles():void { $this->assertSame(7, Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)))); } - public function testMarkAMissingArticle() { + public function testMarkAMissingArticle():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->article(1)); } - public function testMarkAnEdition() { + public function testMarkAnEdition():void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->edition(1001)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -833,7 +833,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleEditions() { + public function testMarkMultipleEditions():void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->editions([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -843,13 +843,13 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleMissingEditions() { + public function testMarkMultipleMissingEditions():void { $this->assertSame(0, Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->editions([500,501]))); $state = $this->primeExpectations($this->data, $this->checkTables); $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleEditionsUnread() { + public function testMarkMultipleEditionsUnread():void { Arsse::$db->articleMark($this->user, ['read'=>false], (new Context)->editions([2,4,7,1001])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -860,7 +860,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleEditionsUnreadWithStale() { + public function testMarkMultipleEditionsUnreadWithStale():void { Arsse::$db->articleMark($this->user, ['read'=>false], (new Context)->editions([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -869,7 +869,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleEditionsUnreadAndStarredWithStale() { + public function testMarkMultipleEditionsUnreadAndStarredWithStale():void { Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->editions([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -881,17 +881,17 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkTooManyMultipleEditions() { + public function testMarkTooManyMultipleEditions():void { $this->assertSame(7, Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->editions(range(1, 51)))); } - public function testMarkAStaleEditionUnread() { + public function testMarkAStaleEditionUnread():void { Arsse::$db->articleMark($this->user, ['read'=>false], (new Context)->edition(20)); // no changes occur $state = $this->primeExpectations($this->data, $this->checkTables); $this->compareExpectations(static::$drv, $state); } - public function testMarkAStaleEditionStarred() { + public function testMarkAStaleEditionStarred():void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->edition(20)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -900,7 +900,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAStaleEditionUnreadAndStarred() { + public function testMarkAStaleEditionUnreadAndStarred():void { Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->edition(20)); // only starred is changed $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -909,18 +909,18 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAStaleEditionUnreadAndUnstarred() { + public function testMarkAStaleEditionUnreadAndUnstarred():void { Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>false], (new Context)->edition(20)); // no changes occur $state = $this->primeExpectations($this->data, $this->checkTables); $this->compareExpectations(static::$drv, $state); } - public function testMarkAMissingEdition() { + public function testMarkAMissingEdition():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->edition(2)); } - public function testMarkByOldestEdition() { + public function testMarkByOldestEdition():void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->oldestEdition(19)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -931,7 +931,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkByLatestEdition() { + public function testMarkByLatestEdition():void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->latestEdition(20)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -944,7 +944,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkByLastMarked() { + public function testMarkByLastMarked():void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->markedSince('2017-01-01T00:00:00Z')); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -955,7 +955,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkByNotLastMarked() { + public function testMarkByNotLastMarked():void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->notMarkedSince('2000-01-01T00:00:00Z')); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -964,55 +964,55 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkArticlesWithoutAuthority() { + public function testMarkArticlesWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->articleMark($this->user, ['read'=>false]); } - public function testCountArticles() { + public function testCountArticles():void { $this->assertSame(2, Arsse::$db->articleCount("john.doe@example.com", (new Context)->starred(true))); $this->assertSame(4, Arsse::$db->articleCount("john.doe@example.com", (new Context)->folder(1))); $this->assertSame(0, Arsse::$db->articleCount("jane.doe@example.com", (new Context)->starred(true))); $this->assertSame(10, Arsse::$db->articleCount("john.doe@example.com", (new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)))); } - public function testCountArticlesWithoutAuthority() { + public function testCountArticlesWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->articleCount($this->user); } - public function testFetchStarredCounts() { + public function testFetchStarredCounts():void { $exp1 = ['total' => 2, 'unread' => 1, 'read' => 1]; $exp2 = ['total' => 0, 'unread' => 0, 'read' => 0]; $this->assertEquals($exp1, Arsse::$db->articleStarred("john.doe@example.com")); $this->assertEquals($exp2, Arsse::$db->articleStarred("jane.doe@example.com")); } - public function testFetchStarredCountsWithoutAuthority() { + public function testFetchStarredCountsWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->articleStarred($this->user); } - public function testFetchLatestEdition() { + public function testFetchLatestEdition():void { $this->assertSame(1001, Arsse::$db->editionLatest($this->user)); $this->assertSame(4, Arsse::$db->editionLatest($this->user, (new Context)->subscription(12))); } - public function testFetchLatestEditionOfMissingSubscription() { + public function testFetchLatestEditionOfMissingSubscription():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->editionLatest($this->user, (new Context)->subscription(1)); } - public function testFetchLatestEditionWithoutAuthority() { + public function testFetchLatestEditionWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->editionLatest($this->user); } - public function testListTheLabelsOfAnArticle() { + public function testListTheLabelsOfAnArticle():void { $this->assertEquals([1,2], Arsse::$db->articleLabelsGet("john.doe@example.com", 1)); $this->assertEquals([2], Arsse::$db->articleLabelsGet("john.doe@example.com", 5)); $this->assertEquals([], Arsse::$db->articleLabelsGet("john.doe@example.com", 2)); @@ -1021,18 +1021,18 @@ trait SeriesArticle { $this->assertEquals([], Arsse::$db->articleLabelsGet("john.doe@example.com", 2, true)); } - public function testListTheLabelsOfAMissingArticle() { + public function testListTheLabelsOfAMissingArticle():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->articleLabelsGet($this->user, 101); } - public function testListTheLabelsOfAnArticleWithoutAuthority() { + public function testListTheLabelsOfAnArticleWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->articleLabelsGet("john.doe@example.com", 1); } - public function testListTheCategoriesOfAnArticle() { + public function testListTheCategoriesOfAnArticle():void { $exp = ["Fascinating", "Logical"]; $this->assertSame($exp, Arsse::$db->articleCategoriesGet($this->user, 19)); $exp = ["Interesting", "Logical"]; @@ -1041,19 +1041,19 @@ trait SeriesArticle { $this->assertSame($exp, Arsse::$db->articleCategoriesGet($this->user, 4)); } - public function testListTheCategoriesOfAMissingArticle() { + public function testListTheCategoriesOfAMissingArticle():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->articleCategoriesGet($this->user, 101); } - public function testListTheCategoriesOfAnArticleWithoutAuthority() { + public function testListTheCategoriesOfAnArticleWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->articleCategoriesGet($this->user, 19); } /** @dataProvider provideArrayContextOptions */ - public function testUseTooFewValuesInArrayContext(string $option) { + public function testUseTooFewValuesInArrayContext(string $option):void { $this->assertException("tooShort", "Db", "ExceptionInput"); Arsse::$db->articleList($this->user, (new Context)->$option([])); } diff --git a/tests/cases/Database/SeriesCleanup.php b/tests/cases/Database/SeriesCleanup.php index 1b0a9fc6..7482243f 100644 --- a/tests/cases/Database/SeriesCleanup.php +++ b/tests/cases/Database/SeriesCleanup.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; trait SeriesCleanup { - protected function setUpSeriesCleanup() { + protected function setUpSeriesCleanup():void { // set up the configuration Arsse::$conf->import([ 'userSessionTimeout' => "PT1H", @@ -147,11 +147,11 @@ trait SeriesCleanup { ]; } - protected function tearDownSeriesCleanup() { + protected function tearDownSeriesCleanup():void { unset($this->data); } - public function testCleanUpOrphanedFeeds() { + public function testCleanUpOrphanedFeeds():void { Arsse::$db->feedCleanup(); $now = gmdate("Y-m-d H:i:s"); $state = $this->primeExpectations($this->data, [ @@ -163,7 +163,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpOrphanedFeedsWithUnlimitedRetention() { + public function testCleanUpOrphanedFeedsWithUnlimitedRetention():void { Arsse::$conf->import([ 'purgeFeeds' => null, ]); @@ -177,7 +177,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpOldArticlesWithStandardRetention() { + public function testCleanUpOldArticlesWithStandardRetention():void { Arsse::$db->articleCleanup(); $state = $this->primeExpectations($this->data, [ 'arsse_articles' => ["id"] @@ -188,7 +188,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpOldArticlesWithUnlimitedReadRetention() { + public function testCleanUpOldArticlesWithUnlimitedReadRetention():void { Arsse::$conf->import([ 'purgeArticlesRead' => null, ]); @@ -202,7 +202,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpOldArticlesWithUnlimitedUnreadRetention() { + public function testCleanUpOldArticlesWithUnlimitedUnreadRetention():void { Arsse::$conf->import([ 'purgeArticlesUnread' => null, ]); @@ -216,7 +216,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpOldArticlesWithUnlimitedRetention() { + public function testCleanUpOldArticlesWithUnlimitedRetention():void { Arsse::$conf->import([ 'purgeArticlesRead' => null, 'purgeArticlesUnread' => null, @@ -228,7 +228,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpExpiredSessions() { + public function testCleanUpExpiredSessions():void { Arsse::$db->sessionCleanup(); $state = $this->primeExpectations($this->data, [ 'arsse_sessions' => ["id"] @@ -239,7 +239,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpExpiredTokens() { + public function testCleanUpExpiredTokens():void { Arsse::$db->tokenCleanup(); $state = $this->primeExpectations($this->data, [ 'arsse_tokens' => ["id", "class"] diff --git a/tests/cases/Database/SeriesFeed.php b/tests/cases/Database/SeriesFeed.php index 8db02351..ce5e074e 100644 --- a/tests/cases/Database/SeriesFeed.php +++ b/tests/cases/Database/SeriesFeed.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; trait SeriesFeed { - protected function setUpSeriesFeed() { + protected function setUpSeriesFeed():void { // set up the test data $past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); $future = gmdate("Y-m-d H:i:s", strtotime("now + 1 minute")); @@ -160,15 +160,15 @@ trait SeriesFeed { ]; } - protected function tearDownSeriesFeed() { + protected function tearDownSeriesFeed():void { unset($this->data, $this->matches); } - public function testListLatestItems() { + public function testListLatestItems():void { $this->assertResult($this->matches, Arsse::$db->feedMatchLatest(1, 2)); } - public function testMatchItemsById() { + public function testMatchItemsById():void { $this->assertResult($this->matches, Arsse::$db->feedMatchIds(1, ['804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180','db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41'])); foreach ($this->matches as $m) { $exp = [$m]; @@ -179,7 +179,7 @@ trait SeriesFeed { $this->assertResult([['id' => 1]], Arsse::$db->feedMatchIds(1, ['e433653cef2e572eee4215fa299a4a5af9137b2cefd6283c85bd69a32915beda'])); // this ID appears in both feed 1 and feed 2; only one result should be returned } - public function testUpdateAFeed() { + public function testUpdateAFeed():void { // update a valid feed with both new and changed items Arsse::$db->feedUpdate(1); $now = gmdate("Y-m-d H:i:s"); @@ -219,22 +219,22 @@ trait SeriesFeed { $this->compareExpectations(static::$drv, $state); } - public function testUpdateAMissingFeed() { + public function testUpdateAMissingFeed():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->feedUpdate(2112); } - public function testUpdateAnInvalidFeed() { + public function testUpdateAnInvalidFeed():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->feedUpdate(-1); } - public function testUpdateAFeedThrowingExceptions() { + public function testUpdateAFeedThrowingExceptions():void { $this->assertException("invalidUrl", "Feed"); Arsse::$db->feedUpdate(3, true); } - public function testUpdateAFeedWithEnclosuresAndCategories() { + public function testUpdateAFeedWithEnclosuresAndCategories():void { Arsse::$db->feedUpdate(5); $state = $this->primeExpectations($this->data, [ 'arsse_enclosures' => ["url","type"], @@ -254,7 +254,7 @@ trait SeriesFeed { $this->compareExpectations(static::$drv, $state); } - public function testListStaleFeeds() { + public function testListStaleFeeds():void { $this->assertEquals([1,3,4], Arsse::$db->feedListStale()); Arsse::$db->feedUpdate(3); Arsse::$db->feedUpdate(4); diff --git a/tests/cases/Database/SeriesFolder.php b/tests/cases/Database/SeriesFolder.php index 907454b6..9c73a3ea 100644 --- a/tests/cases/Database/SeriesFolder.php +++ b/tests/cases/Database/SeriesFolder.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; trait SeriesFolder { - protected function setUpSeriesFolder() { + protected function setUpSeriesFolder():void { $this->data = [ 'arsse_users' => [ 'columns' => [ @@ -93,11 +93,11 @@ trait SeriesFolder { ]; } - protected function tearDownSeriesFolder() { + protected function tearDownSeriesFolder():void { unset($this->data); } - public function testAddARootFolder() { + public function testAddARootFolder():void { $user = "john.doe@example.com"; $folderID = $this->nextID("arsse_folders"); $this->assertSame($folderID, Arsse::$db->folderAdd($user, ['name' => "Entertainment"])); @@ -107,12 +107,12 @@ trait SeriesFolder { $this->compareExpectations(static::$drv, $state); } - public function testAddADuplicateRootFolder() { + public function testAddADuplicateRootFolder():void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => "Politics"]); } - public function testAddANestedFolder() { + public function testAddANestedFolder():void { $user = "john.doe@example.com"; $folderID = $this->nextID("arsse_folders"); $this->assertSame($folderID, Arsse::$db->folderAdd($user, ['name' => "GNOME", 'parent' => 2])); @@ -122,43 +122,43 @@ trait SeriesFolder { $this->compareExpectations(static::$drv, $state); } - public function testAddANestedFolderToAMissingParent() { + public function testAddANestedFolderToAMissingParent():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => "Sociology", 'parent' => 2112]); } - public function testAddANestedFolderToAnInvalidParent() { + public function testAddANestedFolderToAnInvalidParent():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => "Sociology", 'parent' => "stringFolderId"]); } - public function testAddANestedFolderForTheWrongOwner() { + public function testAddANestedFolderForTheWrongOwner():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => "Sociology", 'parent' => 4]); // folder ID 4 belongs to Jane } - public function testAddAFolderWithAMissingName() { + public function testAddAFolderWithAMissingName():void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", []); } - public function testAddAFolderWithABlankName() { + public function testAddAFolderWithABlankName():void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => ""]); } - public function testAddAFolderWithAWhitespaceName() { + public function testAddAFolderWithAWhitespaceName():void { $this->assertException("whitespace", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => " "]); } - public function testAddAFolderWithoutAuthority() { + public function testAddAFolderWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => "Sociology"]); } - public function testListRootFolders() { + public function testListRootFolders():void { $exp = [ ['id' => 5, 'name' => "Politics", 'parent' => null, 'children' => 0, 'feeds' => 2], ['id' => 1, 'name' => "Technology", 'parent' => null, 'children' => 2, 'feeds' => 1], @@ -175,7 +175,7 @@ trait SeriesFolder { \Phake::verify(Arsse::$user)->authorize("admin@example.net", "folderList"); } - public function testListFoldersRecursively() { + public function testListFoldersRecursively():void { $exp = [ ['id' => 5, 'name' => "Politics", 'parent' => null, 'children' => 0, 'feeds' => 2], ['id' => 6, 'name' => "Politics", 'parent' => 2, 'children' => 0, 'feeds' => 1], @@ -196,23 +196,23 @@ trait SeriesFolder { \Phake::verify(Arsse::$user)->authorize("jane.doe@example.com", "folderList"); } - public function testListFoldersOfAMissingParent() { + public function testListFoldersOfAMissingParent():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->folderList("john.doe@example.com", 2112); } - public function testListFoldersOfTheWrongOwner() { + public function testListFoldersOfTheWrongOwner():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->folderList("john.doe@example.com", 4); // folder ID 4 belongs to Jane } - public function testListFoldersWithoutAuthority() { + public function testListFoldersWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->folderList("john.doe@example.com"); } - public function testRemoveAFolder() { + public function testRemoveAFolder():void { $this->assertTrue(Arsse::$db->folderRemove("john.doe@example.com", 6)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "folderRemove"); $state = $this->primeExpectations($this->data, ['arsse_folders' => ['id','owner', 'parent', 'name']]); @@ -220,7 +220,7 @@ trait SeriesFolder { $this->compareExpectations(static::$drv, $state); } - public function testRemoveAFolderTree() { + public function testRemoveAFolderTree():void { $this->assertTrue(Arsse::$db->folderRemove("john.doe@example.com", 1)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "folderRemove"); $state = $this->primeExpectations($this->data, ['arsse_folders' => ['id','owner', 'parent', 'name']]); @@ -230,28 +230,28 @@ trait SeriesFolder { $this->compareExpectations(static::$drv, $state); } - public function testRemoveAMissingFolder() { + public function testRemoveAMissingFolder():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->folderRemove("john.doe@example.com", 2112); } - public function testRemoveAnInvalidFolder() { + public function testRemoveAnInvalidFolder():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->folderRemove("john.doe@example.com", -1); } - public function testRemoveAFolderOfTheWrongOwner() { + public function testRemoveAFolderOfTheWrongOwner():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->folderRemove("john.doe@example.com", 4); // folder ID 4 belongs to Jane } - public function testRemoveAFolderWithoutAuthority() { + public function testRemoveAFolderWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->folderRemove("john.doe@example.com", 1); } - public function testGetThePropertiesOfAFolder() { + public function testGetThePropertiesOfAFolder():void { $exp = [ 'id' => 6, 'name' => "Politics", @@ -261,32 +261,32 @@ trait SeriesFolder { \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "folderPropertiesGet"); } - public function testGetThePropertiesOfAMissingFolder() { + public function testGetThePropertiesOfAMissingFolder():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesGet("john.doe@example.com", 2112); } - public function testGetThePropertiesOfAnInvalidFolder() { + public function testGetThePropertiesOfAnInvalidFolder():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesGet("john.doe@example.com", -1); } - public function testGetThePropertiesOfAFolderOfTheWrongOwner() { + public function testGetThePropertiesOfAFolderOfTheWrongOwner():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesGet("john.doe@example.com", 4); // folder ID 4 belongs to Jane } - public function testGetThePropertiesOfAFolderWithoutAuthority() { + public function testGetThePropertiesOfAFolderWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->folderPropertiesGet("john.doe@example.com", 1); } - public function testMakeNoChangesToAFolder() { + public function testMakeNoChangesToAFolder():void { $this->assertFalse(Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, [])); } - public function testRenameAFolder() { + public function testRenameAFolder():void { $this->assertTrue(Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, ['name' => "Opinion"])); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "folderPropertiesSet"); $state = $this->primeExpectations($this->data, ['arsse_folders' => ['id','owner', 'parent', 'name']]); @@ -294,26 +294,26 @@ trait SeriesFolder { $this->compareExpectations(static::$drv, $state); } - public function testRenameTheRootFolder() { + public function testRenameTheRootFolder():void { $this->assertFalse(Arsse::$db->folderPropertiesSet("john.doe@example.com", null, ['name' => "Opinion"])); } - public function testRenameAFolderToTheEmptyString() { + public function testRenameAFolderToTheEmptyString():void { $this->assertException("missing", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, ['name' => ""])); } - public function testRenameAFolderToWhitespaceOnly() { + public function testRenameAFolderToWhitespaceOnly():void { $this->assertException("whitespace", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, ['name' => " "])); } - public function testRenameAFolderToAnInvalidValue() { + public function testRenameAFolderToAnInvalidValue():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, ['name' => []])); } - public function testMoveAFolder() { + public function testMoveAFolder():void { $this->assertTrue(Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, ['parent' => 5])); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "folderPropertiesSet"); $state = $this->primeExpectations($this->data, ['arsse_folders' => ['id','owner', 'parent', 'name']]); @@ -321,57 +321,57 @@ trait SeriesFolder { $this->compareExpectations(static::$drv, $state); } - public function testMoveTheRootFolder() { + public function testMoveTheRootFolder():void { $this->assertException("circularDependence", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 0, ['parent' => 1]); } - public function testMoveAFolderToItsDescendant() { + public function testMoveAFolderToItsDescendant():void { $this->assertException("circularDependence", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 1, ['parent' => 3]); } - public function testMoveAFolderToItself() { + public function testMoveAFolderToItself():void { $this->assertException("circularDependence", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 1, ['parent' => 1]); } - public function testMoveAFolderToAMissingParent() { + public function testMoveAFolderToAMissingParent():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 1, ['parent' => 2112]); } - public function testMoveAFolderToAnInvalidParent() { + public function testMoveAFolderToAnInvalidParent():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 1, ['parent' => "ThisFolderDoesNotExist"]); } - public function testCauseAFolderCollision() { + public function testCauseAFolderCollision():void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, ['parent' => null]); } - public function testCauseACompoundFolderCollision() { + public function testCauseACompoundFolderCollision():void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 3, ['parent' => null, 'name' => "Technology"]); } - public function testSetThePropertiesOfAMissingFolder() { + public function testSetThePropertiesOfAMissingFolder():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 2112, ['parent' => null]); } - public function testSetThePropertiesOfAnInvalidFolder() { + public function testSetThePropertiesOfAnInvalidFolder():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", -1, ['parent' => null]); } - public function testSetThePropertiesOfAFolderForTheWrongOwner() { + public function testSetThePropertiesOfAFolderForTheWrongOwner():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 4, ['parent' => null]); // folder ID 4 belongs to Jane } - public function testSetThePropertiesOfAFolderWithoutAuthority() { + public function testSetThePropertiesOfAFolderWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 1, ['parent' => null]); diff --git a/tests/cases/Database/SeriesLabel.php b/tests/cases/Database/SeriesLabel.php index 677e8e67..0cf55ca8 100644 --- a/tests/cases/Database/SeriesLabel.php +++ b/tests/cases/Database/SeriesLabel.php @@ -11,7 +11,7 @@ use JKingWeb\Arsse\Database; use JKingWeb\Arsse\Context\Context; trait SeriesLabel { - protected function setUpSeriesLabel() { + protected function setUpSeriesLabel():void { $this->data = [ 'arsse_users' => [ 'columns' => [ @@ -244,11 +244,11 @@ trait SeriesLabel { $this->user = "john.doe@example.com"; } - protected function tearDownSeriesLabel() { + protected function tearDownSeriesLabel():void { unset($this->data, $this->checkLabels, $this->checkMembers, $this->user); } - public function testAddALabel() { + public function testAddALabel():void { $user = "john.doe@example.com"; $labelID = $this->nextID("arsse_labels"); $this->assertSame($labelID, Arsse::$db->labelAdd($user, ['name' => "Entertaining"])); @@ -258,33 +258,33 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testAddADuplicateLabel() { + public function testAddADuplicateLabel():void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->labelAdd("john.doe@example.com", ['name' => "Interesting"]); } - public function testAddALabelWithAMissingName() { + public function testAddALabelWithAMissingName():void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->labelAdd("john.doe@example.com", []); } - public function testAddALabelWithABlankName() { + public function testAddALabelWithABlankName():void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->labelAdd("john.doe@example.com", ['name' => ""]); } - public function testAddALabelWithAWhitespaceName() { + public function testAddALabelWithAWhitespaceName():void { $this->assertException("whitespace", "Db", "ExceptionInput"); Arsse::$db->labelAdd("john.doe@example.com", ['name' => " "]); } - public function testAddALabelWithoutAuthority() { + public function testAddALabelWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelAdd("john.doe@example.com", ['name' => "Boring"]); } - public function testListLabels() { + public function testListLabels():void { $exp = [ ['id' => 2, 'name' => "Fascinating", 'articles' => 3, 'read' => 1], ['id' => 1, 'name' => "Interesting", 'articles' => 2, 'read' => 2], @@ -300,13 +300,13 @@ trait SeriesLabel { \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "labelList"); } - public function testListLabelsWithoutAuthority() { + public function testListLabelsWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelList("john.doe@example.com"); } - public function testRemoveALabel() { + public function testRemoveALabel():void { $this->assertTrue(Arsse::$db->labelRemove("john.doe@example.com", 1)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "labelRemove"); $state = $this->primeExpectations($this->data, $this->checkLabels); @@ -314,7 +314,7 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testRemoveALabelByName() { + public function testRemoveALabelByName():void { $this->assertTrue(Arsse::$db->labelRemove("john.doe@example.com", "Interesting", true)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "labelRemove"); $state = $this->primeExpectations($this->data, $this->checkLabels); @@ -322,33 +322,33 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testRemoveAMissingLabel() { + public function testRemoveAMissingLabel():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelRemove("john.doe@example.com", 2112); } - public function testRemoveAnInvalidLabel() { + public function testRemoveAnInvalidLabel():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelRemove("john.doe@example.com", -1); } - public function testRemoveAnInvalidLabelByName() { + public function testRemoveAnInvalidLabelByName():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelRemove("john.doe@example.com", [], true); } - public function testRemoveALabelOfTheWrongOwner() { + public function testRemoveALabelOfTheWrongOwner():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelRemove("john.doe@example.com", 3); // label ID 3 belongs to Jane } - public function testRemoveALabelWithoutAuthority() { + public function testRemoveALabelWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelRemove("john.doe@example.com", 1); } - public function testGetThePropertiesOfALabel() { + public function testGetThePropertiesOfALabel():void { $exp = [ 'id' => 2, 'name' => "Fascinating", @@ -360,37 +360,37 @@ trait SeriesLabel { \Phake::verify(Arsse::$user, \Phake::times(2))->authorize("john.doe@example.com", "labelPropertiesGet"); } - public function testGetThePropertiesOfAMissingLabel() { + public function testGetThePropertiesOfAMissingLabel():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesGet("john.doe@example.com", 2112); } - public function testGetThePropertiesOfAnInvalidLabel() { + public function testGetThePropertiesOfAnInvalidLabel():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesGet("john.doe@example.com", -1); } - public function testGetThePropertiesOfAnInvalidLabelByName() { + public function testGetThePropertiesOfAnInvalidLabelByName():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesGet("john.doe@example.com", [], true); } - public function testGetThePropertiesOfALabelOfTheWrongOwner() { + public function testGetThePropertiesOfALabelOfTheWrongOwner():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesGet("john.doe@example.com", 3); // label ID 3 belongs to Jane } - public function testGetThePropertiesOfALabelWithoutAuthority() { + public function testGetThePropertiesOfALabelWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelPropertiesGet("john.doe@example.com", 1); } - public function testMakeNoChangesToALabel() { + public function testMakeNoChangesToALabel():void { $this->assertFalse(Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, [])); } - public function testRenameALabel() { + public function testRenameALabel():void { $this->assertTrue(Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, ['name' => "Curious"])); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "labelPropertiesSet"); $state = $this->primeExpectations($this->data, $this->checkLabels); @@ -398,7 +398,7 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testRenameALabelByName() { + public function testRenameALabelByName():void { $this->assertTrue(Arsse::$db->labelPropertiesSet("john.doe@example.com", "Interesting", ['name' => "Curious"], true)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "labelPropertiesSet"); $state = $this->primeExpectations($this->data, $this->checkLabels); @@ -406,53 +406,53 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testRenameALabelToTheEmptyString() { + public function testRenameALabelToTheEmptyString():void { $this->assertException("missing", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, ['name' => ""])); } - public function testRenameALabelToWhitespaceOnly() { + public function testRenameALabelToWhitespaceOnly():void { $this->assertException("whitespace", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, ['name' => " "])); } - public function testRenameALabelToAnInvalidValue() { + public function testRenameALabelToAnInvalidValue():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, ['name' => []])); } - public function testCauseALabelCollision() { + public function testCauseALabelCollision():void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, ['name' => "Fascinating"]); } - public function testSetThePropertiesOfAMissingLabel() { + public function testSetThePropertiesOfAMissingLabel():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesSet("john.doe@example.com", 2112, ['name' => "Exciting"]); } - public function testSetThePropertiesOfAnInvalidLabel() { + public function testSetThePropertiesOfAnInvalidLabel():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesSet("john.doe@example.com", -1, ['name' => "Exciting"]); } - public function testSetThePropertiesOfAnInvalidLabelByName() { + public function testSetThePropertiesOfAnInvalidLabelByName():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesSet("john.doe@example.com", [], ['name' => "Exciting"], true); } - public function testSetThePropertiesOfALabelForTheWrongOwner() { + public function testSetThePropertiesOfALabelForTheWrongOwner():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesSet("john.doe@example.com", 3, ['name' => "Exciting"]); // label ID 3 belongs to Jane } - public function testSetThePropertiesOfALabelWithoutAuthority() { + public function testSetThePropertiesOfALabelWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, ['name' => "Exciting"]); } - public function testListLabelledArticles() { + public function testListLabelledArticles():void { $exp = [1,19]; $this->assertEquals($exp, Arsse::$db->labelArticlesGet("john.doe@example.com", 1)); $this->assertEquals($exp, Arsse::$db->labelArticlesGet("john.doe@example.com", "Interesting", true)); @@ -464,23 +464,23 @@ trait SeriesLabel { $this->assertEquals($exp, Arsse::$db->labelArticlesGet("john.doe@example.com", "Lonely", true)); } - public function testListLabelledArticlesForAMissingLabel() { + public function testListLabelledArticlesForAMissingLabel():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelArticlesGet("john.doe@example.com", 3); } - public function testListLabelledArticlesForAnInvalidLabel() { + public function testListLabelledArticlesForAnInvalidLabel():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelArticlesGet("john.doe@example.com", -1); } - public function testListLabelledArticlesWithoutAuthority() { + public function testListLabelledArticlesWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelArticlesGet("john.doe@example.com", 1); } - public function testApplyALabelToArticles() { + public function testApplyALabelToArticles():void { Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([2,5])); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_label_members']['rows'][4][3] = 1; @@ -488,14 +488,14 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testClearALabelFromArticles() { + public function testClearALabelFromArticles():void { Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([1,5]), Database::ASSOC_REMOVE); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_label_members']['rows'][0][3] = 0; $this->compareExpectations(static::$drv, $state); } - public function testApplyALabelToArticlesByName() { + public function testApplyALabelToArticlesByName():void { Arsse::$db->labelArticlesSet("john.doe@example.com", "Interesting", (new Context)->articles([2,5]), Database::ASSOC_ADD, true); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_label_members']['rows'][4][3] = 1; @@ -503,26 +503,26 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testClearALabelFromArticlesByName() { + public function testClearALabelFromArticlesByName():void { Arsse::$db->labelArticlesSet("john.doe@example.com", "Interesting", (new Context)->articles([1,5]), Database::ASSOC_REMOVE, true); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_label_members']['rows'][0][3] = 0; $this->compareExpectations(static::$drv, $state); } - public function testApplyALabelToNoArticles() { + public function testApplyALabelToNoArticles():void { Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([10000])); $state = $this->primeExpectations($this->data, $this->checkMembers); $this->compareExpectations(static::$drv, $state); } - public function testClearALabelFromNoArticles() { + public function testClearALabelFromNoArticles():void { Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([10000]), Database::ASSOC_REMOVE); $state = $this->primeExpectations($this->data, $this->checkMembers); $this->compareExpectations(static::$drv, $state); } - public function testReplaceArticlesOfALabel() { + public function testReplaceArticlesOfALabel():void { Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([2,5]), Database::ASSOC_REPLACE); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_label_members']['rows'][0][3] = 0; @@ -532,7 +532,7 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testPurgeArticlesOfALabel() { + public function testPurgeArticlesOfALabel():void { Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([10000]), Database::ASSOC_REPLACE); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_label_members']['rows'][0][3] = 0; @@ -540,7 +540,7 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testApplyALabelToArticlesWithoutAuthority() { + public function testApplyALabelToArticlesWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([2,5])); diff --git a/tests/cases/Database/SeriesMeta.php b/tests/cases/Database/SeriesMeta.php index 485c7155..2a617c6f 100644 --- a/tests/cases/Database/SeriesMeta.php +++ b/tests/cases/Database/SeriesMeta.php @@ -10,7 +10,7 @@ use JKingWeb\Arsse\Test\Database; use JKingWeb\Arsse\Arsse; trait SeriesMeta { - protected function setUpSeriesMeta() { + protected function setUpSeriesMeta():void { $dataBare = [ 'arsse_meta' => [ 'columns' => [ @@ -31,18 +31,18 @@ trait SeriesMeta { $this->primeDatabase(static::$drv, $dataBare); } - protected function tearDownSeriesMeta() { + protected function tearDownSeriesMeta():void { unset($this->data); } - public function testAddANewValue() { + public function testAddANewValue():void { $this->assertTrue(Arsse::$db->metaSet("favourite", "Cygnus X-1")); $state = $this->primeExpectations($this->data, ['arsse_meta' => ['key','value']]); $state['arsse_meta']['rows'][] = ["favourite","Cygnus X-1"]; $this->compareExpectations(static::$drv, $state); } - public function testAddANewTypedValue() { + public function testAddANewTypedValue():void { $this->assertTrue(Arsse::$db->metaSet("answer", 42, "int")); $this->assertTrue(Arsse::$db->metaSet("true", true, "bool")); $this->assertTrue(Arsse::$db->metaSet("false", false, "bool")); @@ -55,14 +55,14 @@ trait SeriesMeta { $this->compareExpectations(static::$drv, $state); } - public function testChangeAnExistingValue() { + public function testChangeAnExistingValue():void { $this->assertTrue(Arsse::$db->metaSet("album", "Hemispheres")); $state = $this->primeExpectations($this->data, ['arsse_meta' => ['key','value']]); $state['arsse_meta']['rows'][1][1] = "Hemispheres"; $this->compareExpectations(static::$drv, $state); } - public function testRemoveAValue() { + public function testRemoveAValue():void { $this->assertTrue(Arsse::$db->metaRemove("album")); $this->assertFalse(Arsse::$db->metaRemove("album")); $state = $this->primeExpectations($this->data, ['arsse_meta' => ['key','value']]); @@ -70,7 +70,7 @@ trait SeriesMeta { $this->compareExpectations(static::$drv, $state); } - public function testRetrieveAValue() { + public function testRetrieveAValue():void { $this->assertSame("".Database::SCHEMA_VERSION, Arsse::$db->metaGet("schema_version")); $this->assertSame("A Farewell to Kings", Arsse::$db->metaGet("album")); $this->assertSame(null, Arsse::$db->metaGet("this_key_does_not_exist")); diff --git a/tests/cases/Database/SeriesMiscellany.php b/tests/cases/Database/SeriesMiscellany.php index cb324b4a..03009eff 100644 --- a/tests/cases/Database/SeriesMiscellany.php +++ b/tests/cases/Database/SeriesMiscellany.php @@ -10,22 +10,22 @@ use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Database; trait SeriesMiscellany { - protected function setUpSeriesMiscellany() { + protected function setUpSeriesMiscellany():void { static::setConf([ 'dbDriver' => static::$dbDriverClass, ]); } - protected function tearDownSeriesMiscellany() { + protected function tearDownSeriesMiscellany():void { } - public function testInitializeDatabase() { + public function testInitializeDatabase():void { static::dbRaze(static::$drv); $d = new Database(true); $this->assertSame(Database::SCHEMA_VERSION, $d->driverSchemaVersion()); } - public function testManuallyInitializeDatabase() { + public function testManuallyInitializeDatabase():void { static::dbRaze(static::$drv); $d = new Database(false); $this->assertSame(0, $d->driverSchemaVersion()); @@ -34,11 +34,11 @@ trait SeriesMiscellany { $this->assertFalse($d->driverSchemaUpdate()); } - public function testCheckCharacterSetAcceptability() { + public function testCheckCharacterSetAcceptability():void { $this->assertIsBool(Arsse::$db->driverCharsetAcceptable()); } - public function testPerformMaintenance() { + public function testPerformMaintenance():void { $this->assertTrue(Arsse::$db->driverMaintenance()); } } diff --git a/tests/cases/Database/SeriesSession.php b/tests/cases/Database/SeriesSession.php index 6322d72d..7e5b7c4a 100644 --- a/tests/cases/Database/SeriesSession.php +++ b/tests/cases/Database/SeriesSession.php @@ -10,7 +10,7 @@ use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Misc\Date; trait SeriesSession { - protected function setUpSeriesSession() { + protected function setUpSeriesSession():void { // set up the configuration static::setConf([ 'userSessionTimeout' => "PT1H", @@ -49,11 +49,11 @@ trait SeriesSession { ]; } - protected function tearDownSeriesSession() { + protected function tearDownSeriesSession():void { unset($this->data); } - public function testResumeAValidSession() { + public function testResumeAValidSession():void { $exp1 = [ 'id' => "80fa94c1a11f11e78667001e673b2560", 'user' => "jane.doe@example.com" @@ -74,22 +74,22 @@ trait SeriesSession { $this->assertArraySubset($exp1, Arsse::$db->sessionResume("80fa94c1a11f11e78667001e673b2560")); } - public function testResumeAMissingSession() { + public function testResumeAMissingSession():void { $this->assertException("invalid", "User", "ExceptionSession"); Arsse::$db->sessionResume("thisSessionDoesNotExist"); } - public function testResumeAnExpiredSession() { + public function testResumeAnExpiredSession():void { $this->assertException("invalid", "User", "ExceptionSession"); Arsse::$db->sessionResume("27c6de8da13311e78667001e673b2560"); } - public function testResumeAStaleSession() { + public function testResumeAStaleSession():void { $this->assertException("invalid", "User", "ExceptionSession"); Arsse::$db->sessionResume("ab3b3eb8a13311e78667001e673b2560"); } - public function testCreateASession() { + public function testCreateASession():void { $user = "jane.doe@example.com"; $id = Arsse::$db->sessionCreate($user); $now = time(); @@ -98,13 +98,13 @@ trait SeriesSession { $this->compareExpectations(static::$drv, $state); } - public function testCreateASessionWithoutAuthority() { + public function testCreateASessionWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->sessionCreate("jane.doe@example.com"); } - public function testDestroyASession() { + public function testDestroyASession():void { $user = "jane.doe@example.com"; $id = "80fa94c1a11f11e78667001e673b2560"; $this->assertTrue(Arsse::$db->sessionDestroy($user, $id)); @@ -115,7 +115,7 @@ trait SeriesSession { $this->assertFalse(Arsse::$db->sessionDestroy($user, $id)); } - public function testDestroyAllSessions() { + public function testDestroyAllSessions():void { $user = "jane.doe@example.com"; $this->assertTrue(Arsse::$db->sessionDestroy($user)); $state = $this->primeExpectations($this->data, ['arsse_sessions' => ["id", "created", "expires", "user"]]); @@ -125,13 +125,13 @@ trait SeriesSession { $this->compareExpectations(static::$drv, $state); } - public function testDestroyASessionForTheWrongUser() { + public function testDestroyASessionForTheWrongUser():void { $user = "john.doe@example.com"; $id = "80fa94c1a11f11e78667001e673b2560"; $this->assertFalse(Arsse::$db->sessionDestroy($user, $id)); } - public function testDestroyASessionWithoutAuthority() { + public function testDestroyASessionWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->sessionDestroy("jane.doe@example.com", "80fa94c1a11f11e78667001e673b2560"); diff --git a/tests/cases/Database/SeriesSubscription.php b/tests/cases/Database/SeriesSubscription.php index 001de89d..8f6f3043 100644 --- a/tests/cases/Database/SeriesSubscription.php +++ b/tests/cases/Database/SeriesSubscription.php @@ -11,7 +11,7 @@ use JKingWeb\Arsse\Test\Database; use JKingWeb\Arsse\Feed\Exception as FeedException; trait SeriesSubscription { - public function setUpSeriesSubscription() { + public function setUpSeriesSubscription():void { $this->data = [ 'arsse_users' => [ 'columns' => [ @@ -143,11 +143,11 @@ trait SeriesSubscription { $this->user = "john.doe@example.com"; } - protected function tearDownSeriesSubscription() { + protected function tearDownSeriesSubscription():void { unset($this->data, $this->user); } - public function testAddASubscriptionToAnExistingFeed() { + public function testAddASubscriptionToAnExistingFeed():void { $url = "http://example.com/feed1"; $subID = $this->nextID("arsse_subscriptions"); \Phake::when(Arsse::$db)->feedUpdate->thenReturn(true); @@ -162,7 +162,7 @@ trait SeriesSubscription { $this->compareExpectations(static::$drv, $state); } - public function testAddASubscriptionToANewFeed() { + public function testAddASubscriptionToANewFeed():void { $url = "http://example.org/feed1"; $feedID = $this->nextID("arsse_feeds"); $subID = $this->nextID("arsse_subscriptions"); @@ -179,7 +179,7 @@ trait SeriesSubscription { $this->compareExpectations(static::$drv, $state); } - public function testAddASubscriptionToANewFeedViaDiscovery() { + public function testAddASubscriptionToANewFeedViaDiscovery():void { $url = "http://localhost:8000/Feed/Discovery/Valid"; $discovered = "http://localhost:8000/Feed/Discovery/Feed"; $feedID = $this->nextID("arsse_feeds"); @@ -197,7 +197,7 @@ trait SeriesSubscription { $this->compareExpectations(static::$drv, $state); } - public function testAddASubscriptionToAnInvalidFeed() { + public function testAddASubscriptionToAnInvalidFeed():void { $url = "http://example.org/feed1"; $feedID = $this->nextID("arsse_feeds"); \Phake::when(Arsse::$db)->feedUpdate->thenThrow(new FeedException($url, new \PicoFeed\Client\InvalidUrlException())); @@ -215,19 +215,19 @@ trait SeriesSubscription { } } - public function testAddADuplicateSubscription() { + public function testAddADuplicateSubscription():void { $url = "http://example.com/feed2"; $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionAdd($this->user, $url); } - public function testAddADuplicateSubscriptionWithEquivalentUrl() { + public function testAddADuplicateSubscriptionWithEquivalentUrl():void { $url = "http://EXAMPLE.COM/feed2"; $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionAdd($this->user, $url); } - public function testAddADuplicateSubscriptionViaRedirection() { + public function testAddADuplicateSubscriptionViaRedirection():void { $url = "http://localhost:8000/Feed/Parsing/Valid"; Arsse::$db->subscriptionAdd($this->user, $url); $subID = $this->nextID("arsse_subscriptions"); @@ -235,14 +235,14 @@ trait SeriesSubscription { $this->assertSame($subID, Arsse::$db->subscriptionAdd($this->user, $url)); } - public function testAddASubscriptionWithoutAuthority() { + public function testAddASubscriptionWithoutAuthority():void { $url = "http://example.com/feed1"; \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionAdd($this->user, $url); } - public function testRemoveASubscription() { + public function testRemoveASubscription():void { $this->assertTrue(Arsse::$db->subscriptionRemove($this->user, 1)); \Phake::verify(Arsse::$user)->authorize($this->user, "subscriptionRemove"); $state = $this->primeExpectations($this->data, [ @@ -253,29 +253,29 @@ trait SeriesSubscription { $this->compareExpectations(static::$drv, $state); } - public function testRemoveAMissingSubscription() { + public function testRemoveAMissingSubscription():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionRemove($this->user, 2112); } - public function testRemoveAnInvalidSubscription() { + public function testRemoveAnInvalidSubscription():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionRemove($this->user, -1); } - public function testRemoveASubscriptionForTheWrongOwner() { + public function testRemoveASubscriptionForTheWrongOwner():void { $this->user = "jane.doe@example.com"; $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionRemove($this->user, 1); } - public function testRemoveASubscriptionWithoutAuthority() { + public function testRemoveASubscriptionWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionRemove($this->user, 1); } - public function testListSubscriptions() { + public function testListSubscriptions():void { $exp = [ [ 'url' => "http://example.com/feed2", @@ -303,7 +303,7 @@ trait SeriesSubscription { $this->assertArraySubset($exp[1], Arsse::$db->subscriptionPropertiesGet($this->user, 3)); } - public function testListSubscriptionsInAFolder() { + public function testListSubscriptionsInAFolder():void { $exp = [ [ 'url' => "http://example.com/feed2", @@ -318,7 +318,7 @@ trait SeriesSubscription { $this->assertResult($exp, Arsse::$db->subscriptionList($this->user, null, false)); } - public function testListSubscriptionsWithoutRecursion() { + public function testListSubscriptionsWithoutRecursion():void { $exp = [ [ 'url' => "http://example.com/feed3", @@ -333,50 +333,50 @@ trait SeriesSubscription { $this->assertResult($exp, Arsse::$db->subscriptionList($this->user, 2)); } - public function testListSubscriptionsInAMissingFolder() { + public function testListSubscriptionsInAMissingFolder():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionList($this->user, 4); } - public function testListSubscriptionsWithoutAuthority() { + public function testListSubscriptionsWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionList($this->user); } - public function testCountSubscriptions() { + public function testCountSubscriptions():void { $this->assertSame(2, Arsse::$db->subscriptionCount($this->user)); $this->assertSame(1, Arsse::$db->subscriptionCount($this->user, 2)); } - public function testCountSubscriptionsInAMissingFolder() { + public function testCountSubscriptionsInAMissingFolder():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionCount($this->user, 4); } - public function testCountSubscriptionsWithoutAuthority() { + public function testCountSubscriptionsWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionCount($this->user); } - public function testGetThePropertiesOfAMissingSubscription() { + public function testGetThePropertiesOfAMissingSubscription():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesGet($this->user, 2112); } - public function testGetThePropertiesOfAnInvalidSubscription() { + public function testGetThePropertiesOfAnInvalidSubscription():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesGet($this->user, -1); } - public function testGetThePropertiesOfASubscriptionWithoutAuthority() { + public function testGetThePropertiesOfASubscriptionWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionPropertiesGet($this->user, 1); } - public function testSetThePropertiesOfASubscription() { + public function testSetThePropertiesOfASubscription():void { Arsse::$db->subscriptionPropertiesSet($this->user, 1, [ 'title' => "Ook Ook", 'folder' => 3, @@ -400,56 +400,56 @@ trait SeriesSubscription { $this->compareExpectations(static::$drv, $state); } - public function testMoveASubscriptionToAMissingFolder() { + public function testMoveASubscriptionToAMissingFolder():void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['folder' => 4]); } - public function testMoveASubscriptionToTheRootFolder() { + public function testMoveASubscriptionToTheRootFolder():void { $this->assertTrue(Arsse::$db->subscriptionPropertiesSet($this->user, 3, ['folder' => null])); } - public function testRenameASubscriptionToABlankTitle() { + public function testRenameASubscriptionToABlankTitle():void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['title' => ""]); } - public function testRenameASubscriptionToAWhitespaceTitle() { + public function testRenameASubscriptionToAWhitespaceTitle():void { $this->assertException("whitespace", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['title' => " "]); } - public function testRenameASubscriptionToFalse() { + public function testRenameASubscriptionToFalse():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['title' => false]); } - public function testRenameASubscriptionToZero() { + public function testRenameASubscriptionToZero():void { $this->assertTrue(Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['title' => 0])); } - public function testRenameASubscriptionToAnArray() { + public function testRenameASubscriptionToAnArray():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['title' => []]); } - public function testSetThePropertiesOfAMissingSubscription() { + public function testSetThePropertiesOfAMissingSubscription():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, 2112, ['folder' => null]); } - public function testSetThePropertiesOfAnInvalidSubscription() { + public function testSetThePropertiesOfAnInvalidSubscription():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, -1, ['folder' => null]); } - public function testSetThePropertiesOfASubscriptionWithoutAuthority() { + public function testSetThePropertiesOfASubscriptionWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['folder' => null]); } - public function testRetrieveTheFaviconOfASubscription() { + public function testRetrieveTheFaviconOfASubscription():void { $exp = "http://example.com/favicon.ico"; $this->assertSame($exp, Arsse::$db->subscriptionFavicon(1)); $this->assertSame($exp, Arsse::$db->subscriptionFavicon(2)); @@ -465,7 +465,7 @@ trait SeriesSubscription { $this->assertSame('', Arsse::$db->subscriptionFavicon(-2112)); } - public function testRetrieveTheFaviconOfASubscriptionWithUser() { + public function testRetrieveTheFaviconOfASubscriptionWithUser():void { $exp = "http://example.com/favicon.ico"; $user = "john.doe@example.com"; $this->assertSame($exp, Arsse::$db->subscriptionFavicon(1, $user)); @@ -479,7 +479,7 @@ trait SeriesSubscription { $this->assertSame('', Arsse::$db->subscriptionFavicon(4, $user)); } - public function testRetrieveTheFaviconOfASubscriptionWithUserWithoutAuthority() { + public function testRetrieveTheFaviconOfASubscriptionWithUserWithoutAuthority():void { $exp = "http://example.com/favicon.ico"; $user = "john.doe@example.com"; \Phake::when(Arsse::$user)->authorize->thenReturn(false); @@ -487,36 +487,36 @@ trait SeriesSubscription { Arsse::$db->subscriptionFavicon(-2112, $user); } - public function testListTheTagsOfASubscription() { + public function testListTheTagsOfASubscription():void { $this->assertEquals([1,2], Arsse::$db->subscriptionTagsGet("john.doe@example.com", 1)); $this->assertEquals([2], Arsse::$db->subscriptionTagsGet("john.doe@example.com", 3)); $this->assertEquals(["Fascinating","Interesting"], Arsse::$db->subscriptionTagsGet("john.doe@example.com", 1, true)); $this->assertEquals(["Fascinating"], Arsse::$db->subscriptionTagsGet("john.doe@example.com", 3, true)); } - public function testListTheTagsOfAMissingSubscription() { + public function testListTheTagsOfAMissingSubscription():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionTagsGet($this->user, 101); } - public function testListTheTagsOfASubscriptionWithoutAuthority() { + public function testListTheTagsOfASubscriptionWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionTagsGet("john.doe@example.com", 1); } - public function testGetRefreshTimeOfASubscription() { + public function testGetRefreshTimeOfASubscription():void { $user = "john.doe@example.com"; $this->assertTime(strtotime("now + 1 hour"), Arsse::$db->subscriptionRefreshed($user)); $this->assertTime(strtotime("now - 1 hour"), Arsse::$db->subscriptionRefreshed($user, 1)); } - public function testGetRefreshTimeOfAMissingSubscription() { + public function testGetRefreshTimeOfAMissingSubscription():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); $this->assertTime(strtotime("now - 1 hour"), Arsse::$db->subscriptionRefreshed("john.doe@example.com", 2)); } - public function testGetRefreshTimeOfASubscriptionWithoutAuthority() { + public function testGetRefreshTimeOfASubscriptionWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); $this->assertTime(strtotime("now + 1 hour"), Arsse::$db->subscriptionRefreshed("john.doe@example.com")); diff --git a/tests/cases/Database/SeriesTag.php b/tests/cases/Database/SeriesTag.php index 6c103136..f2617c45 100644 --- a/tests/cases/Database/SeriesTag.php +++ b/tests/cases/Database/SeriesTag.php @@ -10,7 +10,7 @@ use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Database; trait SeriesTag { - protected function setUpSeriesTag() { + protected function setUpSeriesTag():void { $this->data = [ 'arsse_users' => [ 'columns' => [ @@ -104,11 +104,11 @@ trait SeriesTag { $this->user = "john.doe@example.com"; } - protected function tearDownSeriesTag() { + protected function tearDownSeriesTag():void { unset($this->data, $this->checkTags, $this->checkMembers, $this->user); } - public function testAddATag() { + public function testAddATag():void { $user = "john.doe@example.com"; $tagID = $this->nextID("arsse_tags"); $this->assertSame($tagID, Arsse::$db->tagAdd($user, ['name' => "Entertaining"])); @@ -118,33 +118,33 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testAddADuplicateTag() { + public function testAddADuplicateTag():void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->tagAdd("john.doe@example.com", ['name' => "Interesting"]); } - public function testAddATagWithAMissingName() { + public function testAddATagWithAMissingName():void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->tagAdd("john.doe@example.com", []); } - public function testAddATagWithABlankName() { + public function testAddATagWithABlankName():void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->tagAdd("john.doe@example.com", ['name' => ""]); } - public function testAddATagWithAWhitespaceName() { + public function testAddATagWithAWhitespaceName():void { $this->assertException("whitespace", "Db", "ExceptionInput"); Arsse::$db->tagAdd("john.doe@example.com", ['name' => " "]); } - public function testAddATagWithoutAuthority() { + public function testAddATagWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagAdd("john.doe@example.com", ['name' => "Boring"]); } - public function testListTags() { + public function testListTags():void { $exp = [ ['id' => 2, 'name' => "Fascinating"], ['id' => 1, 'name' => "Interesting"], @@ -160,13 +160,13 @@ trait SeriesTag { \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "tagList"); } - public function testListTagsWithoutAuthority() { + public function testListTagsWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagList("john.doe@example.com"); } - public function testRemoveATag() { + public function testRemoveATag():void { $this->assertTrue(Arsse::$db->tagRemove("john.doe@example.com", 1)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "tagRemove"); $state = $this->primeExpectations($this->data, $this->checkTags); @@ -174,7 +174,7 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testRemoveATagByName() { + public function testRemoveATagByName():void { $this->assertTrue(Arsse::$db->tagRemove("john.doe@example.com", "Interesting", true)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "tagRemove"); $state = $this->primeExpectations($this->data, $this->checkTags); @@ -182,33 +182,33 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testRemoveAMissingTag() { + public function testRemoveAMissingTag():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagRemove("john.doe@example.com", 2112); } - public function testRemoveAnInvalidTag() { + public function testRemoveAnInvalidTag():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagRemove("john.doe@example.com", -1); } - public function testRemoveAnInvalidTagByName() { + public function testRemoveAnInvalidTagByName():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagRemove("john.doe@example.com", [], true); } - public function testRemoveATagOfTheWrongOwner() { + public function testRemoveATagOfTheWrongOwner():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagRemove("john.doe@example.com", 3); // tag ID 3 belongs to Jane } - public function testRemoveATagWithoutAuthority() { + public function testRemoveATagWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagRemove("john.doe@example.com", 1); } - public function testGetThePropertiesOfATag() { + public function testGetThePropertiesOfATag():void { $exp = [ 'id' => 2, 'name' => "Fascinating", @@ -218,37 +218,37 @@ trait SeriesTag { \Phake::verify(Arsse::$user, \Phake::times(2))->authorize("john.doe@example.com", "tagPropertiesGet"); } - public function testGetThePropertiesOfAMissingTag() { + public function testGetThePropertiesOfAMissingTag():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesGet("john.doe@example.com", 2112); } - public function testGetThePropertiesOfAnInvalidTag() { + public function testGetThePropertiesOfAnInvalidTag():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesGet("john.doe@example.com", -1); } - public function testGetThePropertiesOfAnInvalidTagByName() { + public function testGetThePropertiesOfAnInvalidTagByName():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesGet("john.doe@example.com", [], true); } - public function testGetThePropertiesOfATagOfTheWrongOwner() { + public function testGetThePropertiesOfATagOfTheWrongOwner():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesGet("john.doe@example.com", 3); // tag ID 3 belongs to Jane } - public function testGetThePropertiesOfATagWithoutAuthority() { + public function testGetThePropertiesOfATagWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagPropertiesGet("john.doe@example.com", 1); } - public function testMakeNoChangesToATag() { + public function testMakeNoChangesToATag():void { $this->assertFalse(Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, [])); } - public function testRenameATag() { + public function testRenameATag():void { $this->assertTrue(Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, ['name' => "Curious"])); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "tagPropertiesSet"); $state = $this->primeExpectations($this->data, $this->checkTags); @@ -256,7 +256,7 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testRenameATagByName() { + public function testRenameATagByName():void { $this->assertTrue(Arsse::$db->tagPropertiesSet("john.doe@example.com", "Interesting", ['name' => "Curious"], true)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "tagPropertiesSet"); $state = $this->primeExpectations($this->data, $this->checkTags); @@ -264,53 +264,53 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testRenameATagToTheEmptyString() { + public function testRenameATagToTheEmptyString():void { $this->assertException("missing", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, ['name' => ""])); } - public function testRenameATagToWhitespaceOnly() { + public function testRenameATagToWhitespaceOnly():void { $this->assertException("whitespace", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, ['name' => " "])); } - public function testRenameATagToAnInvalidValue() { + public function testRenameATagToAnInvalidValue():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, ['name' => []])); } - public function testCauseATagCollision() { + public function testCauseATagCollision():void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, ['name' => "Fascinating"]); } - public function testSetThePropertiesOfAMissingTag() { + public function testSetThePropertiesOfAMissingTag():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesSet("john.doe@example.com", 2112, ['name' => "Exciting"]); } - public function testSetThePropertiesOfAnInvalidTag() { + public function testSetThePropertiesOfAnInvalidTag():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesSet("john.doe@example.com", -1, ['name' => "Exciting"]); } - public function testSetThePropertiesOfAnInvalidTagByName() { + public function testSetThePropertiesOfAnInvalidTagByName():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesSet("john.doe@example.com", [], ['name' => "Exciting"], true); } - public function testSetThePropertiesOfATagForTheWrongOwner() { + public function testSetThePropertiesOfATagForTheWrongOwner():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesSet("john.doe@example.com", 3, ['name' => "Exciting"]); // tag ID 3 belongs to Jane } - public function testSetThePropertiesOfATagWithoutAuthority() { + public function testSetThePropertiesOfATagWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, ['name' => "Exciting"]); } - public function testListTaggedSubscriptions() { + public function testListTaggedSubscriptions():void { $exp = [1,5]; $this->assertEquals($exp, Arsse::$db->tagSubscriptionsGet("john.doe@example.com", 1)); $this->assertEquals($exp, Arsse::$db->tagSubscriptionsGet("john.doe@example.com", "Interesting", true)); @@ -322,23 +322,23 @@ trait SeriesTag { $this->assertEquals($exp, Arsse::$db->tagSubscriptionsGet("john.doe@example.com", "Lonely", true)); } - public function testListTaggedSubscriptionsForAMissingTag() { + public function testListTaggedSubscriptionsForAMissingTag():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagSubscriptionsGet("john.doe@example.com", 3); } - public function testListTaggedSubscriptionsForAnInvalidTag() { + public function testListTaggedSubscriptionsForAnInvalidTag():void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagSubscriptionsGet("john.doe@example.com", -1); } - public function testListTaggedSubscriptionsWithoutAuthority() { + public function testListTaggedSubscriptionsWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagSubscriptionsGet("john.doe@example.com", 1); } - public function testApplyATagToSubscriptions() { + public function testApplyATagToSubscriptions():void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", 1, [3,4]); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_tag_members']['rows'][1][2] = 1; @@ -346,14 +346,14 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testClearATagFromSubscriptions() { + public function testClearATagFromSubscriptions():void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", 1, [1,3], Database::ASSOC_REMOVE); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_tag_members']['rows'][0][2] = 0; $this->compareExpectations(static::$drv, $state); } - public function testApplyATagToSubscriptionsByName() { + public function testApplyATagToSubscriptionsByName():void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", "Interesting", [3,4], Database::ASSOC_ADD, true); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_tag_members']['rows'][1][2] = 1; @@ -361,26 +361,26 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testClearATagFromSubscriptionsByName() { + public function testClearATagFromSubscriptionsByName():void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", "Interesting", [1,3], Database::ASSOC_REMOVE, true); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_tag_members']['rows'][0][2] = 0; $this->compareExpectations(static::$drv, $state); } - public function testApplyATagToNoSubscriptionsByName() { + public function testApplyATagToNoSubscriptionsByName():void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", "Interesting", [], Database::ASSOC_ADD, true); $state = $this->primeExpectations($this->data, $this->checkMembers); $this->compareExpectations(static::$drv, $state); } - public function testClearATagFromNoSubscriptionsByName() { + public function testClearATagFromNoSubscriptionsByName():void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", "Interesting", [], Database::ASSOC_REMOVE, true); $state = $this->primeExpectations($this->data, $this->checkMembers); $this->compareExpectations(static::$drv, $state); } - public function testReplaceSubscriptionsOfATag() { + public function testReplaceSubscriptionsOfATag():void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", 1, [3,4], Database::ASSOC_REPLACE); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_tag_members']['rows'][0][2] = 0; @@ -390,7 +390,7 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testPurgeSubscriptionsOfATag() { + public function testPurgeSubscriptionsOfATag():void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", 1, [], Database::ASSOC_REPLACE); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_tag_members']['rows'][0][2] = 0; @@ -398,13 +398,13 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testApplyATagToSubscriptionsWithoutAuthority() { + public function testApplyATagToSubscriptionsWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagSubscriptionsSet("john.doe@example.com", 1, [3,4]); } - public function testSummarizeTags() { + public function testSummarizeTags():void { $exp = [ ['id' => 1, 'name' => "Interesting", 'subscription' => 1], ['id' => 1, 'name' => "Interesting", 'subscription' => 5], @@ -415,7 +415,7 @@ trait SeriesTag { $this->assertResult($exp, Arsse::$db->tagSummarize("john.doe@example.com")); } - public function testSummarizeTagsWithoutAuthority() { + public function testSummarizeTagsWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagSummarize("john.doe@example.com"); diff --git a/tests/cases/Database/SeriesToken.php b/tests/cases/Database/SeriesToken.php index 6bce88a5..ca37c1d8 100644 --- a/tests/cases/Database/SeriesToken.php +++ b/tests/cases/Database/SeriesToken.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; trait SeriesToken { - protected function setUpSeriesToken() { + protected function setUpSeriesToken():void { // set up the test data $past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); $future = gmdate("Y-m-d H:i:s", strtotime("now + 1 minute")); @@ -43,11 +43,11 @@ trait SeriesToken { ]; } - protected function tearDownSeriesToken() { + protected function tearDownSeriesToken():void { unset($this->data); } - public function testLookUpAValidToken() { + public function testLookUpAValidToken():void { $exp1 = [ 'id' => "80fa94c1a11f11e78667001e673b2560", 'class' => "fever.login", @@ -71,22 +71,22 @@ trait SeriesToken { $this->assertArraySubset($exp1, Arsse::$db->tokenLookup("fever.login", "80fa94c1a11f11e78667001e673b2560")); } - public function testLookUpAMissingToken() { + public function testLookUpAMissingToken():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tokenLookup("class", "thisTokenDoesNotExist"); } - public function testLookUpAnExpiredToken() { + public function testLookUpAnExpiredToken():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tokenLookup("fever.login", "27c6de8da13311e78667001e673b2560"); } - public function testLookUpATokenOfTheWrongClass() { + public function testLookUpATokenOfTheWrongClass():void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tokenLookup("some.class", "80fa94c1a11f11e78667001e673b2560"); } - public function testCreateAToken() { + public function testCreateAToken():void { $user = "jane.doe@example.com"; $state = $this->primeExpectations($this->data, ['arsse_tokens' => ["id", "class", "expires", "user"]]); $id = Arsse::$db->tokenCreate($user, "fever.login"); @@ -100,18 +100,18 @@ trait SeriesToken { $this->compareExpectations(static::$drv, $state); } - public function testCreateATokenForAMissingUser() { + public function testCreateATokenForAMissingUser():void { $this->assertException("doesNotExist", "User"); Arsse::$db->tokenCreate("fever.login", "jane.doe@example.biz"); } - public function testCreateATokenWithoutAuthority() { + public function testCreateATokenWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tokenCreate("fever.login", "jane.doe@example.com"); } - public function testRevokeAToken() { + public function testRevokeAToken():void { $user = "jane.doe@example.com"; $id = "80fa94c1a11f11e78667001e673b2560"; $this->assertTrue(Arsse::$db->tokenRevoke($user, "fever.login", $id)); @@ -122,7 +122,7 @@ trait SeriesToken { $this->assertFalse(Arsse::$db->tokenRevoke($user, "fever.login", $id)); } - public function testRevokeAllTokens() { + public function testRevokeAllTokens():void { $user = "jane.doe@example.com"; $state = $this->primeExpectations($this->data, ['arsse_tokens' => ["id", "expires", "user"]]); $this->assertTrue(Arsse::$db->tokenRevoke($user, "fever.login")); @@ -136,7 +136,7 @@ trait SeriesToken { $this->assertFalse(Arsse::$db->tokenRevoke($user, "unknown.class")); } - public function testRevokeATokenWithoutAuthority() { + public function testRevokeATokenWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tokenRevoke("jane.doe@example.com", "fever.login"); diff --git a/tests/cases/Database/SeriesUser.php b/tests/cases/Database/SeriesUser.php index 265151b2..4a0abb39 100644 --- a/tests/cases/Database/SeriesUser.php +++ b/tests/cases/Database/SeriesUser.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; trait SeriesUser { - protected function setUpSeriesUser() { + protected function setUpSeriesUser():void { $this->data = [ 'arsse_users' => [ 'columns' => [ @@ -25,11 +25,11 @@ trait SeriesUser { ]; } - protected function tearDownSeriesUser() { + protected function tearDownSeriesUser():void { unset($this->data); } - public function testCheckThatAUserExists() { + public function testCheckThatAUserExists():void { $this->assertTrue(Arsse::$db->userExists("jane.doe@example.com")); $this->assertFalse(Arsse::$db->userExists("jane.doe@example.org")); \Phake::verify(Arsse::$user)->authorize("jane.doe@example.com", "userExists"); @@ -37,31 +37,31 @@ trait SeriesUser { $this->compareExpectations(static::$drv, $this->data); } - public function testCheckThatAUserExistsWithoutAuthority() { + public function testCheckThatAUserExistsWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->userExists("jane.doe@example.com"); } - public function testGetAPassword() { + public function testGetAPassword():void { $hash = Arsse::$db->userPasswordGet("admin@example.net"); $this->assertSame('$2y$10$PbcG2ZR3Z8TuPzM7aHTF8.v61dtCjzjK78gdZJcp4UePE8T9jEgBW', $hash); \Phake::verify(Arsse::$user)->authorize("admin@example.net", "userPasswordGet"); $this->assertTrue(password_verify("secret", $hash)); } - public function testGetThePasswordOfAMissingUser() { + public function testGetThePasswordOfAMissingUser():void { $this->assertException("doesNotExist", "User"); Arsse::$db->userPasswordGet("john.doe@example.org"); } - public function testGetAPasswordWithoutAuthority() { + public function testGetAPasswordWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->userPasswordGet("admin@example.net"); } - public function testAddANewUser() { + public function testAddANewUser():void { $this->assertTrue(Arsse::$db->userAdd("john.doe@example.org", "")); \Phake::verify(Arsse::$user)->authorize("john.doe@example.org", "userAdd"); $state = $this->primeExpectations($this->data, ['arsse_users' => ['id']]); @@ -69,18 +69,18 @@ trait SeriesUser { $this->compareExpectations(static::$drv, $state); } - public function testAddAnExistingUser() { + public function testAddAnExistingUser():void { $this->assertException("alreadyExists", "User"); Arsse::$db->userAdd("john.doe@example.com", ""); } - public function testAddANewUserWithoutAuthority() { + public function testAddANewUserWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->userAdd("john.doe@example.org", ""); } - public function testRemoveAUser() { + public function testRemoveAUser():void { $this->assertTrue(Arsse::$db->userRemove("admin@example.net")); \Phake::verify(Arsse::$user)->authorize("admin@example.net", "userRemove"); $state = $this->primeExpectations($this->data, ['arsse_users' => ['id']]); @@ -88,24 +88,24 @@ trait SeriesUser { $this->compareExpectations(static::$drv, $state); } - public function testRemoveAMissingUser() { + public function testRemoveAMissingUser():void { $this->assertException("doesNotExist", "User"); Arsse::$db->userRemove("john.doe@example.org"); } - public function testRemoveAUserWithoutAuthority() { + public function testRemoveAUserWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->userRemove("admin@example.net"); } - public function testListAllUsers() { + public function testListAllUsers():void { $users = ["admin@example.net", "jane.doe@example.com", "john.doe@example.com"]; $this->assertSame($users, Arsse::$db->userList()); \Phake::verify(Arsse::$user)->authorize("", "userList"); } - public function testListAllUsersWithoutAuthority() { + public function testListAllUsersWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->userList(); @@ -114,7 +114,7 @@ trait SeriesUser { /** * @depends testGetAPassword */ - public function testSetAPassword() { + public function testSetAPassword():void { $user = "john.doe@example.com"; $pass = "secret"; $this->assertEquals("", Arsse::$db->userPasswordGet($user)); @@ -125,19 +125,19 @@ trait SeriesUser { $this->assertTrue(password_verify($pass, $hash), "Failed verifying password of $user '$pass' against hash '$hash'."); } - public function testUnsetAPassword() { + public function testUnsetAPassword():void { $user = "john.doe@example.com"; $this->assertEquals("", Arsse::$db->userPasswordGet($user)); $this->assertTrue(Arsse::$db->userPasswordSet($user, null)); $this->assertNull(Arsse::$db->userPasswordGet($user)); } - public function testSetThePasswordOfAMissingUser() { + public function testSetThePasswordOfAMissingUser():void { $this->assertException("doesNotExist", "User"); Arsse::$db->userPasswordSet("john.doe@example.org", "secret"); } - public function testSetAPasswordWithoutAuthority() { + public function testSetAPasswordWithoutAuthority():void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->userPasswordSet("john.doe@example.com", "secret"); diff --git a/tests/cases/Database/TestDatabase.php b/tests/cases/Database/TestDatabase.php index 3ae4f5b2..6f2249fe 100644 --- a/tests/cases/Database/TestDatabase.php +++ b/tests/cases/Database/TestDatabase.php @@ -28,7 +28,7 @@ class TestDatabase extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideInClauses */ - public function testGenerateInClause(string $clause, array $values, array $inV, string $inT) { + public function testGenerateInClause(string $clause, array $values, array $inV, string $inT):void { $types = array_fill(0, sizeof($values), $inT); $exp = [$clause, $types, $values]; $this->assertSame($exp, $this->db->generateIn($inV, $inT)); @@ -62,7 +62,7 @@ class TestDatabase extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideSearchClauses */ - public function testGenerateSearchClause(string $clause, array $values, array $inV, array $inC, bool $inAny) { + public function testGenerateSearchClause(string $clause, array $values, array $inV, array $inC, bool $inAny):void { // this is not an exhaustive test; integration tests already cover the ins and outs of the functionality $types = array_fill(0, sizeof($values), "str"); $exp = [$clause, $types, $values]; diff --git a/tests/cases/Db/BaseDriver.php b/tests/cases/Db/BaseDriver.php index 59165a1b..990f4872 100644 --- a/tests/cases/Db/BaseDriver.php +++ b/tests/cases/Db/BaseDriver.php @@ -76,112 +76,112 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { # TESTS - public function testFetchDriverName() { + public function testFetchDriverName():void { $class = get_class($this->drv); $this->assertTrue(strlen($class::driverName()) > 0); } - public function testFetchSchemaId() { + public function testFetchSchemaId():void { $class = get_class($this->drv); $this->assertTrue(strlen($class::schemaID()) > 0); } - public function testCheckCharacterSetAcceptability() { + public function testCheckCharacterSetAcceptability():void { $this->assertTrue($this->drv->charsetAcceptable()); } - public function testTranslateAToken() { + public function testTranslateAToken():void { $this->assertRegExp("/^[a-z][a-z0-9]*$/i", $this->drv->sqlToken("greatest")); $this->assertRegExp("/^\"?[a-z][a-z0-9_\-]*\"?$/i", $this->drv->sqlToken("nocase")); $this->assertRegExp("/^[a-z][a-z0-9]*$/i", $this->drv->sqlToken("like")); $this->assertSame("distinct", $this->drv->sqlToken("distinct")); } - public function testExecAValidStatement() { + public function testExecAValidStatement():void { $this->assertTrue($this->drv->exec($this->create)); } - public function testExecAnInvalidStatement() { + public function testExecAnInvalidStatement():void { $this->assertException("engineErrorGeneral", "Db"); $this->drv->exec("And the meek shall inherit the earth..."); } - public function testExecMultipleStatements() { + public function testExecMultipleStatements():void { $this->assertTrue($this->drv->exec("$this->create; INSERT INTO arsse_test(id) values(2112)")); $this->assertEquals(2112, $this->query("SELECT id from arsse_test")); } - public function testExecTimeout() { + public function testExecTimeout():void { $this->exec($this->create); $this->exec($this->lock); $this->assertException("general", "Db", "ExceptionTimeout"); $this->drv->exec("INSERT INTO arsse_meta(\"key\", value) values('lock', '1')"); } - public function testExecConstraintViolation() { + public function testExecConstraintViolation():void { $this->drv->exec("CREATE TABLE arsse_test(id varchar(255) not null)"); $this->assertException("constraintViolation", "Db", "ExceptionInput"); $this->drv->exec(static::$insertDefaultValues); } - public function testExecTypeViolation() { + public function testExecTypeViolation():void { $this->drv->exec($this->create); $this->assertException("typeViolation", "Db", "ExceptionInput"); $this->drv->exec("INSERT INTO arsse_test(id) values('ook')"); } - public function testMakeAValidQuery() { + public function testMakeAValidQuery():void { $this->assertInstanceOf(Result::class, $this->drv->query("SELECT 1")); } - public function testMakeAnInvalidQuery() { + public function testMakeAnInvalidQuery():void { $this->assertException("engineErrorGeneral", "Db"); $this->drv->query("Apollo was astonished; Dionysus thought me mad"); } - public function testQueryConstraintViolation() { + public function testQueryConstraintViolation():void { $this->drv->exec("CREATE TABLE arsse_test(id integer not null)"); $this->assertException("constraintViolation", "Db", "ExceptionInput"); $this->drv->query(static::$insertDefaultValues); } - public function testQueryTypeViolation() { + public function testQueryTypeViolation():void { $this->drv->exec($this->create); $this->assertException("typeViolation", "Db", "ExceptionInput"); $this->drv->query("INSERT INTO arsse_test(id) values('ook')"); } - public function testPrepareAValidQuery() { + public function testPrepareAValidQuery():void { $s = $this->drv->prepare("SELECT ?, ?", "int", "int"); $this->assertInstanceOf(Statement::class, $s); } - public function testPrepareAnInvalidQuery() { + public function testPrepareAnInvalidQuery():void { $this->assertException("engineErrorGeneral", "Db"); $s = $this->drv->prepare("This is an invalid query", "int", "int")->run(); } - public function testCreateASavepoint() { + public function testCreateASavepoint():void { $this->assertEquals(1, $this->drv->savepointCreate()); $this->assertEquals(2, $this->drv->savepointCreate()); $this->assertEquals(3, $this->drv->savepointCreate()); } - public function testReleaseASavepoint() { + public function testReleaseASavepoint():void { $this->assertEquals(1, $this->drv->savepointCreate()); $this->assertEquals(true, $this->drv->savepointRelease()); $this->assertException("savepointInvalid", "Db"); $this->drv->savepointRelease(); } - public function testUndoASavepoint() { + public function testUndoASavepoint():void { $this->assertEquals(1, $this->drv->savepointCreate()); $this->assertEquals(true, $this->drv->savepointUndo()); $this->assertException("savepointInvalid", "Db"); $this->drv->savepointUndo(); } - public function testManipulateSavepoints() { + public function testManipulateSavepoints():void { $this->assertEquals(1, $this->drv->savepointCreate()); $this->assertEquals(2, $this->drv->savepointCreate()); $this->assertEquals(3, $this->drv->savepointCreate()); @@ -198,7 +198,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->drv->savepointRelease(2); } - public function testManipulateSavepointsSomeMore() { + public function testManipulateSavepointsSomeMore():void { $this->assertEquals(1, $this->drv->savepointCreate()); $this->assertEquals(2, $this->drv->savepointCreate()); $this->assertEquals(3, $this->drv->savepointCreate()); @@ -209,7 +209,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->drv->savepointUndo(2); } - public function testBeginATransaction() { + public function testBeginATransaction():void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr = $this->drv->begin(); @@ -221,7 +221,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(0, $this->query($select)); } - public function testCommitATransaction() { + public function testCommitATransaction():void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr = $this->drv->begin(); @@ -233,7 +233,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(1, $this->query($select)); } - public function testRollbackATransaction() { + public function testRollbackATransaction():void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr = $this->drv->begin(); @@ -245,7 +245,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(0, $this->query($select)); } - public function testBeginChainedTransactions() { + public function testBeginChainedTransactions():void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr1 = $this->drv->begin(); @@ -258,7 +258,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(0, $this->query($select)); } - public function testCommitChainedTransactions() { + public function testCommitChainedTransactions():void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr1 = $this->drv->begin(); @@ -275,7 +275,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(2, $this->query($select)); } - public function testCommitChainedTransactionsOutOfOrder() { + public function testCommitChainedTransactionsOutOfOrder():void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr1 = $this->drv->begin(); @@ -291,7 +291,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $tr2->commit(); } - public function testRollbackChainedTransactions() { + public function testRollbackChainedTransactions():void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr1 = $this->drv->begin(); @@ -310,7 +310,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(0, $this->query($select)); } - public function testRollbackChainedTransactionsOutOfOrder() { + public function testRollbackChainedTransactionsOutOfOrder():void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr1 = $this->drv->begin(); @@ -329,7 +329,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(0, $this->query($select)); } - public function testPartiallyRollbackChainedTransactions() { + public function testPartiallyRollbackChainedTransactions():void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr1 = $this->drv->begin(); @@ -348,7 +348,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(1, $this->query($select)); } - public function testFetchSchemaVersion() { + public function testFetchSchemaVersion():void { $this->assertSame(0, $this->drv->schemaVersion()); $this->drv->exec(str_replace("#", "1", $this->setVersion)); $this->assertSame(1, $this->drv->schemaVersion()); @@ -361,7 +361,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exp, $this->drv->schemaVersion()); } - public function testLockTheDatabase() { + public function testLockTheDatabase():void { // PostgreSQL doesn't actually lock the whole database, only the metadata table // normally the application will first query this table to ensure the schema version is correct, // so the effect is usually the same @@ -370,7 +370,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->exec($this->lock); } - public function testUnlockTheDatabase() { + public function testUnlockTheDatabase():void { $this->drv->savepointCreate(true); $this->drv->savepointRelease(); $this->drv->savepointCreate(true); @@ -378,11 +378,11 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertTrue($this->exec(str_replace("#", "3", $this->setVersion))); } - public function testProduceAStringLiteral() { + public function testProduceAStringLiteral():void { $this->assertSame("'It''s a string!'", $this->drv->literalString("It's a string!")); } - public function testPerformMaintenance() { + public function testPerformMaintenance():void { // this performs maintenance in the absence of tables; see BaseUpdate.php for another test with tables $this->assertTrue($this->drv->maintenance()); } diff --git a/tests/cases/Db/BaseResult.php b/tests/cases/Db/BaseResult.php index 0fa84dcc..844b8b80 100644 --- a/tests/cases/Db/BaseResult.php +++ b/tests/cases/Db/BaseResult.php @@ -46,18 +46,18 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testConstructResult() { + public function testConstructResult():void { $this->assertInstanceOf(Result::class, new $this->resultClass(...$this->makeResult("SELECT 1"))); } - public function testGetChangeCountAndLastInsertId() { + public function testGetChangeCountAndLastInsertId():void { $this->makeResult(static::$createMeta); $r = new $this->resultClass(...$this->makeResult("INSERT INTO arsse_meta(\"key\",value) values('test', 1)")); $this->assertSame(1, $r->changes()); $this->assertSame(0, $r->lastId()); } - public function testGetChangeCountAndLastInsertIdBis() { + public function testGetChangeCountAndLastInsertIdBis():void { $this->makeResult(static::$createTest); $r = new $this->resultClass(...$this->makeResult(static::$insertDefault)); $this->assertSame(1, $r->changes()); @@ -67,7 +67,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(2, $r->lastId()); } - public function testIterateOverResults() { + public function testIterateOverResults():void { $exp = [0 => 1, 1 => 2, 2 => 3]; $exp = static::$stringOutput ? $this->stringify($exp) : $exp; foreach (new $this->resultClass(...$this->makeResult("SELECT 1 as col union select 2 as col union select 3 as col")) as $index => $row) { @@ -76,7 +76,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exp, $rows); } - public function testIterateOverResultsTwice() { + public function testIterateOverResultsTwice():void { $exp = [0 => 1, 1 => 2, 2 => 3]; $exp = static::$stringOutput ? $this->stringify($exp) : $exp; $result = new $this->resultClass(...$this->makeResult("SELECT 1 as col union select 2 as col union select 3 as col")); @@ -90,7 +90,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testGetSingleValues() { + public function testGetSingleValues():void { $exp = [1867, 1970, 2112]; $exp = static::$stringOutput ? $this->stringify($exp) : $exp; $test = new $this->resultClass(...$this->makeResult("SELECT 1867 as year union all select 1970 as year union all select 2112 as year")); @@ -100,7 +100,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(null, $test->getValue()); } - public function testGetFirstValuesOnly() { + public function testGetFirstValuesOnly():void { $exp = [1867, 1970, 2112]; $exp = static::$stringOutput ? $this->stringify($exp) : $exp; $test = new $this->resultClass(...$this->makeResult("SELECT 1867 as year, 19 as century union all select 1970 as year, 20 as century union all select 2112 as year, 22 as century")); @@ -110,7 +110,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(null, $test->getValue()); } - public function testGetRows() { + public function testGetRows():void { $exp = [ ['album' => '2112', 'track' => '2112'], ['album' => 'Clockwork Angels', 'track' => 'The Wreckers'], @@ -121,7 +121,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(null, $test->getRow()); } - public function testGetAllRows() { + public function testGetAllRows():void { $exp = [ ['album' => '2112', 'track' => '2112'], ['album' => 'Clockwork Angels', 'track' => 'The Wreckers'], diff --git a/tests/cases/Db/BaseStatement.php b/tests/cases/Db/BaseStatement.php index 6aa81cf3..25364fdd 100644 --- a/tests/cases/Db/BaseStatement.php +++ b/tests/cases/Db/BaseStatement.php @@ -46,12 +46,12 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testConstructStatement() { + public function testConstructStatement():void { $this->assertInstanceOf(Statement::class, new $this->statementClass(...$this->makeStatement("SELECT ? as value"))); } /** @dataProvider provideBindings */ - public function testBindATypedValue($value, string $type, string $exp) { + public function testBindATypedValue($value, string $type, string $exp):void { if ($exp === "null") { $query = "SELECT (? is null) as pass"; } else { @@ -65,7 +65,7 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideBinaryBindings */ - public function testHandleBinaryData($value, string $type, string $exp) { + public function testHandleBinaryData($value, string $type, string $exp):void { if (in_array(static::$implementation, ["PostgreSQL", "PDO PostgreSQL"])) { $this->markTestIncomplete("Correct handling of binary data with PostgreSQL is not currently implemented"); } @@ -81,13 +81,13 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertTrue((bool) $act); } - public function testBindMissingValue() { + public function testBindMissingValue():void { $s = new $this->statementClass(...$this->makeStatement("SELECT ? as value", ["int"])); $val = $s->runArray()->getRow()['value']; $this->assertSame(null, $val); } - public function testBindMultipleValues() { + public function testBindMultipleValues():void { $exp = [ 'one' => "A", 'two' => "B", @@ -97,7 +97,7 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exp, $val); } - public function testBindRecursively() { + public function testBindRecursively():void { $exp = [ 'one' => "A", 'two' => "B", @@ -109,20 +109,20 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exp, $val); } - public function testBindWithoutType() { + public function testBindWithoutType():void { $this->assertException("paramTypeMissing", "Db"); $s = new $this->statementClass(...$this->makeStatement("SELECT ? as value", [])); $s->runArray([1]); } - public function testViolateConstraint() { + public function testViolateConstraint():void { (new $this->statementClass(...$this->makeStatement("CREATE TABLE if not exists arsse_meta(\"key\" varchar(255) primary key not null, value text)")))->run(); $s = new $this->statementClass(...$this->makeStatement("INSERT INTO arsse_meta(\"key\") values(?)", ["str"])); $this->assertException("constraintViolation", "Db", "ExceptionInput"); $s->runArray([null]); } - public function testMismatchTypes() { + public function testMismatchTypes():void { (new $this->statementClass(...$this->makeStatement("CREATE TABLE if not exists arsse_feeds(id integer primary key not null, url text not null)")))->run(); $s = new $this->statementClass(...$this->makeStatement("INSERT INTO arsse_feeds(id,url) values(?,?)", ["str", "str"])); $this->assertException("typeViolation", "Db", "ExceptionInput"); diff --git a/tests/cases/Db/BaseUpdate.php b/tests/cases/Db/BaseUpdate.php index 0c78dccb..f9e129dd 100644 --- a/tests/cases/Db/BaseUpdate.php +++ b/tests/cases/Db/BaseUpdate.php @@ -58,43 +58,43 @@ class BaseUpdate extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testLoadMissingFile() { + public function testLoadMissingFile():void { $this->assertException("updateFileMissing", "Db"); $this->drv->schemaUpdate(1, $this->base); } - public function testLoadUnreadableFile() { + public function testLoadUnreadableFile():void { touch($this->path."0.sql"); chmod($this->path."0.sql", 0000); $this->assertException("updateFileUnreadable", "Db"); $this->drv->schemaUpdate(1, $this->base); } - public function testLoadCorruptFile() { + public function testLoadCorruptFile():void { file_put_contents($this->path."0.sql", "This is a corrupt file"); $this->assertException("updateFileError", "Db"); $this->drv->schemaUpdate(1, $this->base); } - public function testLoadIncompleteFile() { + public function testLoadIncompleteFile():void { file_put_contents($this->path."0.sql", "create table arsse_meta(\"key\" varchar(255) primary key not null, value text);"); $this->assertException("updateFileIncomplete", "Db"); $this->drv->schemaUpdate(1, $this->base); } - public function testLoadEmptyFile() { + public function testLoadEmptyFile():void { file_put_contents($this->path."0.sql", ""); $this->assertException("updateFileIncomplete", "Db"); $this->drv->schemaUpdate(1, $this->base); } - public function testLoadCorrectFile() { + public function testLoadCorrectFile():void { file_put_contents($this->path."0.sql", static::$minimal1); $this->drv->schemaUpdate(1, $this->base); $this->assertEquals(1, $this->drv->schemaVersion()); } - public function testPerformPartialUpdate() { + public function testPerformPartialUpdate():void { file_put_contents($this->path."0.sql", static::$minimal1); file_put_contents($this->path."1.sql", "UPDATE arsse_meta set value = '1' where \"key\" = 'schema_version'"); $this->assertException("updateFileIncomplete", "Db"); @@ -106,31 +106,31 @@ class BaseUpdate extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testPerformSequentialUpdate() { + public function testPerformSequentialUpdate():void { file_put_contents($this->path."0.sql", static::$minimal1); file_put_contents($this->path."1.sql", static::$minimal2); $this->drv->schemaUpdate(2, $this->base); $this->assertEquals(2, $this->drv->schemaVersion()); } - public function testPerformActualUpdate() { + public function testPerformActualUpdate():void { $this->drv->schemaUpdate(Database::SCHEMA_VERSION); $this->assertEquals(Database::SCHEMA_VERSION, $this->drv->schemaVersion()); } - public function testDeclineManualUpdate() { + public function testDeclineManualUpdate():void { // turn auto-updating off Arsse::$conf->dbAutoUpdate = false; $this->assertException("updateManual", "Db"); $this->drv->schemaUpdate(Database::SCHEMA_VERSION); } - public function testDeclineDowngrade() { + public function testDeclineDowngrade():void { $this->assertException("updateTooNew", "Db"); $this->drv->schemaUpdate(-1, $this->base); } - public function testPerformMaintenance() { + public function testPerformMaintenance():void { $this->drv->schemaUpdate(Database::SCHEMA_VERSION); $this->assertTrue($this->drv->maintenance()); } diff --git a/tests/cases/Db/MySQL/TestCreation.php b/tests/cases/Db/MySQL/TestCreation.php index 5f9200c9..6b0bbdf4 100644 --- a/tests/cases/Db/MySQL/TestCreation.php +++ b/tests/cases/Db/MySQL/TestCreation.php @@ -19,7 +19,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testFailToConnect() { + public function testFailToConnect():void { // for the sake of simplicity we don't distinguish between failure modes, but the MySQL-supplied error messages do self::setConf([ 'dbMySQLHost' => "example.invalid", diff --git a/tests/cases/Db/MySQL/TestStatement.php b/tests/cases/Db/MySQL/TestStatement.php index 4fcf2ef6..c044c03f 100644 --- a/tests/cases/Db/MySQL/TestStatement.php +++ b/tests/cases/Db/MySQL/TestStatement.php @@ -34,7 +34,7 @@ class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { } } - public function testBindLongString() { + public function testBindLongString():void { // this test requires some set-up to be effective static::$interface->query("CREATE TABLE arsse_test(`value` longtext not null) character set utf8mb4"); // we'll use an unrealistic packet size of 1 byte to trigger special handling for strings which are too long for the maximum packet size diff --git a/tests/cases/Db/MySQLPDO/TestCreation.php b/tests/cases/Db/MySQLPDO/TestCreation.php index 56973eff..856e3488 100644 --- a/tests/cases/Db/MySQLPDO/TestCreation.php +++ b/tests/cases/Db/MySQLPDO/TestCreation.php @@ -19,7 +19,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testFailToConnect() { + public function testFailToConnect():void { // for the sake of simplicity we don't distinguish between failure modes, but the MySQL-supplied error messages do self::setConf([ 'dbMySQLHost' => "example.invalid", diff --git a/tests/cases/Db/PostgreSQL/TestCreation.php b/tests/cases/Db/PostgreSQL/TestCreation.php index bfd58a6d..fcfea3fe 100644 --- a/tests/cases/Db/PostgreSQL/TestCreation.php +++ b/tests/cases/Db/PostgreSQL/TestCreation.php @@ -20,7 +20,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideConnectionStrings */ - public function testGenerateConnectionString(bool $pdo, string $user, string $pass, string $db, string $host, int $port, string $service, string $exp) { + public function testGenerateConnectionString(bool $pdo, string $user, string $pass, string $db, string $host, int $port, string $service, string $exp):void { self::setConf(); $timeout = (string) ceil(Arsse::$conf->dbTimeoutConnect ?? 0); $postfix = "application_name='arsse' client_encoding='UTF8' connect_timeout='$timeout'"; @@ -62,7 +62,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testFailToConnect() { + public function testFailToConnect():void { // we cannnot distinguish between different connection failure modes self::setConf([ 'dbPostgreSQLHost' => "example.invalid", diff --git a/tests/cases/Db/PostgreSQLPDO/TestCreation.php b/tests/cases/Db/PostgreSQLPDO/TestCreation.php index cb1b9cae..003dbe52 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestCreation.php +++ b/tests/cases/Db/PostgreSQLPDO/TestCreation.php @@ -20,7 +20,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideConnectionStrings */ - public function testGenerateConnectionString(bool $pdo, string $user, string $pass, string $db, string $host, int $port, string $service, string $exp) { + public function testGenerateConnectionString(bool $pdo, string $user, string $pass, string $db, string $host, int $port, string $service, string $exp):void { self::setConf(); $timeout = (string) ceil(Arsse::$conf->dbTimeoutConnect ?? 0); $postfix = "application_name='arsse' client_encoding='UTF8' connect_timeout='$timeout'"; @@ -62,7 +62,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testFailToConnect() { + public function testFailToConnect():void { // PDO dies not distinguish between different connection failure modes self::setConf([ 'dbPostgreSQLHost' => "example.invalid", diff --git a/tests/cases/Db/SQLite3/TestCreation.php b/tests/cases/Db/SQLite3/TestCreation.php index 59a7d5b8..2eef1f31 100644 --- a/tests/cases/Db/SQLite3/TestCreation.php +++ b/tests/cases/Db/SQLite3/TestCreation.php @@ -112,79 +112,79 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testFailToCreateDatabase() { + public function testFailToCreateDatabase():void { Arsse::$conf->dbSQLite3File = $this->path."Cmain/arsse.db"; $this->assertException("fileUncreatable", "Db"); new Driver; } - public function testFailToCreateJournal() { + public function testFailToCreateJournal():void { Arsse::$conf->dbSQLite3File = $this->path."Cwal/arsse.db"; $this->assertException("fileUncreatable", "Db"); new Driver; } - public function testFailToCreateSharedMmeory() { + public function testFailToCreateSharedMmeory():void { Arsse::$conf->dbSQLite3File = $this->path."Cshm/arsse.db"; $this->assertException("fileUncreatable", "Db"); new Driver; } - public function testFailToReadDatabase() { + public function testFailToReadDatabase():void { Arsse::$conf->dbSQLite3File = $this->path."Rmain/arsse.db"; $this->assertException("fileUnreadable", "Db"); new Driver; } - public function testFailToReadJournal() { + public function testFailToReadJournal():void { Arsse::$conf->dbSQLite3File = $this->path."Rwal/arsse.db"; $this->assertException("fileUnreadable", "Db"); new Driver; } - public function testFailToReadSharedMmeory() { + public function testFailToReadSharedMmeory():void { Arsse::$conf->dbSQLite3File = $this->path."Rshm/arsse.db"; $this->assertException("fileUnreadable", "Db"); new Driver; } - public function testFailToWriteToDatabase() { + public function testFailToWriteToDatabase():void { Arsse::$conf->dbSQLite3File = $this->path."Wmain/arsse.db"; $this->assertException("fileUnwritable", "Db"); new Driver; } - public function testFailToWriteToJournal() { + public function testFailToWriteToJournal():void { Arsse::$conf->dbSQLite3File = $this->path."Wwal/arsse.db"; $this->assertException("fileUnwritable", "Db"); new Driver; } - public function testFailToWriteToSharedMmeory() { + public function testFailToWriteToSharedMmeory():void { Arsse::$conf->dbSQLite3File = $this->path."Wshm/arsse.db"; $this->assertException("fileUnwritable", "Db"); new Driver; } - public function testFailToAccessDatabase() { + public function testFailToAccessDatabase():void { Arsse::$conf->dbSQLite3File = $this->path."Amain/arsse.db"; $this->assertException("fileUnusable", "Db"); new Driver; } - public function testFailToAccessJournal() { + public function testFailToAccessJournal():void { Arsse::$conf->dbSQLite3File = $this->path."Awal/arsse.db"; $this->assertException("fileUnusable", "Db"); new Driver; } - public function testFailToAccessSharedMmeory() { + public function testFailToAccessSharedMmeory():void { Arsse::$conf->dbSQLite3File = $this->path."Ashm/arsse.db"; $this->assertException("fileUnusable", "Db"); new Driver; } - public function testAssumeDatabaseCorruption() { + public function testAssumeDatabaseCorruption():void { Arsse::$conf->dbSQLite3File = $this->path."corrupt/arsse.db"; $this->assertException("fileCorrupt", "Db"); new Driver; diff --git a/tests/cases/Db/SQLite3PDO/TestCreation.php b/tests/cases/Db/SQLite3PDO/TestCreation.php index d700d194..dde9dd7b 100644 --- a/tests/cases/Db/SQLite3PDO/TestCreation.php +++ b/tests/cases/Db/SQLite3PDO/TestCreation.php @@ -114,79 +114,79 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testFailToCreateDatabase() { + public function testFailToCreateDatabase():void { Arsse::$conf->dbSQLite3File = $this->path."Cmain/arsse.db"; $this->assertException("fileUncreatable", "Db"); new Driver; } - public function testFailToCreateJournal() { + public function testFailToCreateJournal():void { Arsse::$conf->dbSQLite3File = $this->path."Cwal/arsse.db"; $this->assertException("fileUncreatable", "Db"); new Driver; } - public function testFailToCreateSharedMmeory() { + public function testFailToCreateSharedMmeory():void { Arsse::$conf->dbSQLite3File = $this->path."Cshm/arsse.db"; $this->assertException("fileUncreatable", "Db"); new Driver; } - public function testFailToReadDatabase() { + public function testFailToReadDatabase():void { Arsse::$conf->dbSQLite3File = $this->path."Rmain/arsse.db"; $this->assertException("fileUnreadable", "Db"); new Driver; } - public function testFailToReadJournal() { + public function testFailToReadJournal():void { Arsse::$conf->dbSQLite3File = $this->path."Rwal/arsse.db"; $this->assertException("fileUnreadable", "Db"); new Driver; } - public function testFailToReadSharedMmeory() { + public function testFailToReadSharedMmeory():void { Arsse::$conf->dbSQLite3File = $this->path."Rshm/arsse.db"; $this->assertException("fileUnreadable", "Db"); new Driver; } - public function testFailToWriteToDatabase() { + public function testFailToWriteToDatabase():void { Arsse::$conf->dbSQLite3File = $this->path."Wmain/arsse.db"; $this->assertException("fileUnwritable", "Db"); new Driver; } - public function testFailToWriteToJournal() { + public function testFailToWriteToJournal():void { Arsse::$conf->dbSQLite3File = $this->path."Wwal/arsse.db"; $this->assertException("fileUnwritable", "Db"); new Driver; } - public function testFailToWriteToSharedMmeory() { + public function testFailToWriteToSharedMmeory():void { Arsse::$conf->dbSQLite3File = $this->path."Wshm/arsse.db"; $this->assertException("fileUnwritable", "Db"); new Driver; } - public function testFailToAccessDatabase() { + public function testFailToAccessDatabase():void { Arsse::$conf->dbSQLite3File = $this->path."Amain/arsse.db"; $this->assertException("fileUnusable", "Db"); new Driver; } - public function testFailToAccessJournal() { + public function testFailToAccessJournal():void { Arsse::$conf->dbSQLite3File = $this->path."Awal/arsse.db"; $this->assertException("fileUnusable", "Db"); new Driver; } - public function testFailToAccessSharedMmeory() { + public function testFailToAccessSharedMmeory():void { Arsse::$conf->dbSQLite3File = $this->path."Ashm/arsse.db"; $this->assertException("fileUnusable", "Db"); new Driver; } - public function testAssumeDatabaseCorruption() { + public function testAssumeDatabaseCorruption():void { Arsse::$conf->dbSQLite3File = $this->path."corrupt/arsse.db"; $this->assertException("fileCorrupt", "Db"); new Driver; diff --git a/tests/cases/Db/TestResultAggregate.php b/tests/cases/Db/TestResultAggregate.php index cb450ac8..0dad2194 100644 --- a/tests/cases/Db/TestResultAggregate.php +++ b/tests/cases/Db/TestResultAggregate.php @@ -7,7 +7,7 @@ use JKingWeb\Arsse\Test\Result; /** @covers \JKingWeb\Arsse\Db\ResultAggregate */ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { - public function testGetChangeCountAndLastInsertId() { + public function testGetChangeCountAndLastInsertId():void { $in = [ new Result([], 3, 4), new Result([], 27, 10), @@ -18,7 +18,7 @@ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(2112, $r->lastId()); } - public function testIterateOverResults() { + public function testIterateOverResults():void { $in = [ new Result([['col' => 1]]), new Result([['col' => 2]]), @@ -31,7 +31,7 @@ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals([0 => 1, 1 => 2, 2 => 3], $rows); } - public function testIterateOverResultsTwice() { + public function testIterateOverResultsTwice():void { $in = [ new Result([['col' => 1]]), new Result([['col' => 2]]), @@ -49,7 +49,7 @@ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testGetSingleValues() { + public function testGetSingleValues():void { $test = new ResultAggregate(...[ new Result([['year' => 1867]]), new Result([['year' => 1970]]), @@ -61,7 +61,7 @@ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(null, $test->getValue()); } - public function testGetFirstValuesOnly() { + public function testGetFirstValuesOnly():void { $test = new ResultAggregate(...[ new Result([['year' => 1867, 'century' => 19]]), new Result([['year' => 1970, 'century' => 20]]), @@ -73,7 +73,7 @@ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(null, $test->getValue()); } - public function testGetRows() { + public function testGetRows():void { $test = new ResultAggregate(...[ new Result([['album' => '2112', 'track' => '2112']]), new Result([['album' => 'Clockwork Angels', 'track' => 'The Wreckers']]), @@ -87,7 +87,7 @@ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(null, $test->getRow()); } - public function testGetAllRows() { + public function testGetAllRows():void { $test = new ResultAggregate(...[ new Result([['album' => '2112', 'track' => '2112']]), new Result([['album' => 'Clockwork Angels', 'track' => 'The Wreckers']]), diff --git a/tests/cases/Db/TestResultEmpty.php b/tests/cases/Db/TestResultEmpty.php index 03df4d40..c9a799f9 100644 --- a/tests/cases/Db/TestResultEmpty.php +++ b/tests/cases/Db/TestResultEmpty.php @@ -6,13 +6,13 @@ use JKingWeb\Arsse\Db\ResultEmpty; /** @covers \JKingWeb\Arsse\Db\ResultEmpty */ class TestResultEmpty extends \JKingWeb\Arsse\Test\AbstractTest { - public function testGetChangeCountAndLastInsertId() { + public function testGetChangeCountAndLastInsertId():void { $r = new ResultEmpty; $this->assertEquals(0, $r->changes()); $this->assertEquals(0, $r->lastId()); } - public function testIterateOverResults() { + public function testIterateOverResults():void { $rows = []; foreach (new ResultEmpty as $index => $row) { $rows[$index] = $row['col']; @@ -20,17 +20,17 @@ class TestResultEmpty extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals([], $rows); } - public function testGetSingleValues() { + public function testGetSingleValues():void { $test = new ResultEmpty; $this->assertSame(null, $test->getValue()); } - public function testGetRows() { + public function testGetRows():void { $test = new ResultEmpty; $this->assertSame(null, $test->getRow()); } - public function testGetAllRows() { + public function testGetAllRows():void { $test = new ResultEmpty; $rows = []; $this->assertEquals($rows, $test->getAll()); diff --git a/tests/cases/Db/TestTransaction.php b/tests/cases/Db/TestTransaction.php index b189addc..5c045c82 100644 --- a/tests/cases/Db/TestTransaction.php +++ b/tests/cases/Db/TestTransaction.php @@ -23,7 +23,7 @@ class TestTransaction extends \JKingWeb\Arsse\Test\AbstractTest { $this->drv = $drv; } - public function testManipulateTransactions() { + public function testManipulateTransactions():void { $tr1 = new Transaction($this->drv); $tr2 = new Transaction($this->drv); \Phake::verify($this->drv, \Phake::times(2))->savepointCreate; @@ -35,7 +35,7 @@ class TestTransaction extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify($this->drv)->savepointUndo(2); } - public function testCloseTransactions() { + public function testCloseTransactions():void { $tr1 = new Transaction($this->drv); $tr2 = new Transaction($this->drv); $this->assertTrue($tr1->isPending()); @@ -50,7 +50,7 @@ class TestTransaction extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify($this->drv)->savepointUndo(2); } - public function testIgnoreRollbackErrors() { + public function testIgnoreRollbackErrors():void { \Phake::when($this->drv)->savepointUndo->thenThrow(new Exception("savepointStale")); $tr1 = new Transaction($this->drv); $tr2 = new Transaction($this->drv); diff --git a/tests/cases/Exception/TestException.php b/tests/cases/Exception/TestException.php index 739f0522..4c888a67 100644 --- a/tests/cases/Exception/TestException.php +++ b/tests/cases/Exception/TestException.php @@ -28,7 +28,7 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(true); } - public function testBaseClass() { + public function testBaseClass():void { $this->assertException("unknown"); throw new Exception("unknown"); } @@ -36,7 +36,7 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testBaseClass */ - public function testBaseClassWithoutMessage() { + public function testBaseClassWithoutMessage():void { $this->assertException("unknown"); throw new Exception(); } @@ -44,7 +44,7 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testBaseClass */ - public function testDerivedClass() { + public function testDerivedClass():void { $this->assertException("fileMissing", "Lang"); throw new LangException("fileMissing"); } @@ -52,7 +52,7 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testDerivedClass */ - public function testDerivedClassWithMessageParameters() { + public function testDerivedClassWithMessageParameters():void { $this->assertException("fileMissing", "Lang"); throw new LangException("fileMissing", "en"); } @@ -60,7 +60,7 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testBaseClass */ - public function testBaseClassWithUnknownCode() { + public function testBaseClassWithUnknownCode():void { $this->assertException("uncoded"); throw new Exception("testThisExceptionMessageDoesNotExist"); } @@ -68,13 +68,13 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testBaseClassWithUnknownCode */ - public function testDerivedClassWithMissingMessage() { + public function testDerivedClassWithMissingMessage():void { $this->assertException("uncoded"); throw new LangException("testThisExceptionMessageDoesNotExist"); } /** @covers \JKingWeb\Arsse\ExceptionFatal */ - public function testFatalException() { + public function testFatalException():void { $this->expectException('JKingWeb\Arsse\ExceptionFatal'); throw new \JKingWeb\Arsse\ExceptionFatal(""); } diff --git a/tests/cases/Feed/TestFeed.php b/tests/cases/Feed/TestFeed.php index 04d2194b..e6962c54 100644 --- a/tests/cases/Feed/TestFeed.php +++ b/tests/cases/Feed/TestFeed.php @@ -98,7 +98,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { Arsse::$db = \Phake::mock(Database::class); } - public function testParseAFeed() { + public function testParseAFeed():void { // test that various properties are set on the feed and on items $f = new Feed(null, $this->base."Parsing/Valid"); $this->assertTrue(isset($f->lastModified)); @@ -141,37 +141,37 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($categories, $f->data->items[5]->categories); } - public function testDiscoverAFeedSuccessfully() { + public function testDiscoverAFeedSuccessfully():void { $this->assertSame($this->base."Discovery/Feed", Feed::discover($this->base."Discovery/Valid")); $this->assertSame($this->base."Discovery/Feed", Feed::discover($this->base."Discovery/Feed")); } - public function testDiscoverAFeedUnsuccessfully() { + public function testDiscoverAFeedUnsuccessfully():void { $this->assertException("subscriptionNotFound", "Feed"); Feed::discover($this->base."Discovery/Invalid"); } - public function testParseEntityExpansionAttack() { + public function testParseEntityExpansionAttack():void { $this->assertException("xmlEntity", "Feed"); new Feed(null, $this->base."Parsing/XEEAttack"); } - public function testParseExternalEntityAttack() { + public function testParseExternalEntityAttack():void { $this->assertException("xmlEntity", "Feed"); new Feed(null, $this->base."Parsing/XXEAttack"); } - public function testParseAnUnsupportedFeed() { + public function testParseAnUnsupportedFeed():void { $this->assertException("unsupportedFeedFormat", "Feed"); new Feed(null, $this->base."Parsing/Unsupported"); } - public function testParseAMalformedFeed() { + public function testParseAMalformedFeed():void { $this->assertException("malformedXml", "Feed"); new Feed(null, $this->base."Parsing/Malformed"); } - public function testDeduplicateFeedItems() { + public function testDeduplicateFeedItems():void { // duplicates with dates lead to the newest match being kept $t = strtotime("2002-05-19T15:21:36Z"); $f = new Feed(null, $this->base."Deduplication/Permalink-Dates"); @@ -198,7 +198,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame("http://example.com/1", $f->newItems[0]->url); } - public function testHandleCacheHeadersOn304() { + public function testHandleCacheHeadersOn304():void { // upon 304, the client should re-use the caching header values it supplied the server $t = time(); $e = "78567a"; @@ -216,7 +216,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($e, $f->resource->getETag()); } - public function testHandleCacheHeadersOn200() { + public function testHandleCacheHeadersOn200():void { // these tests should trust the server-returned time, even in cases of obviously incorrect results $t = time() - 2000; $f = new Feed(null, $this->base."Caching/200Past"); @@ -244,7 +244,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertTime($t, $f->lastModified); } - public function testComputeNextFetchOnError() { + public function testComputeNextFetchOnError():void { for ($a = 0; $a < 100; $a++) { if ($a < 3) { $this->assertTime("now + 5 minutes", Feed::nextFetchOnError($a)); @@ -257,7 +257,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provide304Timestamps */ - public function testComputeNextFetchFrom304(string $t, string $exp) { + public function testComputeNextFetchFrom304(string $t, string $exp):void { $t = $t ? strtotime($t) : ""; $f = new Feed(null, $this->base."NextFetch/NotModified?t=$t", Date::transform($t, "http")); $exp = strtotime($exp); @@ -279,13 +279,13 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testComputeNextFetchFrom304WithoutDate() { + public function testComputeNextFetchFrom304WithoutDate():void { $f = new Feed(null, $this->base."NextFetch/NotModifiedEtag"); $exp = strtotime("now + 3 hours"); $this->assertTime($exp, $f->nextFetch); } - public function testComputeNextFetchFrom200() { + public function testComputeNextFetchFrom200():void { // if less than half an hour, check in 15 minutes $f = new Feed(null, $this->base."NextFetch/30m"); $exp = strtotime("now + 15 minutes"); @@ -312,7 +312,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertTime($exp, $f->nextFetch); } - public function testMatchLatestArticles() { + public function testMatchLatestArticles():void { \Phake::when(Arsse::$db)->feedMatchLatest(1, $this->anything())->thenReturn(new Result($this->latest)); $f = new Feed(1, $this->base."Matching/1"); $this->assertCount(0, $f->newItems); @@ -328,7 +328,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertCount(2, $f->changedItems); } - public function testMatchHistoricalArticles() { + public function testMatchHistoricalArticles():void { \Phake::when(Arsse::$db)->feedMatchLatest(1, $this->anything())->thenReturn(new Result($this->latest)); \Phake::when(Arsse::$db)->feedMatchIds(1, $this->anything(), $this->anything(), $this->anything(), $this->anything())->thenReturn(new Result($this->others)); $f = new Feed(1, $this->base."Matching/5"); @@ -336,7 +336,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertCount(0, $f->changedItems); } - public function testScrapeFullContent() { + public function testScrapeFullContent():void { // first make sure that the absence of scraping works as expected $f = new Feed(null, $this->base."Scraping/Feed"); $exp = "

Partial content

"; diff --git a/tests/cases/Feed/TestFetching.php b/tests/cases/Feed/TestFetching.php index f2f7ce6a..05b79b40 100644 --- a/tests/cases/Feed/TestFetching.php +++ b/tests/cases/Feed/TestFetching.php @@ -27,48 +27,48 @@ class TestFetching extends \JKingWeb\Arsse\Test\AbstractTest { self::setConf(); } - public function testHandle400() { + public function testHandle400():void { $this->assertException("unsupportedFeedFormat", "Feed"); new Feed(null, $this->base."Fetching/Error?code=400"); } - public function testHandle401() { + public function testHandle401():void { $this->assertException("unauthorized", "Feed"); new Feed(null, $this->base."Fetching/Error?code=401"); } - public function testHandle403() { + public function testHandle403():void { $this->assertException("forbidden", "Feed"); new Feed(null, $this->base."Fetching/Error?code=403"); } - public function testHandle404() { + public function testHandle404():void { $this->assertException("invalidUrl", "Feed"); new Feed(null, $this->base."Fetching/Error?code=404"); } - public function testHandle500() { + public function testHandle500():void { $this->assertException("unsupportedFeedFormat", "Feed"); new Feed(null, $this->base."Fetching/Error?code=500"); } - public function testHandleARedirectLoop() { + public function testHandleARedirectLoop():void { $this->assertException("maxRedirect", "Feed"); new Feed(null, $this->base."Fetching/EndlessLoop?i=0"); } - public function testHandleAnOverlyLargeFeed() { + public function testHandleAnOverlyLargeFeed():void { Arsse::$conf->fetchSizeLimit = 512; $this->assertException("maxSize", "Feed"); new Feed(null, $this->base."Fetching/TooLarge"); } - public function testHandleACertificateError() { + public function testHandleACertificateError():void { $this->assertException("invalidCertificate", "Feed"); new Feed(null, "https://localhost:8000/"); } - public function testHandleATimeout() { + public function testHandleATimeout():void { Arsse::$conf->fetchTimeout = 1; $this->assertException("timeout", "Feed"); new Feed(null, $this->base."Fetching/Timeout"); diff --git a/tests/cases/ImportExport/TestFile.php b/tests/cases/ImportExport/TestFile.php index cd520d21..36b45b57 100644 --- a/tests/cases/ImportExport/TestFile.php +++ b/tests/cases/ImportExport/TestFile.php @@ -45,7 +45,7 @@ class TestFile extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideFileExports */ - public function testExportToAFile(string $file, string $user, bool $flat, $exp) { + public function testExportToAFile(string $file, string $user, bool $flat, $exp):void { $path = $this->path.$file; try { if ($exp instanceof \JKingWeb\Arsse\AbstractException) { @@ -84,7 +84,7 @@ class TestFile extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideFileImports */ - public function testImportFromAFile(string $file, string $user, bool $flat, bool $replace, $exp) { + public function testImportFromAFile(string $file, string $user, bool $flat, bool $replace, $exp):void { $path = $this->path.$file; try { if ($exp instanceof \JKingWeb\Arsse\AbstractException) { diff --git a/tests/cases/ImportExport/TestImportExport.php b/tests/cases/ImportExport/TestImportExport.php index 04e92121..269b3515 100644 --- a/tests/cases/ImportExport/TestImportExport.php +++ b/tests/cases/ImportExport/TestImportExport.php @@ -146,13 +146,13 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testImportForAMissingUser() { + public function testImportForAMissingUser():void { \Phake::when(Arsse::$user)->exists->thenReturn(false); $this->assertException("doesNotExist", "User"); $this->proc->import("john.doe@example.com", "", false, false); } - public function testImportWithInvalidFolder() { + public function testImportWithInvalidFolder():void { $in = [[ ], [1 => ['id' => 1, 'name' => "", 'parent' => 0], @@ -162,7 +162,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { $this->proc->import("john.doe@example.com", "", false, false); } - public function testImportWithDuplicateFolder() { + public function testImportWithDuplicateFolder():void { $in = [[ ], [1 => ['id' => 1, 'name' => "New", 'parent' => 0], @@ -173,7 +173,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { $this->proc->import("john.doe@example.com", "", false, false); } - public function testMakeNoEffectiveChanges() { + public function testMakeNoEffectiveChanges():void { $in = [[ ['url' => "http://localhost:8000/Import/nasa-jpl", 'title' => "NASA JPL", 'folder' => 3, 'tags' => ["tech"]], ['url' => "http://localhost:8000/Import/ars", 'title' => "Ars Technica", 'folder' => 2, 'tags' => ["frequent", "tech"]], @@ -197,7 +197,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { $this->compareExpectations($this->drv, $exp); } - public function testModifyASubscription() { + public function testModifyASubscription():void { $in = [[ ['url' => "http://localhost:8000/Import/nasa-jpl", 'title' => "NASA JPL", 'folder' => 3, 'tags' => ["tech"]], ['url' => "http://localhost:8000/Import/ars", 'title' => "Ars Technica", 'folder' => 2, 'tags' => ["frequent", "tech"]], @@ -222,7 +222,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { $this->compareExpectations($this->drv, $exp); } - public function testImportAFeed() { + public function testImportAFeed():void { $in = [[ ['url' => "http://localhost:8000/Import/some-feed", 'title' => "Some Feed", 'folder' => 0, 'tags' => ["frequent", "cryptic"]], //one existing tag and one new one ], []]; @@ -237,7 +237,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { $this->compareExpectations($this->drv, $exp); } - public function testImportAFeedWithAnInvalidTag() { + public function testImportAFeedWithAnInvalidTag():void { $in = [[ ['url' => "http://localhost:8000/Import/some-feed", 'title' => "Some Feed", 'folder' => 0, 'tags' => [""]], ], []]; @@ -246,7 +246,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { $this->proc->import("john.doe@example.com", "", false, false); } - public function testReplaceData() { + public function testReplaceData():void { $in = [[ ['url' => "http://localhost:8000/Import/some-feed", 'title' => "Some Feed", 'folder' => 1, 'tags' => ["frequent", "cryptic"]], ], [1 => diff --git a/tests/cases/ImportExport/TestOPML.php b/tests/cases/ImportExport/TestOPML.php index 61f6b364..294da40f 100644 --- a/tests/cases/ImportExport/TestOPML.php +++ b/tests/cases/ImportExport/TestOPML.php @@ -86,28 +86,28 @@ OPML_EXPORT_SERIALIZATION; \Phake::when(Arsse::$user)->exists->thenReturn(true); } - public function testExportToOpml() { + public function testExportToOpml():void { \Phake::when(Arsse::$db)->folderList("john.doe@example.com")->thenReturn(new Result($this->folders)); \Phake::when(Arsse::$db)->subscriptionList("john.doe@example.com")->thenReturn(new Result($this->subscriptions)); \Phake::when(Arsse::$db)->tagSummarize("john.doe@example.com")->thenReturn(new Result($this->tags)); $this->assertXmlStringEqualsXmlString($this->serialization, (new OPML)->export("john.doe@example.com")); } - public function testExportToFlatOpml() { + public function testExportToFlatOpml():void { \Phake::when(Arsse::$db)->folderList("john.doe@example.com")->thenReturn(new Result($this->folders)); \Phake::when(Arsse::$db)->subscriptionList("john.doe@example.com")->thenReturn(new Result($this->subscriptions)); \Phake::when(Arsse::$db)->tagSummarize("john.doe@example.com")->thenReturn(new Result($this->tags)); $this->assertXmlStringEqualsXmlString($this->serializationFlat, (new OPML)->export("john.doe@example.com", true)); } - public function testExportToOpmlAMissingUser() { + public function testExportToOpmlAMissingUser():void { \Phake::when(Arsse::$user)->exists->thenReturn(false); $this->assertException("doesNotExist", "User"); (new OPML)->export("john.doe@example.com"); } /** @dataProvider provideParserData */ - public function testParseOpmlForImport(string $file, bool $flat, $exp) { + public function testParseOpmlForImport(string $file, bool $flat, $exp):void { $data = file_get_contents(\JKingWeb\Arsse\DOCROOT."Import/OPML/$file"); // set up a partial mock to make the ImportExport::parse() method visible $parser = \Phake::makeVisible(\Phake::partialMock(OPML::class)); diff --git a/tests/cases/Lang/TestBasic.php b/tests/cases/Lang/TestBasic.php index de4b54c4..16bec4b6 100644 --- a/tests/cases/Lang/TestBasic.php +++ b/tests/cases/Lang/TestBasic.php @@ -16,14 +16,14 @@ class TestBasic extends \JKingWeb\Arsse\Test\AbstractTest { public $path; public $l; - public function testListLanguages() { + public function testListLanguages():void { $this->assertCount(sizeof($this->files), $this->l->list("en")); } /** * @depends testListLanguages */ - public function testSetLanguage() { + public function testSetLanguage():void { $this->assertEquals("en", $this->l->set("en")); $this->assertEquals("en_ca", $this->l->set("en_ca")); $this->assertEquals("de", $this->l->set("de_ch")); @@ -36,7 +36,7 @@ class TestBasic extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testSetLanguage */ - public function testLoadInternalStrings() { + public function testLoadInternalStrings():void { $this->assertEquals("", $this->l->set("", true)); $this->assertCount(sizeof(TestClass::REQUIRED), $this->l->dump()); } @@ -44,7 +44,7 @@ class TestBasic extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testLoadInternalStrings */ - public function testLoadDefaultLanguage() { + public function testLoadDefaultLanguage():void { $this->assertEquals(TestClass::DEFAULT, $this->l->set(TestClass::DEFAULT, true)); $str = $this->l->dump(); $this->assertArrayHasKey('Exception.JKingWeb/Arsse/Exception.uncoded', $str); @@ -54,7 +54,7 @@ class TestBasic extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testLoadDefaultLanguage */ - public function testLoadSupplementaryLanguage() { + public function testLoadSupplementaryLanguage():void { $this->l->set(TestClass::DEFAULT, true); $this->assertEquals("ja", $this->l->set("ja", true)); $str = $this->l->dump(); diff --git a/tests/cases/Lang/TestComplex.php b/tests/cases/Lang/TestComplex.php index 3b976a7d..7de2bf40 100644 --- a/tests/cases/Lang/TestComplex.php +++ b/tests/cases/Lang/TestComplex.php @@ -16,11 +16,11 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { public $path; public $l; - public function setUpSeries() { + public function setUpSeries():void { $this->l->set(TestClass::DEFAULT, true); } - public function testLazyLoad() { + public function testLazyLoad():void { $this->l->set("ja"); $this->assertArrayNotHasKey('Test.absentText', $this->l->dump()); } @@ -28,14 +28,14 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testLazyLoad */ - public function testGetWantedAndLoadedLocale() { + public function testGetWantedAndLoadedLocale():void { $this->l->set("en", true); $this->l->set("ja"); $this->assertEquals("ja", $this->l->get()); $this->assertEquals("en", $this->l->get(true)); } - public function testLoadCascadeOfFiles() { + public function testLoadCascadeOfFiles():void { $this->l->set("ja", true); $this->assertEquals("de", $this->l->set("de", true)); $str = $this->l->dump(); @@ -46,11 +46,11 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testLoadCascadeOfFiles */ - public function testLoadSubtag() { + public function testLoadSubtag():void { $this->assertEquals("en_ca", $this->l->set("en_ca", true)); } - public function testFetchAMessage() { + public function testFetchAMessage():void { $this->l->set("de"); $this->assertEquals('und der Stein der Weisen', $this->l->msg('Test.presentText')); } @@ -58,7 +58,7 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testFetchAMessage */ - public function testFetchAMessageWithMissingParameters() { + public function testFetchAMessageWithMissingParameters():void { $this->l->set("en_ca", true); $this->assertEquals('{0} and {1}', $this->l->msg('Test.presentText')); } @@ -66,7 +66,7 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testFetchAMessage */ - public function testFetchAMessageWithSingleNumericParameter() { + public function testFetchAMessageWithSingleNumericParameter():void { $this->l->set("en_ca", true); $this->assertEquals('Default language file "en" missing', $this->l->msg('Exception.JKingWeb/Arsse/Lang/Exception.defaultFileMissing', TestClass::DEFAULT)); } @@ -74,7 +74,7 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testFetchAMessage */ - public function testFetchAMessageWithMultipleNumericParameters() { + public function testFetchAMessageWithMultipleNumericParameters():void { $this->l->set("en_ca", true); $this->assertEquals('Happy Rotter and the Philosopher\'s Stone', $this->l->msg('Test.presentText', ['Happy Rotter', 'the Philosopher\'s Stone'])); } @@ -82,14 +82,14 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testFetchAMessage */ - public function testFetchAMessageWithNamedParameters() { + public function testFetchAMessageWithNamedParameters():void { $this->assertEquals('Message string "Test.absentText" missing from all loaded language files (en)', $this->l->msg('Exception.JKingWeb/Arsse/Lang/Exception.stringMissing', ['msgID' => 'Test.absentText', 'fileList' => 'en'])); } /** * @depends testFetchAMessage */ - public function testReloadDefaultStrings() { + public function testReloadDefaultStrings():void { $this->l->set("de", true); $this->l->set("en", true); $this->assertEquals('and the Philosopher\'s Stone', $this->l->msg('Test.presentText')); @@ -98,7 +98,7 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testFetchAMessage */ - public function testReloadGeneralTagAfterSubtag() { + public function testReloadGeneralTagAfterSubtag():void { $this->l->set("en", true); $this->l->set("en_us", true); $this->assertEquals('and the Sorcerer\'s Stone', $this->l->msg('Test.presentText')); diff --git a/tests/cases/Lang/TestErrors.php b/tests/cases/Lang/TestErrors.php index 86e29393..e8774846 100644 --- a/tests/cases/Lang/TestErrors.php +++ b/tests/cases/Lang/TestErrors.php @@ -16,65 +16,65 @@ class TestErrors extends \JKingWeb\Arsse\Test\AbstractTest { public $path; public $l; - public function setUpSeries() { + public function setUpSeries():void { $this->l->set("", true); } - public function testLoadEmptyFile() { + public function testLoadEmptyFile():void { $this->assertException("fileCorrupt", "Lang"); $this->l->set("fr_ca", true); } - public function testLoadFileWhichDoesNotReturnAnArray() { + public function testLoadFileWhichDoesNotReturnAnArray():void { $this->assertException("fileCorrupt", "Lang"); $this->l->set("it", true); } - public function testLoadFileWhichIsNotPhp() { + public function testLoadFileWhichIsNotPhp():void { $this->assertException("fileCorrupt", "Lang"); $this->l->set("ko", true); } - public function testLoadFileWhichIsCorrupt() { + public function testLoadFileWhichIsCorrupt():void { $this->assertException("fileCorrupt", "Lang"); $this->l->set("zh", true); } - public function testLoadFileWithooutReadPermission() { + public function testLoadFileWithooutReadPermission():void { $this->assertException("fileUnreadable", "Lang"); $this->l->set("ru", true); } - public function testLoadSubtagOfMissingLanguage() { + public function testLoadSubtagOfMissingLanguage():void { $this->assertException("fileMissing", "Lang"); $this->l->set("pt_br", true); } - public function testFetchInvalidMessage() { + public function testFetchInvalidMessage():void { $this->assertException("stringInvalid", "Lang"); $this->l->set("vi", true); $txt = $this->l->msg('Test.presentText'); } - public function testFetchMissingMessage() { + public function testFetchMissingMessage():void { $this->assertException("stringMissing", "Lang"); $txt = $this->l->msg('Test.absentText'); } - public function testLoadMissingDefaultLanguage() { + public function testLoadMissingDefaultLanguage():void { unlink($this->path.TestClass::DEFAULT.".php"); $this->assertException("defaultFileMissing", "Lang"); $this->l->set("fr", true); } - public function testLoadMissingLanguageWhenFetching() { + public function testLoadMissingLanguageWhenFetching():void { $this->l->set("en_ca"); unlink($this->path.TestClass::DEFAULT.".php"); $this->assertException("fileMissing", "Lang"); $this->l->msg('Test.presentText'); } - public function testLoadMissingDefaultLanguageWhenFetching() { + public function testLoadMissingDefaultLanguageWhenFetching():void { unlink($this->path.TestClass::DEFAULT.".php"); $this->l = new TestClass($this->path); $this->assertException("stringMissing", "Lang"); diff --git a/tests/cases/Misc/TestContext.php b/tests/cases/Misc/TestContext.php index f32f11e4..8ebb5151 100644 --- a/tests/cases/Misc/TestContext.php +++ b/tests/cases/Misc/TestContext.php @@ -11,7 +11,7 @@ use JKingWeb\Arsse\Misc\ValueInfo; /** @covers \JKingWeb\Arsse\Context\Context */ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { - public function testVerifyInitialState() { + public function testVerifyInitialState():void { $c = new Context; foreach ((new \ReflectionObject($c))->getMethods(\ReflectionMethod::IS_PUBLIC) as $m) { if ($m->isStatic() || strpos($m->name, "__") === 0) { @@ -23,7 +23,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testSetContextOptions() { + public function testSetContextOptions():void { $v = [ 'reverse' => true, 'limit' => 10, @@ -85,7 +85,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testCleanIdArrayValues() { + public function testCleanIdArrayValues():void { $methods = ["articles", "editions", "tags", "labels", "subscriptions"]; $in = [1, "2", 3.5, 4.0, 4, "ook", 0, -20, true, false, null, new \DateTime(), -1.0]; $out = [1, 2, 4]; @@ -95,7 +95,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testCleanFolderIdArrayValues() { + public function testCleanFolderIdArrayValues():void { $methods = ["folders", "foldersShallow"]; $in = [1, "2", 3.5, 4.0, 4, "ook", 0, -20, true, false, null, new \DateTime(), -1.0]; $out = [1, 2, 4, 0]; @@ -105,7 +105,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testCleanStringArrayValues() { + public function testCleanStringArrayValues():void { $methods = ["searchTerms", "annotationTerms", "titleTerms", "authorTerms", "tagNames", "labelNames"]; $now = new \DateTime; $in = [1, 3.0, "ook", 0, true, false, null, $now, ""]; @@ -116,7 +116,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testCloneAContext() { + public function testCloneAContext():void { $c1 = new Context; $c2 = clone $c1; $this->assertEquals($c1, $c2); diff --git a/tests/cases/Misc/TestDate.php b/tests/cases/Misc/TestDate.php index f2eb2be3..229c3108 100644 --- a/tests/cases/Misc/TestDate.php +++ b/tests/cases/Misc/TestDate.php @@ -14,7 +14,7 @@ class TestDate extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testNormalizeADate() { + public function testNormalizeADate():void { $exp = new \DateTimeImmutable("2018-01-01T00:00:00Z"); $this->assertEquals($exp, Date::normalize(1514764800)); $this->assertEquals($exp, Date::normalize("2018-01-01T00:00:00")); @@ -26,7 +26,7 @@ class TestDate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertNull(Date::normalize("2018-01-01T00:00:00Z", "http")); } - public function testFormatADate() { + public function testFormatADate():void { $test = new \DateTimeImmutable("2018-01-01T00:00:00Z"); $this->assertNull(Date::transform(null, "http")); $this->assertNull(Date::transform("ook", "http")); @@ -40,7 +40,7 @@ class TestDate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(1514764800.265579, Date::transform("2018-01-01T00:00:00.265579Z", "float", "iso8601m")); } - public function testMoveDateForward() { + public function testMoveDateForward():void { $test = new \DateTimeImmutable("2018-01-01T00:00:00Z"); $this->assertNull(Date::add("P1D", null)); $this->assertNull(Date::add("P1D", "ook")); @@ -49,7 +49,7 @@ class TestDate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertNull(Date::add("ook", $test)); } - public function testMoveDateBack() { + public function testMoveDateBack():void { $test = new \DateTimeImmutable("2018-01-01T00:00:00Z"); $this->assertNull(Date::sub("P1D", null)); $this->assertNull(Date::sub("P1D", "ook")); diff --git a/tests/cases/Misc/TestHTTP.php b/tests/cases/Misc/TestHTTP.php index 8430ddaa..d951af7c 100644 --- a/tests/cases/Misc/TestHTTP.php +++ b/tests/cases/Misc/TestHTTP.php @@ -12,14 +12,14 @@ use Psr\Http\Message\ResponseInterface; /** @covers \JKingWeb\Arsse\Misc\HTTP */ class TestHTTP extends \JKingWeb\Arsse\Test\AbstractTest { /** @dataProvider provideMediaTypes */ - public function testMatchMediaType(string $header, array $types, bool $exp) { + public function testMatchMediaType(string $header, array $types, bool $exp):void { $msg = (new \Laminas\Diactoros\Request)->withHeader("Content-Type", $header); $this->assertSame($exp, HTTP::matchType($msg, ...$types)); $msg = (new \Laminas\Diactoros\Response)->withHeader("Content-Type", $header); $this->assertSame($exp, HTTP::matchType($msg, ...$types)); } - public function provideMediaTypes() { + public function provideMediaTypes(): array { return [ ["application/json", ["application/json"], true], ["APPLICATION/JSON", ["application/json"], true], diff --git a/tests/cases/Misc/TestQuery.php b/tests/cases/Misc/TestQuery.php index a1588f1b..d784d91e 100644 --- a/tests/cases/Misc/TestQuery.php +++ b/tests/cases/Misc/TestQuery.php @@ -11,14 +11,14 @@ use JKingWeb\Arsse\Misc\ValueInfo; /** @covers \JKingWeb\Arsse\Misc\Query */ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { - public function testBasicQuery() { + public function testBasicQuery():void { $q = new Query("select * from table where a = ?", "int", 3); $this->assertSame("select * from table where a = ?", $q->getQuery()); $this->assertSame(["int"], $q->getTypes()); $this->assertSame([3], $q->getValues()); } - public function testWhereQuery() { + public function testWhereQuery():void { // simple where clause $q = (new Query("select * from table"))->setWhere("a = ?", "int", 3); $this->assertSame("select * from table WHERE a = ?", $q->getQuery()); @@ -46,21 +46,21 @@ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame([2, 4, 1, 3], $q->getValues()); } - public function testGroupedQuery() { + public function testGroupedQuery():void { $q = (new Query("select col1, col2, count(*) as count from table"))->setGroup("col1", "col2"); $this->assertSame("select col1, col2, count(*) as count from table GROUP BY col1, col2", $q->getQuery()); $this->assertSame([], $q->getTypes()); $this->assertSame([], $q->getValues()); } - public function testOrderedQuery() { + public function testOrderedQuery():void { $q = (new Query("select col1, col2, col3 from table"))->setOrder("col1 desc", "col2")->setOrder("col3 asc"); $this->assertSame("select col1, col2, col3 from table ORDER BY col1 desc, col2, col3 asc", $q->getQuery()); $this->assertSame([], $q->getTypes()); $this->assertSame([], $q->getValues()); } - public function testLimitedQuery() { + public function testLimitedQuery():void { // no offset $q = (new Query("select * from table"))->setLimit(5); $this->assertSame("select * from table LIMIT 5", $q->getQuery()); @@ -78,7 +78,7 @@ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame([], $q->getValues()); } - public function testQueryWithCommonTableExpression() { + public function testQueryWithCommonTableExpression():void { $q = (new Query("select * from table where a in (select * from cte where a = ?)", "int", 1))->setCTE("cte", "select * from other_table where a = ? and b = ?", ["str", "str"], [2, 3]); $this->assertSame("WITH RECURSIVE cte as (select * from other_table where a = ? and b = ?) select * from table where a in (select * from cte where a = ?)", $q->getQuery()); $this->assertSame(["str", "str", "int"], $q->getTypes()); @@ -90,7 +90,7 @@ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame([2, 3, 4, 5, 1], $q->getValues()); } - public function testQueryWithPushedCommonTableExpression() { + public function testQueryWithPushedCommonTableExpression():void { $q = (new Query("select * from table1"))->setWhere("a between ? and ?", ["datetime", "datetime"], [1, 2]) ->setCTE("cte1", "select * from table2 where a = ? and b = ?", ["str", "str"], [3, 4]) ->pushCTE("cte2") @@ -100,7 +100,7 @@ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame([3, 4, 1, 2, 5], $q->getValues()); } - public function testComplexQuery() { + public function testComplexQuery():void { $q = (new query("select *, ? as const from table", "datetime", 1)) ->setWhereNot("b = ?", "bool", 2) ->setGroup("col1", "col2") diff --git a/tests/cases/Misc/TestURL.php b/tests/cases/Misc/TestURL.php index 06b509db..7cf1554f 100644 --- a/tests/cases/Misc/TestURL.php +++ b/tests/cases/Misc/TestURL.php @@ -15,7 +15,7 @@ class TestURL extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideNormalizations */ - public function testNormalizeAUrl(string $url, string $exp, string $user = null, string $pass = null) { + public function testNormalizeAUrl(string $url, string $exp, string $user = null, string $pass = null):void { $this->assertSame($exp, URL::normalize($url, $user, $pass)); } @@ -77,7 +77,7 @@ class TestURL extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideQueries */ - public function testAppendQueryParameters(string $url, string $query, string $exp) { + public function testAppendQueryParameters(string $url, string $query, string $exp):void { $this->assertSame($exp, URL::queryAppend($url, $query)); } @@ -93,11 +93,11 @@ class TestURL extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideAbsolutes */ - public function testDetermineAbsoluteness(bool $exp, string $url) { + public function testDetermineAbsoluteness(bool $exp, string $url):void { $this->assertSame($exp, URL::absolute($url)); } - public function provideAbsolutes() { + public function provideAbsolutes(): array { return [ [true, "http://example.com/"], [true, "HTTP://example.com/"], diff --git a/tests/cases/Misc/TestValueInfo.php b/tests/cases/Misc/TestValueInfo.php index 729b0f25..b3b48ca4 100644 --- a/tests/cases/Misc/TestValueInfo.php +++ b/tests/cases/Misc/TestValueInfo.php @@ -16,7 +16,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testGetIntegerInfo() { + public function testGetIntegerInfo():void { $tests = [ [null, I::NULL], ["", I::NULL], @@ -91,7 +91,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exp, I::int($value), "Test returned ".decbin(I::int($value))." for value: ".var_export($value, true)); } } - public function testGetStringInfo() { + public function testGetStringInfo():void { $tests = [ [null, I::NULL], ["", I::VALID | I::EMPTY], @@ -162,7 +162,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testValidateDatabaseIdentifier() { + public function testValidateDatabaseIdentifier():void { $tests = [ [null, false, true], ["", false, true], @@ -234,7 +234,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testValidateBoolean() { + public function testValidateBoolean():void { $tests = [ [null, null], ["", false], @@ -310,7 +310,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideSimpleNormalizationValues */ - public function testNormalizeSimpleValues($input, string $typeName, $exp, bool $pass, bool $strict, bool $drop) { + public function testNormalizeSimpleValues($input, string $typeName, $exp, bool $pass, bool $strict, bool $drop):void { $assert = function($exp, $act, string $msg) { if (is_null($exp)) { $this->assertNull($act, $msg); @@ -366,7 +366,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideDateNormalizationValues */ - public function testNormalizeDateValues($input, $format, $exp, bool $strict, bool $drop) { + public function testNormalizeDateValues($input, $format, $exp, bool $strict, bool $drop):void { if ($strict && $drop) { $modeName = "strict drop"; $modeConst = I::M_STRICT | I::M_DROP; @@ -397,7 +397,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testNormalizeComplexValues() { + public function testNormalizeComplexValues():void { // Array-mode tests $tests = [ [I::T_INT | I::M_DROP, [1, 2, 2.2, 3], [1,2,null,3] ], @@ -640,7 +640,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { return $out; } - public function testFlattenArray() { + public function testFlattenArray():void { $arr = [1, [2, 3, [4, 5]], 6, [[7, 8], 9, 10]]; $exp = range(1, 10); $this->assertSame($exp, I::flatten($arr)); diff --git a/tests/cases/REST/Fever/TestAPI.php b/tests/cases/REST/Fever/TestAPI.php index f7cd3c53..fd892b06 100644 --- a/tests/cases/REST/Fever/TestAPI.php +++ b/tests/cases/REST/Fever/TestAPI.php @@ -173,7 +173,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideTokenAuthenticationRequests */ - public function testAuthenticateAUserToken(bool $httpRequired, bool $tokenEnforced, string $httpUser = null, array $dataPost, array $dataGet, ResponseInterface $exp) { + public function testAuthenticateAUserToken(bool $httpRequired, bool $tokenEnforced, string $httpUser = null, array $dataPost, array $dataGet, ResponseInterface $exp):void { self::setConf([ 'userHTTPAuthRequired' => $httpRequired, 'userSessionEnforced' => $tokenEnforced, @@ -244,7 +244,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testListGroups() { + public function testListGroups():void { \Phake::when(Arsse::$db)->tagList(Arsse::$user->id)->thenReturn(new Result([ ['id' => 1, 'name' => "Fascinating", 'subscriptions' => 2], ['id' => 2, 'name' => "Interesting", 'subscriptions' => 2], @@ -271,7 +271,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $act); } - public function testListFeeds() { + public function testListFeeds():void { \Phake::when(Arsse::$db)->subscriptionList(Arsse::$user->id)->thenReturn(new Result([ ['id' => 1, 'feed' => 5, 'title' => "Ankh-Morpork News", 'url' => "http://example.com/feed", 'source' => "http://example.com/", 'edited' => "2019-01-01 21:12:00", 'favicon' => "http://example.com/favicon.ico"], ['id' => 2, 'feed' => 9, 'title' => "Ook, Ook Eek Ook!", 'url' => "http://example.net/feed", 'source' => "http://example.net/", 'edited' => "1988-06-24 12:21:00", 'favicon' => ""], @@ -299,7 +299,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideItemListContexts */ - public function testListItems(string $url, Context $c, bool $desc) { + public function testListItems(string $url, Context $c, bool $desc):void { $fields = ["id", "subscription", "title", "author", "content", "url", "starred", "unread", "published_date"]; $order = [$desc ? "id desc" : "id"]; \Phake::when(Arsse::$db)->articleList->thenReturn(new Result($this->articles['db'])); @@ -329,7 +329,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testListItemIds() { + public function testListItemIds():void { $saved = [['id' => 1],['id' => 2],['id' => 3]]; $unread = [['id' => 4],['id' => 5],['id' => 6]]; \Phake::when(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->starred(true))->thenReturn(new Result($saved)); @@ -344,7 +344,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->h->dispatch($this->req("api&unread_item_ids"))); } - public function testListHotLinks() { + public function testListHotLinks():void { // hot links are not actually implemented, so an empty array should be all we get $exp = new JsonResponse([ 'links' => [] @@ -353,7 +353,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideMarkingContexts */ - public function testSetMarks(string $post, Context $c, array $data, array $out) { + public function testSetMarks(string $post, Context $c, array $data, array $out):void { $saved = [['id' => 1],['id' => 2],['id' => 3]]; $unread = [['id' => 4],['id' => 5],['id' => 6]]; \Phake::when(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->starred(true))->thenReturn(new Result($saved)); @@ -371,7 +371,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideMarkingContexts */ - public function testSetMarksWithQuery(string $get, Context $c, array $data, array $out) { + public function testSetMarksWithQuery(string $get, Context $c, array $data, array $out):void { $saved = [['id' => 1],['id' => 2],['id' => 3]]; $unread = [['id' => 4],['id' => 5],['id' => 6]]; \Phake::when(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->starred(true))->thenReturn(new Result($saved)); @@ -427,7 +427,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideInvalidRequests */ - public function testSendInvalidRequests(ServerRequest $req, ResponseInterface $exp) { + public function testSendInvalidRequests(ServerRequest $req, ResponseInterface $exp):void { $this->assertMessage($exp, $this->h->dispatch($req)); } @@ -439,7 +439,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testMakeABaseQuery() { + public function testMakeABaseQuery():void { $this->h = \Phake::partialMock(API::class); \Phake::when($this->h)->logIn->thenReturn(true); \Phake::when(Arsse::$db)->subscriptionRefreshed(Arsse::$user->id)->thenReturn(new \DateTimeImmutable("2000-01-01T00:00:00Z")); @@ -467,7 +467,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $act); } - public function testUndoReadMarks() { + public function testUndoReadMarks():void { $unread = [['id' => 4],['id' => 5],['id' => 6]]; $out = ['unread_item_ids' => "4,5,6"]; \Phake::when(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->limit(1), ["marked_date"], ["marked_date desc"])->thenReturn(new Result([['marked_date' => "2000-01-01 00:00:00"]])); @@ -483,7 +483,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db)->articleMark; // only called one time, above } - public function testOutputToXml() { + public function testOutputToXml():void { \Phake::when($this->h)->processRequest->thenReturn([ 'items' => $this->articles['rest'], 'total_items' => 1024, @@ -493,13 +493,13 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $act); } - public function testListFeedIcons() { + public function testListFeedIcons():void { $act = $this->h->dispatch($this->req("api&favicons")); $exp = new JsonResponse(['favicons' => [['id' => 0, 'data' => API::GENERIC_ICON_TYPE.",".API::GENERIC_ICON_DATA]]]); $this->assertMessage($exp, $act); } - public function testAnswerOptionsRequest() { + public function testAnswerOptionsRequest():void { $act = $this->h->dispatch($this->req("api", "", "OPTIONS")); $exp = new EmptyResponse(204, [ 'Allow' => "POST", diff --git a/tests/cases/REST/Fever/TestUser.php b/tests/cases/REST/Fever/TestUser.php index 481057a2..695ea933 100644 --- a/tests/cases/REST/Fever/TestUser.php +++ b/tests/cases/REST/Fever/TestUser.php @@ -36,7 +36,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider providePasswordCreations */ - public function testRegisterAUserPassword(string $user, string $password = null, $exp) { + public function testRegisterAUserPassword(string $user, string $password = null, $exp):void { \Phake::when(Arsse::$user)->generatePassword->thenReturn("RANDOM_PASSWORD"); \Phake::when(Arsse::$db)->tokenCreate->thenReturnCallback(function($user, $class, $id = null) { return $id ?? "RANDOM_TOKEN"; @@ -66,7 +66,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testUnregisterAUser() { + public function testUnregisterAUser():void { \Phake::when(Arsse::$db)->tokenRevoke->thenReturn(3); $this->assertTrue($this->u->unregister("jane.doe@example.com")); \Phake::verify(Arsse::$db)->tokenRevoke("jane.doe@example.com", "fever.login"); @@ -76,7 +76,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserAuthenticationRequests */ - public function testAuthenticateAUserName(string $user, string $password, bool $exp) { + public function testAuthenticateAUserName(string $user, string $password, bool $exp):void { \Phake::when(Arsse::$db)->tokenLookup->thenThrow(new ExceptionInput("constraintViolation")); \Phake::when(Arsse::$db)->tokenLookup("fever.login", md5("jane.doe@example.com:secret"))->thenReturn(['user' => "jane.doe@example.com"]); \Phake::when(Arsse::$db)->tokenLookup("fever.login", md5("john.doe@example.com:superman"))->thenReturn(['user' => "john.doe@example.com"]); diff --git a/tests/cases/REST/NextcloudNews/TestV1_2.php b/tests/cases/REST/NextcloudNews/TestV1_2.php index 9aa3c8e9..25b98a82 100644 --- a/tests/cases/REST/NextcloudNews/TestV1_2.php +++ b/tests/cases/REST/NextcloudNews/TestV1_2.php @@ -333,18 +333,18 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { return $value; } - public function testSendAuthenticationChallenge() { + public function testSendAuthenticationChallenge():void { $exp = new EmptyResponse(401); $this->assertMessage($exp, $this->req("GET", "/", "", [], false)); } /** @dataProvider provideInvalidPaths */ - public function testRespondToInvalidPaths($path, $method, $code, $allow = null) { + public function testRespondToInvalidPaths($path, $method, $code, $allow = null):void { $exp = new EmptyResponse($code, $allow ? ['Allow' => $allow] : []); $this->assertMessage($exp, $this->req($method, $path)); } - public function provideInvalidPaths() { + public function provideInvalidPaths(): array { return [ ["/", "GET", 404], ["/", "POST", 404], @@ -371,7 +371,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testRespondToInvalidInputTypes() { + public function testRespondToInvalidInputTypes():void { $exp = new EmptyResponse(415, ['Accept' => "application/json"]); $this->assertMessage($exp, $this->req("PUT", "/folders/1", '', ['Content-Type' => "application/xml"])); $exp = new EmptyResponse(400); @@ -380,7 +380,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideOptionsRequests */ - public function testRespondToOptionsRequests(string $url, string $allow, string $accept) { + public function testRespondToOptionsRequests(string $url, string $allow, string $accept):void { $exp = new EmptyResponse(204, [ 'Allow' => $allow, 'Accept' => $accept, @@ -388,7 +388,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("OPTIONS", $url)); } - public function provideOptionsRequests() { + public function provideOptionsRequests(): array { return [ ["/feeds", "HEAD,GET,POST", "application/json"], ["/feeds/2112", "DELETE", "application/json"], @@ -396,7 +396,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testListFolders() { + public function testListFolders():void { $list = [ ['id' => 1, 'name' => "Software", 'parent' => null], ['id' => 12, 'name' => "Hardware", 'parent' => null], @@ -411,7 +411,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideFolderCreations */ - public function testAddAFolder(array $input, bool $body, $output, ResponseInterface $exp) { + public function testAddAFolder(array $input, bool $body, $output, ResponseInterface $exp):void { if ($output instanceof ExceptionInput) { \Phake::when(Arsse::$db)->folderAdd->thenThrow($output); } else { @@ -428,7 +428,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function provideFolderCreations() { + public function provideFolderCreations(): array { return [ [['name' => "Software"], true, 1, new Response(['folders' => [['id'=> 1, 'name' => "Software"]]])], [['name' => "Software"], false, 1, new Response(['folders' => [['id'=> 1, 'name' => "Software"]]])], @@ -441,7 +441,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testRemoveAFolder() { + public function testRemoveAFolder():void { \Phake::when(Arsse::$db)->folderRemove(Arsse::$user->id, 1)->thenReturn(true)->thenThrow(new ExceptionInput("subjectMissing")); $exp = new EmptyResponse(204); $this->assertMessage($exp, $this->req("DELETE", "/folders/1")); @@ -452,7 +452,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideFolderRenamings */ - public function testRenameAFolder(array $input, int $id, $output, ResponseInterface $exp) { + public function testRenameAFolder(array $input, int $id, $output, ResponseInterface $exp):void { if ($output instanceof ExceptionInput) { \Phake::when(Arsse::$db)->folderPropertiesSet->thenThrow($output); } else { @@ -463,7 +463,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db)->folderPropertiesSet(Arsse::$user->id, $id, $input); } - public function provideFolderRenamings() { + public function provideFolderRenamings(): array { return [ [['name' => "Software"], 1, true, new EmptyResponse(204)], [['name' => "Software"], 2, new ExceptionInput("constraintViolation"), new EmptyResponse(409)], @@ -474,7 +474,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testRetrieveServerVersion() { + public function testRetrieveServerVersion():void { $exp = new Response([ 'version' => V1_2::VERSION, 'arsse_version' => Arsse::VERSION, @@ -482,7 +482,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("GET", "/version")); } - public function testListSubscriptions() { + public function testListSubscriptions():void { $exp1 = [ 'feeds' => [], 'starredCount' => 0, @@ -502,7 +502,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideNewSubscriptions */ - public function testAddASubscription(array $input, $id, int $latestEdition, array $output, $moveOutcome, ResponseInterface $exp) { + public function testAddASubscription(array $input, $id, int $latestEdition, array $output, $moveOutcome, ResponseInterface $exp):void { if ($id instanceof \Exception) { \Phake::when(Arsse::$db)->subscriptionAdd->thenThrow($id); } else { @@ -533,7 +533,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function provideNewSubscriptions() { + public function provideNewSubscriptions(): array { $feedException = new \JKingWeb\Arsse\Feed\Exception("", new \PicoFeed\Reader\SubscriptionNotFoundException); return [ [['url' => "http://example.com/news.atom", 'folderId' => 3], 2112, 0, $this->feeds['db'][0], new ExceptionInput("idMissing"), new Response(['feeds' => [$this->feeds['rest'][0]]])], @@ -545,7 +545,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testRemoveASubscription() { + public function testRemoveASubscription():void { \Phake::when(Arsse::$db)->subscriptionRemove(Arsse::$user->id, 1)->thenReturn(true)->thenThrow(new ExceptionInput("subjectMissing")); $exp = new EmptyResponse(204); $this->assertMessage($exp, $this->req("DELETE", "/feeds/1")); @@ -555,7 +555,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db, \Phake::times(2))->subscriptionRemove(Arsse::$user->id, 1); } - public function testMoveASubscription() { + public function testMoveASubscription():void { $in = [ ['folderId' => 0], ['folderId' => 42], @@ -583,7 +583,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("PUT", "/feeds/1/move", json_encode($in[5]))); } - public function testRenameASubscription() { + public function testRenameASubscription():void { $in = [ ['feedTitle' => null], ['feedTitle' => "Ook"], @@ -613,7 +613,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("PUT", "/feeds/1/rename", json_encode($in[6]))); } - public function testListStaleFeeds() { + public function testListStaleFeeds():void { $out = [ [ 'id' => 42, @@ -629,7 +629,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("GET", "/feeds/all")); } - public function testUpdateAFeed() { + public function testUpdateAFeed():void { $in = [ ['feedId' => 42], // valid ['feedId' => 2112], // feed does not exist @@ -650,7 +650,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("GET", "/feeds/update", json_encode($in[4]))); } - public function testListArticles() { + public function testListArticles():void { $t = new \DateTime; $in = [ ['type' => 0, 'id' => 42], // type=0 => subscription/feed @@ -704,7 +704,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->limit(5), $this->anything(), ["edition desc"]); } - public function testMarkAFolderRead() { + public function testMarkAFolderRead():void { $read = ['read' => true]; $in = json_encode(['newestItemId' => 2112]); \Phake::when(Arsse::$db)->articleMark(Arsse::$user->id, $read, (new Context)->folder(1)->latestEdition(2112))->thenReturn(42); @@ -719,7 +719,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("PUT", "/folders/42/read", $in)); } - public function testMarkASubscriptionRead() { + public function testMarkASubscriptionRead():void { $read = ['read' => true]; $in = json_encode(['newestItemId' => 2112]); \Phake::when(Arsse::$db)->articleMark(Arsse::$user->id, $read, (new Context)->subscription(1)->latestEdition(2112))->thenReturn(42); @@ -734,7 +734,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("PUT", "/feeds/42/read", $in)); } - public function testMarkAllItemsRead() { + public function testMarkAllItemsRead():void { $read = ['read' => true]; $in = json_encode(['newestItemId' => 2112]); \Phake::when(Arsse::$db)->articleMark(Arsse::$user->id, $read, (new Context)->latestEdition(2112))->thenReturn(42); @@ -746,7 +746,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("PUT", "/items/read?newestItemId=ook")); } - public function testChangeMarksOfASingleArticle() { + public function testChangeMarksOfASingleArticle():void { $read = ['read' => true]; $unread = ['read' => false]; $star = ['starred' => true]; @@ -772,7 +772,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db, \Phake::times(8))->articleMark(Arsse::$user->id, $this->anything(), $this->anything()); } - public function testChangeMarksOfMultipleArticles() { + public function testChangeMarksOfMultipleArticles():void { $read = ['read' => true]; $unread = ['read' => false]; $star = ['starred' => true]; @@ -827,7 +827,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db, \Phake::atLeast(1))->articleMark(Arsse::$user->id, $unstar, (new Context)->articles($in[1])); } - public function testQueryTheServerStatus() { + public function testQueryTheServerStatus():void { $interval = Arsse::$conf->serviceFrequency; $valid = (new \DateTimeImmutable("now", new \DateTimezone("UTC")))->sub($interval); $invalid = $valid->sub($interval)->sub($interval); @@ -847,21 +847,21 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("GET", "/status")); } - public function testCleanUpBeforeUpdate() { + public function testCleanUpBeforeUpdate():void { \Phake::when(Arsse::$db)->feedCleanup()->thenReturn(true); $exp = new EmptyResponse(204); $this->assertMessage($exp, $this->req("GET", "/cleanup/before-update")); \Phake::verify(Arsse::$db)->feedCleanup(); } - public function testCleanUpAfterUpdate() { + public function testCleanUpAfterUpdate():void { \Phake::when(Arsse::$db)->articleCleanup()->thenReturn(true); $exp = new EmptyResponse(204); $this->assertMessage($exp, $this->req("GET", "/cleanup/after-update")); \Phake::verify(Arsse::$db)->articleCleanup(); } - public function testQueryTheUserStatus() { + public function testQueryTheUserStatus():void { $act = $this->req("GET", "/user"); $exp = new Response([ 'userId' => Arsse::$user->id, @@ -872,7 +872,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $act); } - public function testPreferJsonOverQueryParameters() { + public function testPreferJsonOverQueryParameters():void { $in = ['name' => "Software"]; $url = "/folders?name=Hardware"; $out1 = ['id' => 1, 'name' => "Software"]; @@ -885,7 +885,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("POST", "/folders?name=Hardware", json_encode($in))); } - public function testMeldJsonAndQueryParameters() { + public function testMeldJsonAndQueryParameters():void { $in = ['oldestFirst' => true]; $url = "/items?type=2"; \Phake::when(Arsse::$db)->articleList->thenReturn(new Result([])); diff --git a/tests/cases/REST/NextcloudNews/TestVersions.php b/tests/cases/REST/NextcloudNews/TestVersions.php index 7c65ddbf..ba849c59 100644 --- a/tests/cases/REST/NextcloudNews/TestVersions.php +++ b/tests/cases/REST/NextcloudNews/TestVersions.php @@ -25,24 +25,24 @@ class TestVersions extends \JKingWeb\Arsse\Test\AbstractTest { return (new Versions)->dispatch($req); } - public function testFetchVersionList() { + public function testFetchVersionList():void { $exp = new Response(['apiLevels' => ['v1-2']]); $this->assertMessage($exp, $this->req("GET", "/")); $this->assertMessage($exp, $this->req("GET", "/")); $this->assertMessage($exp, $this->req("GET", "/")); } - public function testRespondToOptionsRequest() { + public function testRespondToOptionsRequest():void { $exp = new EmptyResponse(204, ['Allow' => "HEAD,GET"]); $this->assertMessage($exp, $this->req("OPTIONS", "/")); } - public function testUseIncorrectMethod() { + public function testUseIncorrectMethod():void { $exp = new EmptyResponse(405, ['Allow' => "HEAD,GET"]); $this->assertMessage($exp, $this->req("POST", "/")); } - public function testUseIncorrectPath() { + public function testUseIncorrectPath():void { $exp = new EmptyResponse(404); $this->assertMessage($exp, $this->req("GET", "/ook")); $this->assertMessage($exp, $this->req("OPTIONS", "/ook")); diff --git a/tests/cases/REST/TestREST.php b/tests/cases/REST/TestREST.php index 249e80c1..821ab308 100644 --- a/tests/cases/REST/TestREST.php +++ b/tests/cases/REST/TestREST.php @@ -25,7 +25,7 @@ use Laminas\Diactoros\Response\EmptyResponse; class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { /** @dataProvider provideApiMatchData */ - public function testMatchAUrlToAnApi($apiList, string $input, array $exp) { + public function testMatchAUrlToAnApi($apiList, string $input, array $exp):void { $r = new REST($apiList); try { $out = $r->apiMatch($input); @@ -61,7 +61,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideAuthenticableRequests */ - public function testAuthenticateRequests(array $serverParams, array $expAttr) { + public function testAuthenticateRequests(array $serverParams, array $expAttr):void { $r = new REST(); // create a mock user manager Arsse::$user = \Phake::mock(User::class); @@ -93,7 +93,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testSendAuthenticationChallenges() { + public function testSendAuthenticationChallenges():void { self::setConf(); $r = new REST(); $in = new EmptyResponse(401); @@ -106,7 +106,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUnnormalizedOrigins */ - public function testNormalizeOrigins(string $origin, string $exp, array $ports = null) { + public function testNormalizeOrigins(string $origin, string $exp, array $ports = null):void { $r = new REST(); $act = $r->corsNormalizeOrigin($origin, $ports); $this->assertSame($exp, $act); @@ -149,7 +149,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideCorsNegotiations */ - public function testNegotiateCors($origin, bool $exp, string $allowed = null, string $denied = null) { + public function testNegotiateCors($origin, bool $exp, string $allowed = null, string $denied = null):void { self::setConf(); $r = \Phake::partialMock(REST::class); \Phake::when($r)->corsNormalizeOrigin->thenReturnCallback(function($origin) { @@ -187,7 +187,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideCorsHeaders */ - public function testAddCorsHeaders(string $reqMethod, array $reqHeaders, array $resHeaders, array $expHeaders) { + public function testAddCorsHeaders(string $reqMethod, array $reqHeaders, array $resHeaders, array $expHeaders):void { $r = new REST(); $req = new Request("", $reqMethod, "php://memory", $reqHeaders); $res = new EmptyResponse(204, $resHeaders); @@ -251,7 +251,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUnnormalizedResponses */ - public function testNormalizeHttpResponses(ResponseInterface $res, ResponseInterface $exp, RequestInterface $req = null) { + public function testNormalizeHttpResponses(ResponseInterface $res, ResponseInterface $exp, RequestInterface $req = null):void { $r = \Phake::partialMock(REST::class); \Phake::when($r)->corsNegotiate->thenReturn(true); \Phake::when($r)->challenge->thenReturnCallback(function($res) { @@ -286,7 +286,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testCreateHandlers() { + public function testCreateHandlers():void { $r = new REST(); foreach (REST::API_LIST as $api) { $class = $api['class']; @@ -295,7 +295,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideMockRequests */ - public function testDispatchRequests(ServerRequest $req, string $method, bool $called, string $class = "", string $target ="") { + public function testDispatchRequests(ServerRequest $req, string $method, bool $called, string $class = "", string $target =""):void { $r = \Phake::partialMock(REST::class); \Phake::when($r)->normalizeResponse->thenReturnCallback(function($res) { return $res; diff --git a/tests/cases/REST/TinyTinyRSS/TestAPI.php b/tests/cases/REST/TinyTinyRSS/TestAPI.php index f25c4ccb..b6be644a 100644 --- a/tests/cases/REST/TinyTinyRSS/TestAPI.php +++ b/tests/cases/REST/TinyTinyRSS/TestAPI.php @@ -133,7 +133,7 @@ LONG_STRING; return $this->h->dispatch($req); } - protected function reqAuth($data, $user) { + protected function reqAuth($data, $user): ResponseInterface { return $this->req($data, "POST", "", null, $user); } @@ -178,7 +178,7 @@ LONG_STRING; self::clearData(); } - public function testHandleInvalidPaths() { + public function testHandleInvalidPaths():void { $exp = $this->respErr("MALFORMED_INPUT", [], null); $this->assertMessage($exp, $this->req(null, "POST", "", "")); $this->assertMessage($exp, $this->req(null, "POST", "/", "")); @@ -187,7 +187,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req(null, "POST", "/bad/path", "")); } - public function testHandleOptionsRequest() { + public function testHandleOptionsRequest():void { $exp = new EmptyResponse(204, [ 'Allow' => "POST", 'Accept' => "application/json, text/json", @@ -195,14 +195,14 @@ LONG_STRING; $this->assertMessage($exp, $this->req(null, "OPTIONS", "", "")); } - public function testHandleInvalidData() { + public function testHandleInvalidData():void { $exp = $this->respErr("MALFORMED_INPUT", [], null); $this->assertMessage($exp, $this->req(null, "POST", "", "This is not valid JSON data")); $this->assertMessage($exp, $this->req(null, "POST", "", "")); // lack of data is also an error } /** @dataProvider provideLoginRequests */ - public function testLogIn(array $conf, $httpUser, array $data, $sessions) { + public function testLogIn(array $conf, $httpUser, array $data, $sessions):void { Arsse::$user->id = null; self::setConf($conf); \Phake::when(Arsse::$user)->auth->thenReturn(false); @@ -236,7 +236,7 @@ LONG_STRING; } /** @dataProvider provideResumeRequests */ - public function testValidateASession(array $conf, $httpUser, string $data, $result) { + public function testValidateASession(array $conf, $httpUser, string $data, $result):void { Arsse::$user->id = null; self::setConf($conf); \Phake::when(Arsse::$db)->sessionResume("PriestsOfSyrinx")->thenReturn([ @@ -273,7 +273,7 @@ LONG_STRING; return $this->generateLoginRequests("isLoggedIn"); } - public function generateLoginRequests(string $type) { + public function generateLoginRequests(string $type): array { $john = "john.doe@example.com"; $johnGood = [ 'user' => $john, @@ -520,7 +520,7 @@ LONG_STRING; } } - public function testHandleGenericError() { + public function testHandleGenericError():void { \Phake::when(Arsse::$user)->auth(Arsse::$user->id, $this->anything())->thenThrow(new \JKingWeb\Arsse\Db\ExceptionTimeout("general")); $data = [ 'op' => "login", @@ -531,7 +531,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($data)); } - public function testLogOut() { + public function testLogOut():void { \Phake::when(Arsse::$db)->sessionDestroy->thenReturn(true); $data = [ 'op' => "logout", @@ -542,7 +542,7 @@ LONG_STRING; \Phake::verify(Arsse::$db)->sessionDestroy(Arsse::$user->id, "PriestsOfSyrinx"); } - public function testHandleUnknownMethods() { + public function testHandleUnknownMethods():void { $exp = $this->respErr("UNKNOWN_METHOD", ['method' => "thisMethodDoesNotExist"]); $data = [ 'op' => "thisMethodDoesNotExist", @@ -551,7 +551,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($data)); } - public function testHandleMixedCaseMethods() { + public function testHandleMixedCaseMethods():void { $data = [ 'op' => "isLoggedIn", 'sid' => "PriestsOfSyrinx", @@ -566,7 +566,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($data)); } - public function testRetrieveServerVersion() { + public function testRetrieveServerVersion():void { $data = [ 'op' => "getVersion", 'sid' => "PriestsOfSyrinx", @@ -578,7 +578,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($data)); } - public function testRetrieveProtocolLevel() { + public function testRetrieveProtocolLevel():void { $data = [ 'op' => "getApiLevel", 'sid' => "PriestsOfSyrinx", @@ -587,7 +587,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($data)); } - public function testAddACategory() { + public function testAddACategory():void { $in = [ ['op' => "addCategory", 'sid' => "PriestsOfSyrinx", 'caption' => "Software"], ['op' => "addCategory", 'sid' => "PriestsOfSyrinx", 'caption' => "Hardware", 'parent_id' => 1], @@ -638,7 +638,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($in[5])); } - public function testRemoveACategory() { + public function testRemoveACategory():void { $in = [ ['op' => "removeCategory", 'sid' => "PriestsOfSyrinx", 'category_id' => 42], ['op' => "removeCategory", 'sid' => "PriestsOfSyrinx", 'category_id' => 2112], @@ -661,7 +661,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(3))->folderRemove(Arsse::$user->id, $this->anything()); } - public function testMoveACategory() { + public function testMoveACategory():void { $in = [ ['op' => "moveCategory", 'sid' => "PriestsOfSyrinx", 'category_id' => 42, 'parent_id' => 1], ['op' => "moveCategory", 'sid' => "PriestsOfSyrinx", 'category_id' => 2112, 'parent_id' => 2], @@ -713,7 +713,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(5))->folderPropertiesSet(Arsse::$user->id, $this->anything(), $this->anything()); } - public function testRenameACategory() { + public function testRenameACategory():void { $in = [ ['op' => "renameCategory", 'sid' => "PriestsOfSyrinx", 'category_id' => 42, 'caption' => "Ook"], ['op' => "renameCategory", 'sid' => "PriestsOfSyrinx", 'category_id' => 2112, 'caption' => "Eek"], @@ -753,7 +753,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(3))->folderPropertiesSet(Arsse::$user->id, $this->anything(), $this->anything()); } - public function testAddASubscription() { + public function testAddASubscription():void { $in = [ ['op' => "subscribeToFeed", 'sid' => "PriestsOfSyrinx", 'feed_url' => "http://example.com/0"], ['op' => "subscribeToFeed", 'sid' => "PriestsOfSyrinx", 'feed_url' => "http://example.com/1", 'category_id' => 42], @@ -828,7 +828,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(0))->subscriptionPropertiesSet(Arsse::$user->id, 4, ['folder' => 1]); } - public function testRemoveASubscription() { + public function testRemoveASubscription():void { $in = [ ['op' => "unsubscribeFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 42], ['op' => "unsubscribeFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 2112], @@ -850,7 +850,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(5))->subscriptionRemove(Arsse::$user->id, $this->anything()); } - public function testMoveASubscription() { + public function testMoveASubscription():void { $in = [ ['op' => "moveFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 42, 'category_id' => 1], ['op' => "moveFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 2112, 'category_id' => 2], @@ -892,7 +892,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(4))->subscriptionPropertiesSet(Arsse::$user->id, $this->anything(), $this->anything()); } - public function testRenameASubscription() { + public function testRenameASubscription():void { $in = [ ['op' => "renameFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 42, 'caption' => "Ook"], ['op' => "renameFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 2112, 'caption' => "Eek"], @@ -934,7 +934,7 @@ LONG_STRING; \Phake::verify(Arsse::$db)->subscriptionPropertiesSet(...$db[2]); } - public function testRetrieveTheGlobalUnreadCount() { + public function testRetrieveTheGlobalUnreadCount():void { $in = ['op' => "getUnread", 'sid' => "PriestsOfSyrinx"]; \Phake::when(Arsse::$db)->subscriptionList(Arsse::$user->id)->thenReturn(new Result($this->v([ ['id' => 1, 'unread' => 2112], @@ -945,7 +945,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($in)); } - public function testRetrieveTheServerConfiguration() { + public function testRetrieveTheServerConfiguration():void { $in = ['op' => "getConfig", 'sid' => "PriestsOfSyrinx"]; $interval = Arsse::$conf->serviceFrequency; $valid = (new \DateTimeImmutable("now", new \DateTimezone("UTC")))->sub($interval); @@ -960,7 +960,7 @@ LONG_STRING; $this->assertMessage($this->respGood($exp[1]), $this->req($in)); } - public function testUpdateAFeed() { + public function testUpdateAFeed():void { $in = [ ['op' => "updateFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 1], ['op' => "updateFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 2], @@ -980,7 +980,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($in[3])); } - public function testAddALabel() { + public function testAddALabel():void { $in = [ ['op' => "addLabel", 'sid' => "PriestsOfSyrinx", 'caption' => "Software"], ['op' => "addLabel", 'sid' => "PriestsOfSyrinx", 'caption' => "Hardware",], @@ -1025,7 +1025,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($in[4])); } - public function testRemoveALabel() { + public function testRemoveALabel():void { $in = [ ['op' => "removeLabel", 'sid' => "PriestsOfSyrinx", 'label_id' => -1042], ['op' => "removeLabel", 'sid' => "PriestsOfSyrinx", 'label_id' => -2112], @@ -1053,7 +1053,7 @@ LONG_STRING; \Phake::verify(Arsse::$db)->labelRemove(Arsse::$user->id, 1088); } - public function testRenameALabel() { + public function testRenameALabel():void { $in = [ ['op' => "renameLabel", 'sid' => "PriestsOfSyrinx", 'label_id' => -1042, 'caption' => "Ook"], ['op' => "renameLabel", 'sid' => "PriestsOfSyrinx", 'label_id' => -2112, 'caption' => "Eek"], @@ -1099,7 +1099,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(6))->labelPropertiesSet(Arsse::$user->id, $this->anything(), $this->anything()); } - public function testRetrieveCategoryLists() { + public function testRetrieveCategoryLists():void { $in = [ ['op' => "getCategories", 'sid' => "PriestsOfSyrinx", 'include_empty' => true], ['op' => "getCategories", 'sid' => "PriestsOfSyrinx"], @@ -1171,7 +1171,7 @@ LONG_STRING; } } - public function testRetrieveCounterList() { + public function testRetrieveCounterList():void { $in = ['op' => "getCounters", 'sid' => "PriestsOfSyrinx"]; \Phake::when(Arsse::$db)->folderList($this->anything())->thenReturn(new Result($this->v($this->folders))); \Phake::when(Arsse::$db)->subscriptionList($this->anything())->thenReturn(new Result($this->v($this->subscriptions))); @@ -1206,7 +1206,7 @@ LONG_STRING; $this->assertMessage($this->respGood($exp), $this->req($in)); } - public function testRetrieveTheLabelList() { + public function testRetrieveTheLabelList():void { $in = [ ['op' => "getLabels", 'sid' => "PriestsOfSyrinx"], ['op' => "getLabels", 'sid' => "PriestsOfSyrinx", 'article_id' => 1], @@ -1251,7 +1251,7 @@ LONG_STRING; } } - public function testAssignArticlesToALabel() { + public function testAssignArticlesToALabel():void { $list = [ range(1, 100), range(1, 50), @@ -1289,7 +1289,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($in[6])); } - public function testRetrieveFeedTree() { + public function testRetrieveFeedTree():void { $in = [ ['op' => "getFeedTree", 'sid' => "PriestsOfSyrinx", 'include_empty' => true], ['op' => "getFeedTree", 'sid' => "PriestsOfSyrinx"], @@ -1306,7 +1306,7 @@ LONG_STRING; $this->assertMessage($this->respGood($exp), $this->req($in[1])); } - public function testMarkFeedsAsRead() { + public function testMarkFeedsAsRead():void { $in1 = [ // no-ops ['op' => "catchupFeed", 'sid' => "PriestsOfSyrinx"], @@ -1357,7 +1357,7 @@ LONG_STRING; \Phake::verify(Arsse::$db)->articleMark($this->anything(), ['read' => true], $this->equalTo((new Context)->modifiedSince($t), 2)); // within two seconds } - public function testRetrieveFeedList() { + public function testRetrieveFeedList():void { $in1 = [ ['op' => "getFeeds", 'sid' => "PriestsOfSyrinx"], ['op' => "getFeeds", 'sid' => "PriestsOfSyrinx", 'cat_id' => -1], @@ -1519,7 +1519,7 @@ LONG_STRING; return $out; } - public function testChangeArticles() { + public function testChangeArticles():void { $in = [ ['op' => "updateArticle", 'sid' => "PriestsOfSyrinx"], ['op' => "updateArticle", 'sid' => "PriestsOfSyrinx", 'article_ids' => "42, 2112, -1"], @@ -1604,7 +1604,7 @@ LONG_STRING; } } - public function testListArticles() { + public function testListArticles():void { $in = [ // error conditions ['op' => "getArticle", 'sid' => "PriestsOfSyrinx"], @@ -1693,7 +1693,7 @@ LONG_STRING; $this->assertMessage($this->respGood([$exp[0]]), $this->req($in[5])); } - public function testRetrieveCompactHeadlines() { + public function testRetrieveCompactHeadlines():void { $in1 = [ // erroneous input ['op' => "getCompactHeadlines", 'sid' => "PriestsOfSyrinx"], @@ -1779,7 +1779,7 @@ LONG_STRING; } } - public function testRetrieveFullHeadlines() { + public function testRetrieveFullHeadlines():void { $in1 = [ // empty results ['op' => "getHeadlines", 'sid' => "PriestsOfSyrinx", 'feed_id' => 0], @@ -1895,7 +1895,7 @@ LONG_STRING; } } - public function testRetrieveFullHeadlinesCheckingExtraFields() { + public function testRetrieveFullHeadlinesCheckingExtraFields():void { $in = [ // empty results ['op' => "getHeadlines", 'sid' => "PriestsOfSyrinx", 'feed_id' => -4], diff --git a/tests/cases/REST/TinyTinyRSS/TestIcon.php b/tests/cases/REST/TinyTinyRSS/TestIcon.php index fd330945..a90bd98d 100644 --- a/tests/cases/REST/TinyTinyRSS/TestIcon.php +++ b/tests/cases/REST/TinyTinyRSS/TestIcon.php @@ -40,15 +40,15 @@ class TestIcon extends \JKingWeb\Arsse\Test\AbstractTest { return $this->h->dispatch($req); } - protected function reqAuth(string $target, string $method = "GET") { + protected function reqAuth(string $target, string $method = "GET"): ResponseInterface { return $this->req($target, $method, $this->user); } - protected function reqAuthFailed(string $target, string $method = "GET") { + protected function reqAuthFailed(string $target, string $method = "GET"): ResponseInterface { return $this->req($target, $method, ""); } - public function testRetrieveFavion() { + public function testRetrieveFavion():void { \Phake::when(Arsse::$db)->subscriptionFavicon->thenReturn(""); \Phake::when(Arsse::$db)->subscriptionFavicon(42, $this->anything())->thenReturn("http://example.com/favicon.ico"); \Phake::when(Arsse::$db)->subscriptionFavicon(2112, $this->anything())->thenReturn("http://example.net/logo.png"); @@ -71,7 +71,7 @@ class TestIcon extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("2112.ico", "PUT")); } - public function testRetrieveFavionWithHttpAuthentication() { + public function testRetrieveFavionWithHttpAuthentication():void { $url = "http://example.org/icon.gif\r\nLocation: http://bad.example.com/"; \Phake::when(Arsse::$db)->subscriptionFavicon->thenReturn(""); \Phake::when(Arsse::$db)->subscriptionFavicon(42, $this->user)->thenReturn($url); diff --git a/tests/cases/REST/TinyTinyRSS/TestSearch.php b/tests/cases/REST/TinyTinyRSS/TestSearch.php index 82720bf9..890a6bb1 100644 --- a/tests/cases/REST/TinyTinyRSS/TestSearch.php +++ b/tests/cases/REST/TinyTinyRSS/TestSearch.php @@ -118,7 +118,7 @@ class TestSearch extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideSearchStrings */ - public function testApplySearchToContext(string $search, $exp) { + public function testApplySearchToContext(string $search, $exp):void { $act = Search::parse($search); $this->assertEquals($exp, $act); } diff --git a/tests/cases/Service/TestSerial.php b/tests/cases/Service/TestSerial.php index 73381374..4031c80e 100644 --- a/tests/cases/Service/TestSerial.php +++ b/tests/cases/Service/TestSerial.php @@ -19,16 +19,16 @@ class TestSerial extends \JKingWeb\Arsse\Test\AbstractTest { Arsse::$db = \Phake::mock(Database::class); } - public function testConstruct() { + public function testConstruct():void { $this->assertTrue(Driver::requirementsMet()); $this->assertInstanceOf(DriverInterface::class, new Driver); } - public function testFetchDriverName() { + public function testFetchDriverName():void { $this->assertTrue(strlen(Driver::driverName()) > 0); } - public function testEnqueueFeeds() { + public function testEnqueueFeeds():void { $d = new Driver; $this->assertSame(3, $d->queue(1, 2, 3)); $this->assertSame(5, $d->queue(4, 5)); @@ -36,7 +36,7 @@ class TestSerial extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(1, $d->queue(5)); } - public function testRefreshFeeds() { + public function testRefreshFeeds():void { $d = new Driver; $d->queue(1, 4, 3); $this->assertSame(Arsse::$conf->serviceQueueWidth, $d->exec()); diff --git a/tests/cases/Service/TestService.php b/tests/cases/Service/TestService.php index 08114888..55930602 100644 --- a/tests/cases/Service/TestService.php +++ b/tests/cases/Service/TestService.php @@ -22,14 +22,14 @@ class TestService extends \JKingWeb\Arsse\Test\AbstractTest { $this->srv = new Service(); } - public function testCheckIn() { + public function testCheckIn():void { $now = time(); $this->srv->checkIn(); \Phake::verify(Arsse::$db)->metaSet("service_last_checkin", \Phake::capture($then), "datetime"); $this->assertTime($now, $then); } - public function testReportHavingCheckedIn() { + public function testReportHavingCheckedIn():void { // the mock's metaGet() returns null by default $this->assertFalse(Service::hasCheckedIn()); $interval = Arsse::$conf->serviceFrequency; @@ -40,27 +40,27 @@ class TestService extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertFalse(Service::hasCheckedIn()); } - public function testPerformPreCleanup() { + public function testPerformPreCleanup():void { $this->assertTrue(Service::cleanupPre()); \Phake::verify(Arsse::$db)->feedCleanup(); \Phake::verify(Arsse::$db)->sessionCleanup(); } - public function testPerformShortPostCleanup() { + public function testPerformShortPostCleanup():void { \Phake::when(Arsse::$db)->articleCleanup()->thenReturn(0); $this->assertTrue(Service::cleanupPost()); \Phake::verify(Arsse::$db)->articleCleanup(); \Phake::verify(Arsse::$db, \Phake::times(0))->driverMaintenance(); } - public function testPerformFullPostCleanup() { + public function testPerformFullPostCleanup():void { \Phake::when(Arsse::$db)->articleCleanup()->thenReturn(1); $this->assertTrue(Service::cleanupPost()); \Phake::verify(Arsse::$db)->articleCleanup(); \Phake::verify(Arsse::$db)->driverMaintenance(); } - public function testRefreshFeeds() { + public function testRefreshFeeds():void { // set up mock database actions \Phake::when(Arsse::$db)->metaSet->thenReturn(true); \Phake::when(Arsse::$db)->feedCleanup->thenReturn(true); diff --git a/tests/cases/Service/TestSubprocess.php b/tests/cases/Service/TestSubprocess.php index 332b4544..9562048c 100644 --- a/tests/cases/Service/TestSubprocess.php +++ b/tests/cases/Service/TestSubprocess.php @@ -18,16 +18,16 @@ class TestSubprocess extends \JKingWeb\Arsse\Test\AbstractTest { self::setConf(); } - public function testConstruct() { + public function testConstruct():void { $this->assertTrue(Driver::requirementsMet()); $this->assertInstanceOf(DriverInterface::class, new Driver); } - public function testFetchDriverName() { + public function testFetchDriverName():void { $this->assertTrue(strlen(Driver::driverName()) > 0); } - public function testEnqueueFeeds() { + public function testEnqueueFeeds():void { $d = new Driver; $this->assertSame(3, $d->queue(1, 2, 3)); $this->assertSame(5, $d->queue(4, 5)); @@ -35,7 +35,7 @@ class TestSubprocess extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(1, $d->queue(5)); } - public function testRefreshFeeds() { + public function testRefreshFeeds():void { $d = \Phake::partialMock(Driver::class); \Phake::when($d)->execCmd->thenReturnCallback(function(string $cmd) { // FIXME: Does this work in Windows? diff --git a/tests/cases/TestArsse.php b/tests/cases/TestArsse.php index 9fbe0821..a6b28e7c 100644 --- a/tests/cases/TestArsse.php +++ b/tests/cases/TestArsse.php @@ -22,7 +22,7 @@ class TestArsse extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testLoadExistingData() { + public function testLoadExistingData():void { $lang = Arsse::$lang = \Phake::mock(Lang::class); $db = Arsse::$db = \Phake::mock(Database::class); $user = Arsse::$user = \Phake::mock(User::class); @@ -36,7 +36,7 @@ class TestArsse extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify($lang)->set("test"); } - public function testLoadNewData() { + public function testLoadNewData():void { if (!\JKingWeb\Arsse\Db\SQLite3\Driver::requirementsMet() && !\JKingWeb\Arsse\Db\SQLite3\PDODriver::requirementsMet()) { $this->markTestSkipped("A functional SQLite interface is required for this test"); } diff --git a/tests/cases/User/TestInternal.php b/tests/cases/User/TestInternal.php index b72cf9a3..ea1221b3 100644 --- a/tests/cases/User/TestInternal.php +++ b/tests/cases/User/TestInternal.php @@ -21,11 +21,11 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when(Arsse::$db)->begin->thenReturn(\Phake::mock(\JKingWeb\Arsse\Db\Transaction::class)); } - public function testConstruct() { + public function testConstruct():void { $this->assertInstanceOf(DriverInterface::class, new Driver); } - public function testFetchDriverName() { + public function testFetchDriverName():void { $this->assertTrue(strlen(Driver::driverName()) > 0); } @@ -33,7 +33,7 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { * @dataProvider provideAuthentication * @group slow */ - public function testAuthenticateAUser(bool $authorized, string $user, $password, bool $exp) { + public function testAuthenticateAUser(bool $authorized, string $user, $password, bool $exp):void { if ($authorized) { \Phake::when(Arsse::$db)->userPasswordGet("john.doe@example.com")->thenReturn('$2y$10$1zbqRJhxM8uUjeSBPp4IhO90xrqK0XjEh9Z16iIYEFRV4U.zeAFom'); // hash of "secret" \Phake::when(Arsse::$db)->userPasswordGet("jane.doe@example.com")->thenReturn('$2y$10$bK1ljXfTSyc2D.NYvT.Eq..OpehLRXVbglW.23ihVuyhgwJCd.7Im'); // hash of "superman" @@ -74,12 +74,12 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testAuthorizeAnAction() { + public function testAuthorizeAnAction():void { \Phake::verifyNoFurtherInteraction(Arsse::$db); $this->assertTrue((new Driver)->authorize("someone", "something")); } - public function testListUsers() { + public function testListUsers():void { $john = "john.doe@example.com"; $jane = "jane.doe@example.com"; \Phake::when(Arsse::$db)->userList->thenReturn([$john, $jane])->thenReturn([$jane, $john]); @@ -89,7 +89,7 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db, \Phake::times(2))->userList; } - public function testCheckThatAUserExists() { + public function testCheckThatAUserExists():void { $john = "john.doe@example.com"; $jane = "jane.doe@example.com"; \Phake::when(Arsse::$db)->userExists($john)->thenReturn(true); @@ -101,7 +101,7 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db)->userExists($jane); } - public function testAddAUser() { + public function testAddAUser():void { $john = "john.doe@example.com"; \Phake::when(Arsse::$db)->userAdd->thenReturnCallback(function($user, $pass) { return $pass; @@ -114,7 +114,7 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db)->userAdd; } - public function testRemoveAUser() { + public function testRemoveAUser():void { $john = "john.doe@example.com"; \Phake::when(Arsse::$db)->userRemove->thenReturn(true)->thenThrow(new \JKingWeb\Arsse\User\Exception("doesNotExist")); $driver = new Driver; @@ -128,21 +128,21 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testSetAPassword() { + public function testSetAPassword():void { $john = "john.doe@example.com"; \Phake::verifyNoFurtherInteraction(Arsse::$db); $this->assertSame("superman", (new Driver)->userPasswordSet($john, "superman")); $this->assertSame(null, (new Driver)->userPasswordSet($john, null)); } - public function testUnsetAPassword() { + public function testUnsetAPassword():void { $drv = \Phake::partialMock(Driver::class); \Phake::when($drv)->userExists->thenReturn(true); \Phake::verifyNoFurtherInteraction(Arsse::$db); $this->assertTrue($drv->userPasswordUnset("john.doe@example.com")); } - public function testUnsetAPasswordForAMssingUser() { + public function testUnsetAPasswordForAMssingUser():void { $drv = \Phake::partialMock(Driver::class); \Phake::when($drv)->userExists->thenReturn(false); \Phake::verifyNoFurtherInteraction(Arsse::$db); diff --git a/tests/cases/User/TestUser.php b/tests/cases/User/TestUser.php index 97f3fc09..4b0c3998 100644 --- a/tests/cases/User/TestUser.php +++ b/tests/cases/User/TestUser.php @@ -24,12 +24,12 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { $this->drv = \Phake::mock(Driver::class); } - public function testConstruct() { + public function testConstruct():void { $this->assertInstanceOf(User::class, new User($this->drv)); $this->assertInstanceOf(User::class, new User); } - public function testConversionToString() { + public function testConversionToString():void { $u = new User; $u->id = "john.doe@example.com"; $this->assertSame("john.doe@example.com", (string) $u); @@ -38,7 +38,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideAuthentication */ - public function testAuthenticateAUser(bool $preAuth, string $user, string $password, bool $exp) { + public function testAuthenticateAUser(bool $preAuth, string $user, string $password, bool $exp):void { Arsse::$conf->userPreAuth = $preAuth; \Phake::when($this->drv)->auth->thenReturn(false); \Phake::when($this->drv)->auth("john.doe@example.com", "secret")->thenReturn(true); @@ -69,7 +69,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserList */ - public function testListUsers(bool $authorized, $exp) { + public function testListUsers(bool $authorized, $exp):void { $u = new User($this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userList->thenReturn(["john.doe@example.com", "jane.doe@example.com"]); @@ -89,7 +89,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideExistence */ - public function testCheckThatAUserExists(bool $authorized, string $user, $exp) { + public function testCheckThatAUserExists(bool $authorized, string $user, $exp):void { $u = new User($this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userExists("john.doe@example.com")->thenReturn(true); @@ -112,7 +112,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideAdditions */ - public function testAddAUser(bool $authorized, string $user, $password, $exp) { + public function testAddAUser(bool $authorized, string $user, $password, $exp):void { $u = new User($this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userAdd("john.doe@example.com", $this->anything())->thenThrow(new \JKingWeb\Arsse\User\Exception("alreadyExists")); @@ -130,7 +130,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideAdditions */ - public function testAddAUserWithARandomPassword(bool $authorized, string $user, $password, $exp) { + public function testAddAUserWithARandomPassword(bool $authorized, string $user, $password, $exp):void { $u = \Phake::partialMock(User::class, $this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userAdd($this->anything(), $this->isNull())->thenReturn(null); @@ -172,7 +172,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideRemovals */ - public function testRemoveAUser(bool $authorized, string $user, bool $exists, $exp) { + public function testRemoveAUser(bool $authorized, string $user, bool $exists, $exp):void { $u = new User($this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userRemove("john.doe@example.com")->thenReturn(true); @@ -210,7 +210,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider providePasswordChanges */ - public function testChangeAPassword(bool $authorized, string $user, $password, bool $exists, $exp) { + public function testChangeAPassword(bool $authorized, string $user, $password, bool $exists, $exp):void { $u = new User($this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userPasswordSet("john.doe@example.com", $this->anything(), $this->anything())->thenReturnCallback(function($user, $pass, $old) { @@ -237,7 +237,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider providePasswordChanges */ - public function testChangeAPasswordToARandomPassword(bool $authorized, string $user, $password, bool $exists, $exp) { + public function testChangeAPasswordToARandomPassword(bool $authorized, string $user, $password, bool $exists, $exp):void { $u = \Phake::partialMock(User::class, $this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userPasswordSet($this->anything(), $this->isNull(), $this->anything())->thenReturn(null); @@ -289,7 +289,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider providePasswordClearings */ - public function testClearAPassword(bool $authorized, bool $exists, string $user, $exp) { + public function testClearAPassword(bool $authorized, bool $exists, string $user, $exp):void { \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userPasswordUnset->thenReturn(true); \Phake::when($this->drv)->userPasswordUnset("jane.doe@example.net", null)->thenThrow(new \JKingWeb\Arsse\User\Exception("doesNotExist")); diff --git a/tests/lib/AbstractTest.php b/tests/lib/AbstractTest.php index bb0c688f..0a553d13 100644 --- a/tests/lib/AbstractTest.php +++ b/tests/lib/AbstractTest.php @@ -34,7 +34,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { self::clearData(); } - public static function clearData(bool $loadLang = true) { + public static function clearData(bool $loadLang = true): void { date_default_timezone_set("America/Toronto"); $r = new \ReflectionClass(\JKingWeb\Arsse\Arsse::class); $props = array_keys($r->getStaticProperties()); @@ -46,7 +46,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { } } - public static function setConf(array $conf = [], bool $force = true) { + public static function setConf(array $conf = [], bool $force = true): void { $defaults = [ 'dbSQLite3File' => ":memory:", 'dbSQLite3Timeout' => 0, @@ -127,7 +127,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { return $req; } - public function assertException($msg = "", string $prefix = "", string $type = "Exception") { + public function assertException($msg = "", string $prefix = "", string $type = "Exception"): void { if (func_num_args()) { if ($msg instanceof \JKingWeb\Arsse\AbstractException) { $this->expectException(get_class($msg)); @@ -149,7 +149,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { } } - protected function assertMessage(MessageInterface $exp, MessageInterface $act, string $text = '') { + protected function assertMessage(MessageInterface $exp, MessageInterface $act, string $text = ''): void { if ($exp instanceof ResponseInterface) { $this->assertInstanceOf(ResponseInterface::class, $act, $text); $this->assertEquals($exp->getStatusCode(), $act->getStatusCode(), $text); @@ -173,7 +173,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { $this->assertEquals($exp->getHeaders(), $act->getHeaders(), $text); } - public function assertTime($exp, $test, string $msg = '') { + public function assertTime($exp, $test, string $msg = ''): void { $test = $this->approximateTime($exp, $test); $exp = Date::transform($exp, "iso8601"); $test = Date::transform($test, "iso8601"); @@ -299,7 +299,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { return $out; } - public function assertResult(array $expected, Result $data) { + public function assertResult(array $expected, Result $data): void { $data = $data->getAll(); $this->assertCount(sizeof($expected), $data, "Number of result rows (".sizeof($data).") differs from number of expected rows (".sizeof($expected).")"); if (sizeof($expected)) { diff --git a/tests/lib/DatabaseDrivers/MySQL.php b/tests/lib/DatabaseDrivers/MySQL.php index 332f3d99..c0863b7d 100644 --- a/tests/lib/DatabaseDrivers/MySQL.php +++ b/tests/lib/DatabaseDrivers/MySQL.php @@ -42,7 +42,7 @@ trait MySQL { return $tables; } - public static function dbTruncate($db, array $afterStatements = []) { + public static function dbTruncate($db, array $afterStatements = []): void { // rollback any pending transaction try { $db->query("UNLOCK TABLES; ROLLBACK"); @@ -63,7 +63,7 @@ trait MySQL { } } - public static function dbRaze($db, array $afterStatements = []) { + public static function dbRaze($db, array $afterStatements = []): void { // rollback any pending transaction try { $db->query("UNLOCK TABLES; ROLLBACK"); diff --git a/tests/lib/DatabaseDrivers/MySQLPDO.php b/tests/lib/DatabaseDrivers/MySQLPDO.php index 2499e5d9..0b9ffef2 100644 --- a/tests/lib/DatabaseDrivers/MySQLPDO.php +++ b/tests/lib/DatabaseDrivers/MySQLPDO.php @@ -47,11 +47,11 @@ trait MySQLPDO { return MySQL::dbTableList($db); } - public static function dbTruncate($db, array $afterStatements = []) { + public static function dbTruncate($db, array $afterStatements = []): void { MySQL::dbTruncate($db, $afterStatements); } - public static function dbRaze($db, array $afterStatements = []) { + public static function dbRaze($db, array $afterStatements = []): void { MySQL::dbRaze($db, $afterStatements); } } diff --git a/tests/lib/DatabaseDrivers/PostgreSQL.php b/tests/lib/DatabaseDrivers/PostgreSQL.php index c03070ed..3b59ee84 100644 --- a/tests/lib/DatabaseDrivers/PostgreSQL.php +++ b/tests/lib/DatabaseDrivers/PostgreSQL.php @@ -29,7 +29,7 @@ trait PostgreSQL { } } - public static function dbExec($db, $q) { + public static function dbExec($db, $q): void { if ($db instanceof Driver) { $db->exec($q); } elseif ($db instanceof \PDO) { @@ -52,7 +52,7 @@ trait PostgreSQL { } } - public static function dbTruncate($db, array $afterStatements = []) { + public static function dbTruncate($db, array $afterStatements = []): void { // rollback any pending transaction try { @self::dbExec($db, "ROLLBACK"); @@ -72,7 +72,7 @@ trait PostgreSQL { } } - public static function dbRaze($db, array $afterStatements = []) { + public static function dbRaze($db, array $afterStatements = []): void { // rollback any pending transaction try { @self::dbExec($db, "ROLLBACK"); diff --git a/tests/lib/DatabaseDrivers/PostgreSQLPDO.php b/tests/lib/DatabaseDrivers/PostgreSQLPDO.php index f275e70e..b7f5f259 100644 --- a/tests/lib/DatabaseDrivers/PostgreSQLPDO.php +++ b/tests/lib/DatabaseDrivers/PostgreSQLPDO.php @@ -33,11 +33,11 @@ trait PostgreSQLPDO { return PostgreSQL::dbTableList($db); } - public static function dbTruncate($db, array $afterStatements = []) { + public static function dbTruncate($db, array $afterStatements = []): void { PostgreSQL::dbTruncate($db, $afterStatements); } - public static function dbRaze($db, array $afterStatements = []) { + public static function dbRaze($db, array $afterStatements = []): void { PostgreSQL::dbRaze($db, $afterStatements); } } diff --git a/tests/lib/DatabaseDrivers/SQLite3.php b/tests/lib/DatabaseDrivers/SQLite3.php index a3e23580..20f50cc1 100644 --- a/tests/lib/DatabaseDrivers/SQLite3.php +++ b/tests/lib/DatabaseDrivers/SQLite3.php @@ -51,7 +51,7 @@ trait SQLite3 { return $tables; } - public static function dbTruncate($db, array $afterStatements = []) { + public static function dbTruncate($db, array $afterStatements = []): void { // rollback any pending transaction try { $db->exec("ROLLBACK"); @@ -69,7 +69,7 @@ trait SQLite3 { } } - public static function dbRaze($db, array $afterStatements = []) { + public static function dbRaze($db, array $afterStatements = []): void { // rollback any pending transaction try { $db->exec("ROLLBACK"); diff --git a/tests/lib/DatabaseDrivers/SQLite3PDO.php b/tests/lib/DatabaseDrivers/SQLite3PDO.php index 7f5d2a04..c7af2074 100644 --- a/tests/lib/DatabaseDrivers/SQLite3PDO.php +++ b/tests/lib/DatabaseDrivers/SQLite3PDO.php @@ -30,11 +30,11 @@ trait SQLite3PDO { return SQLite3::dbTableList($db); } - public static function dbTruncate($db, array $afterStatements = []) { + public static function dbTruncate($db, array $afterStatements = []): void { SQLite3::dbTruncate($db, $afterStatements); } - public static function dbRaze($db, array $afterStatements = []) { + public static function dbRaze($db, array $afterStatements = []): void { SQLite3::dbRaze($db, $afterStatements); } } From b5f118e8cb879ba40778907c5bed0cdb8f0cf3b8 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 20 Jan 2020 13:52:48 -0500 Subject: [PATCH 10/50] Cleanup --- lib/Database.php | 2 +- lib/Feed.php | 2 +- lib/Misc/Date.php | 8 +- tests/cases/CLI/TestCLI.php | 28 ++-- tests/cases/Conf/TestConf.php | 32 ++--- tests/cases/Database/SeriesArticle.php | 120 +++++++++--------- tests/cases/Database/SeriesCleanup.php | 20 +-- tests/cases/Database/SeriesFeed.php | 20 +-- tests/cases/Database/SeriesFolder.php | 92 +++++++------- tests/cases/Database/SeriesLabel.php | 96 +++++++------- tests/cases/Database/SeriesMeta.php | 14 +- tests/cases/Database/SeriesMiscellany.php | 12 +- tests/cases/Database/SeriesSession.php | 24 ++-- tests/cases/Database/SeriesSubscription.php | 92 +++++++------- tests/cases/Database/SeriesTag.php | 100 +++++++-------- tests/cases/Database/SeriesToken.php | 24 ++-- tests/cases/Database/SeriesUser.php | 38 +++--- tests/cases/Database/TestDatabase.php | 4 +- tests/cases/Db/BaseDriver.php | 70 +++++----- tests/cases/Db/BaseResult.php | 18 +-- tests/cases/Db/BaseStatement.php | 18 +-- tests/cases/Db/BaseUpdate.php | 24 ++-- tests/cases/Db/MySQL/TestCreation.php | 2 +- tests/cases/Db/MySQL/TestStatement.php | 2 +- tests/cases/Db/MySQLPDO/TestCreation.php | 2 +- tests/cases/Db/PostgreSQL/TestCreation.php | 4 +- tests/cases/Db/PostgreSQLPDO/TestCreation.php | 4 +- tests/cases/Db/SQLite3/TestCreation.php | 26 ++-- tests/cases/Db/SQLite3PDO/TestCreation.php | 26 ++-- tests/cases/Db/TestResultAggregate.php | 14 +- tests/cases/Db/TestResultEmpty.php | 10 +- tests/cases/Db/TestTransaction.php | 6 +- tests/cases/Exception/TestException.php | 14 +- tests/cases/Feed/TestFeed.php | 34 ++--- tests/cases/Feed/TestFetching.php | 18 +-- tests/cases/ImportExport/TestFile.php | 4 +- tests/cases/ImportExport/TestImportExport.php | 16 +-- tests/cases/ImportExport/TestOPML.php | 8 +- tests/cases/Lang/TestBasic.php | 10 +- tests/cases/Lang/TestComplex.php | 24 ++-- tests/cases/Lang/TestErrors.php | 24 ++-- tests/cases/Misc/TestContext.php | 12 +- tests/cases/Misc/TestDate.php | 8 +- tests/cases/Misc/TestHTTP.php | 2 +- tests/cases/Misc/TestQuery.php | 16 +-- tests/cases/Misc/TestURL.php | 6 +- tests/cases/Misc/TestValueInfo.php | 16 +-- tests/cases/REST/Fever/TestAPI.php | 28 ++-- tests/cases/REST/Fever/TestUser.php | 6 +- tests/cases/REST/NextcloudNews/TestV1_2.php | 60 ++++----- .../cases/REST/NextcloudNews/TestVersions.php | 8 +- tests/cases/REST/TestREST.php | 18 +-- tests/cases/REST/TinyTinyRSS/TestAPI.php | 74 +++++------ tests/cases/REST/TinyTinyRSS/TestIcon.php | 4 +- tests/cases/REST/TinyTinyRSS/TestSearch.php | 2 +- tests/cases/Service/TestSerial.php | 8 +- tests/cases/Service/TestService.php | 12 +- tests/cases/Service/TestSubprocess.php | 8 +- tests/cases/TestArsse.php | 4 +- tests/cases/User/TestInternal.php | 22 ++-- tests/cases/User/TestUser.php | 22 ++-- 61 files changed, 721 insertions(+), 721 deletions(-) diff --git a/lib/Database.php b/lib/Database.php index eadabd70..24475a64 100644 --- a/lib/Database.php +++ b/lib/Database.php @@ -932,7 +932,7 @@ class Database { } /** Returns the time at which any of a user's subscriptions (or a specific subscription) was last refreshed, as a DateTimeImmutable object */ - public function subscriptionRefreshed(string $user, int $id = null): ?\DateTimeInterface { + public function subscriptionRefreshed(string $user, int $id = null): ?\DateTimeImmutable { if (!Arsse::$user->authorize($user, __FUNCTION__)) { throw new User\ExceptionAuthz("notAuthorized", ["action" => __FUNCTION__, "user" => $user]); } diff --git a/lib/Feed.php b/lib/Feed.php index 859bd06e..87e6016f 100644 --- a/lib/Feed.php +++ b/lib/Feed.php @@ -390,7 +390,7 @@ class Feed { return $offset; } - protected function computeLastModified(): ?\DateTimeInterface { + protected function computeLastModified(): ?\DateTimeImmutable { if (!$this->modified) { return $this->lastModified; // @codeCoverageIgnore } diff --git a/lib/Misc/Date.php b/lib/Misc/Date.php index 0b519dc4..6972ea5e 100644 --- a/lib/Misc/Date.php +++ b/lib/Misc/Date.php @@ -21,19 +21,19 @@ class Date { return $out; } - public static function normalize($date, string $inFormat = null): ?\DateTimeInterface { + public static function normalize($date, string $inFormat = null): ?\DateTimeImmutable { return ValueInfo::normalize($date, ValueInfo::T_DATE, $inFormat); } - public static function add($interval, $date = "now"): ?\DateTimeInterface { + public static function add($interval, $date = "now"): ?\DateTimeImmutable { return self::modify("add", $interval, $date); } - public static function sub($interval, $date = "now"): ?\DateTimeInterface { + public static function sub($interval, $date = "now"): ?\DateTimeImmutable { return self::modify("sub", $interval, $date); } - protected static function modify(string $func, $interval, $date): ?\DateTimeInterface { + protected static function modify(string $func, $interval, $date): ?\DateTimeImmutable { $date = self::normalize($date); $interval = (!$interval instanceof \DateInterval) ? ValueInfo::normalize($interval, ValueInfo::T_INTERVAL) : $interval; return $date ? $date->$func($interval) : null; diff --git a/tests/cases/CLI/TestCLI.php b/tests/cases/CLI/TestCLI.php index a350ce1e..6056912b 100644 --- a/tests/cases/CLI/TestCLI.php +++ b/tests/cases/CLI/TestCLI.php @@ -35,13 +35,13 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exitStatus, $cli->dispatch($argv)); } - public function testPrintVersion():void { + public function testPrintVersion(): void { $this->assertConsole($this->cli, "arsse.php --version", 0, Arsse::VERSION); \Phake::verify($this->cli, \Phake::times(0))->loadConf; } /** @dataProvider provideHelpText */ - public function testPrintHelp(string $cmd, string $name):void { + public function testPrintHelp(string $cmd, string $name): void { $this->assertConsole($this->cli, $cmd, 0, str_replace("arsse.php", $name, CLI::USAGE)); \Phake::verify($this->cli, \Phake::times(0))->loadConf; } @@ -57,7 +57,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testStartTheDaemon():void { + public function testStartTheDaemon(): void { $srv = \Phake::mock(Service::class); \Phake::when($srv)->watch->thenReturn(new \DateTimeImmutable); \Phake::when($this->cli)->getInstance(Service::class)->thenReturn($srv); @@ -67,7 +67,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify($this->cli)->getInstance(Service::class); } - public function testRefreshAllFeeds():void { + public function testRefreshAllFeeds(): void { $srv = \Phake::mock(Service::class); \Phake::when($srv)->watch->thenReturn(new \DateTimeImmutable); \Phake::when($this->cli)->getInstance(Service::class)->thenReturn($srv); @@ -78,7 +78,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideFeedUpdates */ - public function testRefreshAFeed(string $cmd, int $exitStatus, string $output):void { + public function testRefreshAFeed(string $cmd, int $exitStatus, string $output): void { Arsse::$db = \Phake::mock(Database::class); \Phake::when(Arsse::$db)->feedUpdate(1, true)->thenReturn(true); \Phake::when(Arsse::$db)->feedUpdate(2, true)->thenThrow(new \JKingWeb\Arsse\Feed\Exception("http://example.com/", new \PicoFeed\Client\InvalidUrlException)); @@ -95,7 +95,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideDefaultConfigurationSaves */ - public function testSaveTheDefaultConfiguration(string $cmd, int $exitStatus, string $file):void { + public function testSaveTheDefaultConfiguration(string $cmd, int $exitStatus, string $file): void { $conf = \Phake::mock(Conf::class); \Phake::when($conf)->exportFile("php://output", true)->thenReturn(true); \Phake::when($conf)->exportFile("good.conf", true)->thenReturn(true); @@ -116,7 +116,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserList */ - public function testListUsers(string $cmd, array $list, int $exitStatus, string $output):void { + public function testListUsers(string $cmd, array $list, int $exitStatus, string $output): void { // FIXME: Phake is somehow unable to mock the User class correctly, so we use PHPUnit's mocks instead Arsse::$user = $this->createMock(User::class); Arsse::$user->method("list")->willReturn($list); @@ -135,7 +135,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserAdditions */ - public function testAddAUser(string $cmd, int $exitStatus, string $output):void { + public function testAddAUser(string $cmd, int $exitStatus, string $output): void { // FIXME: Phake is somehow unable to mock the User class correctly, so we use PHPUnit's mocks instead Arsse::$user = $this->createMock(User::class); Arsse::$user->method("add")->will($this->returnCallback(function($user, $pass = null) { @@ -158,7 +158,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserAuthentication */ - public function testAuthenticateAUser(string $cmd, int $exitStatus, string $output):void { + public function testAuthenticateAUser(string $cmd, int $exitStatus, string $output): void { // FIXME: Phake is somehow unable to mock the User class correctly, so we use PHPUnit's mocks instead Arsse::$user = $this->createMock(User::class); Arsse::$user->method("auth")->will($this->returnCallback(function($user, $pass) { @@ -192,7 +192,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserRemovals */ - public function testRemoveAUser(string $cmd, int $exitStatus, string $output):void { + public function testRemoveAUser(string $cmd, int $exitStatus, string $output): void { // FIXME: Phake is somehow unable to mock the User class correctly, so we use PHPUnit's mocks instead Arsse::$user = $this->createMock(User::class); Arsse::$user->method("remove")->will($this->returnCallback(function($user) { @@ -212,7 +212,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserPasswordChanges */ - public function testChangeAUserPassword(string $cmd, int $exitStatus, string $output):void { + public function testChangeAUserPassword(string $cmd, int $exitStatus, string $output): void { $passwordChange = function($user, $pass = null) { switch ($user) { case "jane.doe@example.com": @@ -242,7 +242,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserPasswordClearings */ - public function testClearAUserPassword(string $cmd, int $exitStatus, string $output):void { + public function testClearAUserPassword(string $cmd, int $exitStatus, string $output): void { $passwordClear = function($user) { switch ($user) { case "jane.doe@example.com": @@ -270,7 +270,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideOpmlExports */ - public function testExportToOpml(string $cmd, int $exitStatus, string $file, string $user, bool $flat):void { + public function testExportToOpml(string $cmd, int $exitStatus, string $file, string $user, bool $flat): void { $opml = \Phake::mock(OPML::class); \Phake::when($opml)->exportFile("php://output", $user, $flat)->thenReturn(true); \Phake::when($opml)->exportFile("good.opml", $user, $flat)->thenReturn(true); @@ -311,7 +311,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideOpmlImports */ - public function testImportFromOpml(string $cmd, int $exitStatus, string $file, string $user, bool $flat, bool $replace):void { + public function testImportFromOpml(string $cmd, int $exitStatus, string $file, string $user, bool $flat, bool $replace): void { $opml = \Phake::mock(OPML::class); \Phake::when($opml)->importFile("php://input", $user, $flat, $replace)->thenReturn(true); \Phake::when($opml)->importFile("good.opml", $user, $flat, $replace)->thenReturn(true); diff --git a/tests/cases/Conf/TestConf.php b/tests/cases/Conf/TestConf.php index d10d1d4c..67283338 100644 --- a/tests/cases/Conf/TestConf.php +++ b/tests/cases/Conf/TestConf.php @@ -38,12 +38,12 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testLoadDefaultValues():void { + public function testLoadDefaultValues(): void { $this->assertInstanceOf(Conf::class, new Conf); } /** @depends testLoadDefaultValues */ - public function testImportFromArray():void { + public function testImportFromArray(): void { $arr = [ 'lang' => "xx", 'purgeFeeds' => "P2D", @@ -54,7 +54,7 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { } /** @depends testImportFromArray */ - public function testImportFromFile():void { + public function testImportFromFile(): void { $conf = new Conf; $conf->importFile(self::$path."confGood"); $this->assertEquals("xx", $conf->lang); @@ -63,43 +63,43 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { } /** @depends testImportFromFile */ - public function testImportFromMissingFile():void { + public function testImportFromMissingFile(): void { $this->assertException("fileMissing", "Conf"); $conf = new Conf(self::$path."confMissing"); } /** @depends testImportFromFile */ - public function testImportFromEmptyFile():void { + public function testImportFromEmptyFile(): void { $this->assertException("fileCorrupt", "Conf"); $conf = new Conf(self::$path."confEmpty"); } /** @depends testImportFromFile */ - public function testImportFromFileWithoutReadPermission():void { + public function testImportFromFileWithoutReadPermission(): void { $this->assertException("fileUnreadable", "Conf"); $conf = new Conf(self::$path."confUnreadable"); } /** @depends testImportFromFile */ - public function testImportFromFileWhichIsNotAnArray():void { + public function testImportFromFileWhichIsNotAnArray(): void { $this->assertException("fileCorrupt", "Conf"); $conf = new Conf(self::$path."confNotArray"); } /** @depends testImportFromFile */ - public function testImportFromFileWhichIsNotPhp():void { + public function testImportFromFileWhichIsNotPhp(): void { $this->assertException("fileCorrupt", "Conf"); // this should not print the output of the non-PHP file $conf = new Conf(self::$path."confNotPHP"); } /** @depends testImportFromFile */ - public function testImportFromCorruptFile():void { + public function testImportFromCorruptFile(): void { $this->assertException("fileCorrupt", "Conf"); $conf = new Conf(self::$path."confCorrupt"); } - public function testImportBogusValue():void { + public function testImportBogusValue(): void { $arr = [ 'dbAutoUpdate' => "yes, please", ]; @@ -108,7 +108,7 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { $conf->import($arr); } - public function testImportBogusDriver():void { + public function testImportBogusDriver(): void { $arr = [ 'dbDriver' => "this driver does not exist", ]; @@ -117,7 +117,7 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { $conf->import($arr); } - public function testExportToArray():void { + public function testExportToArray(): void { $conf = new Conf; $conf->lang = ["en", "fr"]; // should not be exported: not scalar $conf->dbSQLite3File = "test.db"; // should be exported: value changed @@ -138,7 +138,7 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { /** @depends testExportToArray * @depends testImportFromFile */ - public function testExportToFile():void { + public function testExportToFile(): void { $conf = new Conf; $conf->lang = ["en", "fr"]; // should not be exported: not scalar $conf->dbSQLite3File = "test.db"; // should be exported: value changed @@ -159,19 +159,19 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { } /** @depends testExportToFile */ - public function testExportToStdout():void { + public function testExportToStdout(): void { $conf = new Conf(self::$path."confGood"); $conf->exportFile(self::$path."confGood"); $this->expectOutputString(file_get_contents(self::$path."confGood")); $conf->exportFile("php://output"); } - public function testExportToFileWithoutWritePermission():void { + public function testExportToFileWithoutWritePermission(): void { $this->assertException("fileUnwritable", "Conf"); (new Conf)->exportFile(self::$path."confUnreadable"); } - public function testExportToFileWithoutCreatePermission():void { + public function testExportToFileWithoutCreatePermission(): void { $this->assertException("fileUncreatable", "Conf"); (new Conf)->exportFile(self::$path."confForbidden/conf"); } diff --git a/tests/cases/Database/SeriesArticle.php b/tests/cases/Database/SeriesArticle.php index b560527c..13a5e930 100644 --- a/tests/cases/Database/SeriesArticle.php +++ b/tests/cases/Database/SeriesArticle.php @@ -13,7 +13,7 @@ use JKingWeb\Arsse\Misc\Date; use JKingWeb\Arsse\Misc\ValueInfo; trait SeriesArticle { - protected function setUpSeriesArticle():void { + protected function setUpSeriesArticle(): void { $this->data = [ 'arsse_users' => [ 'columns' => [ @@ -408,12 +408,12 @@ trait SeriesArticle { $this->user = "john.doe@example.net"; } - protected function tearDownSeriesArticle():void { + protected function tearDownSeriesArticle(): void { unset($this->data, $this->matches, $this->fields, $this->checkTables, $this->user); } /** @dataProvider provideContextMatches */ - public function testListArticlesCheckingContext(Context $c, array $exp):void { + public function testListArticlesCheckingContext(Context $c, array $exp): void { $ids = array_column($ids = Arsse::$db->articleList("john.doe@example.com", $c, ["id"], ["id"])->getAll(), "id"); sort($ids); sort($exp); @@ -516,7 +516,7 @@ trait SeriesArticle { ]; } - public function testRetrieveArticleIdsForEditions():void { + public function testRetrieveArticleIdsForEditions(): void { $exp = [ 1 => 1, 2 => 2, @@ -553,17 +553,17 @@ trait SeriesArticle { $this->assertEquals($exp, Arsse::$db->editionArticle(...range(1, 1001))); } - public function testListArticlesOfAMissingFolder():void { + public function testListArticlesOfAMissingFolder(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->articleList($this->user, (new Context)->folder(1)); } - public function testListArticlesOfAMissingSubscription():void { + public function testListArticlesOfAMissingSubscription(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->articleList($this->user, (new Context)->subscription(1)); } - public function testListArticlesCheckingProperties():void { + public function testListArticlesCheckingProperties(): void { $this->user = "john.doe@example.org"; // check that the different fieldset groups return the expected columns foreach ($this->fields as $column) { @@ -577,7 +577,7 @@ trait SeriesArticle { } /** @dataProvider provideOrderedLists */ - public function testListArticlesCheckingOrder(array $sortCols, array $exp):void { + public function testListArticlesCheckingOrder(array $sortCols, array $exp): void { $act = ValueInfo::normalize(array_column(iterator_to_array(Arsse::$db->articleList("john.doe@example.com", null, ["id"], $sortCols)), "id"), ValueInfo::T_INT | ValueInfo::M_ARRAY); $this->assertSame($exp, $act); } @@ -595,17 +595,17 @@ trait SeriesArticle { ]; } - public function testListArticlesWithoutAuthority():void { + public function testListArticlesWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->articleList($this->user); } - public function testMarkNothing():void { + public function testMarkNothing(): void { $this->assertSame(0, Arsse::$db->articleMark($this->user, [])); } - public function testMarkAllArticlesUnread():void { + public function testMarkAllArticlesUnread(): void { Arsse::$db->articleMark($this->user, ['read'=>false]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -616,7 +616,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesRead():void { + public function testMarkAllArticlesRead(): void { Arsse::$db->articleMark($this->user, ['read'=>true]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -631,7 +631,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesUnstarred():void { + public function testMarkAllArticlesUnstarred(): void { Arsse::$db->articleMark($this->user, ['starred'=>false]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -642,7 +642,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesStarred():void { + public function testMarkAllArticlesStarred(): void { Arsse::$db->articleMark($this->user, ['starred'=>true]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -657,7 +657,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesUnreadAndUnstarred():void { + public function testMarkAllArticlesUnreadAndUnstarred(): void { Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>false]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -671,7 +671,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesReadAndStarred():void { + public function testMarkAllArticlesReadAndStarred(): void { Arsse::$db->articleMark($this->user, ['read'=>true,'starred'=>true]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -689,7 +689,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesUnreadAndStarred():void { + public function testMarkAllArticlesUnreadAndStarred(): void { Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -707,7 +707,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAllArticlesReadAndUnstarred():void { + public function testMarkAllArticlesReadAndUnstarred(): void { Arsse::$db->articleMark($this->user, ['read'=>true,'starred'=>false]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -725,7 +725,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testSetNoteForAllArticles():void { + public function testSetNoteForAllArticles(): void { Arsse::$db->articleMark($this->user, ['note'=>"New note"]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -744,7 +744,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkATreeFolder():void { + public function testMarkATreeFolder(): void { Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(7)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -755,7 +755,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkALeafFolder():void { + public function testMarkALeafFolder(): void { Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(8)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -764,12 +764,12 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAMissingFolder():void { + public function testMarkAMissingFolder(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(42)); } - public function testMarkASubscription():void { + public function testMarkASubscription(): void { Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->subscription(13)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -778,12 +778,12 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAMissingSubscription():void { + public function testMarkAMissingSubscription(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(2112)); } - public function testMarkAnArticle():void { + public function testMarkAnArticle(): void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->article(20)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -792,7 +792,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleArticles():void { + public function testMarkMultipleArticles(): void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->articles([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -802,7 +802,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleArticlessUnreadAndStarred():void { + public function testMarkMultipleArticlessUnreadAndStarred(): void { Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->articles([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -815,16 +815,16 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkTooManyMultipleArticles():void { + public function testMarkTooManyMultipleArticles(): void { $this->assertSame(7, Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)))); } - public function testMarkAMissingArticle():void { + public function testMarkAMissingArticle(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->article(1)); } - public function testMarkAnEdition():void { + public function testMarkAnEdition(): void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->edition(1001)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -833,7 +833,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleEditions():void { + public function testMarkMultipleEditions(): void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->editions([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -843,13 +843,13 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleMissingEditions():void { + public function testMarkMultipleMissingEditions(): void { $this->assertSame(0, Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->editions([500,501]))); $state = $this->primeExpectations($this->data, $this->checkTables); $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleEditionsUnread():void { + public function testMarkMultipleEditionsUnread(): void { Arsse::$db->articleMark($this->user, ['read'=>false], (new Context)->editions([2,4,7,1001])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -860,7 +860,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleEditionsUnreadWithStale():void { + public function testMarkMultipleEditionsUnreadWithStale(): void { Arsse::$db->articleMark($this->user, ['read'=>false], (new Context)->editions([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -869,7 +869,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkMultipleEditionsUnreadAndStarredWithStale():void { + public function testMarkMultipleEditionsUnreadAndStarredWithStale(): void { Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->editions([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -881,17 +881,17 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkTooManyMultipleEditions():void { + public function testMarkTooManyMultipleEditions(): void { $this->assertSame(7, Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->editions(range(1, 51)))); } - public function testMarkAStaleEditionUnread():void { + public function testMarkAStaleEditionUnread(): void { Arsse::$db->articleMark($this->user, ['read'=>false], (new Context)->edition(20)); // no changes occur $state = $this->primeExpectations($this->data, $this->checkTables); $this->compareExpectations(static::$drv, $state); } - public function testMarkAStaleEditionStarred():void { + public function testMarkAStaleEditionStarred(): void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->edition(20)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -900,7 +900,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAStaleEditionUnreadAndStarred():void { + public function testMarkAStaleEditionUnreadAndStarred(): void { Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->edition(20)); // only starred is changed $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -909,18 +909,18 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkAStaleEditionUnreadAndUnstarred():void { + public function testMarkAStaleEditionUnreadAndUnstarred(): void { Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>false], (new Context)->edition(20)); // no changes occur $state = $this->primeExpectations($this->data, $this->checkTables); $this->compareExpectations(static::$drv, $state); } - public function testMarkAMissingEdition():void { + public function testMarkAMissingEdition(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->edition(2)); } - public function testMarkByOldestEdition():void { + public function testMarkByOldestEdition(): void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->oldestEdition(19)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -931,7 +931,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkByLatestEdition():void { + public function testMarkByLatestEdition(): void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->latestEdition(20)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -944,7 +944,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkByLastMarked():void { + public function testMarkByLastMarked(): void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->markedSince('2017-01-01T00:00:00Z')); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -955,7 +955,7 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkByNotLastMarked():void { + public function testMarkByNotLastMarked(): void { Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->notMarkedSince('2000-01-01T00:00:00Z')); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); @@ -964,55 +964,55 @@ trait SeriesArticle { $this->compareExpectations(static::$drv, $state); } - public function testMarkArticlesWithoutAuthority():void { + public function testMarkArticlesWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->articleMark($this->user, ['read'=>false]); } - public function testCountArticles():void { + public function testCountArticles(): void { $this->assertSame(2, Arsse::$db->articleCount("john.doe@example.com", (new Context)->starred(true))); $this->assertSame(4, Arsse::$db->articleCount("john.doe@example.com", (new Context)->folder(1))); $this->assertSame(0, Arsse::$db->articleCount("jane.doe@example.com", (new Context)->starred(true))); $this->assertSame(10, Arsse::$db->articleCount("john.doe@example.com", (new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)))); } - public function testCountArticlesWithoutAuthority():void { + public function testCountArticlesWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->articleCount($this->user); } - public function testFetchStarredCounts():void { + public function testFetchStarredCounts(): void { $exp1 = ['total' => 2, 'unread' => 1, 'read' => 1]; $exp2 = ['total' => 0, 'unread' => 0, 'read' => 0]; $this->assertEquals($exp1, Arsse::$db->articleStarred("john.doe@example.com")); $this->assertEquals($exp2, Arsse::$db->articleStarred("jane.doe@example.com")); } - public function testFetchStarredCountsWithoutAuthority():void { + public function testFetchStarredCountsWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->articleStarred($this->user); } - public function testFetchLatestEdition():void { + public function testFetchLatestEdition(): void { $this->assertSame(1001, Arsse::$db->editionLatest($this->user)); $this->assertSame(4, Arsse::$db->editionLatest($this->user, (new Context)->subscription(12))); } - public function testFetchLatestEditionOfMissingSubscription():void { + public function testFetchLatestEditionOfMissingSubscription(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->editionLatest($this->user, (new Context)->subscription(1)); } - public function testFetchLatestEditionWithoutAuthority():void { + public function testFetchLatestEditionWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->editionLatest($this->user); } - public function testListTheLabelsOfAnArticle():void { + public function testListTheLabelsOfAnArticle(): void { $this->assertEquals([1,2], Arsse::$db->articleLabelsGet("john.doe@example.com", 1)); $this->assertEquals([2], Arsse::$db->articleLabelsGet("john.doe@example.com", 5)); $this->assertEquals([], Arsse::$db->articleLabelsGet("john.doe@example.com", 2)); @@ -1021,18 +1021,18 @@ trait SeriesArticle { $this->assertEquals([], Arsse::$db->articleLabelsGet("john.doe@example.com", 2, true)); } - public function testListTheLabelsOfAMissingArticle():void { + public function testListTheLabelsOfAMissingArticle(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->articleLabelsGet($this->user, 101); } - public function testListTheLabelsOfAnArticleWithoutAuthority():void { + public function testListTheLabelsOfAnArticleWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->articleLabelsGet("john.doe@example.com", 1); } - public function testListTheCategoriesOfAnArticle():void { + public function testListTheCategoriesOfAnArticle(): void { $exp = ["Fascinating", "Logical"]; $this->assertSame($exp, Arsse::$db->articleCategoriesGet($this->user, 19)); $exp = ["Interesting", "Logical"]; @@ -1041,19 +1041,19 @@ trait SeriesArticle { $this->assertSame($exp, Arsse::$db->articleCategoriesGet($this->user, 4)); } - public function testListTheCategoriesOfAMissingArticle():void { + public function testListTheCategoriesOfAMissingArticle(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->articleCategoriesGet($this->user, 101); } - public function testListTheCategoriesOfAnArticleWithoutAuthority():void { + public function testListTheCategoriesOfAnArticleWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->articleCategoriesGet($this->user, 19); } /** @dataProvider provideArrayContextOptions */ - public function testUseTooFewValuesInArrayContext(string $option):void { + public function testUseTooFewValuesInArrayContext(string $option): void { $this->assertException("tooShort", "Db", "ExceptionInput"); Arsse::$db->articleList($this->user, (new Context)->$option([])); } diff --git a/tests/cases/Database/SeriesCleanup.php b/tests/cases/Database/SeriesCleanup.php index 7482243f..3a33f651 100644 --- a/tests/cases/Database/SeriesCleanup.php +++ b/tests/cases/Database/SeriesCleanup.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; trait SeriesCleanup { - protected function setUpSeriesCleanup():void { + protected function setUpSeriesCleanup(): void { // set up the configuration Arsse::$conf->import([ 'userSessionTimeout' => "PT1H", @@ -147,11 +147,11 @@ trait SeriesCleanup { ]; } - protected function tearDownSeriesCleanup():void { + protected function tearDownSeriesCleanup(): void { unset($this->data); } - public function testCleanUpOrphanedFeeds():void { + public function testCleanUpOrphanedFeeds(): void { Arsse::$db->feedCleanup(); $now = gmdate("Y-m-d H:i:s"); $state = $this->primeExpectations($this->data, [ @@ -163,7 +163,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpOrphanedFeedsWithUnlimitedRetention():void { + public function testCleanUpOrphanedFeedsWithUnlimitedRetention(): void { Arsse::$conf->import([ 'purgeFeeds' => null, ]); @@ -177,7 +177,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpOldArticlesWithStandardRetention():void { + public function testCleanUpOldArticlesWithStandardRetention(): void { Arsse::$db->articleCleanup(); $state = $this->primeExpectations($this->data, [ 'arsse_articles' => ["id"] @@ -188,7 +188,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpOldArticlesWithUnlimitedReadRetention():void { + public function testCleanUpOldArticlesWithUnlimitedReadRetention(): void { Arsse::$conf->import([ 'purgeArticlesRead' => null, ]); @@ -202,7 +202,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpOldArticlesWithUnlimitedUnreadRetention():void { + public function testCleanUpOldArticlesWithUnlimitedUnreadRetention(): void { Arsse::$conf->import([ 'purgeArticlesUnread' => null, ]); @@ -216,7 +216,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpOldArticlesWithUnlimitedRetention():void { + public function testCleanUpOldArticlesWithUnlimitedRetention(): void { Arsse::$conf->import([ 'purgeArticlesRead' => null, 'purgeArticlesUnread' => null, @@ -228,7 +228,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpExpiredSessions():void { + public function testCleanUpExpiredSessions(): void { Arsse::$db->sessionCleanup(); $state = $this->primeExpectations($this->data, [ 'arsse_sessions' => ["id"] @@ -239,7 +239,7 @@ trait SeriesCleanup { $this->compareExpectations(static::$drv, $state); } - public function testCleanUpExpiredTokens():void { + public function testCleanUpExpiredTokens(): void { Arsse::$db->tokenCleanup(); $state = $this->primeExpectations($this->data, [ 'arsse_tokens' => ["id", "class"] diff --git a/tests/cases/Database/SeriesFeed.php b/tests/cases/Database/SeriesFeed.php index ce5e074e..ee19bb19 100644 --- a/tests/cases/Database/SeriesFeed.php +++ b/tests/cases/Database/SeriesFeed.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; trait SeriesFeed { - protected function setUpSeriesFeed():void { + protected function setUpSeriesFeed(): void { // set up the test data $past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); $future = gmdate("Y-m-d H:i:s", strtotime("now + 1 minute")); @@ -160,15 +160,15 @@ trait SeriesFeed { ]; } - protected function tearDownSeriesFeed():void { + protected function tearDownSeriesFeed(): void { unset($this->data, $this->matches); } - public function testListLatestItems():void { + public function testListLatestItems(): void { $this->assertResult($this->matches, Arsse::$db->feedMatchLatest(1, 2)); } - public function testMatchItemsById():void { + public function testMatchItemsById(): void { $this->assertResult($this->matches, Arsse::$db->feedMatchIds(1, ['804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180','db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41'])); foreach ($this->matches as $m) { $exp = [$m]; @@ -179,7 +179,7 @@ trait SeriesFeed { $this->assertResult([['id' => 1]], Arsse::$db->feedMatchIds(1, ['e433653cef2e572eee4215fa299a4a5af9137b2cefd6283c85bd69a32915beda'])); // this ID appears in both feed 1 and feed 2; only one result should be returned } - public function testUpdateAFeed():void { + public function testUpdateAFeed(): void { // update a valid feed with both new and changed items Arsse::$db->feedUpdate(1); $now = gmdate("Y-m-d H:i:s"); @@ -219,22 +219,22 @@ trait SeriesFeed { $this->compareExpectations(static::$drv, $state); } - public function testUpdateAMissingFeed():void { + public function testUpdateAMissingFeed(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->feedUpdate(2112); } - public function testUpdateAnInvalidFeed():void { + public function testUpdateAnInvalidFeed(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->feedUpdate(-1); } - public function testUpdateAFeedThrowingExceptions():void { + public function testUpdateAFeedThrowingExceptions(): void { $this->assertException("invalidUrl", "Feed"); Arsse::$db->feedUpdate(3, true); } - public function testUpdateAFeedWithEnclosuresAndCategories():void { + public function testUpdateAFeedWithEnclosuresAndCategories(): void { Arsse::$db->feedUpdate(5); $state = $this->primeExpectations($this->data, [ 'arsse_enclosures' => ["url","type"], @@ -254,7 +254,7 @@ trait SeriesFeed { $this->compareExpectations(static::$drv, $state); } - public function testListStaleFeeds():void { + public function testListStaleFeeds(): void { $this->assertEquals([1,3,4], Arsse::$db->feedListStale()); Arsse::$db->feedUpdate(3); Arsse::$db->feedUpdate(4); diff --git a/tests/cases/Database/SeriesFolder.php b/tests/cases/Database/SeriesFolder.php index 9c73a3ea..bc1ae3a1 100644 --- a/tests/cases/Database/SeriesFolder.php +++ b/tests/cases/Database/SeriesFolder.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; trait SeriesFolder { - protected function setUpSeriesFolder():void { + protected function setUpSeriesFolder(): void { $this->data = [ 'arsse_users' => [ 'columns' => [ @@ -93,11 +93,11 @@ trait SeriesFolder { ]; } - protected function tearDownSeriesFolder():void { + protected function tearDownSeriesFolder(): void { unset($this->data); } - public function testAddARootFolder():void { + public function testAddARootFolder(): void { $user = "john.doe@example.com"; $folderID = $this->nextID("arsse_folders"); $this->assertSame($folderID, Arsse::$db->folderAdd($user, ['name' => "Entertainment"])); @@ -107,12 +107,12 @@ trait SeriesFolder { $this->compareExpectations(static::$drv, $state); } - public function testAddADuplicateRootFolder():void { + public function testAddADuplicateRootFolder(): void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => "Politics"]); } - public function testAddANestedFolder():void { + public function testAddANestedFolder(): void { $user = "john.doe@example.com"; $folderID = $this->nextID("arsse_folders"); $this->assertSame($folderID, Arsse::$db->folderAdd($user, ['name' => "GNOME", 'parent' => 2])); @@ -122,43 +122,43 @@ trait SeriesFolder { $this->compareExpectations(static::$drv, $state); } - public function testAddANestedFolderToAMissingParent():void { + public function testAddANestedFolderToAMissingParent(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => "Sociology", 'parent' => 2112]); } - public function testAddANestedFolderToAnInvalidParent():void { + public function testAddANestedFolderToAnInvalidParent(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => "Sociology", 'parent' => "stringFolderId"]); } - public function testAddANestedFolderForTheWrongOwner():void { + public function testAddANestedFolderForTheWrongOwner(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => "Sociology", 'parent' => 4]); // folder ID 4 belongs to Jane } - public function testAddAFolderWithAMissingName():void { + public function testAddAFolderWithAMissingName(): void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", []); } - public function testAddAFolderWithABlankName():void { + public function testAddAFolderWithABlankName(): void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => ""]); } - public function testAddAFolderWithAWhitespaceName():void { + public function testAddAFolderWithAWhitespaceName(): void { $this->assertException("whitespace", "Db", "ExceptionInput"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => " "]); } - public function testAddAFolderWithoutAuthority():void { + public function testAddAFolderWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->folderAdd("john.doe@example.com", ['name' => "Sociology"]); } - public function testListRootFolders():void { + public function testListRootFolders(): void { $exp = [ ['id' => 5, 'name' => "Politics", 'parent' => null, 'children' => 0, 'feeds' => 2], ['id' => 1, 'name' => "Technology", 'parent' => null, 'children' => 2, 'feeds' => 1], @@ -175,7 +175,7 @@ trait SeriesFolder { \Phake::verify(Arsse::$user)->authorize("admin@example.net", "folderList"); } - public function testListFoldersRecursively():void { + public function testListFoldersRecursively(): void { $exp = [ ['id' => 5, 'name' => "Politics", 'parent' => null, 'children' => 0, 'feeds' => 2], ['id' => 6, 'name' => "Politics", 'parent' => 2, 'children' => 0, 'feeds' => 1], @@ -196,23 +196,23 @@ trait SeriesFolder { \Phake::verify(Arsse::$user)->authorize("jane.doe@example.com", "folderList"); } - public function testListFoldersOfAMissingParent():void { + public function testListFoldersOfAMissingParent(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->folderList("john.doe@example.com", 2112); } - public function testListFoldersOfTheWrongOwner():void { + public function testListFoldersOfTheWrongOwner(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->folderList("john.doe@example.com", 4); // folder ID 4 belongs to Jane } - public function testListFoldersWithoutAuthority():void { + public function testListFoldersWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->folderList("john.doe@example.com"); } - public function testRemoveAFolder():void { + public function testRemoveAFolder(): void { $this->assertTrue(Arsse::$db->folderRemove("john.doe@example.com", 6)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "folderRemove"); $state = $this->primeExpectations($this->data, ['arsse_folders' => ['id','owner', 'parent', 'name']]); @@ -220,7 +220,7 @@ trait SeriesFolder { $this->compareExpectations(static::$drv, $state); } - public function testRemoveAFolderTree():void { + public function testRemoveAFolderTree(): void { $this->assertTrue(Arsse::$db->folderRemove("john.doe@example.com", 1)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "folderRemove"); $state = $this->primeExpectations($this->data, ['arsse_folders' => ['id','owner', 'parent', 'name']]); @@ -230,28 +230,28 @@ trait SeriesFolder { $this->compareExpectations(static::$drv, $state); } - public function testRemoveAMissingFolder():void { + public function testRemoveAMissingFolder(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->folderRemove("john.doe@example.com", 2112); } - public function testRemoveAnInvalidFolder():void { + public function testRemoveAnInvalidFolder(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->folderRemove("john.doe@example.com", -1); } - public function testRemoveAFolderOfTheWrongOwner():void { + public function testRemoveAFolderOfTheWrongOwner(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->folderRemove("john.doe@example.com", 4); // folder ID 4 belongs to Jane } - public function testRemoveAFolderWithoutAuthority():void { + public function testRemoveAFolderWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->folderRemove("john.doe@example.com", 1); } - public function testGetThePropertiesOfAFolder():void { + public function testGetThePropertiesOfAFolder(): void { $exp = [ 'id' => 6, 'name' => "Politics", @@ -261,32 +261,32 @@ trait SeriesFolder { \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "folderPropertiesGet"); } - public function testGetThePropertiesOfAMissingFolder():void { + public function testGetThePropertiesOfAMissingFolder(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesGet("john.doe@example.com", 2112); } - public function testGetThePropertiesOfAnInvalidFolder():void { + public function testGetThePropertiesOfAnInvalidFolder(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesGet("john.doe@example.com", -1); } - public function testGetThePropertiesOfAFolderOfTheWrongOwner():void { + public function testGetThePropertiesOfAFolderOfTheWrongOwner(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesGet("john.doe@example.com", 4); // folder ID 4 belongs to Jane } - public function testGetThePropertiesOfAFolderWithoutAuthority():void { + public function testGetThePropertiesOfAFolderWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->folderPropertiesGet("john.doe@example.com", 1); } - public function testMakeNoChangesToAFolder():void { + public function testMakeNoChangesToAFolder(): void { $this->assertFalse(Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, [])); } - public function testRenameAFolder():void { + public function testRenameAFolder(): void { $this->assertTrue(Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, ['name' => "Opinion"])); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "folderPropertiesSet"); $state = $this->primeExpectations($this->data, ['arsse_folders' => ['id','owner', 'parent', 'name']]); @@ -294,26 +294,26 @@ trait SeriesFolder { $this->compareExpectations(static::$drv, $state); } - public function testRenameTheRootFolder():void { + public function testRenameTheRootFolder(): void { $this->assertFalse(Arsse::$db->folderPropertiesSet("john.doe@example.com", null, ['name' => "Opinion"])); } - public function testRenameAFolderToTheEmptyString():void { + public function testRenameAFolderToTheEmptyString(): void { $this->assertException("missing", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, ['name' => ""])); } - public function testRenameAFolderToWhitespaceOnly():void { + public function testRenameAFolderToWhitespaceOnly(): void { $this->assertException("whitespace", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, ['name' => " "])); } - public function testRenameAFolderToAnInvalidValue():void { + public function testRenameAFolderToAnInvalidValue(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, ['name' => []])); } - public function testMoveAFolder():void { + public function testMoveAFolder(): void { $this->assertTrue(Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, ['parent' => 5])); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "folderPropertiesSet"); $state = $this->primeExpectations($this->data, ['arsse_folders' => ['id','owner', 'parent', 'name']]); @@ -321,57 +321,57 @@ trait SeriesFolder { $this->compareExpectations(static::$drv, $state); } - public function testMoveTheRootFolder():void { + public function testMoveTheRootFolder(): void { $this->assertException("circularDependence", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 0, ['parent' => 1]); } - public function testMoveAFolderToItsDescendant():void { + public function testMoveAFolderToItsDescendant(): void { $this->assertException("circularDependence", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 1, ['parent' => 3]); } - public function testMoveAFolderToItself():void { + public function testMoveAFolderToItself(): void { $this->assertException("circularDependence", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 1, ['parent' => 1]); } - public function testMoveAFolderToAMissingParent():void { + public function testMoveAFolderToAMissingParent(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 1, ['parent' => 2112]); } - public function testMoveAFolderToAnInvalidParent():void { + public function testMoveAFolderToAnInvalidParent(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 1, ['parent' => "ThisFolderDoesNotExist"]); } - public function testCauseAFolderCollision():void { + public function testCauseAFolderCollision(): void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 6, ['parent' => null]); } - public function testCauseACompoundFolderCollision():void { + public function testCauseACompoundFolderCollision(): void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 3, ['parent' => null, 'name' => "Technology"]); } - public function testSetThePropertiesOfAMissingFolder():void { + public function testSetThePropertiesOfAMissingFolder(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 2112, ['parent' => null]); } - public function testSetThePropertiesOfAnInvalidFolder():void { + public function testSetThePropertiesOfAnInvalidFolder(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", -1, ['parent' => null]); } - public function testSetThePropertiesOfAFolderForTheWrongOwner():void { + public function testSetThePropertiesOfAFolderForTheWrongOwner(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 4, ['parent' => null]); // folder ID 4 belongs to Jane } - public function testSetThePropertiesOfAFolderWithoutAuthority():void { + public function testSetThePropertiesOfAFolderWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->folderPropertiesSet("john.doe@example.com", 1, ['parent' => null]); diff --git a/tests/cases/Database/SeriesLabel.php b/tests/cases/Database/SeriesLabel.php index 0cf55ca8..74fdee47 100644 --- a/tests/cases/Database/SeriesLabel.php +++ b/tests/cases/Database/SeriesLabel.php @@ -11,7 +11,7 @@ use JKingWeb\Arsse\Database; use JKingWeb\Arsse\Context\Context; trait SeriesLabel { - protected function setUpSeriesLabel():void { + protected function setUpSeriesLabel(): void { $this->data = [ 'arsse_users' => [ 'columns' => [ @@ -244,11 +244,11 @@ trait SeriesLabel { $this->user = "john.doe@example.com"; } - protected function tearDownSeriesLabel():void { + protected function tearDownSeriesLabel(): void { unset($this->data, $this->checkLabels, $this->checkMembers, $this->user); } - public function testAddALabel():void { + public function testAddALabel(): void { $user = "john.doe@example.com"; $labelID = $this->nextID("arsse_labels"); $this->assertSame($labelID, Arsse::$db->labelAdd($user, ['name' => "Entertaining"])); @@ -258,33 +258,33 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testAddADuplicateLabel():void { + public function testAddADuplicateLabel(): void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->labelAdd("john.doe@example.com", ['name' => "Interesting"]); } - public function testAddALabelWithAMissingName():void { + public function testAddALabelWithAMissingName(): void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->labelAdd("john.doe@example.com", []); } - public function testAddALabelWithABlankName():void { + public function testAddALabelWithABlankName(): void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->labelAdd("john.doe@example.com", ['name' => ""]); } - public function testAddALabelWithAWhitespaceName():void { + public function testAddALabelWithAWhitespaceName(): void { $this->assertException("whitespace", "Db", "ExceptionInput"); Arsse::$db->labelAdd("john.doe@example.com", ['name' => " "]); } - public function testAddALabelWithoutAuthority():void { + public function testAddALabelWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelAdd("john.doe@example.com", ['name' => "Boring"]); } - public function testListLabels():void { + public function testListLabels(): void { $exp = [ ['id' => 2, 'name' => "Fascinating", 'articles' => 3, 'read' => 1], ['id' => 1, 'name' => "Interesting", 'articles' => 2, 'read' => 2], @@ -300,13 +300,13 @@ trait SeriesLabel { \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "labelList"); } - public function testListLabelsWithoutAuthority():void { + public function testListLabelsWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelList("john.doe@example.com"); } - public function testRemoveALabel():void { + public function testRemoveALabel(): void { $this->assertTrue(Arsse::$db->labelRemove("john.doe@example.com", 1)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "labelRemove"); $state = $this->primeExpectations($this->data, $this->checkLabels); @@ -314,7 +314,7 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testRemoveALabelByName():void { + public function testRemoveALabelByName(): void { $this->assertTrue(Arsse::$db->labelRemove("john.doe@example.com", "Interesting", true)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "labelRemove"); $state = $this->primeExpectations($this->data, $this->checkLabels); @@ -322,33 +322,33 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testRemoveAMissingLabel():void { + public function testRemoveAMissingLabel(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelRemove("john.doe@example.com", 2112); } - public function testRemoveAnInvalidLabel():void { + public function testRemoveAnInvalidLabel(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelRemove("john.doe@example.com", -1); } - public function testRemoveAnInvalidLabelByName():void { + public function testRemoveAnInvalidLabelByName(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelRemove("john.doe@example.com", [], true); } - public function testRemoveALabelOfTheWrongOwner():void { + public function testRemoveALabelOfTheWrongOwner(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelRemove("john.doe@example.com", 3); // label ID 3 belongs to Jane } - public function testRemoveALabelWithoutAuthority():void { + public function testRemoveALabelWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelRemove("john.doe@example.com", 1); } - public function testGetThePropertiesOfALabel():void { + public function testGetThePropertiesOfALabel(): void { $exp = [ 'id' => 2, 'name' => "Fascinating", @@ -360,37 +360,37 @@ trait SeriesLabel { \Phake::verify(Arsse::$user, \Phake::times(2))->authorize("john.doe@example.com", "labelPropertiesGet"); } - public function testGetThePropertiesOfAMissingLabel():void { + public function testGetThePropertiesOfAMissingLabel(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesGet("john.doe@example.com", 2112); } - public function testGetThePropertiesOfAnInvalidLabel():void { + public function testGetThePropertiesOfAnInvalidLabel(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesGet("john.doe@example.com", -1); } - public function testGetThePropertiesOfAnInvalidLabelByName():void { + public function testGetThePropertiesOfAnInvalidLabelByName(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesGet("john.doe@example.com", [], true); } - public function testGetThePropertiesOfALabelOfTheWrongOwner():void { + public function testGetThePropertiesOfALabelOfTheWrongOwner(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesGet("john.doe@example.com", 3); // label ID 3 belongs to Jane } - public function testGetThePropertiesOfALabelWithoutAuthority():void { + public function testGetThePropertiesOfALabelWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelPropertiesGet("john.doe@example.com", 1); } - public function testMakeNoChangesToALabel():void { + public function testMakeNoChangesToALabel(): void { $this->assertFalse(Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, [])); } - public function testRenameALabel():void { + public function testRenameALabel(): void { $this->assertTrue(Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, ['name' => "Curious"])); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "labelPropertiesSet"); $state = $this->primeExpectations($this->data, $this->checkLabels); @@ -398,7 +398,7 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testRenameALabelByName():void { + public function testRenameALabelByName(): void { $this->assertTrue(Arsse::$db->labelPropertiesSet("john.doe@example.com", "Interesting", ['name' => "Curious"], true)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "labelPropertiesSet"); $state = $this->primeExpectations($this->data, $this->checkLabels); @@ -406,53 +406,53 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testRenameALabelToTheEmptyString():void { + public function testRenameALabelToTheEmptyString(): void { $this->assertException("missing", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, ['name' => ""])); } - public function testRenameALabelToWhitespaceOnly():void { + public function testRenameALabelToWhitespaceOnly(): void { $this->assertException("whitespace", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, ['name' => " "])); } - public function testRenameALabelToAnInvalidValue():void { + public function testRenameALabelToAnInvalidValue(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, ['name' => []])); } - public function testCauseALabelCollision():void { + public function testCauseALabelCollision(): void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, ['name' => "Fascinating"]); } - public function testSetThePropertiesOfAMissingLabel():void { + public function testSetThePropertiesOfAMissingLabel(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesSet("john.doe@example.com", 2112, ['name' => "Exciting"]); } - public function testSetThePropertiesOfAnInvalidLabel():void { + public function testSetThePropertiesOfAnInvalidLabel(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesSet("john.doe@example.com", -1, ['name' => "Exciting"]); } - public function testSetThePropertiesOfAnInvalidLabelByName():void { + public function testSetThePropertiesOfAnInvalidLabelByName(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesSet("john.doe@example.com", [], ['name' => "Exciting"], true); } - public function testSetThePropertiesOfALabelForTheWrongOwner():void { + public function testSetThePropertiesOfALabelForTheWrongOwner(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelPropertiesSet("john.doe@example.com", 3, ['name' => "Exciting"]); // label ID 3 belongs to Jane } - public function testSetThePropertiesOfALabelWithoutAuthority():void { + public function testSetThePropertiesOfALabelWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelPropertiesSet("john.doe@example.com", 1, ['name' => "Exciting"]); } - public function testListLabelledArticles():void { + public function testListLabelledArticles(): void { $exp = [1,19]; $this->assertEquals($exp, Arsse::$db->labelArticlesGet("john.doe@example.com", 1)); $this->assertEquals($exp, Arsse::$db->labelArticlesGet("john.doe@example.com", "Interesting", true)); @@ -464,23 +464,23 @@ trait SeriesLabel { $this->assertEquals($exp, Arsse::$db->labelArticlesGet("john.doe@example.com", "Lonely", true)); } - public function testListLabelledArticlesForAMissingLabel():void { + public function testListLabelledArticlesForAMissingLabel(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->labelArticlesGet("john.doe@example.com", 3); } - public function testListLabelledArticlesForAnInvalidLabel():void { + public function testListLabelledArticlesForAnInvalidLabel(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->labelArticlesGet("john.doe@example.com", -1); } - public function testListLabelledArticlesWithoutAuthority():void { + public function testListLabelledArticlesWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelArticlesGet("john.doe@example.com", 1); } - public function testApplyALabelToArticles():void { + public function testApplyALabelToArticles(): void { Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([2,5])); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_label_members']['rows'][4][3] = 1; @@ -488,14 +488,14 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testClearALabelFromArticles():void { + public function testClearALabelFromArticles(): void { Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([1,5]), Database::ASSOC_REMOVE); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_label_members']['rows'][0][3] = 0; $this->compareExpectations(static::$drv, $state); } - public function testApplyALabelToArticlesByName():void { + public function testApplyALabelToArticlesByName(): void { Arsse::$db->labelArticlesSet("john.doe@example.com", "Interesting", (new Context)->articles([2,5]), Database::ASSOC_ADD, true); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_label_members']['rows'][4][3] = 1; @@ -503,26 +503,26 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testClearALabelFromArticlesByName():void { + public function testClearALabelFromArticlesByName(): void { Arsse::$db->labelArticlesSet("john.doe@example.com", "Interesting", (new Context)->articles([1,5]), Database::ASSOC_REMOVE, true); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_label_members']['rows'][0][3] = 0; $this->compareExpectations(static::$drv, $state); } - public function testApplyALabelToNoArticles():void { + public function testApplyALabelToNoArticles(): void { Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([10000])); $state = $this->primeExpectations($this->data, $this->checkMembers); $this->compareExpectations(static::$drv, $state); } - public function testClearALabelFromNoArticles():void { + public function testClearALabelFromNoArticles(): void { Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([10000]), Database::ASSOC_REMOVE); $state = $this->primeExpectations($this->data, $this->checkMembers); $this->compareExpectations(static::$drv, $state); } - public function testReplaceArticlesOfALabel():void { + public function testReplaceArticlesOfALabel(): void { Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([2,5]), Database::ASSOC_REPLACE); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_label_members']['rows'][0][3] = 0; @@ -532,7 +532,7 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testPurgeArticlesOfALabel():void { + public function testPurgeArticlesOfALabel(): void { Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([10000]), Database::ASSOC_REPLACE); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_label_members']['rows'][0][3] = 0; @@ -540,7 +540,7 @@ trait SeriesLabel { $this->compareExpectations(static::$drv, $state); } - public function testApplyALabelToArticlesWithoutAuthority():void { + public function testApplyALabelToArticlesWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->labelArticlesSet("john.doe@example.com", 1, (new Context)->articles([2,5])); diff --git a/tests/cases/Database/SeriesMeta.php b/tests/cases/Database/SeriesMeta.php index 2a617c6f..b1d19743 100644 --- a/tests/cases/Database/SeriesMeta.php +++ b/tests/cases/Database/SeriesMeta.php @@ -10,7 +10,7 @@ use JKingWeb\Arsse\Test\Database; use JKingWeb\Arsse\Arsse; trait SeriesMeta { - protected function setUpSeriesMeta():void { + protected function setUpSeriesMeta(): void { $dataBare = [ 'arsse_meta' => [ 'columns' => [ @@ -31,18 +31,18 @@ trait SeriesMeta { $this->primeDatabase(static::$drv, $dataBare); } - protected function tearDownSeriesMeta():void { + protected function tearDownSeriesMeta(): void { unset($this->data); } - public function testAddANewValue():void { + public function testAddANewValue(): void { $this->assertTrue(Arsse::$db->metaSet("favourite", "Cygnus X-1")); $state = $this->primeExpectations($this->data, ['arsse_meta' => ['key','value']]); $state['arsse_meta']['rows'][] = ["favourite","Cygnus X-1"]; $this->compareExpectations(static::$drv, $state); } - public function testAddANewTypedValue():void { + public function testAddANewTypedValue(): void { $this->assertTrue(Arsse::$db->metaSet("answer", 42, "int")); $this->assertTrue(Arsse::$db->metaSet("true", true, "bool")); $this->assertTrue(Arsse::$db->metaSet("false", false, "bool")); @@ -55,14 +55,14 @@ trait SeriesMeta { $this->compareExpectations(static::$drv, $state); } - public function testChangeAnExistingValue():void { + public function testChangeAnExistingValue(): void { $this->assertTrue(Arsse::$db->metaSet("album", "Hemispheres")); $state = $this->primeExpectations($this->data, ['arsse_meta' => ['key','value']]); $state['arsse_meta']['rows'][1][1] = "Hemispheres"; $this->compareExpectations(static::$drv, $state); } - public function testRemoveAValue():void { + public function testRemoveAValue(): void { $this->assertTrue(Arsse::$db->metaRemove("album")); $this->assertFalse(Arsse::$db->metaRemove("album")); $state = $this->primeExpectations($this->data, ['arsse_meta' => ['key','value']]); @@ -70,7 +70,7 @@ trait SeriesMeta { $this->compareExpectations(static::$drv, $state); } - public function testRetrieveAValue():void { + public function testRetrieveAValue(): void { $this->assertSame("".Database::SCHEMA_VERSION, Arsse::$db->metaGet("schema_version")); $this->assertSame("A Farewell to Kings", Arsse::$db->metaGet("album")); $this->assertSame(null, Arsse::$db->metaGet("this_key_does_not_exist")); diff --git a/tests/cases/Database/SeriesMiscellany.php b/tests/cases/Database/SeriesMiscellany.php index 03009eff..5bc1092b 100644 --- a/tests/cases/Database/SeriesMiscellany.php +++ b/tests/cases/Database/SeriesMiscellany.php @@ -10,22 +10,22 @@ use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Database; trait SeriesMiscellany { - protected function setUpSeriesMiscellany():void { + protected function setUpSeriesMiscellany(): void { static::setConf([ 'dbDriver' => static::$dbDriverClass, ]); } - protected function tearDownSeriesMiscellany():void { + protected function tearDownSeriesMiscellany(): void { } - public function testInitializeDatabase():void { + public function testInitializeDatabase(): void { static::dbRaze(static::$drv); $d = new Database(true); $this->assertSame(Database::SCHEMA_VERSION, $d->driverSchemaVersion()); } - public function testManuallyInitializeDatabase():void { + public function testManuallyInitializeDatabase(): void { static::dbRaze(static::$drv); $d = new Database(false); $this->assertSame(0, $d->driverSchemaVersion()); @@ -34,11 +34,11 @@ trait SeriesMiscellany { $this->assertFalse($d->driverSchemaUpdate()); } - public function testCheckCharacterSetAcceptability():void { + public function testCheckCharacterSetAcceptability(): void { $this->assertIsBool(Arsse::$db->driverCharsetAcceptable()); } - public function testPerformMaintenance():void { + public function testPerformMaintenance(): void { $this->assertTrue(Arsse::$db->driverMaintenance()); } } diff --git a/tests/cases/Database/SeriesSession.php b/tests/cases/Database/SeriesSession.php index 7e5b7c4a..f3a84b6f 100644 --- a/tests/cases/Database/SeriesSession.php +++ b/tests/cases/Database/SeriesSession.php @@ -10,7 +10,7 @@ use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Misc\Date; trait SeriesSession { - protected function setUpSeriesSession():void { + protected function setUpSeriesSession(): void { // set up the configuration static::setConf([ 'userSessionTimeout' => "PT1H", @@ -49,11 +49,11 @@ trait SeriesSession { ]; } - protected function tearDownSeriesSession():void { + protected function tearDownSeriesSession(): void { unset($this->data); } - public function testResumeAValidSession():void { + public function testResumeAValidSession(): void { $exp1 = [ 'id' => "80fa94c1a11f11e78667001e673b2560", 'user' => "jane.doe@example.com" @@ -74,22 +74,22 @@ trait SeriesSession { $this->assertArraySubset($exp1, Arsse::$db->sessionResume("80fa94c1a11f11e78667001e673b2560")); } - public function testResumeAMissingSession():void { + public function testResumeAMissingSession(): void { $this->assertException("invalid", "User", "ExceptionSession"); Arsse::$db->sessionResume("thisSessionDoesNotExist"); } - public function testResumeAnExpiredSession():void { + public function testResumeAnExpiredSession(): void { $this->assertException("invalid", "User", "ExceptionSession"); Arsse::$db->sessionResume("27c6de8da13311e78667001e673b2560"); } - public function testResumeAStaleSession():void { + public function testResumeAStaleSession(): void { $this->assertException("invalid", "User", "ExceptionSession"); Arsse::$db->sessionResume("ab3b3eb8a13311e78667001e673b2560"); } - public function testCreateASession():void { + public function testCreateASession(): void { $user = "jane.doe@example.com"; $id = Arsse::$db->sessionCreate($user); $now = time(); @@ -98,13 +98,13 @@ trait SeriesSession { $this->compareExpectations(static::$drv, $state); } - public function testCreateASessionWithoutAuthority():void { + public function testCreateASessionWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->sessionCreate("jane.doe@example.com"); } - public function testDestroyASession():void { + public function testDestroyASession(): void { $user = "jane.doe@example.com"; $id = "80fa94c1a11f11e78667001e673b2560"; $this->assertTrue(Arsse::$db->sessionDestroy($user, $id)); @@ -115,7 +115,7 @@ trait SeriesSession { $this->assertFalse(Arsse::$db->sessionDestroy($user, $id)); } - public function testDestroyAllSessions():void { + public function testDestroyAllSessions(): void { $user = "jane.doe@example.com"; $this->assertTrue(Arsse::$db->sessionDestroy($user)); $state = $this->primeExpectations($this->data, ['arsse_sessions' => ["id", "created", "expires", "user"]]); @@ -125,13 +125,13 @@ trait SeriesSession { $this->compareExpectations(static::$drv, $state); } - public function testDestroyASessionForTheWrongUser():void { + public function testDestroyASessionForTheWrongUser(): void { $user = "john.doe@example.com"; $id = "80fa94c1a11f11e78667001e673b2560"; $this->assertFalse(Arsse::$db->sessionDestroy($user, $id)); } - public function testDestroyASessionWithoutAuthority():void { + public function testDestroyASessionWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->sessionDestroy("jane.doe@example.com", "80fa94c1a11f11e78667001e673b2560"); diff --git a/tests/cases/Database/SeriesSubscription.php b/tests/cases/Database/SeriesSubscription.php index 8f6f3043..434427e5 100644 --- a/tests/cases/Database/SeriesSubscription.php +++ b/tests/cases/Database/SeriesSubscription.php @@ -11,7 +11,7 @@ use JKingWeb\Arsse\Test\Database; use JKingWeb\Arsse\Feed\Exception as FeedException; trait SeriesSubscription { - public function setUpSeriesSubscription():void { + public function setUpSeriesSubscription(): void { $this->data = [ 'arsse_users' => [ 'columns' => [ @@ -143,11 +143,11 @@ trait SeriesSubscription { $this->user = "john.doe@example.com"; } - protected function tearDownSeriesSubscription():void { + protected function tearDownSeriesSubscription(): void { unset($this->data, $this->user); } - public function testAddASubscriptionToAnExistingFeed():void { + public function testAddASubscriptionToAnExistingFeed(): void { $url = "http://example.com/feed1"; $subID = $this->nextID("arsse_subscriptions"); \Phake::when(Arsse::$db)->feedUpdate->thenReturn(true); @@ -162,7 +162,7 @@ trait SeriesSubscription { $this->compareExpectations(static::$drv, $state); } - public function testAddASubscriptionToANewFeed():void { + public function testAddASubscriptionToANewFeed(): void { $url = "http://example.org/feed1"; $feedID = $this->nextID("arsse_feeds"); $subID = $this->nextID("arsse_subscriptions"); @@ -179,7 +179,7 @@ trait SeriesSubscription { $this->compareExpectations(static::$drv, $state); } - public function testAddASubscriptionToANewFeedViaDiscovery():void { + public function testAddASubscriptionToANewFeedViaDiscovery(): void { $url = "http://localhost:8000/Feed/Discovery/Valid"; $discovered = "http://localhost:8000/Feed/Discovery/Feed"; $feedID = $this->nextID("arsse_feeds"); @@ -197,7 +197,7 @@ trait SeriesSubscription { $this->compareExpectations(static::$drv, $state); } - public function testAddASubscriptionToAnInvalidFeed():void { + public function testAddASubscriptionToAnInvalidFeed(): void { $url = "http://example.org/feed1"; $feedID = $this->nextID("arsse_feeds"); \Phake::when(Arsse::$db)->feedUpdate->thenThrow(new FeedException($url, new \PicoFeed\Client\InvalidUrlException())); @@ -215,19 +215,19 @@ trait SeriesSubscription { } } - public function testAddADuplicateSubscription():void { + public function testAddADuplicateSubscription(): void { $url = "http://example.com/feed2"; $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionAdd($this->user, $url); } - public function testAddADuplicateSubscriptionWithEquivalentUrl():void { + public function testAddADuplicateSubscriptionWithEquivalentUrl(): void { $url = "http://EXAMPLE.COM/feed2"; $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionAdd($this->user, $url); } - public function testAddADuplicateSubscriptionViaRedirection():void { + public function testAddADuplicateSubscriptionViaRedirection(): void { $url = "http://localhost:8000/Feed/Parsing/Valid"; Arsse::$db->subscriptionAdd($this->user, $url); $subID = $this->nextID("arsse_subscriptions"); @@ -235,14 +235,14 @@ trait SeriesSubscription { $this->assertSame($subID, Arsse::$db->subscriptionAdd($this->user, $url)); } - public function testAddASubscriptionWithoutAuthority():void { + public function testAddASubscriptionWithoutAuthority(): void { $url = "http://example.com/feed1"; \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionAdd($this->user, $url); } - public function testRemoveASubscription():void { + public function testRemoveASubscription(): void { $this->assertTrue(Arsse::$db->subscriptionRemove($this->user, 1)); \Phake::verify(Arsse::$user)->authorize($this->user, "subscriptionRemove"); $state = $this->primeExpectations($this->data, [ @@ -253,29 +253,29 @@ trait SeriesSubscription { $this->compareExpectations(static::$drv, $state); } - public function testRemoveAMissingSubscription():void { + public function testRemoveAMissingSubscription(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionRemove($this->user, 2112); } - public function testRemoveAnInvalidSubscription():void { + public function testRemoveAnInvalidSubscription(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionRemove($this->user, -1); } - public function testRemoveASubscriptionForTheWrongOwner():void { + public function testRemoveASubscriptionForTheWrongOwner(): void { $this->user = "jane.doe@example.com"; $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionRemove($this->user, 1); } - public function testRemoveASubscriptionWithoutAuthority():void { + public function testRemoveASubscriptionWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionRemove($this->user, 1); } - public function testListSubscriptions():void { + public function testListSubscriptions(): void { $exp = [ [ 'url' => "http://example.com/feed2", @@ -303,7 +303,7 @@ trait SeriesSubscription { $this->assertArraySubset($exp[1], Arsse::$db->subscriptionPropertiesGet($this->user, 3)); } - public function testListSubscriptionsInAFolder():void { + public function testListSubscriptionsInAFolder(): void { $exp = [ [ 'url' => "http://example.com/feed2", @@ -318,7 +318,7 @@ trait SeriesSubscription { $this->assertResult($exp, Arsse::$db->subscriptionList($this->user, null, false)); } - public function testListSubscriptionsWithoutRecursion():void { + public function testListSubscriptionsWithoutRecursion(): void { $exp = [ [ 'url' => "http://example.com/feed3", @@ -333,50 +333,50 @@ trait SeriesSubscription { $this->assertResult($exp, Arsse::$db->subscriptionList($this->user, 2)); } - public function testListSubscriptionsInAMissingFolder():void { + public function testListSubscriptionsInAMissingFolder(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionList($this->user, 4); } - public function testListSubscriptionsWithoutAuthority():void { + public function testListSubscriptionsWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionList($this->user); } - public function testCountSubscriptions():void { + public function testCountSubscriptions(): void { $this->assertSame(2, Arsse::$db->subscriptionCount($this->user)); $this->assertSame(1, Arsse::$db->subscriptionCount($this->user, 2)); } - public function testCountSubscriptionsInAMissingFolder():void { + public function testCountSubscriptionsInAMissingFolder(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionCount($this->user, 4); } - public function testCountSubscriptionsWithoutAuthority():void { + public function testCountSubscriptionsWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionCount($this->user); } - public function testGetThePropertiesOfAMissingSubscription():void { + public function testGetThePropertiesOfAMissingSubscription(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesGet($this->user, 2112); } - public function testGetThePropertiesOfAnInvalidSubscription():void { + public function testGetThePropertiesOfAnInvalidSubscription(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesGet($this->user, -1); } - public function testGetThePropertiesOfASubscriptionWithoutAuthority():void { + public function testGetThePropertiesOfASubscriptionWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionPropertiesGet($this->user, 1); } - public function testSetThePropertiesOfASubscription():void { + public function testSetThePropertiesOfASubscription(): void { Arsse::$db->subscriptionPropertiesSet($this->user, 1, [ 'title' => "Ook Ook", 'folder' => 3, @@ -400,56 +400,56 @@ trait SeriesSubscription { $this->compareExpectations(static::$drv, $state); } - public function testMoveASubscriptionToAMissingFolder():void { + public function testMoveASubscriptionToAMissingFolder(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['folder' => 4]); } - public function testMoveASubscriptionToTheRootFolder():void { + public function testMoveASubscriptionToTheRootFolder(): void { $this->assertTrue(Arsse::$db->subscriptionPropertiesSet($this->user, 3, ['folder' => null])); } - public function testRenameASubscriptionToABlankTitle():void { + public function testRenameASubscriptionToABlankTitle(): void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['title' => ""]); } - public function testRenameASubscriptionToAWhitespaceTitle():void { + public function testRenameASubscriptionToAWhitespaceTitle(): void { $this->assertException("whitespace", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['title' => " "]); } - public function testRenameASubscriptionToFalse():void { + public function testRenameASubscriptionToFalse(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['title' => false]); } - public function testRenameASubscriptionToZero():void { + public function testRenameASubscriptionToZero(): void { $this->assertTrue(Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['title' => 0])); } - public function testRenameASubscriptionToAnArray():void { + public function testRenameASubscriptionToAnArray(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['title' => []]); } - public function testSetThePropertiesOfAMissingSubscription():void { + public function testSetThePropertiesOfAMissingSubscription(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, 2112, ['folder' => null]); } - public function testSetThePropertiesOfAnInvalidSubscription():void { + public function testSetThePropertiesOfAnInvalidSubscription(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->subscriptionPropertiesSet($this->user, -1, ['folder' => null]); } - public function testSetThePropertiesOfASubscriptionWithoutAuthority():void { + public function testSetThePropertiesOfASubscriptionWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionPropertiesSet($this->user, 1, ['folder' => null]); } - public function testRetrieveTheFaviconOfASubscription():void { + public function testRetrieveTheFaviconOfASubscription(): void { $exp = "http://example.com/favicon.ico"; $this->assertSame($exp, Arsse::$db->subscriptionFavicon(1)); $this->assertSame($exp, Arsse::$db->subscriptionFavicon(2)); @@ -465,7 +465,7 @@ trait SeriesSubscription { $this->assertSame('', Arsse::$db->subscriptionFavicon(-2112)); } - public function testRetrieveTheFaviconOfASubscriptionWithUser():void { + public function testRetrieveTheFaviconOfASubscriptionWithUser(): void { $exp = "http://example.com/favicon.ico"; $user = "john.doe@example.com"; $this->assertSame($exp, Arsse::$db->subscriptionFavicon(1, $user)); @@ -479,7 +479,7 @@ trait SeriesSubscription { $this->assertSame('', Arsse::$db->subscriptionFavicon(4, $user)); } - public function testRetrieveTheFaviconOfASubscriptionWithUserWithoutAuthority():void { + public function testRetrieveTheFaviconOfASubscriptionWithUserWithoutAuthority(): void { $exp = "http://example.com/favicon.ico"; $user = "john.doe@example.com"; \Phake::when(Arsse::$user)->authorize->thenReturn(false); @@ -487,36 +487,36 @@ trait SeriesSubscription { Arsse::$db->subscriptionFavicon(-2112, $user); } - public function testListTheTagsOfASubscription():void { + public function testListTheTagsOfASubscription(): void { $this->assertEquals([1,2], Arsse::$db->subscriptionTagsGet("john.doe@example.com", 1)); $this->assertEquals([2], Arsse::$db->subscriptionTagsGet("john.doe@example.com", 3)); $this->assertEquals(["Fascinating","Interesting"], Arsse::$db->subscriptionTagsGet("john.doe@example.com", 1, true)); $this->assertEquals(["Fascinating"], Arsse::$db->subscriptionTagsGet("john.doe@example.com", 3, true)); } - public function testListTheTagsOfAMissingSubscription():void { + public function testListTheTagsOfAMissingSubscription(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->subscriptionTagsGet($this->user, 101); } - public function testListTheTagsOfASubscriptionWithoutAuthority():void { + public function testListTheTagsOfASubscriptionWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->subscriptionTagsGet("john.doe@example.com", 1); } - public function testGetRefreshTimeOfASubscription():void { + public function testGetRefreshTimeOfASubscription(): void { $user = "john.doe@example.com"; $this->assertTime(strtotime("now + 1 hour"), Arsse::$db->subscriptionRefreshed($user)); $this->assertTime(strtotime("now - 1 hour"), Arsse::$db->subscriptionRefreshed($user, 1)); } - public function testGetRefreshTimeOfAMissingSubscription():void { + public function testGetRefreshTimeOfAMissingSubscription(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); $this->assertTime(strtotime("now - 1 hour"), Arsse::$db->subscriptionRefreshed("john.doe@example.com", 2)); } - public function testGetRefreshTimeOfASubscriptionWithoutAuthority():void { + public function testGetRefreshTimeOfASubscriptionWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); $this->assertTime(strtotime("now + 1 hour"), Arsse::$db->subscriptionRefreshed("john.doe@example.com")); diff --git a/tests/cases/Database/SeriesTag.php b/tests/cases/Database/SeriesTag.php index f2617c45..07b99fd6 100644 --- a/tests/cases/Database/SeriesTag.php +++ b/tests/cases/Database/SeriesTag.php @@ -10,7 +10,7 @@ use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Database; trait SeriesTag { - protected function setUpSeriesTag():void { + protected function setUpSeriesTag(): void { $this->data = [ 'arsse_users' => [ 'columns' => [ @@ -104,11 +104,11 @@ trait SeriesTag { $this->user = "john.doe@example.com"; } - protected function tearDownSeriesTag():void { + protected function tearDownSeriesTag(): void { unset($this->data, $this->checkTags, $this->checkMembers, $this->user); } - public function testAddATag():void { + public function testAddATag(): void { $user = "john.doe@example.com"; $tagID = $this->nextID("arsse_tags"); $this->assertSame($tagID, Arsse::$db->tagAdd($user, ['name' => "Entertaining"])); @@ -118,33 +118,33 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testAddADuplicateTag():void { + public function testAddADuplicateTag(): void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->tagAdd("john.doe@example.com", ['name' => "Interesting"]); } - public function testAddATagWithAMissingName():void { + public function testAddATagWithAMissingName(): void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->tagAdd("john.doe@example.com", []); } - public function testAddATagWithABlankName():void { + public function testAddATagWithABlankName(): void { $this->assertException("missing", "Db", "ExceptionInput"); Arsse::$db->tagAdd("john.doe@example.com", ['name' => ""]); } - public function testAddATagWithAWhitespaceName():void { + public function testAddATagWithAWhitespaceName(): void { $this->assertException("whitespace", "Db", "ExceptionInput"); Arsse::$db->tagAdd("john.doe@example.com", ['name' => " "]); } - public function testAddATagWithoutAuthority():void { + public function testAddATagWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagAdd("john.doe@example.com", ['name' => "Boring"]); } - public function testListTags():void { + public function testListTags(): void { $exp = [ ['id' => 2, 'name' => "Fascinating"], ['id' => 1, 'name' => "Interesting"], @@ -160,13 +160,13 @@ trait SeriesTag { \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "tagList"); } - public function testListTagsWithoutAuthority():void { + public function testListTagsWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagList("john.doe@example.com"); } - public function testRemoveATag():void { + public function testRemoveATag(): void { $this->assertTrue(Arsse::$db->tagRemove("john.doe@example.com", 1)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "tagRemove"); $state = $this->primeExpectations($this->data, $this->checkTags); @@ -174,7 +174,7 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testRemoveATagByName():void { + public function testRemoveATagByName(): void { $this->assertTrue(Arsse::$db->tagRemove("john.doe@example.com", "Interesting", true)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "tagRemove"); $state = $this->primeExpectations($this->data, $this->checkTags); @@ -182,33 +182,33 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testRemoveAMissingTag():void { + public function testRemoveAMissingTag(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagRemove("john.doe@example.com", 2112); } - public function testRemoveAnInvalidTag():void { + public function testRemoveAnInvalidTag(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagRemove("john.doe@example.com", -1); } - public function testRemoveAnInvalidTagByName():void { + public function testRemoveAnInvalidTagByName(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagRemove("john.doe@example.com", [], true); } - public function testRemoveATagOfTheWrongOwner():void { + public function testRemoveATagOfTheWrongOwner(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagRemove("john.doe@example.com", 3); // tag ID 3 belongs to Jane } - public function testRemoveATagWithoutAuthority():void { + public function testRemoveATagWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagRemove("john.doe@example.com", 1); } - public function testGetThePropertiesOfATag():void { + public function testGetThePropertiesOfATag(): void { $exp = [ 'id' => 2, 'name' => "Fascinating", @@ -218,37 +218,37 @@ trait SeriesTag { \Phake::verify(Arsse::$user, \Phake::times(2))->authorize("john.doe@example.com", "tagPropertiesGet"); } - public function testGetThePropertiesOfAMissingTag():void { + public function testGetThePropertiesOfAMissingTag(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesGet("john.doe@example.com", 2112); } - public function testGetThePropertiesOfAnInvalidTag():void { + public function testGetThePropertiesOfAnInvalidTag(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesGet("john.doe@example.com", -1); } - public function testGetThePropertiesOfAnInvalidTagByName():void { + public function testGetThePropertiesOfAnInvalidTagByName(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesGet("john.doe@example.com", [], true); } - public function testGetThePropertiesOfATagOfTheWrongOwner():void { + public function testGetThePropertiesOfATagOfTheWrongOwner(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesGet("john.doe@example.com", 3); // tag ID 3 belongs to Jane } - public function testGetThePropertiesOfATagWithoutAuthority():void { + public function testGetThePropertiesOfATagWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagPropertiesGet("john.doe@example.com", 1); } - public function testMakeNoChangesToATag():void { + public function testMakeNoChangesToATag(): void { $this->assertFalse(Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, [])); } - public function testRenameATag():void { + public function testRenameATag(): void { $this->assertTrue(Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, ['name' => "Curious"])); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "tagPropertiesSet"); $state = $this->primeExpectations($this->data, $this->checkTags); @@ -256,7 +256,7 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testRenameATagByName():void { + public function testRenameATagByName(): void { $this->assertTrue(Arsse::$db->tagPropertiesSet("john.doe@example.com", "Interesting", ['name' => "Curious"], true)); \Phake::verify(Arsse::$user)->authorize("john.doe@example.com", "tagPropertiesSet"); $state = $this->primeExpectations($this->data, $this->checkTags); @@ -264,53 +264,53 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testRenameATagToTheEmptyString():void { + public function testRenameATagToTheEmptyString(): void { $this->assertException("missing", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, ['name' => ""])); } - public function testRenameATagToWhitespaceOnly():void { + public function testRenameATagToWhitespaceOnly(): void { $this->assertException("whitespace", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, ['name' => " "])); } - public function testRenameATagToAnInvalidValue():void { + public function testRenameATagToAnInvalidValue(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); $this->assertTrue(Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, ['name' => []])); } - public function testCauseATagCollision():void { + public function testCauseATagCollision(): void { $this->assertException("constraintViolation", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, ['name' => "Fascinating"]); } - public function testSetThePropertiesOfAMissingTag():void { + public function testSetThePropertiesOfAMissingTag(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesSet("john.doe@example.com", 2112, ['name' => "Exciting"]); } - public function testSetThePropertiesOfAnInvalidTag():void { + public function testSetThePropertiesOfAnInvalidTag(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesSet("john.doe@example.com", -1, ['name' => "Exciting"]); } - public function testSetThePropertiesOfAnInvalidTagByName():void { + public function testSetThePropertiesOfAnInvalidTagByName(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesSet("john.doe@example.com", [], ['name' => "Exciting"], true); } - public function testSetThePropertiesOfATagForTheWrongOwner():void { + public function testSetThePropertiesOfATagForTheWrongOwner(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagPropertiesSet("john.doe@example.com", 3, ['name' => "Exciting"]); // tag ID 3 belongs to Jane } - public function testSetThePropertiesOfATagWithoutAuthority():void { + public function testSetThePropertiesOfATagWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagPropertiesSet("john.doe@example.com", 1, ['name' => "Exciting"]); } - public function testListTaggedSubscriptions():void { + public function testListTaggedSubscriptions(): void { $exp = [1,5]; $this->assertEquals($exp, Arsse::$db->tagSubscriptionsGet("john.doe@example.com", 1)); $this->assertEquals($exp, Arsse::$db->tagSubscriptionsGet("john.doe@example.com", "Interesting", true)); @@ -322,23 +322,23 @@ trait SeriesTag { $this->assertEquals($exp, Arsse::$db->tagSubscriptionsGet("john.doe@example.com", "Lonely", true)); } - public function testListTaggedSubscriptionsForAMissingTag():void { + public function testListTaggedSubscriptionsForAMissingTag(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tagSubscriptionsGet("john.doe@example.com", 3); } - public function testListTaggedSubscriptionsForAnInvalidTag():void { + public function testListTaggedSubscriptionsForAnInvalidTag(): void { $this->assertException("typeViolation", "Db", "ExceptionInput"); Arsse::$db->tagSubscriptionsGet("john.doe@example.com", -1); } - public function testListTaggedSubscriptionsWithoutAuthority():void { + public function testListTaggedSubscriptionsWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagSubscriptionsGet("john.doe@example.com", 1); } - public function testApplyATagToSubscriptions():void { + public function testApplyATagToSubscriptions(): void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", 1, [3,4]); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_tag_members']['rows'][1][2] = 1; @@ -346,14 +346,14 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testClearATagFromSubscriptions():void { + public function testClearATagFromSubscriptions(): void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", 1, [1,3], Database::ASSOC_REMOVE); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_tag_members']['rows'][0][2] = 0; $this->compareExpectations(static::$drv, $state); } - public function testApplyATagToSubscriptionsByName():void { + public function testApplyATagToSubscriptionsByName(): void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", "Interesting", [3,4], Database::ASSOC_ADD, true); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_tag_members']['rows'][1][2] = 1; @@ -361,26 +361,26 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testClearATagFromSubscriptionsByName():void { + public function testClearATagFromSubscriptionsByName(): void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", "Interesting", [1,3], Database::ASSOC_REMOVE, true); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_tag_members']['rows'][0][2] = 0; $this->compareExpectations(static::$drv, $state); } - public function testApplyATagToNoSubscriptionsByName():void { + public function testApplyATagToNoSubscriptionsByName(): void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", "Interesting", [], Database::ASSOC_ADD, true); $state = $this->primeExpectations($this->data, $this->checkMembers); $this->compareExpectations(static::$drv, $state); } - public function testClearATagFromNoSubscriptionsByName():void { + public function testClearATagFromNoSubscriptionsByName(): void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", "Interesting", [], Database::ASSOC_REMOVE, true); $state = $this->primeExpectations($this->data, $this->checkMembers); $this->compareExpectations(static::$drv, $state); } - public function testReplaceSubscriptionsOfATag():void { + public function testReplaceSubscriptionsOfATag(): void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", 1, [3,4], Database::ASSOC_REPLACE); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_tag_members']['rows'][0][2] = 0; @@ -390,7 +390,7 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testPurgeSubscriptionsOfATag():void { + public function testPurgeSubscriptionsOfATag(): void { Arsse::$db->tagSubscriptionsSet("john.doe@example.com", 1, [], Database::ASSOC_REPLACE); $state = $this->primeExpectations($this->data, $this->checkMembers); $state['arsse_tag_members']['rows'][0][2] = 0; @@ -398,13 +398,13 @@ trait SeriesTag { $this->compareExpectations(static::$drv, $state); } - public function testApplyATagToSubscriptionsWithoutAuthority():void { + public function testApplyATagToSubscriptionsWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagSubscriptionsSet("john.doe@example.com", 1, [3,4]); } - public function testSummarizeTags():void { + public function testSummarizeTags(): void { $exp = [ ['id' => 1, 'name' => "Interesting", 'subscription' => 1], ['id' => 1, 'name' => "Interesting", 'subscription' => 5], @@ -415,7 +415,7 @@ trait SeriesTag { $this->assertResult($exp, Arsse::$db->tagSummarize("john.doe@example.com")); } - public function testSummarizeTagsWithoutAuthority():void { + public function testSummarizeTagsWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tagSummarize("john.doe@example.com"); diff --git a/tests/cases/Database/SeriesToken.php b/tests/cases/Database/SeriesToken.php index ca37c1d8..8ed84e2b 100644 --- a/tests/cases/Database/SeriesToken.php +++ b/tests/cases/Database/SeriesToken.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; trait SeriesToken { - protected function setUpSeriesToken():void { + protected function setUpSeriesToken(): void { // set up the test data $past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); $future = gmdate("Y-m-d H:i:s", strtotime("now + 1 minute")); @@ -43,11 +43,11 @@ trait SeriesToken { ]; } - protected function tearDownSeriesToken():void { + protected function tearDownSeriesToken(): void { unset($this->data); } - public function testLookUpAValidToken():void { + public function testLookUpAValidToken(): void { $exp1 = [ 'id' => "80fa94c1a11f11e78667001e673b2560", 'class' => "fever.login", @@ -71,22 +71,22 @@ trait SeriesToken { $this->assertArraySubset($exp1, Arsse::$db->tokenLookup("fever.login", "80fa94c1a11f11e78667001e673b2560")); } - public function testLookUpAMissingToken():void { + public function testLookUpAMissingToken(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tokenLookup("class", "thisTokenDoesNotExist"); } - public function testLookUpAnExpiredToken():void { + public function testLookUpAnExpiredToken(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tokenLookup("fever.login", "27c6de8da13311e78667001e673b2560"); } - public function testLookUpATokenOfTheWrongClass():void { + public function testLookUpATokenOfTheWrongClass(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); Arsse::$db->tokenLookup("some.class", "80fa94c1a11f11e78667001e673b2560"); } - public function testCreateAToken():void { + public function testCreateAToken(): void { $user = "jane.doe@example.com"; $state = $this->primeExpectations($this->data, ['arsse_tokens' => ["id", "class", "expires", "user"]]); $id = Arsse::$db->tokenCreate($user, "fever.login"); @@ -100,18 +100,18 @@ trait SeriesToken { $this->compareExpectations(static::$drv, $state); } - public function testCreateATokenForAMissingUser():void { + public function testCreateATokenForAMissingUser(): void { $this->assertException("doesNotExist", "User"); Arsse::$db->tokenCreate("fever.login", "jane.doe@example.biz"); } - public function testCreateATokenWithoutAuthority():void { + public function testCreateATokenWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tokenCreate("fever.login", "jane.doe@example.com"); } - public function testRevokeAToken():void { + public function testRevokeAToken(): void { $user = "jane.doe@example.com"; $id = "80fa94c1a11f11e78667001e673b2560"; $this->assertTrue(Arsse::$db->tokenRevoke($user, "fever.login", $id)); @@ -122,7 +122,7 @@ trait SeriesToken { $this->assertFalse(Arsse::$db->tokenRevoke($user, "fever.login", $id)); } - public function testRevokeAllTokens():void { + public function testRevokeAllTokens(): void { $user = "jane.doe@example.com"; $state = $this->primeExpectations($this->data, ['arsse_tokens' => ["id", "expires", "user"]]); $this->assertTrue(Arsse::$db->tokenRevoke($user, "fever.login")); @@ -136,7 +136,7 @@ trait SeriesToken { $this->assertFalse(Arsse::$db->tokenRevoke($user, "unknown.class")); } - public function testRevokeATokenWithoutAuthority():void { + public function testRevokeATokenWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->tokenRevoke("jane.doe@example.com", "fever.login"); diff --git a/tests/cases/Database/SeriesUser.php b/tests/cases/Database/SeriesUser.php index 4a0abb39..54376600 100644 --- a/tests/cases/Database/SeriesUser.php +++ b/tests/cases/Database/SeriesUser.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; trait SeriesUser { - protected function setUpSeriesUser():void { + protected function setUpSeriesUser(): void { $this->data = [ 'arsse_users' => [ 'columns' => [ @@ -25,11 +25,11 @@ trait SeriesUser { ]; } - protected function tearDownSeriesUser():void { + protected function tearDownSeriesUser(): void { unset($this->data); } - public function testCheckThatAUserExists():void { + public function testCheckThatAUserExists(): void { $this->assertTrue(Arsse::$db->userExists("jane.doe@example.com")); $this->assertFalse(Arsse::$db->userExists("jane.doe@example.org")); \Phake::verify(Arsse::$user)->authorize("jane.doe@example.com", "userExists"); @@ -37,31 +37,31 @@ trait SeriesUser { $this->compareExpectations(static::$drv, $this->data); } - public function testCheckThatAUserExistsWithoutAuthority():void { + public function testCheckThatAUserExistsWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->userExists("jane.doe@example.com"); } - public function testGetAPassword():void { + public function testGetAPassword(): void { $hash = Arsse::$db->userPasswordGet("admin@example.net"); $this->assertSame('$2y$10$PbcG2ZR3Z8TuPzM7aHTF8.v61dtCjzjK78gdZJcp4UePE8T9jEgBW', $hash); \Phake::verify(Arsse::$user)->authorize("admin@example.net", "userPasswordGet"); $this->assertTrue(password_verify("secret", $hash)); } - public function testGetThePasswordOfAMissingUser():void { + public function testGetThePasswordOfAMissingUser(): void { $this->assertException("doesNotExist", "User"); Arsse::$db->userPasswordGet("john.doe@example.org"); } - public function testGetAPasswordWithoutAuthority():void { + public function testGetAPasswordWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->userPasswordGet("admin@example.net"); } - public function testAddANewUser():void { + public function testAddANewUser(): void { $this->assertTrue(Arsse::$db->userAdd("john.doe@example.org", "")); \Phake::verify(Arsse::$user)->authorize("john.doe@example.org", "userAdd"); $state = $this->primeExpectations($this->data, ['arsse_users' => ['id']]); @@ -69,18 +69,18 @@ trait SeriesUser { $this->compareExpectations(static::$drv, $state); } - public function testAddAnExistingUser():void { + public function testAddAnExistingUser(): void { $this->assertException("alreadyExists", "User"); Arsse::$db->userAdd("john.doe@example.com", ""); } - public function testAddANewUserWithoutAuthority():void { + public function testAddANewUserWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->userAdd("john.doe@example.org", ""); } - public function testRemoveAUser():void { + public function testRemoveAUser(): void { $this->assertTrue(Arsse::$db->userRemove("admin@example.net")); \Phake::verify(Arsse::$user)->authorize("admin@example.net", "userRemove"); $state = $this->primeExpectations($this->data, ['arsse_users' => ['id']]); @@ -88,24 +88,24 @@ trait SeriesUser { $this->compareExpectations(static::$drv, $state); } - public function testRemoveAMissingUser():void { + public function testRemoveAMissingUser(): void { $this->assertException("doesNotExist", "User"); Arsse::$db->userRemove("john.doe@example.org"); } - public function testRemoveAUserWithoutAuthority():void { + public function testRemoveAUserWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->userRemove("admin@example.net"); } - public function testListAllUsers():void { + public function testListAllUsers(): void { $users = ["admin@example.net", "jane.doe@example.com", "john.doe@example.com"]; $this->assertSame($users, Arsse::$db->userList()); \Phake::verify(Arsse::$user)->authorize("", "userList"); } - public function testListAllUsersWithoutAuthority():void { + public function testListAllUsersWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->userList(); @@ -114,7 +114,7 @@ trait SeriesUser { /** * @depends testGetAPassword */ - public function testSetAPassword():void { + public function testSetAPassword(): void { $user = "john.doe@example.com"; $pass = "secret"; $this->assertEquals("", Arsse::$db->userPasswordGet($user)); @@ -125,19 +125,19 @@ trait SeriesUser { $this->assertTrue(password_verify($pass, $hash), "Failed verifying password of $user '$pass' against hash '$hash'."); } - public function testUnsetAPassword():void { + public function testUnsetAPassword(): void { $user = "john.doe@example.com"; $this->assertEquals("", Arsse::$db->userPasswordGet($user)); $this->assertTrue(Arsse::$db->userPasswordSet($user, null)); $this->assertNull(Arsse::$db->userPasswordGet($user)); } - public function testSetThePasswordOfAMissingUser():void { + public function testSetThePasswordOfAMissingUser(): void { $this->assertException("doesNotExist", "User"); Arsse::$db->userPasswordSet("john.doe@example.org", "secret"); } - public function testSetAPasswordWithoutAuthority():void { + public function testSetAPasswordWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); Arsse::$db->userPasswordSet("john.doe@example.com", "secret"); diff --git a/tests/cases/Database/TestDatabase.php b/tests/cases/Database/TestDatabase.php index 6f2249fe..0bce9166 100644 --- a/tests/cases/Database/TestDatabase.php +++ b/tests/cases/Database/TestDatabase.php @@ -28,7 +28,7 @@ class TestDatabase extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideInClauses */ - public function testGenerateInClause(string $clause, array $values, array $inV, string $inT):void { + public function testGenerateInClause(string $clause, array $values, array $inV, string $inT): void { $types = array_fill(0, sizeof($values), $inT); $exp = [$clause, $types, $values]; $this->assertSame($exp, $this->db->generateIn($inV, $inT)); @@ -62,7 +62,7 @@ class TestDatabase extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideSearchClauses */ - public function testGenerateSearchClause(string $clause, array $values, array $inV, array $inC, bool $inAny):void { + public function testGenerateSearchClause(string $clause, array $values, array $inV, array $inC, bool $inAny): void { // this is not an exhaustive test; integration tests already cover the ins and outs of the functionality $types = array_fill(0, sizeof($values), "str"); $exp = [$clause, $types, $values]; diff --git a/tests/cases/Db/BaseDriver.php b/tests/cases/Db/BaseDriver.php index 990f4872..017deaaa 100644 --- a/tests/cases/Db/BaseDriver.php +++ b/tests/cases/Db/BaseDriver.php @@ -76,112 +76,112 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { # TESTS - public function testFetchDriverName():void { + public function testFetchDriverName(): void { $class = get_class($this->drv); $this->assertTrue(strlen($class::driverName()) > 0); } - public function testFetchSchemaId():void { + public function testFetchSchemaId(): void { $class = get_class($this->drv); $this->assertTrue(strlen($class::schemaID()) > 0); } - public function testCheckCharacterSetAcceptability():void { + public function testCheckCharacterSetAcceptability(): void { $this->assertTrue($this->drv->charsetAcceptable()); } - public function testTranslateAToken():void { + public function testTranslateAToken(): void { $this->assertRegExp("/^[a-z][a-z0-9]*$/i", $this->drv->sqlToken("greatest")); $this->assertRegExp("/^\"?[a-z][a-z0-9_\-]*\"?$/i", $this->drv->sqlToken("nocase")); $this->assertRegExp("/^[a-z][a-z0-9]*$/i", $this->drv->sqlToken("like")); $this->assertSame("distinct", $this->drv->sqlToken("distinct")); } - public function testExecAValidStatement():void { + public function testExecAValidStatement(): void { $this->assertTrue($this->drv->exec($this->create)); } - public function testExecAnInvalidStatement():void { + public function testExecAnInvalidStatement(): void { $this->assertException("engineErrorGeneral", "Db"); $this->drv->exec("And the meek shall inherit the earth..."); } - public function testExecMultipleStatements():void { + public function testExecMultipleStatements(): void { $this->assertTrue($this->drv->exec("$this->create; INSERT INTO arsse_test(id) values(2112)")); $this->assertEquals(2112, $this->query("SELECT id from arsse_test")); } - public function testExecTimeout():void { + public function testExecTimeout(): void { $this->exec($this->create); $this->exec($this->lock); $this->assertException("general", "Db", "ExceptionTimeout"); $this->drv->exec("INSERT INTO arsse_meta(\"key\", value) values('lock', '1')"); } - public function testExecConstraintViolation():void { + public function testExecConstraintViolation(): void { $this->drv->exec("CREATE TABLE arsse_test(id varchar(255) not null)"); $this->assertException("constraintViolation", "Db", "ExceptionInput"); $this->drv->exec(static::$insertDefaultValues); } - public function testExecTypeViolation():void { + public function testExecTypeViolation(): void { $this->drv->exec($this->create); $this->assertException("typeViolation", "Db", "ExceptionInput"); $this->drv->exec("INSERT INTO arsse_test(id) values('ook')"); } - public function testMakeAValidQuery():void { + public function testMakeAValidQuery(): void { $this->assertInstanceOf(Result::class, $this->drv->query("SELECT 1")); } - public function testMakeAnInvalidQuery():void { + public function testMakeAnInvalidQuery(): void { $this->assertException("engineErrorGeneral", "Db"); $this->drv->query("Apollo was astonished; Dionysus thought me mad"); } - public function testQueryConstraintViolation():void { + public function testQueryConstraintViolation(): void { $this->drv->exec("CREATE TABLE arsse_test(id integer not null)"); $this->assertException("constraintViolation", "Db", "ExceptionInput"); $this->drv->query(static::$insertDefaultValues); } - public function testQueryTypeViolation():void { + public function testQueryTypeViolation(): void { $this->drv->exec($this->create); $this->assertException("typeViolation", "Db", "ExceptionInput"); $this->drv->query("INSERT INTO arsse_test(id) values('ook')"); } - public function testPrepareAValidQuery():void { + public function testPrepareAValidQuery(): void { $s = $this->drv->prepare("SELECT ?, ?", "int", "int"); $this->assertInstanceOf(Statement::class, $s); } - public function testPrepareAnInvalidQuery():void { + public function testPrepareAnInvalidQuery(): void { $this->assertException("engineErrorGeneral", "Db"); $s = $this->drv->prepare("This is an invalid query", "int", "int")->run(); } - public function testCreateASavepoint():void { + public function testCreateASavepoint(): void { $this->assertEquals(1, $this->drv->savepointCreate()); $this->assertEquals(2, $this->drv->savepointCreate()); $this->assertEquals(3, $this->drv->savepointCreate()); } - public function testReleaseASavepoint():void { + public function testReleaseASavepoint(): void { $this->assertEquals(1, $this->drv->savepointCreate()); $this->assertEquals(true, $this->drv->savepointRelease()); $this->assertException("savepointInvalid", "Db"); $this->drv->savepointRelease(); } - public function testUndoASavepoint():void { + public function testUndoASavepoint(): void { $this->assertEquals(1, $this->drv->savepointCreate()); $this->assertEquals(true, $this->drv->savepointUndo()); $this->assertException("savepointInvalid", "Db"); $this->drv->savepointUndo(); } - public function testManipulateSavepoints():void { + public function testManipulateSavepoints(): void { $this->assertEquals(1, $this->drv->savepointCreate()); $this->assertEquals(2, $this->drv->savepointCreate()); $this->assertEquals(3, $this->drv->savepointCreate()); @@ -198,7 +198,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->drv->savepointRelease(2); } - public function testManipulateSavepointsSomeMore():void { + public function testManipulateSavepointsSomeMore(): void { $this->assertEquals(1, $this->drv->savepointCreate()); $this->assertEquals(2, $this->drv->savepointCreate()); $this->assertEquals(3, $this->drv->savepointCreate()); @@ -209,7 +209,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->drv->savepointUndo(2); } - public function testBeginATransaction():void { + public function testBeginATransaction(): void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr = $this->drv->begin(); @@ -221,7 +221,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(0, $this->query($select)); } - public function testCommitATransaction():void { + public function testCommitATransaction(): void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr = $this->drv->begin(); @@ -233,7 +233,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(1, $this->query($select)); } - public function testRollbackATransaction():void { + public function testRollbackATransaction(): void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr = $this->drv->begin(); @@ -245,7 +245,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(0, $this->query($select)); } - public function testBeginChainedTransactions():void { + public function testBeginChainedTransactions(): void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr1 = $this->drv->begin(); @@ -258,7 +258,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(0, $this->query($select)); } - public function testCommitChainedTransactions():void { + public function testCommitChainedTransactions(): void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr1 = $this->drv->begin(); @@ -275,7 +275,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(2, $this->query($select)); } - public function testCommitChainedTransactionsOutOfOrder():void { + public function testCommitChainedTransactionsOutOfOrder(): void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr1 = $this->drv->begin(); @@ -291,7 +291,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $tr2->commit(); } - public function testRollbackChainedTransactions():void { + public function testRollbackChainedTransactions(): void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr1 = $this->drv->begin(); @@ -310,7 +310,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(0, $this->query($select)); } - public function testRollbackChainedTransactionsOutOfOrder():void { + public function testRollbackChainedTransactionsOutOfOrder(): void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr1 = $this->drv->begin(); @@ -329,7 +329,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(0, $this->query($select)); } - public function testPartiallyRollbackChainedTransactions():void { + public function testPartiallyRollbackChainedTransactions(): void { $select = "SELECT count(*) FROM arsse_test"; $this->drv->exec($this->create); $tr1 = $this->drv->begin(); @@ -348,7 +348,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(1, $this->query($select)); } - public function testFetchSchemaVersion():void { + public function testFetchSchemaVersion(): void { $this->assertSame(0, $this->drv->schemaVersion()); $this->drv->exec(str_replace("#", "1", $this->setVersion)); $this->assertSame(1, $this->drv->schemaVersion()); @@ -361,7 +361,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exp, $this->drv->schemaVersion()); } - public function testLockTheDatabase():void { + public function testLockTheDatabase(): void { // PostgreSQL doesn't actually lock the whole database, only the metadata table // normally the application will first query this table to ensure the schema version is correct, // so the effect is usually the same @@ -370,7 +370,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->exec($this->lock); } - public function testUnlockTheDatabase():void { + public function testUnlockTheDatabase(): void { $this->drv->savepointCreate(true); $this->drv->savepointRelease(); $this->drv->savepointCreate(true); @@ -378,11 +378,11 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertTrue($this->exec(str_replace("#", "3", $this->setVersion))); } - public function testProduceAStringLiteral():void { + public function testProduceAStringLiteral(): void { $this->assertSame("'It''s a string!'", $this->drv->literalString("It's a string!")); } - public function testPerformMaintenance():void { + public function testPerformMaintenance(): void { // this performs maintenance in the absence of tables; see BaseUpdate.php for another test with tables $this->assertTrue($this->drv->maintenance()); } diff --git a/tests/cases/Db/BaseResult.php b/tests/cases/Db/BaseResult.php index 844b8b80..3391cf0e 100644 --- a/tests/cases/Db/BaseResult.php +++ b/tests/cases/Db/BaseResult.php @@ -46,18 +46,18 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testConstructResult():void { + public function testConstructResult(): void { $this->assertInstanceOf(Result::class, new $this->resultClass(...$this->makeResult("SELECT 1"))); } - public function testGetChangeCountAndLastInsertId():void { + public function testGetChangeCountAndLastInsertId(): void { $this->makeResult(static::$createMeta); $r = new $this->resultClass(...$this->makeResult("INSERT INTO arsse_meta(\"key\",value) values('test', 1)")); $this->assertSame(1, $r->changes()); $this->assertSame(0, $r->lastId()); } - public function testGetChangeCountAndLastInsertIdBis():void { + public function testGetChangeCountAndLastInsertIdBis(): void { $this->makeResult(static::$createTest); $r = new $this->resultClass(...$this->makeResult(static::$insertDefault)); $this->assertSame(1, $r->changes()); @@ -67,7 +67,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(2, $r->lastId()); } - public function testIterateOverResults():void { + public function testIterateOverResults(): void { $exp = [0 => 1, 1 => 2, 2 => 3]; $exp = static::$stringOutput ? $this->stringify($exp) : $exp; foreach (new $this->resultClass(...$this->makeResult("SELECT 1 as col union select 2 as col union select 3 as col")) as $index => $row) { @@ -76,7 +76,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exp, $rows); } - public function testIterateOverResultsTwice():void { + public function testIterateOverResultsTwice(): void { $exp = [0 => 1, 1 => 2, 2 => 3]; $exp = static::$stringOutput ? $this->stringify($exp) : $exp; $result = new $this->resultClass(...$this->makeResult("SELECT 1 as col union select 2 as col union select 3 as col")); @@ -90,7 +90,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testGetSingleValues():void { + public function testGetSingleValues(): void { $exp = [1867, 1970, 2112]; $exp = static::$stringOutput ? $this->stringify($exp) : $exp; $test = new $this->resultClass(...$this->makeResult("SELECT 1867 as year union all select 1970 as year union all select 2112 as year")); @@ -100,7 +100,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(null, $test->getValue()); } - public function testGetFirstValuesOnly():void { + public function testGetFirstValuesOnly(): void { $exp = [1867, 1970, 2112]; $exp = static::$stringOutput ? $this->stringify($exp) : $exp; $test = new $this->resultClass(...$this->makeResult("SELECT 1867 as year, 19 as century union all select 1970 as year, 20 as century union all select 2112 as year, 22 as century")); @@ -110,7 +110,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(null, $test->getValue()); } - public function testGetRows():void { + public function testGetRows(): void { $exp = [ ['album' => '2112', 'track' => '2112'], ['album' => 'Clockwork Angels', 'track' => 'The Wreckers'], @@ -121,7 +121,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(null, $test->getRow()); } - public function testGetAllRows():void { + public function testGetAllRows(): void { $exp = [ ['album' => '2112', 'track' => '2112'], ['album' => 'Clockwork Angels', 'track' => 'The Wreckers'], diff --git a/tests/cases/Db/BaseStatement.php b/tests/cases/Db/BaseStatement.php index 25364fdd..f2f166f8 100644 --- a/tests/cases/Db/BaseStatement.php +++ b/tests/cases/Db/BaseStatement.php @@ -46,12 +46,12 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testConstructStatement():void { + public function testConstructStatement(): void { $this->assertInstanceOf(Statement::class, new $this->statementClass(...$this->makeStatement("SELECT ? as value"))); } /** @dataProvider provideBindings */ - public function testBindATypedValue($value, string $type, string $exp):void { + public function testBindATypedValue($value, string $type, string $exp): void { if ($exp === "null") { $query = "SELECT (? is null) as pass"; } else { @@ -65,7 +65,7 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideBinaryBindings */ - public function testHandleBinaryData($value, string $type, string $exp):void { + public function testHandleBinaryData($value, string $type, string $exp): void { if (in_array(static::$implementation, ["PostgreSQL", "PDO PostgreSQL"])) { $this->markTestIncomplete("Correct handling of binary data with PostgreSQL is not currently implemented"); } @@ -81,13 +81,13 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertTrue((bool) $act); } - public function testBindMissingValue():void { + public function testBindMissingValue(): void { $s = new $this->statementClass(...$this->makeStatement("SELECT ? as value", ["int"])); $val = $s->runArray()->getRow()['value']; $this->assertSame(null, $val); } - public function testBindMultipleValues():void { + public function testBindMultipleValues(): void { $exp = [ 'one' => "A", 'two' => "B", @@ -97,7 +97,7 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exp, $val); } - public function testBindRecursively():void { + public function testBindRecursively(): void { $exp = [ 'one' => "A", 'two' => "B", @@ -109,20 +109,20 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exp, $val); } - public function testBindWithoutType():void { + public function testBindWithoutType(): void { $this->assertException("paramTypeMissing", "Db"); $s = new $this->statementClass(...$this->makeStatement("SELECT ? as value", [])); $s->runArray([1]); } - public function testViolateConstraint():void { + public function testViolateConstraint(): void { (new $this->statementClass(...$this->makeStatement("CREATE TABLE if not exists arsse_meta(\"key\" varchar(255) primary key not null, value text)")))->run(); $s = new $this->statementClass(...$this->makeStatement("INSERT INTO arsse_meta(\"key\") values(?)", ["str"])); $this->assertException("constraintViolation", "Db", "ExceptionInput"); $s->runArray([null]); } - public function testMismatchTypes():void { + public function testMismatchTypes(): void { (new $this->statementClass(...$this->makeStatement("CREATE TABLE if not exists arsse_feeds(id integer primary key not null, url text not null)")))->run(); $s = new $this->statementClass(...$this->makeStatement("INSERT INTO arsse_feeds(id,url) values(?,?)", ["str", "str"])); $this->assertException("typeViolation", "Db", "ExceptionInput"); diff --git a/tests/cases/Db/BaseUpdate.php b/tests/cases/Db/BaseUpdate.php index f9e129dd..06db9db7 100644 --- a/tests/cases/Db/BaseUpdate.php +++ b/tests/cases/Db/BaseUpdate.php @@ -58,43 +58,43 @@ class BaseUpdate extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testLoadMissingFile():void { + public function testLoadMissingFile(): void { $this->assertException("updateFileMissing", "Db"); $this->drv->schemaUpdate(1, $this->base); } - public function testLoadUnreadableFile():void { + public function testLoadUnreadableFile(): void { touch($this->path."0.sql"); chmod($this->path."0.sql", 0000); $this->assertException("updateFileUnreadable", "Db"); $this->drv->schemaUpdate(1, $this->base); } - public function testLoadCorruptFile():void { + public function testLoadCorruptFile(): void { file_put_contents($this->path."0.sql", "This is a corrupt file"); $this->assertException("updateFileError", "Db"); $this->drv->schemaUpdate(1, $this->base); } - public function testLoadIncompleteFile():void { + public function testLoadIncompleteFile(): void { file_put_contents($this->path."0.sql", "create table arsse_meta(\"key\" varchar(255) primary key not null, value text);"); $this->assertException("updateFileIncomplete", "Db"); $this->drv->schemaUpdate(1, $this->base); } - public function testLoadEmptyFile():void { + public function testLoadEmptyFile(): void { file_put_contents($this->path."0.sql", ""); $this->assertException("updateFileIncomplete", "Db"); $this->drv->schemaUpdate(1, $this->base); } - public function testLoadCorrectFile():void { + public function testLoadCorrectFile(): void { file_put_contents($this->path."0.sql", static::$minimal1); $this->drv->schemaUpdate(1, $this->base); $this->assertEquals(1, $this->drv->schemaVersion()); } - public function testPerformPartialUpdate():void { + public function testPerformPartialUpdate(): void { file_put_contents($this->path."0.sql", static::$minimal1); file_put_contents($this->path."1.sql", "UPDATE arsse_meta set value = '1' where \"key\" = 'schema_version'"); $this->assertException("updateFileIncomplete", "Db"); @@ -106,31 +106,31 @@ class BaseUpdate extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testPerformSequentialUpdate():void { + public function testPerformSequentialUpdate(): void { file_put_contents($this->path."0.sql", static::$minimal1); file_put_contents($this->path."1.sql", static::$minimal2); $this->drv->schemaUpdate(2, $this->base); $this->assertEquals(2, $this->drv->schemaVersion()); } - public function testPerformActualUpdate():void { + public function testPerformActualUpdate(): void { $this->drv->schemaUpdate(Database::SCHEMA_VERSION); $this->assertEquals(Database::SCHEMA_VERSION, $this->drv->schemaVersion()); } - public function testDeclineManualUpdate():void { + public function testDeclineManualUpdate(): void { // turn auto-updating off Arsse::$conf->dbAutoUpdate = false; $this->assertException("updateManual", "Db"); $this->drv->schemaUpdate(Database::SCHEMA_VERSION); } - public function testDeclineDowngrade():void { + public function testDeclineDowngrade(): void { $this->assertException("updateTooNew", "Db"); $this->drv->schemaUpdate(-1, $this->base); } - public function testPerformMaintenance():void { + public function testPerformMaintenance(): void { $this->drv->schemaUpdate(Database::SCHEMA_VERSION); $this->assertTrue($this->drv->maintenance()); } diff --git a/tests/cases/Db/MySQL/TestCreation.php b/tests/cases/Db/MySQL/TestCreation.php index 6b0bbdf4..2f821043 100644 --- a/tests/cases/Db/MySQL/TestCreation.php +++ b/tests/cases/Db/MySQL/TestCreation.php @@ -19,7 +19,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testFailToConnect():void { + public function testFailToConnect(): void { // for the sake of simplicity we don't distinguish between failure modes, but the MySQL-supplied error messages do self::setConf([ 'dbMySQLHost' => "example.invalid", diff --git a/tests/cases/Db/MySQL/TestStatement.php b/tests/cases/Db/MySQL/TestStatement.php index c044c03f..76c7b819 100644 --- a/tests/cases/Db/MySQL/TestStatement.php +++ b/tests/cases/Db/MySQL/TestStatement.php @@ -34,7 +34,7 @@ class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { } } - public function testBindLongString():void { + public function testBindLongString(): void { // this test requires some set-up to be effective static::$interface->query("CREATE TABLE arsse_test(`value` longtext not null) character set utf8mb4"); // we'll use an unrealistic packet size of 1 byte to trigger special handling for strings which are too long for the maximum packet size diff --git a/tests/cases/Db/MySQLPDO/TestCreation.php b/tests/cases/Db/MySQLPDO/TestCreation.php index 856e3488..b12bc8eb 100644 --- a/tests/cases/Db/MySQLPDO/TestCreation.php +++ b/tests/cases/Db/MySQLPDO/TestCreation.php @@ -19,7 +19,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testFailToConnect():void { + public function testFailToConnect(): void { // for the sake of simplicity we don't distinguish between failure modes, but the MySQL-supplied error messages do self::setConf([ 'dbMySQLHost' => "example.invalid", diff --git a/tests/cases/Db/PostgreSQL/TestCreation.php b/tests/cases/Db/PostgreSQL/TestCreation.php index fcfea3fe..7b3dd761 100644 --- a/tests/cases/Db/PostgreSQL/TestCreation.php +++ b/tests/cases/Db/PostgreSQL/TestCreation.php @@ -20,7 +20,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideConnectionStrings */ - public function testGenerateConnectionString(bool $pdo, string $user, string $pass, string $db, string $host, int $port, string $service, string $exp):void { + public function testGenerateConnectionString(bool $pdo, string $user, string $pass, string $db, string $host, int $port, string $service, string $exp): void { self::setConf(); $timeout = (string) ceil(Arsse::$conf->dbTimeoutConnect ?? 0); $postfix = "application_name='arsse' client_encoding='UTF8' connect_timeout='$timeout'"; @@ -62,7 +62,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testFailToConnect():void { + public function testFailToConnect(): void { // we cannnot distinguish between different connection failure modes self::setConf([ 'dbPostgreSQLHost' => "example.invalid", diff --git a/tests/cases/Db/PostgreSQLPDO/TestCreation.php b/tests/cases/Db/PostgreSQLPDO/TestCreation.php index 003dbe52..a3916403 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestCreation.php +++ b/tests/cases/Db/PostgreSQLPDO/TestCreation.php @@ -20,7 +20,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideConnectionStrings */ - public function testGenerateConnectionString(bool $pdo, string $user, string $pass, string $db, string $host, int $port, string $service, string $exp):void { + public function testGenerateConnectionString(bool $pdo, string $user, string $pass, string $db, string $host, int $port, string $service, string $exp): void { self::setConf(); $timeout = (string) ceil(Arsse::$conf->dbTimeoutConnect ?? 0); $postfix = "application_name='arsse' client_encoding='UTF8' connect_timeout='$timeout'"; @@ -62,7 +62,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testFailToConnect():void { + public function testFailToConnect(): void { // PDO dies not distinguish between different connection failure modes self::setConf([ 'dbPostgreSQLHost' => "example.invalid", diff --git a/tests/cases/Db/SQLite3/TestCreation.php b/tests/cases/Db/SQLite3/TestCreation.php index 2eef1f31..ecb942f3 100644 --- a/tests/cases/Db/SQLite3/TestCreation.php +++ b/tests/cases/Db/SQLite3/TestCreation.php @@ -112,79 +112,79 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testFailToCreateDatabase():void { + public function testFailToCreateDatabase(): void { Arsse::$conf->dbSQLite3File = $this->path."Cmain/arsse.db"; $this->assertException("fileUncreatable", "Db"); new Driver; } - public function testFailToCreateJournal():void { + public function testFailToCreateJournal(): void { Arsse::$conf->dbSQLite3File = $this->path."Cwal/arsse.db"; $this->assertException("fileUncreatable", "Db"); new Driver; } - public function testFailToCreateSharedMmeory():void { + public function testFailToCreateSharedMmeory(): void { Arsse::$conf->dbSQLite3File = $this->path."Cshm/arsse.db"; $this->assertException("fileUncreatable", "Db"); new Driver; } - public function testFailToReadDatabase():void { + public function testFailToReadDatabase(): void { Arsse::$conf->dbSQLite3File = $this->path."Rmain/arsse.db"; $this->assertException("fileUnreadable", "Db"); new Driver; } - public function testFailToReadJournal():void { + public function testFailToReadJournal(): void { Arsse::$conf->dbSQLite3File = $this->path."Rwal/arsse.db"; $this->assertException("fileUnreadable", "Db"); new Driver; } - public function testFailToReadSharedMmeory():void { + public function testFailToReadSharedMmeory(): void { Arsse::$conf->dbSQLite3File = $this->path."Rshm/arsse.db"; $this->assertException("fileUnreadable", "Db"); new Driver; } - public function testFailToWriteToDatabase():void { + public function testFailToWriteToDatabase(): void { Arsse::$conf->dbSQLite3File = $this->path."Wmain/arsse.db"; $this->assertException("fileUnwritable", "Db"); new Driver; } - public function testFailToWriteToJournal():void { + public function testFailToWriteToJournal(): void { Arsse::$conf->dbSQLite3File = $this->path."Wwal/arsse.db"; $this->assertException("fileUnwritable", "Db"); new Driver; } - public function testFailToWriteToSharedMmeory():void { + public function testFailToWriteToSharedMmeory(): void { Arsse::$conf->dbSQLite3File = $this->path."Wshm/arsse.db"; $this->assertException("fileUnwritable", "Db"); new Driver; } - public function testFailToAccessDatabase():void { + public function testFailToAccessDatabase(): void { Arsse::$conf->dbSQLite3File = $this->path."Amain/arsse.db"; $this->assertException("fileUnusable", "Db"); new Driver; } - public function testFailToAccessJournal():void { + public function testFailToAccessJournal(): void { Arsse::$conf->dbSQLite3File = $this->path."Awal/arsse.db"; $this->assertException("fileUnusable", "Db"); new Driver; } - public function testFailToAccessSharedMmeory():void { + public function testFailToAccessSharedMmeory(): void { Arsse::$conf->dbSQLite3File = $this->path."Ashm/arsse.db"; $this->assertException("fileUnusable", "Db"); new Driver; } - public function testAssumeDatabaseCorruption():void { + public function testAssumeDatabaseCorruption(): void { Arsse::$conf->dbSQLite3File = $this->path."corrupt/arsse.db"; $this->assertException("fileCorrupt", "Db"); new Driver; diff --git a/tests/cases/Db/SQLite3PDO/TestCreation.php b/tests/cases/Db/SQLite3PDO/TestCreation.php index dde9dd7b..50e2fe25 100644 --- a/tests/cases/Db/SQLite3PDO/TestCreation.php +++ b/tests/cases/Db/SQLite3PDO/TestCreation.php @@ -114,79 +114,79 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testFailToCreateDatabase():void { + public function testFailToCreateDatabase(): void { Arsse::$conf->dbSQLite3File = $this->path."Cmain/arsse.db"; $this->assertException("fileUncreatable", "Db"); new Driver; } - public function testFailToCreateJournal():void { + public function testFailToCreateJournal(): void { Arsse::$conf->dbSQLite3File = $this->path."Cwal/arsse.db"; $this->assertException("fileUncreatable", "Db"); new Driver; } - public function testFailToCreateSharedMmeory():void { + public function testFailToCreateSharedMmeory(): void { Arsse::$conf->dbSQLite3File = $this->path."Cshm/arsse.db"; $this->assertException("fileUncreatable", "Db"); new Driver; } - public function testFailToReadDatabase():void { + public function testFailToReadDatabase(): void { Arsse::$conf->dbSQLite3File = $this->path."Rmain/arsse.db"; $this->assertException("fileUnreadable", "Db"); new Driver; } - public function testFailToReadJournal():void { + public function testFailToReadJournal(): void { Arsse::$conf->dbSQLite3File = $this->path."Rwal/arsse.db"; $this->assertException("fileUnreadable", "Db"); new Driver; } - public function testFailToReadSharedMmeory():void { + public function testFailToReadSharedMmeory(): void { Arsse::$conf->dbSQLite3File = $this->path."Rshm/arsse.db"; $this->assertException("fileUnreadable", "Db"); new Driver; } - public function testFailToWriteToDatabase():void { + public function testFailToWriteToDatabase(): void { Arsse::$conf->dbSQLite3File = $this->path."Wmain/arsse.db"; $this->assertException("fileUnwritable", "Db"); new Driver; } - public function testFailToWriteToJournal():void { + public function testFailToWriteToJournal(): void { Arsse::$conf->dbSQLite3File = $this->path."Wwal/arsse.db"; $this->assertException("fileUnwritable", "Db"); new Driver; } - public function testFailToWriteToSharedMmeory():void { + public function testFailToWriteToSharedMmeory(): void { Arsse::$conf->dbSQLite3File = $this->path."Wshm/arsse.db"; $this->assertException("fileUnwritable", "Db"); new Driver; } - public function testFailToAccessDatabase():void { + public function testFailToAccessDatabase(): void { Arsse::$conf->dbSQLite3File = $this->path."Amain/arsse.db"; $this->assertException("fileUnusable", "Db"); new Driver; } - public function testFailToAccessJournal():void { + public function testFailToAccessJournal(): void { Arsse::$conf->dbSQLite3File = $this->path."Awal/arsse.db"; $this->assertException("fileUnusable", "Db"); new Driver; } - public function testFailToAccessSharedMmeory():void { + public function testFailToAccessSharedMmeory(): void { Arsse::$conf->dbSQLite3File = $this->path."Ashm/arsse.db"; $this->assertException("fileUnusable", "Db"); new Driver; } - public function testAssumeDatabaseCorruption():void { + public function testAssumeDatabaseCorruption(): void { Arsse::$conf->dbSQLite3File = $this->path."corrupt/arsse.db"; $this->assertException("fileCorrupt", "Db"); new Driver; diff --git a/tests/cases/Db/TestResultAggregate.php b/tests/cases/Db/TestResultAggregate.php index 0dad2194..2ce69cdd 100644 --- a/tests/cases/Db/TestResultAggregate.php +++ b/tests/cases/Db/TestResultAggregate.php @@ -7,7 +7,7 @@ use JKingWeb\Arsse\Test\Result; /** @covers \JKingWeb\Arsse\Db\ResultAggregate */ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { - public function testGetChangeCountAndLastInsertId():void { + public function testGetChangeCountAndLastInsertId(): void { $in = [ new Result([], 3, 4), new Result([], 27, 10), @@ -18,7 +18,7 @@ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals(2112, $r->lastId()); } - public function testIterateOverResults():void { + public function testIterateOverResults(): void { $in = [ new Result([['col' => 1]]), new Result([['col' => 2]]), @@ -31,7 +31,7 @@ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals([0 => 1, 1 => 2, 2 => 3], $rows); } - public function testIterateOverResultsTwice():void { + public function testIterateOverResultsTwice(): void { $in = [ new Result([['col' => 1]]), new Result([['col' => 2]]), @@ -49,7 +49,7 @@ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testGetSingleValues():void { + public function testGetSingleValues(): void { $test = new ResultAggregate(...[ new Result([['year' => 1867]]), new Result([['year' => 1970]]), @@ -61,7 +61,7 @@ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(null, $test->getValue()); } - public function testGetFirstValuesOnly():void { + public function testGetFirstValuesOnly(): void { $test = new ResultAggregate(...[ new Result([['year' => 1867, 'century' => 19]]), new Result([['year' => 1970, 'century' => 20]]), @@ -73,7 +73,7 @@ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(null, $test->getValue()); } - public function testGetRows():void { + public function testGetRows(): void { $test = new ResultAggregate(...[ new Result([['album' => '2112', 'track' => '2112']]), new Result([['album' => 'Clockwork Angels', 'track' => 'The Wreckers']]), @@ -87,7 +87,7 @@ class TestResultAggregate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(null, $test->getRow()); } - public function testGetAllRows():void { + public function testGetAllRows(): void { $test = new ResultAggregate(...[ new Result([['album' => '2112', 'track' => '2112']]), new Result([['album' => 'Clockwork Angels', 'track' => 'The Wreckers']]), diff --git a/tests/cases/Db/TestResultEmpty.php b/tests/cases/Db/TestResultEmpty.php index c9a799f9..0386c976 100644 --- a/tests/cases/Db/TestResultEmpty.php +++ b/tests/cases/Db/TestResultEmpty.php @@ -6,13 +6,13 @@ use JKingWeb\Arsse\Db\ResultEmpty; /** @covers \JKingWeb\Arsse\Db\ResultEmpty */ class TestResultEmpty extends \JKingWeb\Arsse\Test\AbstractTest { - public function testGetChangeCountAndLastInsertId():void { + public function testGetChangeCountAndLastInsertId(): void { $r = new ResultEmpty; $this->assertEquals(0, $r->changes()); $this->assertEquals(0, $r->lastId()); } - public function testIterateOverResults():void { + public function testIterateOverResults(): void { $rows = []; foreach (new ResultEmpty as $index => $row) { $rows[$index] = $row['col']; @@ -20,17 +20,17 @@ class TestResultEmpty extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals([], $rows); } - public function testGetSingleValues():void { + public function testGetSingleValues(): void { $test = new ResultEmpty; $this->assertSame(null, $test->getValue()); } - public function testGetRows():void { + public function testGetRows(): void { $test = new ResultEmpty; $this->assertSame(null, $test->getRow()); } - public function testGetAllRows():void { + public function testGetAllRows(): void { $test = new ResultEmpty; $rows = []; $this->assertEquals($rows, $test->getAll()); diff --git a/tests/cases/Db/TestTransaction.php b/tests/cases/Db/TestTransaction.php index 5c045c82..6b8aed58 100644 --- a/tests/cases/Db/TestTransaction.php +++ b/tests/cases/Db/TestTransaction.php @@ -23,7 +23,7 @@ class TestTransaction extends \JKingWeb\Arsse\Test\AbstractTest { $this->drv = $drv; } - public function testManipulateTransactions():void { + public function testManipulateTransactions(): void { $tr1 = new Transaction($this->drv); $tr2 = new Transaction($this->drv); \Phake::verify($this->drv, \Phake::times(2))->savepointCreate; @@ -35,7 +35,7 @@ class TestTransaction extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify($this->drv)->savepointUndo(2); } - public function testCloseTransactions():void { + public function testCloseTransactions(): void { $tr1 = new Transaction($this->drv); $tr2 = new Transaction($this->drv); $this->assertTrue($tr1->isPending()); @@ -50,7 +50,7 @@ class TestTransaction extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify($this->drv)->savepointUndo(2); } - public function testIgnoreRollbackErrors():void { + public function testIgnoreRollbackErrors(): void { \Phake::when($this->drv)->savepointUndo->thenThrow(new Exception("savepointStale")); $tr1 = new Transaction($this->drv); $tr2 = new Transaction($this->drv); diff --git a/tests/cases/Exception/TestException.php b/tests/cases/Exception/TestException.php index 4c888a67..66a1f3a8 100644 --- a/tests/cases/Exception/TestException.php +++ b/tests/cases/Exception/TestException.php @@ -28,7 +28,7 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(true); } - public function testBaseClass():void { + public function testBaseClass(): void { $this->assertException("unknown"); throw new Exception("unknown"); } @@ -36,7 +36,7 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testBaseClass */ - public function testBaseClassWithoutMessage():void { + public function testBaseClassWithoutMessage(): void { $this->assertException("unknown"); throw new Exception(); } @@ -44,7 +44,7 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testBaseClass */ - public function testDerivedClass():void { + public function testDerivedClass(): void { $this->assertException("fileMissing", "Lang"); throw new LangException("fileMissing"); } @@ -52,7 +52,7 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testDerivedClass */ - public function testDerivedClassWithMessageParameters():void { + public function testDerivedClassWithMessageParameters(): void { $this->assertException("fileMissing", "Lang"); throw new LangException("fileMissing", "en"); } @@ -60,7 +60,7 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testBaseClass */ - public function testBaseClassWithUnknownCode():void { + public function testBaseClassWithUnknownCode(): void { $this->assertException("uncoded"); throw new Exception("testThisExceptionMessageDoesNotExist"); } @@ -68,13 +68,13 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testBaseClassWithUnknownCode */ - public function testDerivedClassWithMissingMessage():void { + public function testDerivedClassWithMissingMessage(): void { $this->assertException("uncoded"); throw new LangException("testThisExceptionMessageDoesNotExist"); } /** @covers \JKingWeb\Arsse\ExceptionFatal */ - public function testFatalException():void { + public function testFatalException(): void { $this->expectException('JKingWeb\Arsse\ExceptionFatal'); throw new \JKingWeb\Arsse\ExceptionFatal(""); } diff --git a/tests/cases/Feed/TestFeed.php b/tests/cases/Feed/TestFeed.php index e6962c54..e86628d3 100644 --- a/tests/cases/Feed/TestFeed.php +++ b/tests/cases/Feed/TestFeed.php @@ -98,7 +98,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { Arsse::$db = \Phake::mock(Database::class); } - public function testParseAFeed():void { + public function testParseAFeed(): void { // test that various properties are set on the feed and on items $f = new Feed(null, $this->base."Parsing/Valid"); $this->assertTrue(isset($f->lastModified)); @@ -141,37 +141,37 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($categories, $f->data->items[5]->categories); } - public function testDiscoverAFeedSuccessfully():void { + public function testDiscoverAFeedSuccessfully(): void { $this->assertSame($this->base."Discovery/Feed", Feed::discover($this->base."Discovery/Valid")); $this->assertSame($this->base."Discovery/Feed", Feed::discover($this->base."Discovery/Feed")); } - public function testDiscoverAFeedUnsuccessfully():void { + public function testDiscoverAFeedUnsuccessfully(): void { $this->assertException("subscriptionNotFound", "Feed"); Feed::discover($this->base."Discovery/Invalid"); } - public function testParseEntityExpansionAttack():void { + public function testParseEntityExpansionAttack(): void { $this->assertException("xmlEntity", "Feed"); new Feed(null, $this->base."Parsing/XEEAttack"); } - public function testParseExternalEntityAttack():void { + public function testParseExternalEntityAttack(): void { $this->assertException("xmlEntity", "Feed"); new Feed(null, $this->base."Parsing/XXEAttack"); } - public function testParseAnUnsupportedFeed():void { + public function testParseAnUnsupportedFeed(): void { $this->assertException("unsupportedFeedFormat", "Feed"); new Feed(null, $this->base."Parsing/Unsupported"); } - public function testParseAMalformedFeed():void { + public function testParseAMalformedFeed(): void { $this->assertException("malformedXml", "Feed"); new Feed(null, $this->base."Parsing/Malformed"); } - public function testDeduplicateFeedItems():void { + public function testDeduplicateFeedItems(): void { // duplicates with dates lead to the newest match being kept $t = strtotime("2002-05-19T15:21:36Z"); $f = new Feed(null, $this->base."Deduplication/Permalink-Dates"); @@ -198,7 +198,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame("http://example.com/1", $f->newItems[0]->url); } - public function testHandleCacheHeadersOn304():void { + public function testHandleCacheHeadersOn304(): void { // upon 304, the client should re-use the caching header values it supplied the server $t = time(); $e = "78567a"; @@ -216,7 +216,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($e, $f->resource->getETag()); } - public function testHandleCacheHeadersOn200():void { + public function testHandleCacheHeadersOn200(): void { // these tests should trust the server-returned time, even in cases of obviously incorrect results $t = time() - 2000; $f = new Feed(null, $this->base."Caching/200Past"); @@ -244,7 +244,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertTime($t, $f->lastModified); } - public function testComputeNextFetchOnError():void { + public function testComputeNextFetchOnError(): void { for ($a = 0; $a < 100; $a++) { if ($a < 3) { $this->assertTime("now + 5 minutes", Feed::nextFetchOnError($a)); @@ -257,7 +257,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provide304Timestamps */ - public function testComputeNextFetchFrom304(string $t, string $exp):void { + public function testComputeNextFetchFrom304(string $t, string $exp): void { $t = $t ? strtotime($t) : ""; $f = new Feed(null, $this->base."NextFetch/NotModified?t=$t", Date::transform($t, "http")); $exp = strtotime($exp); @@ -279,13 +279,13 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testComputeNextFetchFrom304WithoutDate():void { + public function testComputeNextFetchFrom304WithoutDate(): void { $f = new Feed(null, $this->base."NextFetch/NotModifiedEtag"); $exp = strtotime("now + 3 hours"); $this->assertTime($exp, $f->nextFetch); } - public function testComputeNextFetchFrom200():void { + public function testComputeNextFetchFrom200(): void { // if less than half an hour, check in 15 minutes $f = new Feed(null, $this->base."NextFetch/30m"); $exp = strtotime("now + 15 minutes"); @@ -312,7 +312,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertTime($exp, $f->nextFetch); } - public function testMatchLatestArticles():void { + public function testMatchLatestArticles(): void { \Phake::when(Arsse::$db)->feedMatchLatest(1, $this->anything())->thenReturn(new Result($this->latest)); $f = new Feed(1, $this->base."Matching/1"); $this->assertCount(0, $f->newItems); @@ -328,7 +328,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertCount(2, $f->changedItems); } - public function testMatchHistoricalArticles():void { + public function testMatchHistoricalArticles(): void { \Phake::when(Arsse::$db)->feedMatchLatest(1, $this->anything())->thenReturn(new Result($this->latest)); \Phake::when(Arsse::$db)->feedMatchIds(1, $this->anything(), $this->anything(), $this->anything(), $this->anything())->thenReturn(new Result($this->others)); $f = new Feed(1, $this->base."Matching/5"); @@ -336,7 +336,7 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertCount(0, $f->changedItems); } - public function testScrapeFullContent():void { + public function testScrapeFullContent(): void { // first make sure that the absence of scraping works as expected $f = new Feed(null, $this->base."Scraping/Feed"); $exp = "

Partial content

"; diff --git a/tests/cases/Feed/TestFetching.php b/tests/cases/Feed/TestFetching.php index 05b79b40..573c7e96 100644 --- a/tests/cases/Feed/TestFetching.php +++ b/tests/cases/Feed/TestFetching.php @@ -27,48 +27,48 @@ class TestFetching extends \JKingWeb\Arsse\Test\AbstractTest { self::setConf(); } - public function testHandle400():void { + public function testHandle400(): void { $this->assertException("unsupportedFeedFormat", "Feed"); new Feed(null, $this->base."Fetching/Error?code=400"); } - public function testHandle401():void { + public function testHandle401(): void { $this->assertException("unauthorized", "Feed"); new Feed(null, $this->base."Fetching/Error?code=401"); } - public function testHandle403():void { + public function testHandle403(): void { $this->assertException("forbidden", "Feed"); new Feed(null, $this->base."Fetching/Error?code=403"); } - public function testHandle404():void { + public function testHandle404(): void { $this->assertException("invalidUrl", "Feed"); new Feed(null, $this->base."Fetching/Error?code=404"); } - public function testHandle500():void { + public function testHandle500(): void { $this->assertException("unsupportedFeedFormat", "Feed"); new Feed(null, $this->base."Fetching/Error?code=500"); } - public function testHandleARedirectLoop():void { + public function testHandleARedirectLoop(): void { $this->assertException("maxRedirect", "Feed"); new Feed(null, $this->base."Fetching/EndlessLoop?i=0"); } - public function testHandleAnOverlyLargeFeed():void { + public function testHandleAnOverlyLargeFeed(): void { Arsse::$conf->fetchSizeLimit = 512; $this->assertException("maxSize", "Feed"); new Feed(null, $this->base."Fetching/TooLarge"); } - public function testHandleACertificateError():void { + public function testHandleACertificateError(): void { $this->assertException("invalidCertificate", "Feed"); new Feed(null, "https://localhost:8000/"); } - public function testHandleATimeout():void { + public function testHandleATimeout(): void { Arsse::$conf->fetchTimeout = 1; $this->assertException("timeout", "Feed"); new Feed(null, $this->base."Fetching/Timeout"); diff --git a/tests/cases/ImportExport/TestFile.php b/tests/cases/ImportExport/TestFile.php index 36b45b57..bbffca67 100644 --- a/tests/cases/ImportExport/TestFile.php +++ b/tests/cases/ImportExport/TestFile.php @@ -45,7 +45,7 @@ class TestFile extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideFileExports */ - public function testExportToAFile(string $file, string $user, bool $flat, $exp):void { + public function testExportToAFile(string $file, string $user, bool $flat, $exp): void { $path = $this->path.$file; try { if ($exp instanceof \JKingWeb\Arsse\AbstractException) { @@ -84,7 +84,7 @@ class TestFile extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideFileImports */ - public function testImportFromAFile(string $file, string $user, bool $flat, bool $replace, $exp):void { + public function testImportFromAFile(string $file, string $user, bool $flat, bool $replace, $exp): void { $path = $this->path.$file; try { if ($exp instanceof \JKingWeb\Arsse\AbstractException) { diff --git a/tests/cases/ImportExport/TestImportExport.php b/tests/cases/ImportExport/TestImportExport.php index 269b3515..ee8830c3 100644 --- a/tests/cases/ImportExport/TestImportExport.php +++ b/tests/cases/ImportExport/TestImportExport.php @@ -146,13 +146,13 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testImportForAMissingUser():void { + public function testImportForAMissingUser(): void { \Phake::when(Arsse::$user)->exists->thenReturn(false); $this->assertException("doesNotExist", "User"); $this->proc->import("john.doe@example.com", "", false, false); } - public function testImportWithInvalidFolder():void { + public function testImportWithInvalidFolder(): void { $in = [[ ], [1 => ['id' => 1, 'name' => "", 'parent' => 0], @@ -162,7 +162,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { $this->proc->import("john.doe@example.com", "", false, false); } - public function testImportWithDuplicateFolder():void { + public function testImportWithDuplicateFolder(): void { $in = [[ ], [1 => ['id' => 1, 'name' => "New", 'parent' => 0], @@ -173,7 +173,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { $this->proc->import("john.doe@example.com", "", false, false); } - public function testMakeNoEffectiveChanges():void { + public function testMakeNoEffectiveChanges(): void { $in = [[ ['url' => "http://localhost:8000/Import/nasa-jpl", 'title' => "NASA JPL", 'folder' => 3, 'tags' => ["tech"]], ['url' => "http://localhost:8000/Import/ars", 'title' => "Ars Technica", 'folder' => 2, 'tags' => ["frequent", "tech"]], @@ -197,7 +197,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { $this->compareExpectations($this->drv, $exp); } - public function testModifyASubscription():void { + public function testModifyASubscription(): void { $in = [[ ['url' => "http://localhost:8000/Import/nasa-jpl", 'title' => "NASA JPL", 'folder' => 3, 'tags' => ["tech"]], ['url' => "http://localhost:8000/Import/ars", 'title' => "Ars Technica", 'folder' => 2, 'tags' => ["frequent", "tech"]], @@ -222,7 +222,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { $this->compareExpectations($this->drv, $exp); } - public function testImportAFeed():void { + public function testImportAFeed(): void { $in = [[ ['url' => "http://localhost:8000/Import/some-feed", 'title' => "Some Feed", 'folder' => 0, 'tags' => ["frequent", "cryptic"]], //one existing tag and one new one ], []]; @@ -237,7 +237,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { $this->compareExpectations($this->drv, $exp); } - public function testImportAFeedWithAnInvalidTag():void { + public function testImportAFeedWithAnInvalidTag(): void { $in = [[ ['url' => "http://localhost:8000/Import/some-feed", 'title' => "Some Feed", 'folder' => 0, 'tags' => [""]], ], []]; @@ -246,7 +246,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { $this->proc->import("john.doe@example.com", "", false, false); } - public function testReplaceData():void { + public function testReplaceData(): void { $in = [[ ['url' => "http://localhost:8000/Import/some-feed", 'title' => "Some Feed", 'folder' => 1, 'tags' => ["frequent", "cryptic"]], ], [1 => diff --git a/tests/cases/ImportExport/TestOPML.php b/tests/cases/ImportExport/TestOPML.php index 294da40f..234d6b5c 100644 --- a/tests/cases/ImportExport/TestOPML.php +++ b/tests/cases/ImportExport/TestOPML.php @@ -86,28 +86,28 @@ OPML_EXPORT_SERIALIZATION; \Phake::when(Arsse::$user)->exists->thenReturn(true); } - public function testExportToOpml():void { + public function testExportToOpml(): void { \Phake::when(Arsse::$db)->folderList("john.doe@example.com")->thenReturn(new Result($this->folders)); \Phake::when(Arsse::$db)->subscriptionList("john.doe@example.com")->thenReturn(new Result($this->subscriptions)); \Phake::when(Arsse::$db)->tagSummarize("john.doe@example.com")->thenReturn(new Result($this->tags)); $this->assertXmlStringEqualsXmlString($this->serialization, (new OPML)->export("john.doe@example.com")); } - public function testExportToFlatOpml():void { + public function testExportToFlatOpml(): void { \Phake::when(Arsse::$db)->folderList("john.doe@example.com")->thenReturn(new Result($this->folders)); \Phake::when(Arsse::$db)->subscriptionList("john.doe@example.com")->thenReturn(new Result($this->subscriptions)); \Phake::when(Arsse::$db)->tagSummarize("john.doe@example.com")->thenReturn(new Result($this->tags)); $this->assertXmlStringEqualsXmlString($this->serializationFlat, (new OPML)->export("john.doe@example.com", true)); } - public function testExportToOpmlAMissingUser():void { + public function testExportToOpmlAMissingUser(): void { \Phake::when(Arsse::$user)->exists->thenReturn(false); $this->assertException("doesNotExist", "User"); (new OPML)->export("john.doe@example.com"); } /** @dataProvider provideParserData */ - public function testParseOpmlForImport(string $file, bool $flat, $exp):void { + public function testParseOpmlForImport(string $file, bool $flat, $exp): void { $data = file_get_contents(\JKingWeb\Arsse\DOCROOT."Import/OPML/$file"); // set up a partial mock to make the ImportExport::parse() method visible $parser = \Phake::makeVisible(\Phake::partialMock(OPML::class)); diff --git a/tests/cases/Lang/TestBasic.php b/tests/cases/Lang/TestBasic.php index 16bec4b6..ff55b538 100644 --- a/tests/cases/Lang/TestBasic.php +++ b/tests/cases/Lang/TestBasic.php @@ -16,14 +16,14 @@ class TestBasic extends \JKingWeb\Arsse\Test\AbstractTest { public $path; public $l; - public function testListLanguages():void { + public function testListLanguages(): void { $this->assertCount(sizeof($this->files), $this->l->list("en")); } /** * @depends testListLanguages */ - public function testSetLanguage():void { + public function testSetLanguage(): void { $this->assertEquals("en", $this->l->set("en")); $this->assertEquals("en_ca", $this->l->set("en_ca")); $this->assertEquals("de", $this->l->set("de_ch")); @@ -36,7 +36,7 @@ class TestBasic extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testSetLanguage */ - public function testLoadInternalStrings():void { + public function testLoadInternalStrings(): void { $this->assertEquals("", $this->l->set("", true)); $this->assertCount(sizeof(TestClass::REQUIRED), $this->l->dump()); } @@ -44,7 +44,7 @@ class TestBasic extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testLoadInternalStrings */ - public function testLoadDefaultLanguage():void { + public function testLoadDefaultLanguage(): void { $this->assertEquals(TestClass::DEFAULT, $this->l->set(TestClass::DEFAULT, true)); $str = $this->l->dump(); $this->assertArrayHasKey('Exception.JKingWeb/Arsse/Exception.uncoded', $str); @@ -54,7 +54,7 @@ class TestBasic extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testLoadDefaultLanguage */ - public function testLoadSupplementaryLanguage():void { + public function testLoadSupplementaryLanguage(): void { $this->l->set(TestClass::DEFAULT, true); $this->assertEquals("ja", $this->l->set("ja", true)); $str = $this->l->dump(); diff --git a/tests/cases/Lang/TestComplex.php b/tests/cases/Lang/TestComplex.php index 7de2bf40..9697c237 100644 --- a/tests/cases/Lang/TestComplex.php +++ b/tests/cases/Lang/TestComplex.php @@ -16,11 +16,11 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { public $path; public $l; - public function setUpSeries():void { + public function setUpSeries(): void { $this->l->set(TestClass::DEFAULT, true); } - public function testLazyLoad():void { + public function testLazyLoad(): void { $this->l->set("ja"); $this->assertArrayNotHasKey('Test.absentText', $this->l->dump()); } @@ -28,14 +28,14 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testLazyLoad */ - public function testGetWantedAndLoadedLocale():void { + public function testGetWantedAndLoadedLocale(): void { $this->l->set("en", true); $this->l->set("ja"); $this->assertEquals("ja", $this->l->get()); $this->assertEquals("en", $this->l->get(true)); } - public function testLoadCascadeOfFiles():void { + public function testLoadCascadeOfFiles(): void { $this->l->set("ja", true); $this->assertEquals("de", $this->l->set("de", true)); $str = $this->l->dump(); @@ -46,11 +46,11 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testLoadCascadeOfFiles */ - public function testLoadSubtag():void { + public function testLoadSubtag(): void { $this->assertEquals("en_ca", $this->l->set("en_ca", true)); } - public function testFetchAMessage():void { + public function testFetchAMessage(): void { $this->l->set("de"); $this->assertEquals('und der Stein der Weisen', $this->l->msg('Test.presentText')); } @@ -58,7 +58,7 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testFetchAMessage */ - public function testFetchAMessageWithMissingParameters():void { + public function testFetchAMessageWithMissingParameters(): void { $this->l->set("en_ca", true); $this->assertEquals('{0} and {1}', $this->l->msg('Test.presentText')); } @@ -66,7 +66,7 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testFetchAMessage */ - public function testFetchAMessageWithSingleNumericParameter():void { + public function testFetchAMessageWithSingleNumericParameter(): void { $this->l->set("en_ca", true); $this->assertEquals('Default language file "en" missing', $this->l->msg('Exception.JKingWeb/Arsse/Lang/Exception.defaultFileMissing', TestClass::DEFAULT)); } @@ -74,7 +74,7 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testFetchAMessage */ - public function testFetchAMessageWithMultipleNumericParameters():void { + public function testFetchAMessageWithMultipleNumericParameters(): void { $this->l->set("en_ca", true); $this->assertEquals('Happy Rotter and the Philosopher\'s Stone', $this->l->msg('Test.presentText', ['Happy Rotter', 'the Philosopher\'s Stone'])); } @@ -82,14 +82,14 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testFetchAMessage */ - public function testFetchAMessageWithNamedParameters():void { + public function testFetchAMessageWithNamedParameters(): void { $this->assertEquals('Message string "Test.absentText" missing from all loaded language files (en)', $this->l->msg('Exception.JKingWeb/Arsse/Lang/Exception.stringMissing', ['msgID' => 'Test.absentText', 'fileList' => 'en'])); } /** * @depends testFetchAMessage */ - public function testReloadDefaultStrings():void { + public function testReloadDefaultStrings(): void { $this->l->set("de", true); $this->l->set("en", true); $this->assertEquals('and the Philosopher\'s Stone', $this->l->msg('Test.presentText')); @@ -98,7 +98,7 @@ class TestComplex extends \JKingWeb\Arsse\Test\AbstractTest { /** * @depends testFetchAMessage */ - public function testReloadGeneralTagAfterSubtag():void { + public function testReloadGeneralTagAfterSubtag(): void { $this->l->set("en", true); $this->l->set("en_us", true); $this->assertEquals('and the Sorcerer\'s Stone', $this->l->msg('Test.presentText')); diff --git a/tests/cases/Lang/TestErrors.php b/tests/cases/Lang/TestErrors.php index e8774846..8c995062 100644 --- a/tests/cases/Lang/TestErrors.php +++ b/tests/cases/Lang/TestErrors.php @@ -16,65 +16,65 @@ class TestErrors extends \JKingWeb\Arsse\Test\AbstractTest { public $path; public $l; - public function setUpSeries():void { + public function setUpSeries(): void { $this->l->set("", true); } - public function testLoadEmptyFile():void { + public function testLoadEmptyFile(): void { $this->assertException("fileCorrupt", "Lang"); $this->l->set("fr_ca", true); } - public function testLoadFileWhichDoesNotReturnAnArray():void { + public function testLoadFileWhichDoesNotReturnAnArray(): void { $this->assertException("fileCorrupt", "Lang"); $this->l->set("it", true); } - public function testLoadFileWhichIsNotPhp():void { + public function testLoadFileWhichIsNotPhp(): void { $this->assertException("fileCorrupt", "Lang"); $this->l->set("ko", true); } - public function testLoadFileWhichIsCorrupt():void { + public function testLoadFileWhichIsCorrupt(): void { $this->assertException("fileCorrupt", "Lang"); $this->l->set("zh", true); } - public function testLoadFileWithooutReadPermission():void { + public function testLoadFileWithooutReadPermission(): void { $this->assertException("fileUnreadable", "Lang"); $this->l->set("ru", true); } - public function testLoadSubtagOfMissingLanguage():void { + public function testLoadSubtagOfMissingLanguage(): void { $this->assertException("fileMissing", "Lang"); $this->l->set("pt_br", true); } - public function testFetchInvalidMessage():void { + public function testFetchInvalidMessage(): void { $this->assertException("stringInvalid", "Lang"); $this->l->set("vi", true); $txt = $this->l->msg('Test.presentText'); } - public function testFetchMissingMessage():void { + public function testFetchMissingMessage(): void { $this->assertException("stringMissing", "Lang"); $txt = $this->l->msg('Test.absentText'); } - public function testLoadMissingDefaultLanguage():void { + public function testLoadMissingDefaultLanguage(): void { unlink($this->path.TestClass::DEFAULT.".php"); $this->assertException("defaultFileMissing", "Lang"); $this->l->set("fr", true); } - public function testLoadMissingLanguageWhenFetching():void { + public function testLoadMissingLanguageWhenFetching(): void { $this->l->set("en_ca"); unlink($this->path.TestClass::DEFAULT.".php"); $this->assertException("fileMissing", "Lang"); $this->l->msg('Test.presentText'); } - public function testLoadMissingDefaultLanguageWhenFetching():void { + public function testLoadMissingDefaultLanguageWhenFetching(): void { unlink($this->path.TestClass::DEFAULT.".php"); $this->l = new TestClass($this->path); $this->assertException("stringMissing", "Lang"); diff --git a/tests/cases/Misc/TestContext.php b/tests/cases/Misc/TestContext.php index 8ebb5151..b4f51c5c 100644 --- a/tests/cases/Misc/TestContext.php +++ b/tests/cases/Misc/TestContext.php @@ -11,7 +11,7 @@ use JKingWeb\Arsse\Misc\ValueInfo; /** @covers \JKingWeb\Arsse\Context\Context */ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { - public function testVerifyInitialState():void { + public function testVerifyInitialState(): void { $c = new Context; foreach ((new \ReflectionObject($c))->getMethods(\ReflectionMethod::IS_PUBLIC) as $m) { if ($m->isStatic() || strpos($m->name, "__") === 0) { @@ -23,7 +23,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testSetContextOptions():void { + public function testSetContextOptions(): void { $v = [ 'reverse' => true, 'limit' => 10, @@ -85,7 +85,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testCleanIdArrayValues():void { + public function testCleanIdArrayValues(): void { $methods = ["articles", "editions", "tags", "labels", "subscriptions"]; $in = [1, "2", 3.5, 4.0, 4, "ook", 0, -20, true, false, null, new \DateTime(), -1.0]; $out = [1, 2, 4]; @@ -95,7 +95,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testCleanFolderIdArrayValues():void { + public function testCleanFolderIdArrayValues(): void { $methods = ["folders", "foldersShallow"]; $in = [1, "2", 3.5, 4.0, 4, "ook", 0, -20, true, false, null, new \DateTime(), -1.0]; $out = [1, 2, 4, 0]; @@ -105,7 +105,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testCleanStringArrayValues():void { + public function testCleanStringArrayValues(): void { $methods = ["searchTerms", "annotationTerms", "titleTerms", "authorTerms", "tagNames", "labelNames"]; $now = new \DateTime; $in = [1, 3.0, "ook", 0, true, false, null, $now, ""]; @@ -116,7 +116,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testCloneAContext():void { + public function testCloneAContext(): void { $c1 = new Context; $c2 = clone $c1; $this->assertEquals($c1, $c2); diff --git a/tests/cases/Misc/TestDate.php b/tests/cases/Misc/TestDate.php index 229c3108..5c16d352 100644 --- a/tests/cases/Misc/TestDate.php +++ b/tests/cases/Misc/TestDate.php @@ -14,7 +14,7 @@ class TestDate extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testNormalizeADate():void { + public function testNormalizeADate(): void { $exp = new \DateTimeImmutable("2018-01-01T00:00:00Z"); $this->assertEquals($exp, Date::normalize(1514764800)); $this->assertEquals($exp, Date::normalize("2018-01-01T00:00:00")); @@ -26,7 +26,7 @@ class TestDate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertNull(Date::normalize("2018-01-01T00:00:00Z", "http")); } - public function testFormatADate():void { + public function testFormatADate(): void { $test = new \DateTimeImmutable("2018-01-01T00:00:00Z"); $this->assertNull(Date::transform(null, "http")); $this->assertNull(Date::transform("ook", "http")); @@ -40,7 +40,7 @@ class TestDate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(1514764800.265579, Date::transform("2018-01-01T00:00:00.265579Z", "float", "iso8601m")); } - public function testMoveDateForward():void { + public function testMoveDateForward(): void { $test = new \DateTimeImmutable("2018-01-01T00:00:00Z"); $this->assertNull(Date::add("P1D", null)); $this->assertNull(Date::add("P1D", "ook")); @@ -49,7 +49,7 @@ class TestDate extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertNull(Date::add("ook", $test)); } - public function testMoveDateBack():void { + public function testMoveDateBack(): void { $test = new \DateTimeImmutable("2018-01-01T00:00:00Z"); $this->assertNull(Date::sub("P1D", null)); $this->assertNull(Date::sub("P1D", "ook")); diff --git a/tests/cases/Misc/TestHTTP.php b/tests/cases/Misc/TestHTTP.php index d951af7c..04199d10 100644 --- a/tests/cases/Misc/TestHTTP.php +++ b/tests/cases/Misc/TestHTTP.php @@ -12,7 +12,7 @@ use Psr\Http\Message\ResponseInterface; /** @covers \JKingWeb\Arsse\Misc\HTTP */ class TestHTTP extends \JKingWeb\Arsse\Test\AbstractTest { /** @dataProvider provideMediaTypes */ - public function testMatchMediaType(string $header, array $types, bool $exp):void { + public function testMatchMediaType(string $header, array $types, bool $exp): void { $msg = (new \Laminas\Diactoros\Request)->withHeader("Content-Type", $header); $this->assertSame($exp, HTTP::matchType($msg, ...$types)); $msg = (new \Laminas\Diactoros\Response)->withHeader("Content-Type", $header); diff --git a/tests/cases/Misc/TestQuery.php b/tests/cases/Misc/TestQuery.php index d784d91e..7d94f90d 100644 --- a/tests/cases/Misc/TestQuery.php +++ b/tests/cases/Misc/TestQuery.php @@ -11,14 +11,14 @@ use JKingWeb\Arsse\Misc\ValueInfo; /** @covers \JKingWeb\Arsse\Misc\Query */ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { - public function testBasicQuery():void { + public function testBasicQuery(): void { $q = new Query("select * from table where a = ?", "int", 3); $this->assertSame("select * from table where a = ?", $q->getQuery()); $this->assertSame(["int"], $q->getTypes()); $this->assertSame([3], $q->getValues()); } - public function testWhereQuery():void { + public function testWhereQuery(): void { // simple where clause $q = (new Query("select * from table"))->setWhere("a = ?", "int", 3); $this->assertSame("select * from table WHERE a = ?", $q->getQuery()); @@ -46,21 +46,21 @@ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame([2, 4, 1, 3], $q->getValues()); } - public function testGroupedQuery():void { + public function testGroupedQuery(): void { $q = (new Query("select col1, col2, count(*) as count from table"))->setGroup("col1", "col2"); $this->assertSame("select col1, col2, count(*) as count from table GROUP BY col1, col2", $q->getQuery()); $this->assertSame([], $q->getTypes()); $this->assertSame([], $q->getValues()); } - public function testOrderedQuery():void { + public function testOrderedQuery(): void { $q = (new Query("select col1, col2, col3 from table"))->setOrder("col1 desc", "col2")->setOrder("col3 asc"); $this->assertSame("select col1, col2, col3 from table ORDER BY col1 desc, col2, col3 asc", $q->getQuery()); $this->assertSame([], $q->getTypes()); $this->assertSame([], $q->getValues()); } - public function testLimitedQuery():void { + public function testLimitedQuery(): void { // no offset $q = (new Query("select * from table"))->setLimit(5); $this->assertSame("select * from table LIMIT 5", $q->getQuery()); @@ -78,7 +78,7 @@ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame([], $q->getValues()); } - public function testQueryWithCommonTableExpression():void { + public function testQueryWithCommonTableExpression(): void { $q = (new Query("select * from table where a in (select * from cte where a = ?)", "int", 1))->setCTE("cte", "select * from other_table where a = ? and b = ?", ["str", "str"], [2, 3]); $this->assertSame("WITH RECURSIVE cte as (select * from other_table where a = ? and b = ?) select * from table where a in (select * from cte where a = ?)", $q->getQuery()); $this->assertSame(["str", "str", "int"], $q->getTypes()); @@ -90,7 +90,7 @@ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame([2, 3, 4, 5, 1], $q->getValues()); } - public function testQueryWithPushedCommonTableExpression():void { + public function testQueryWithPushedCommonTableExpression(): void { $q = (new Query("select * from table1"))->setWhere("a between ? and ?", ["datetime", "datetime"], [1, 2]) ->setCTE("cte1", "select * from table2 where a = ? and b = ?", ["str", "str"], [3, 4]) ->pushCTE("cte2") @@ -100,7 +100,7 @@ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame([3, 4, 1, 2, 5], $q->getValues()); } - public function testComplexQuery():void { + public function testComplexQuery(): void { $q = (new query("select *, ? as const from table", "datetime", 1)) ->setWhereNot("b = ?", "bool", 2) ->setGroup("col1", "col2") diff --git a/tests/cases/Misc/TestURL.php b/tests/cases/Misc/TestURL.php index 7cf1554f..46f5886a 100644 --- a/tests/cases/Misc/TestURL.php +++ b/tests/cases/Misc/TestURL.php @@ -15,7 +15,7 @@ class TestURL extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideNormalizations */ - public function testNormalizeAUrl(string $url, string $exp, string $user = null, string $pass = null):void { + public function testNormalizeAUrl(string $url, string $exp, string $user = null, string $pass = null): void { $this->assertSame($exp, URL::normalize($url, $user, $pass)); } @@ -77,7 +77,7 @@ class TestURL extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideQueries */ - public function testAppendQueryParameters(string $url, string $query, string $exp):void { + public function testAppendQueryParameters(string $url, string $query, string $exp): void { $this->assertSame($exp, URL::queryAppend($url, $query)); } @@ -93,7 +93,7 @@ class TestURL extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideAbsolutes */ - public function testDetermineAbsoluteness(bool $exp, string $url):void { + public function testDetermineAbsoluteness(bool $exp, string $url): void { $this->assertSame($exp, URL::absolute($url)); } diff --git a/tests/cases/Misc/TestValueInfo.php b/tests/cases/Misc/TestValueInfo.php index b3b48ca4..a35040b6 100644 --- a/tests/cases/Misc/TestValueInfo.php +++ b/tests/cases/Misc/TestValueInfo.php @@ -16,7 +16,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testGetIntegerInfo():void { + public function testGetIntegerInfo(): void { $tests = [ [null, I::NULL], ["", I::NULL], @@ -91,7 +91,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame($exp, I::int($value), "Test returned ".decbin(I::int($value))." for value: ".var_export($value, true)); } } - public function testGetStringInfo():void { + public function testGetStringInfo(): void { $tests = [ [null, I::NULL], ["", I::VALID | I::EMPTY], @@ -162,7 +162,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testValidateDatabaseIdentifier():void { + public function testValidateDatabaseIdentifier(): void { $tests = [ [null, false, true], ["", false, true], @@ -234,7 +234,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testValidateBoolean():void { + public function testValidateBoolean(): void { $tests = [ [null, null], ["", false], @@ -310,7 +310,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideSimpleNormalizationValues */ - public function testNormalizeSimpleValues($input, string $typeName, $exp, bool $pass, bool $strict, bool $drop):void { + public function testNormalizeSimpleValues($input, string $typeName, $exp, bool $pass, bool $strict, bool $drop): void { $assert = function($exp, $act, string $msg) { if (is_null($exp)) { $this->assertNull($act, $msg); @@ -366,7 +366,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideDateNormalizationValues */ - public function testNormalizeDateValues($input, $format, $exp, bool $strict, bool $drop):void { + public function testNormalizeDateValues($input, $format, $exp, bool $strict, bool $drop): void { if ($strict && $drop) { $modeName = "strict drop"; $modeConst = I::M_STRICT | I::M_DROP; @@ -397,7 +397,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testNormalizeComplexValues():void { + public function testNormalizeComplexValues(): void { // Array-mode tests $tests = [ [I::T_INT | I::M_DROP, [1, 2, 2.2, 3], [1,2,null,3] ], @@ -640,7 +640,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { return $out; } - public function testFlattenArray():void { + public function testFlattenArray(): void { $arr = [1, [2, 3, [4, 5]], 6, [[7, 8], 9, 10]]; $exp = range(1, 10); $this->assertSame($exp, I::flatten($arr)); diff --git a/tests/cases/REST/Fever/TestAPI.php b/tests/cases/REST/Fever/TestAPI.php index fd892b06..6bdce399 100644 --- a/tests/cases/REST/Fever/TestAPI.php +++ b/tests/cases/REST/Fever/TestAPI.php @@ -173,7 +173,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideTokenAuthenticationRequests */ - public function testAuthenticateAUserToken(bool $httpRequired, bool $tokenEnforced, string $httpUser = null, array $dataPost, array $dataGet, ResponseInterface $exp):void { + public function testAuthenticateAUserToken(bool $httpRequired, bool $tokenEnforced, string $httpUser = null, array $dataPost, array $dataGet, ResponseInterface $exp): void { self::setConf([ 'userHTTPAuthRequired' => $httpRequired, 'userSessionEnforced' => $tokenEnforced, @@ -244,7 +244,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testListGroups():void { + public function testListGroups(): void { \Phake::when(Arsse::$db)->tagList(Arsse::$user->id)->thenReturn(new Result([ ['id' => 1, 'name' => "Fascinating", 'subscriptions' => 2], ['id' => 2, 'name' => "Interesting", 'subscriptions' => 2], @@ -271,7 +271,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $act); } - public function testListFeeds():void { + public function testListFeeds(): void { \Phake::when(Arsse::$db)->subscriptionList(Arsse::$user->id)->thenReturn(new Result([ ['id' => 1, 'feed' => 5, 'title' => "Ankh-Morpork News", 'url' => "http://example.com/feed", 'source' => "http://example.com/", 'edited' => "2019-01-01 21:12:00", 'favicon' => "http://example.com/favicon.ico"], ['id' => 2, 'feed' => 9, 'title' => "Ook, Ook Eek Ook!", 'url' => "http://example.net/feed", 'source' => "http://example.net/", 'edited' => "1988-06-24 12:21:00", 'favicon' => ""], @@ -299,7 +299,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideItemListContexts */ - public function testListItems(string $url, Context $c, bool $desc):void { + public function testListItems(string $url, Context $c, bool $desc): void { $fields = ["id", "subscription", "title", "author", "content", "url", "starred", "unread", "published_date"]; $order = [$desc ? "id desc" : "id"]; \Phake::when(Arsse::$db)->articleList->thenReturn(new Result($this->articles['db'])); @@ -329,7 +329,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testListItemIds():void { + public function testListItemIds(): void { $saved = [['id' => 1],['id' => 2],['id' => 3]]; $unread = [['id' => 4],['id' => 5],['id' => 6]]; \Phake::when(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->starred(true))->thenReturn(new Result($saved)); @@ -344,7 +344,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->h->dispatch($this->req("api&unread_item_ids"))); } - public function testListHotLinks():void { + public function testListHotLinks(): void { // hot links are not actually implemented, so an empty array should be all we get $exp = new JsonResponse([ 'links' => [] @@ -353,7 +353,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideMarkingContexts */ - public function testSetMarks(string $post, Context $c, array $data, array $out):void { + public function testSetMarks(string $post, Context $c, array $data, array $out): void { $saved = [['id' => 1],['id' => 2],['id' => 3]]; $unread = [['id' => 4],['id' => 5],['id' => 6]]; \Phake::when(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->starred(true))->thenReturn(new Result($saved)); @@ -371,7 +371,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideMarkingContexts */ - public function testSetMarksWithQuery(string $get, Context $c, array $data, array $out):void { + public function testSetMarksWithQuery(string $get, Context $c, array $data, array $out): void { $saved = [['id' => 1],['id' => 2],['id' => 3]]; $unread = [['id' => 4],['id' => 5],['id' => 6]]; \Phake::when(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->starred(true))->thenReturn(new Result($saved)); @@ -427,7 +427,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideInvalidRequests */ - public function testSendInvalidRequests(ServerRequest $req, ResponseInterface $exp):void { + public function testSendInvalidRequests(ServerRequest $req, ResponseInterface $exp): void { $this->assertMessage($exp, $this->h->dispatch($req)); } @@ -439,7 +439,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testMakeABaseQuery():void { + public function testMakeABaseQuery(): void { $this->h = \Phake::partialMock(API::class); \Phake::when($this->h)->logIn->thenReturn(true); \Phake::when(Arsse::$db)->subscriptionRefreshed(Arsse::$user->id)->thenReturn(new \DateTimeImmutable("2000-01-01T00:00:00Z")); @@ -467,7 +467,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $act); } - public function testUndoReadMarks():void { + public function testUndoReadMarks(): void { $unread = [['id' => 4],['id' => 5],['id' => 6]]; $out = ['unread_item_ids' => "4,5,6"]; \Phake::when(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->limit(1), ["marked_date"], ["marked_date desc"])->thenReturn(new Result([['marked_date' => "2000-01-01 00:00:00"]])); @@ -483,7 +483,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db)->articleMark; // only called one time, above } - public function testOutputToXml():void { + public function testOutputToXml(): void { \Phake::when($this->h)->processRequest->thenReturn([ 'items' => $this->articles['rest'], 'total_items' => 1024, @@ -493,13 +493,13 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $act); } - public function testListFeedIcons():void { + public function testListFeedIcons(): void { $act = $this->h->dispatch($this->req("api&favicons")); $exp = new JsonResponse(['favicons' => [['id' => 0, 'data' => API::GENERIC_ICON_TYPE.",".API::GENERIC_ICON_DATA]]]); $this->assertMessage($exp, $act); } - public function testAnswerOptionsRequest():void { + public function testAnswerOptionsRequest(): void { $act = $this->h->dispatch($this->req("api", "", "OPTIONS")); $exp = new EmptyResponse(204, [ 'Allow' => "POST", diff --git a/tests/cases/REST/Fever/TestUser.php b/tests/cases/REST/Fever/TestUser.php index 695ea933..d6bab6df 100644 --- a/tests/cases/REST/Fever/TestUser.php +++ b/tests/cases/REST/Fever/TestUser.php @@ -36,7 +36,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider providePasswordCreations */ - public function testRegisterAUserPassword(string $user, string $password = null, $exp):void { + public function testRegisterAUserPassword(string $user, string $password = null, $exp): void { \Phake::when(Arsse::$user)->generatePassword->thenReturn("RANDOM_PASSWORD"); \Phake::when(Arsse::$db)->tokenCreate->thenReturnCallback(function($user, $class, $id = null) { return $id ?? "RANDOM_TOKEN"; @@ -66,7 +66,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testUnregisterAUser():void { + public function testUnregisterAUser(): void { \Phake::when(Arsse::$db)->tokenRevoke->thenReturn(3); $this->assertTrue($this->u->unregister("jane.doe@example.com")); \Phake::verify(Arsse::$db)->tokenRevoke("jane.doe@example.com", "fever.login"); @@ -76,7 +76,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserAuthenticationRequests */ - public function testAuthenticateAUserName(string $user, string $password, bool $exp):void { + public function testAuthenticateAUserName(string $user, string $password, bool $exp): void { \Phake::when(Arsse::$db)->tokenLookup->thenThrow(new ExceptionInput("constraintViolation")); \Phake::when(Arsse::$db)->tokenLookup("fever.login", md5("jane.doe@example.com:secret"))->thenReturn(['user' => "jane.doe@example.com"]); \Phake::when(Arsse::$db)->tokenLookup("fever.login", md5("john.doe@example.com:superman"))->thenReturn(['user' => "john.doe@example.com"]); diff --git a/tests/cases/REST/NextcloudNews/TestV1_2.php b/tests/cases/REST/NextcloudNews/TestV1_2.php index 25b98a82..dfe30083 100644 --- a/tests/cases/REST/NextcloudNews/TestV1_2.php +++ b/tests/cases/REST/NextcloudNews/TestV1_2.php @@ -333,13 +333,13 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { return $value; } - public function testSendAuthenticationChallenge():void { + public function testSendAuthenticationChallenge(): void { $exp = new EmptyResponse(401); $this->assertMessage($exp, $this->req("GET", "/", "", [], false)); } /** @dataProvider provideInvalidPaths */ - public function testRespondToInvalidPaths($path, $method, $code, $allow = null):void { + public function testRespondToInvalidPaths($path, $method, $code, $allow = null): void { $exp = new EmptyResponse($code, $allow ? ['Allow' => $allow] : []); $this->assertMessage($exp, $this->req($method, $path)); } @@ -371,7 +371,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testRespondToInvalidInputTypes():void { + public function testRespondToInvalidInputTypes(): void { $exp = new EmptyResponse(415, ['Accept' => "application/json"]); $this->assertMessage($exp, $this->req("PUT", "/folders/1", '', ['Content-Type' => "application/xml"])); $exp = new EmptyResponse(400); @@ -380,7 +380,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideOptionsRequests */ - public function testRespondToOptionsRequests(string $url, string $allow, string $accept):void { + public function testRespondToOptionsRequests(string $url, string $allow, string $accept): void { $exp = new EmptyResponse(204, [ 'Allow' => $allow, 'Accept' => $accept, @@ -396,7 +396,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testListFolders():void { + public function testListFolders(): void { $list = [ ['id' => 1, 'name' => "Software", 'parent' => null], ['id' => 12, 'name' => "Hardware", 'parent' => null], @@ -411,9 +411,9 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideFolderCreations */ - public function testAddAFolder(array $input, bool $body, $output, ResponseInterface $exp):void { + public function testAddAFolder(array $input, bool $body, $output, ResponseInterface $exp): void { if ($output instanceof ExceptionInput) { - \Phake::when(Arsse::$db)->folderAdd->thenThrow($output); + \Phake::when(Arsse::$db)->folderAdd->thenThrow($output); } else { \Phake::when(Arsse::$db)->folderAdd->thenReturn($output); \Phake::when(Arsse::$db)->folderPropertiesGet->thenReturn($this->v(['id' => $output, 'name' => $input['name'], 'parent' => null])); @@ -441,7 +441,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testRemoveAFolder():void { + public function testRemoveAFolder(): void { \Phake::when(Arsse::$db)->folderRemove(Arsse::$user->id, 1)->thenReturn(true)->thenThrow(new ExceptionInput("subjectMissing")); $exp = new EmptyResponse(204); $this->assertMessage($exp, $this->req("DELETE", "/folders/1")); @@ -452,7 +452,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideFolderRenamings */ - public function testRenameAFolder(array $input, int $id, $output, ResponseInterface $exp):void { + public function testRenameAFolder(array $input, int $id, $output, ResponseInterface $exp): void { if ($output instanceof ExceptionInput) { \Phake::when(Arsse::$db)->folderPropertiesSet->thenThrow($output); } else { @@ -474,7 +474,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testRetrieveServerVersion():void { + public function testRetrieveServerVersion(): void { $exp = new Response([ 'version' => V1_2::VERSION, 'arsse_version' => Arsse::VERSION, @@ -482,7 +482,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("GET", "/version")); } - public function testListSubscriptions():void { + public function testListSubscriptions(): void { $exp1 = [ 'feeds' => [], 'starredCount' => 0, @@ -502,7 +502,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideNewSubscriptions */ - public function testAddASubscription(array $input, $id, int $latestEdition, array $output, $moveOutcome, ResponseInterface $exp):void { + public function testAddASubscription(array $input, $id, int $latestEdition, array $output, $moveOutcome, ResponseInterface $exp): void { if ($id instanceof \Exception) { \Phake::when(Arsse::$db)->subscriptionAdd->thenThrow($id); } else { @@ -528,7 +528,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { if ($input['folderId'] ?? 0) { \Phake::verify(Arsse::$db)->subscriptionPropertiesSet(Arsse::$user->id, $id, ['folder' => (int) $input['folderId']]); } else { - \Phake::verify(Arsse::$db, \Phake::times(0))->subscriptionPropertiesSet; + \Phake::verify(Arsse::$db, \Phake::times(0))->subscriptionPropertiesSet; } } } @@ -545,7 +545,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testRemoveASubscription():void { + public function testRemoveASubscription(): void { \Phake::when(Arsse::$db)->subscriptionRemove(Arsse::$user->id, 1)->thenReturn(true)->thenThrow(new ExceptionInput("subjectMissing")); $exp = new EmptyResponse(204); $this->assertMessage($exp, $this->req("DELETE", "/feeds/1")); @@ -555,7 +555,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db, \Phake::times(2))->subscriptionRemove(Arsse::$user->id, 1); } - public function testMoveASubscription():void { + public function testMoveASubscription(): void { $in = [ ['folderId' => 0], ['folderId' => 42], @@ -583,7 +583,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("PUT", "/feeds/1/move", json_encode($in[5]))); } - public function testRenameASubscription():void { + public function testRenameASubscription(): void { $in = [ ['feedTitle' => null], ['feedTitle' => "Ook"], @@ -613,7 +613,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("PUT", "/feeds/1/rename", json_encode($in[6]))); } - public function testListStaleFeeds():void { + public function testListStaleFeeds(): void { $out = [ [ 'id' => 42, @@ -629,7 +629,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("GET", "/feeds/all")); } - public function testUpdateAFeed():void { + public function testUpdateAFeed(): void { $in = [ ['feedId' => 42], // valid ['feedId' => 2112], // feed does not exist @@ -650,7 +650,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("GET", "/feeds/update", json_encode($in[4]))); } - public function testListArticles():void { + public function testListArticles(): void { $t = new \DateTime; $in = [ ['type' => 0, 'id' => 42], // type=0 => subscription/feed @@ -704,7 +704,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->limit(5), $this->anything(), ["edition desc"]); } - public function testMarkAFolderRead():void { + public function testMarkAFolderRead(): void { $read = ['read' => true]; $in = json_encode(['newestItemId' => 2112]); \Phake::when(Arsse::$db)->articleMark(Arsse::$user->id, $read, (new Context)->folder(1)->latestEdition(2112))->thenReturn(42); @@ -719,7 +719,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("PUT", "/folders/42/read", $in)); } - public function testMarkASubscriptionRead():void { + public function testMarkASubscriptionRead(): void { $read = ['read' => true]; $in = json_encode(['newestItemId' => 2112]); \Phake::when(Arsse::$db)->articleMark(Arsse::$user->id, $read, (new Context)->subscription(1)->latestEdition(2112))->thenReturn(42); @@ -734,7 +734,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("PUT", "/feeds/42/read", $in)); } - public function testMarkAllItemsRead():void { + public function testMarkAllItemsRead(): void { $read = ['read' => true]; $in = json_encode(['newestItemId' => 2112]); \Phake::when(Arsse::$db)->articleMark(Arsse::$user->id, $read, (new Context)->latestEdition(2112))->thenReturn(42); @@ -746,7 +746,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("PUT", "/items/read?newestItemId=ook")); } - public function testChangeMarksOfASingleArticle():void { + public function testChangeMarksOfASingleArticle(): void { $read = ['read' => true]; $unread = ['read' => false]; $star = ['starred' => true]; @@ -772,7 +772,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db, \Phake::times(8))->articleMark(Arsse::$user->id, $this->anything(), $this->anything()); } - public function testChangeMarksOfMultipleArticles():void { + public function testChangeMarksOfMultipleArticles(): void { $read = ['read' => true]; $unread = ['read' => false]; $star = ['starred' => true]; @@ -827,7 +827,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db, \Phake::atLeast(1))->articleMark(Arsse::$user->id, $unstar, (new Context)->articles($in[1])); } - public function testQueryTheServerStatus():void { + public function testQueryTheServerStatus(): void { $interval = Arsse::$conf->serviceFrequency; $valid = (new \DateTimeImmutable("now", new \DateTimezone("UTC")))->sub($interval); $invalid = $valid->sub($interval)->sub($interval); @@ -847,21 +847,21 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("GET", "/status")); } - public function testCleanUpBeforeUpdate():void { + public function testCleanUpBeforeUpdate(): void { \Phake::when(Arsse::$db)->feedCleanup()->thenReturn(true); $exp = new EmptyResponse(204); $this->assertMessage($exp, $this->req("GET", "/cleanup/before-update")); \Phake::verify(Arsse::$db)->feedCleanup(); } - public function testCleanUpAfterUpdate():void { + public function testCleanUpAfterUpdate(): void { \Phake::when(Arsse::$db)->articleCleanup()->thenReturn(true); $exp = new EmptyResponse(204); $this->assertMessage($exp, $this->req("GET", "/cleanup/after-update")); \Phake::verify(Arsse::$db)->articleCleanup(); } - public function testQueryTheUserStatus():void { + public function testQueryTheUserStatus(): void { $act = $this->req("GET", "/user"); $exp = new Response([ 'userId' => Arsse::$user->id, @@ -872,7 +872,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $act); } - public function testPreferJsonOverQueryParameters():void { + public function testPreferJsonOverQueryParameters(): void { $in = ['name' => "Software"]; $url = "/folders?name=Hardware"; $out1 = ['id' => 1, 'name' => "Software"]; @@ -885,7 +885,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("POST", "/folders?name=Hardware", json_encode($in))); } - public function testMeldJsonAndQueryParameters():void { + public function testMeldJsonAndQueryParameters(): void { $in = ['oldestFirst' => true]; $url = "/items?type=2"; \Phake::when(Arsse::$db)->articleList->thenReturn(new Result([])); diff --git a/tests/cases/REST/NextcloudNews/TestVersions.php b/tests/cases/REST/NextcloudNews/TestVersions.php index ba849c59..ba0ae3a0 100644 --- a/tests/cases/REST/NextcloudNews/TestVersions.php +++ b/tests/cases/REST/NextcloudNews/TestVersions.php @@ -25,24 +25,24 @@ class TestVersions extends \JKingWeb\Arsse\Test\AbstractTest { return (new Versions)->dispatch($req); } - public function testFetchVersionList():void { + public function testFetchVersionList(): void { $exp = new Response(['apiLevels' => ['v1-2']]); $this->assertMessage($exp, $this->req("GET", "/")); $this->assertMessage($exp, $this->req("GET", "/")); $this->assertMessage($exp, $this->req("GET", "/")); } - public function testRespondToOptionsRequest():void { + public function testRespondToOptionsRequest(): void { $exp = new EmptyResponse(204, ['Allow' => "HEAD,GET"]); $this->assertMessage($exp, $this->req("OPTIONS", "/")); } - public function testUseIncorrectMethod():void { + public function testUseIncorrectMethod(): void { $exp = new EmptyResponse(405, ['Allow' => "HEAD,GET"]); $this->assertMessage($exp, $this->req("POST", "/")); } - public function testUseIncorrectPath():void { + public function testUseIncorrectPath(): void { $exp = new EmptyResponse(404); $this->assertMessage($exp, $this->req("GET", "/ook")); $this->assertMessage($exp, $this->req("OPTIONS", "/ook")); diff --git a/tests/cases/REST/TestREST.php b/tests/cases/REST/TestREST.php index 821ab308..3983fd29 100644 --- a/tests/cases/REST/TestREST.php +++ b/tests/cases/REST/TestREST.php @@ -25,7 +25,7 @@ use Laminas\Diactoros\Response\EmptyResponse; class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { /** @dataProvider provideApiMatchData */ - public function testMatchAUrlToAnApi($apiList, string $input, array $exp):void { + public function testMatchAUrlToAnApi($apiList, string $input, array $exp): void { $r = new REST($apiList); try { $out = $r->apiMatch($input); @@ -61,7 +61,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideAuthenticableRequests */ - public function testAuthenticateRequests(array $serverParams, array $expAttr):void { + public function testAuthenticateRequests(array $serverParams, array $expAttr): void { $r = new REST(); // create a mock user manager Arsse::$user = \Phake::mock(User::class); @@ -93,7 +93,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testSendAuthenticationChallenges():void { + public function testSendAuthenticationChallenges(): void { self::setConf(); $r = new REST(); $in = new EmptyResponse(401); @@ -106,7 +106,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUnnormalizedOrigins */ - public function testNormalizeOrigins(string $origin, string $exp, array $ports = null):void { + public function testNormalizeOrigins(string $origin, string $exp, array $ports = null): void { $r = new REST(); $act = $r->corsNormalizeOrigin($origin, $ports); $this->assertSame($exp, $act); @@ -149,7 +149,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideCorsNegotiations */ - public function testNegotiateCors($origin, bool $exp, string $allowed = null, string $denied = null):void { + public function testNegotiateCors($origin, bool $exp, string $allowed = null, string $denied = null): void { self::setConf(); $r = \Phake::partialMock(REST::class); \Phake::when($r)->corsNormalizeOrigin->thenReturnCallback(function($origin) { @@ -187,7 +187,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideCorsHeaders */ - public function testAddCorsHeaders(string $reqMethod, array $reqHeaders, array $resHeaders, array $expHeaders):void { + public function testAddCorsHeaders(string $reqMethod, array $reqHeaders, array $resHeaders, array $expHeaders): void { $r = new REST(); $req = new Request("", $reqMethod, "php://memory", $reqHeaders); $res = new EmptyResponse(204, $resHeaders); @@ -251,7 +251,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUnnormalizedResponses */ - public function testNormalizeHttpResponses(ResponseInterface $res, ResponseInterface $exp, RequestInterface $req = null):void { + public function testNormalizeHttpResponses(ResponseInterface $res, ResponseInterface $exp, RequestInterface $req = null): void { $r = \Phake::partialMock(REST::class); \Phake::when($r)->corsNegotiate->thenReturn(true); \Phake::when($r)->challenge->thenReturnCallback(function($res) { @@ -286,7 +286,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testCreateHandlers():void { + public function testCreateHandlers(): void { $r = new REST(); foreach (REST::API_LIST as $api) { $class = $api['class']; @@ -295,7 +295,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideMockRequests */ - public function testDispatchRequests(ServerRequest $req, string $method, bool $called, string $class = "", string $target =""):void { + public function testDispatchRequests(ServerRequest $req, string $method, bool $called, string $class = "", string $target =""): void { $r = \Phake::partialMock(REST::class); \Phake::when($r)->normalizeResponse->thenReturnCallback(function($res) { return $res; diff --git a/tests/cases/REST/TinyTinyRSS/TestAPI.php b/tests/cases/REST/TinyTinyRSS/TestAPI.php index b6be644a..8f94c76c 100644 --- a/tests/cases/REST/TinyTinyRSS/TestAPI.php +++ b/tests/cases/REST/TinyTinyRSS/TestAPI.php @@ -178,7 +178,7 @@ LONG_STRING; self::clearData(); } - public function testHandleInvalidPaths():void { + public function testHandleInvalidPaths(): void { $exp = $this->respErr("MALFORMED_INPUT", [], null); $this->assertMessage($exp, $this->req(null, "POST", "", "")); $this->assertMessage($exp, $this->req(null, "POST", "/", "")); @@ -187,7 +187,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req(null, "POST", "/bad/path", "")); } - public function testHandleOptionsRequest():void { + public function testHandleOptionsRequest(): void { $exp = new EmptyResponse(204, [ 'Allow' => "POST", 'Accept' => "application/json, text/json", @@ -195,14 +195,14 @@ LONG_STRING; $this->assertMessage($exp, $this->req(null, "OPTIONS", "", "")); } - public function testHandleInvalidData():void { + public function testHandleInvalidData(): void { $exp = $this->respErr("MALFORMED_INPUT", [], null); $this->assertMessage($exp, $this->req(null, "POST", "", "This is not valid JSON data")); $this->assertMessage($exp, $this->req(null, "POST", "", "")); // lack of data is also an error } /** @dataProvider provideLoginRequests */ - public function testLogIn(array $conf, $httpUser, array $data, $sessions):void { + public function testLogIn(array $conf, $httpUser, array $data, $sessions): void { Arsse::$user->id = null; self::setConf($conf); \Phake::when(Arsse::$user)->auth->thenReturn(false); @@ -236,7 +236,7 @@ LONG_STRING; } /** @dataProvider provideResumeRequests */ - public function testValidateASession(array $conf, $httpUser, string $data, $result):void { + public function testValidateASession(array $conf, $httpUser, string $data, $result): void { Arsse::$user->id = null; self::setConf($conf); \Phake::when(Arsse::$db)->sessionResume("PriestsOfSyrinx")->thenReturn([ @@ -520,7 +520,7 @@ LONG_STRING; } } - public function testHandleGenericError():void { + public function testHandleGenericError(): void { \Phake::when(Arsse::$user)->auth(Arsse::$user->id, $this->anything())->thenThrow(new \JKingWeb\Arsse\Db\ExceptionTimeout("general")); $data = [ 'op' => "login", @@ -531,7 +531,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($data)); } - public function testLogOut():void { + public function testLogOut(): void { \Phake::when(Arsse::$db)->sessionDestroy->thenReturn(true); $data = [ 'op' => "logout", @@ -542,7 +542,7 @@ LONG_STRING; \Phake::verify(Arsse::$db)->sessionDestroy(Arsse::$user->id, "PriestsOfSyrinx"); } - public function testHandleUnknownMethods():void { + public function testHandleUnknownMethods(): void { $exp = $this->respErr("UNKNOWN_METHOD", ['method' => "thisMethodDoesNotExist"]); $data = [ 'op' => "thisMethodDoesNotExist", @@ -551,7 +551,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($data)); } - public function testHandleMixedCaseMethods():void { + public function testHandleMixedCaseMethods(): void { $data = [ 'op' => "isLoggedIn", 'sid' => "PriestsOfSyrinx", @@ -566,7 +566,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($data)); } - public function testRetrieveServerVersion():void { + public function testRetrieveServerVersion(): void { $data = [ 'op' => "getVersion", 'sid' => "PriestsOfSyrinx", @@ -578,7 +578,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($data)); } - public function testRetrieveProtocolLevel():void { + public function testRetrieveProtocolLevel(): void { $data = [ 'op' => "getApiLevel", 'sid' => "PriestsOfSyrinx", @@ -587,7 +587,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($data)); } - public function testAddACategory():void { + public function testAddACategory(): void { $in = [ ['op' => "addCategory", 'sid' => "PriestsOfSyrinx", 'caption' => "Software"], ['op' => "addCategory", 'sid' => "PriestsOfSyrinx", 'caption' => "Hardware", 'parent_id' => 1], @@ -638,7 +638,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($in[5])); } - public function testRemoveACategory():void { + public function testRemoveACategory(): void { $in = [ ['op' => "removeCategory", 'sid' => "PriestsOfSyrinx", 'category_id' => 42], ['op' => "removeCategory", 'sid' => "PriestsOfSyrinx", 'category_id' => 2112], @@ -661,7 +661,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(3))->folderRemove(Arsse::$user->id, $this->anything()); } - public function testMoveACategory():void { + public function testMoveACategory(): void { $in = [ ['op' => "moveCategory", 'sid' => "PriestsOfSyrinx", 'category_id' => 42, 'parent_id' => 1], ['op' => "moveCategory", 'sid' => "PriestsOfSyrinx", 'category_id' => 2112, 'parent_id' => 2], @@ -713,7 +713,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(5))->folderPropertiesSet(Arsse::$user->id, $this->anything(), $this->anything()); } - public function testRenameACategory():void { + public function testRenameACategory(): void { $in = [ ['op' => "renameCategory", 'sid' => "PriestsOfSyrinx", 'category_id' => 42, 'caption' => "Ook"], ['op' => "renameCategory", 'sid' => "PriestsOfSyrinx", 'category_id' => 2112, 'caption' => "Eek"], @@ -753,7 +753,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(3))->folderPropertiesSet(Arsse::$user->id, $this->anything(), $this->anything()); } - public function testAddASubscription():void { + public function testAddASubscription(): void { $in = [ ['op' => "subscribeToFeed", 'sid' => "PriestsOfSyrinx", 'feed_url' => "http://example.com/0"], ['op' => "subscribeToFeed", 'sid' => "PriestsOfSyrinx", 'feed_url' => "http://example.com/1", 'category_id' => 42], @@ -828,7 +828,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(0))->subscriptionPropertiesSet(Arsse::$user->id, 4, ['folder' => 1]); } - public function testRemoveASubscription():void { + public function testRemoveASubscription(): void { $in = [ ['op' => "unsubscribeFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 42], ['op' => "unsubscribeFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 2112], @@ -850,7 +850,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(5))->subscriptionRemove(Arsse::$user->id, $this->anything()); } - public function testMoveASubscription():void { + public function testMoveASubscription(): void { $in = [ ['op' => "moveFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 42, 'category_id' => 1], ['op' => "moveFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 2112, 'category_id' => 2], @@ -892,7 +892,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(4))->subscriptionPropertiesSet(Arsse::$user->id, $this->anything(), $this->anything()); } - public function testRenameASubscription():void { + public function testRenameASubscription(): void { $in = [ ['op' => "renameFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 42, 'caption' => "Ook"], ['op' => "renameFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 2112, 'caption' => "Eek"], @@ -934,7 +934,7 @@ LONG_STRING; \Phake::verify(Arsse::$db)->subscriptionPropertiesSet(...$db[2]); } - public function testRetrieveTheGlobalUnreadCount():void { + public function testRetrieveTheGlobalUnreadCount(): void { $in = ['op' => "getUnread", 'sid' => "PriestsOfSyrinx"]; \Phake::when(Arsse::$db)->subscriptionList(Arsse::$user->id)->thenReturn(new Result($this->v([ ['id' => 1, 'unread' => 2112], @@ -945,7 +945,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($in)); } - public function testRetrieveTheServerConfiguration():void { + public function testRetrieveTheServerConfiguration(): void { $in = ['op' => "getConfig", 'sid' => "PriestsOfSyrinx"]; $interval = Arsse::$conf->serviceFrequency; $valid = (new \DateTimeImmutable("now", new \DateTimezone("UTC")))->sub($interval); @@ -960,7 +960,7 @@ LONG_STRING; $this->assertMessage($this->respGood($exp[1]), $this->req($in)); } - public function testUpdateAFeed():void { + public function testUpdateAFeed(): void { $in = [ ['op' => "updateFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 1], ['op' => "updateFeed", 'sid' => "PriestsOfSyrinx", 'feed_id' => 2], @@ -980,7 +980,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($in[3])); } - public function testAddALabel():void { + public function testAddALabel(): void { $in = [ ['op' => "addLabel", 'sid' => "PriestsOfSyrinx", 'caption' => "Software"], ['op' => "addLabel", 'sid' => "PriestsOfSyrinx", 'caption' => "Hardware",], @@ -1025,7 +1025,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($in[4])); } - public function testRemoveALabel():void { + public function testRemoveALabel(): void { $in = [ ['op' => "removeLabel", 'sid' => "PriestsOfSyrinx", 'label_id' => -1042], ['op' => "removeLabel", 'sid' => "PriestsOfSyrinx", 'label_id' => -2112], @@ -1053,7 +1053,7 @@ LONG_STRING; \Phake::verify(Arsse::$db)->labelRemove(Arsse::$user->id, 1088); } - public function testRenameALabel():void { + public function testRenameALabel(): void { $in = [ ['op' => "renameLabel", 'sid' => "PriestsOfSyrinx", 'label_id' => -1042, 'caption' => "Ook"], ['op' => "renameLabel", 'sid' => "PriestsOfSyrinx", 'label_id' => -2112, 'caption' => "Eek"], @@ -1099,7 +1099,7 @@ LONG_STRING; \Phake::verify(Arsse::$db, \Phake::times(6))->labelPropertiesSet(Arsse::$user->id, $this->anything(), $this->anything()); } - public function testRetrieveCategoryLists():void { + public function testRetrieveCategoryLists(): void { $in = [ ['op' => "getCategories", 'sid' => "PriestsOfSyrinx", 'include_empty' => true], ['op' => "getCategories", 'sid' => "PriestsOfSyrinx"], @@ -1171,7 +1171,7 @@ LONG_STRING; } } - public function testRetrieveCounterList():void { + public function testRetrieveCounterList(): void { $in = ['op' => "getCounters", 'sid' => "PriestsOfSyrinx"]; \Phake::when(Arsse::$db)->folderList($this->anything())->thenReturn(new Result($this->v($this->folders))); \Phake::when(Arsse::$db)->subscriptionList($this->anything())->thenReturn(new Result($this->v($this->subscriptions))); @@ -1206,7 +1206,7 @@ LONG_STRING; $this->assertMessage($this->respGood($exp), $this->req($in)); } - public function testRetrieveTheLabelList():void { + public function testRetrieveTheLabelList(): void { $in = [ ['op' => "getLabels", 'sid' => "PriestsOfSyrinx"], ['op' => "getLabels", 'sid' => "PriestsOfSyrinx", 'article_id' => 1], @@ -1251,7 +1251,7 @@ LONG_STRING; } } - public function testAssignArticlesToALabel():void { + public function testAssignArticlesToALabel(): void { $list = [ range(1, 100), range(1, 50), @@ -1289,7 +1289,7 @@ LONG_STRING; $this->assertMessage($exp, $this->req($in[6])); } - public function testRetrieveFeedTree():void { + public function testRetrieveFeedTree(): void { $in = [ ['op' => "getFeedTree", 'sid' => "PriestsOfSyrinx", 'include_empty' => true], ['op' => "getFeedTree", 'sid' => "PriestsOfSyrinx"], @@ -1306,7 +1306,7 @@ LONG_STRING; $this->assertMessage($this->respGood($exp), $this->req($in[1])); } - public function testMarkFeedsAsRead():void { + public function testMarkFeedsAsRead(): void { $in1 = [ // no-ops ['op' => "catchupFeed", 'sid' => "PriestsOfSyrinx"], @@ -1357,7 +1357,7 @@ LONG_STRING; \Phake::verify(Arsse::$db)->articleMark($this->anything(), ['read' => true], $this->equalTo((new Context)->modifiedSince($t), 2)); // within two seconds } - public function testRetrieveFeedList():void { + public function testRetrieveFeedList(): void { $in1 = [ ['op' => "getFeeds", 'sid' => "PriestsOfSyrinx"], ['op' => "getFeeds", 'sid' => "PriestsOfSyrinx", 'cat_id' => -1], @@ -1519,7 +1519,7 @@ LONG_STRING; return $out; } - public function testChangeArticles():void { + public function testChangeArticles(): void { $in = [ ['op' => "updateArticle", 'sid' => "PriestsOfSyrinx"], ['op' => "updateArticle", 'sid' => "PriestsOfSyrinx", 'article_ids' => "42, 2112, -1"], @@ -1604,7 +1604,7 @@ LONG_STRING; } } - public function testListArticles():void { + public function testListArticles(): void { $in = [ // error conditions ['op' => "getArticle", 'sid' => "PriestsOfSyrinx"], @@ -1693,7 +1693,7 @@ LONG_STRING; $this->assertMessage($this->respGood([$exp[0]]), $this->req($in[5])); } - public function testRetrieveCompactHeadlines():void { + public function testRetrieveCompactHeadlines(): void { $in1 = [ // erroneous input ['op' => "getCompactHeadlines", 'sid' => "PriestsOfSyrinx"], @@ -1779,7 +1779,7 @@ LONG_STRING; } } - public function testRetrieveFullHeadlines():void { + public function testRetrieveFullHeadlines(): void { $in1 = [ // empty results ['op' => "getHeadlines", 'sid' => "PriestsOfSyrinx", 'feed_id' => 0], @@ -1895,7 +1895,7 @@ LONG_STRING; } } - public function testRetrieveFullHeadlinesCheckingExtraFields():void { + public function testRetrieveFullHeadlinesCheckingExtraFields(): void { $in = [ // empty results ['op' => "getHeadlines", 'sid' => "PriestsOfSyrinx", 'feed_id' => -4], diff --git a/tests/cases/REST/TinyTinyRSS/TestIcon.php b/tests/cases/REST/TinyTinyRSS/TestIcon.php index a90bd98d..3877ab7e 100644 --- a/tests/cases/REST/TinyTinyRSS/TestIcon.php +++ b/tests/cases/REST/TinyTinyRSS/TestIcon.php @@ -48,7 +48,7 @@ class TestIcon extends \JKingWeb\Arsse\Test\AbstractTest { return $this->req($target, $method, ""); } - public function testRetrieveFavion():void { + public function testRetrieveFavion(): void { \Phake::when(Arsse::$db)->subscriptionFavicon->thenReturn(""); \Phake::when(Arsse::$db)->subscriptionFavicon(42, $this->anything())->thenReturn("http://example.com/favicon.ico"); \Phake::when(Arsse::$db)->subscriptionFavicon(2112, $this->anything())->thenReturn("http://example.net/logo.png"); @@ -71,7 +71,7 @@ class TestIcon extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertMessage($exp, $this->req("2112.ico", "PUT")); } - public function testRetrieveFavionWithHttpAuthentication():void { + public function testRetrieveFavionWithHttpAuthentication(): void { $url = "http://example.org/icon.gif\r\nLocation: http://bad.example.com/"; \Phake::when(Arsse::$db)->subscriptionFavicon->thenReturn(""); \Phake::when(Arsse::$db)->subscriptionFavicon(42, $this->user)->thenReturn($url); diff --git a/tests/cases/REST/TinyTinyRSS/TestSearch.php b/tests/cases/REST/TinyTinyRSS/TestSearch.php index 890a6bb1..f99ce7e6 100644 --- a/tests/cases/REST/TinyTinyRSS/TestSearch.php +++ b/tests/cases/REST/TinyTinyRSS/TestSearch.php @@ -118,7 +118,7 @@ class TestSearch extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideSearchStrings */ - public function testApplySearchToContext(string $search, $exp):void { + public function testApplySearchToContext(string $search, $exp): void { $act = Search::parse($search); $this->assertEquals($exp, $act); } diff --git a/tests/cases/Service/TestSerial.php b/tests/cases/Service/TestSerial.php index 4031c80e..93209798 100644 --- a/tests/cases/Service/TestSerial.php +++ b/tests/cases/Service/TestSerial.php @@ -19,16 +19,16 @@ class TestSerial extends \JKingWeb\Arsse\Test\AbstractTest { Arsse::$db = \Phake::mock(Database::class); } - public function testConstruct():void { + public function testConstruct(): void { $this->assertTrue(Driver::requirementsMet()); $this->assertInstanceOf(DriverInterface::class, new Driver); } - public function testFetchDriverName():void { + public function testFetchDriverName(): void { $this->assertTrue(strlen(Driver::driverName()) > 0); } - public function testEnqueueFeeds():void { + public function testEnqueueFeeds(): void { $d = new Driver; $this->assertSame(3, $d->queue(1, 2, 3)); $this->assertSame(5, $d->queue(4, 5)); @@ -36,7 +36,7 @@ class TestSerial extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(1, $d->queue(5)); } - public function testRefreshFeeds():void { + public function testRefreshFeeds(): void { $d = new Driver; $d->queue(1, 4, 3); $this->assertSame(Arsse::$conf->serviceQueueWidth, $d->exec()); diff --git a/tests/cases/Service/TestService.php b/tests/cases/Service/TestService.php index 55930602..804cd553 100644 --- a/tests/cases/Service/TestService.php +++ b/tests/cases/Service/TestService.php @@ -22,14 +22,14 @@ class TestService extends \JKingWeb\Arsse\Test\AbstractTest { $this->srv = new Service(); } - public function testCheckIn():void { + public function testCheckIn(): void { $now = time(); $this->srv->checkIn(); \Phake::verify(Arsse::$db)->metaSet("service_last_checkin", \Phake::capture($then), "datetime"); $this->assertTime($now, $then); } - public function testReportHavingCheckedIn():void { + public function testReportHavingCheckedIn(): void { // the mock's metaGet() returns null by default $this->assertFalse(Service::hasCheckedIn()); $interval = Arsse::$conf->serviceFrequency; @@ -40,27 +40,27 @@ class TestService extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertFalse(Service::hasCheckedIn()); } - public function testPerformPreCleanup():void { + public function testPerformPreCleanup(): void { $this->assertTrue(Service::cleanupPre()); \Phake::verify(Arsse::$db)->feedCleanup(); \Phake::verify(Arsse::$db)->sessionCleanup(); } - public function testPerformShortPostCleanup():void { + public function testPerformShortPostCleanup(): void { \Phake::when(Arsse::$db)->articleCleanup()->thenReturn(0); $this->assertTrue(Service::cleanupPost()); \Phake::verify(Arsse::$db)->articleCleanup(); \Phake::verify(Arsse::$db, \Phake::times(0))->driverMaintenance(); } - public function testPerformFullPostCleanup():void { + public function testPerformFullPostCleanup(): void { \Phake::when(Arsse::$db)->articleCleanup()->thenReturn(1); $this->assertTrue(Service::cleanupPost()); \Phake::verify(Arsse::$db)->articleCleanup(); \Phake::verify(Arsse::$db)->driverMaintenance(); } - public function testRefreshFeeds():void { + public function testRefreshFeeds(): void { // set up mock database actions \Phake::when(Arsse::$db)->metaSet->thenReturn(true); \Phake::when(Arsse::$db)->feedCleanup->thenReturn(true); diff --git a/tests/cases/Service/TestSubprocess.php b/tests/cases/Service/TestSubprocess.php index 9562048c..f5c3a371 100644 --- a/tests/cases/Service/TestSubprocess.php +++ b/tests/cases/Service/TestSubprocess.php @@ -18,16 +18,16 @@ class TestSubprocess extends \JKingWeb\Arsse\Test\AbstractTest { self::setConf(); } - public function testConstruct():void { + public function testConstruct(): void { $this->assertTrue(Driver::requirementsMet()); $this->assertInstanceOf(DriverInterface::class, new Driver); } - public function testFetchDriverName():void { + public function testFetchDriverName(): void { $this->assertTrue(strlen(Driver::driverName()) > 0); } - public function testEnqueueFeeds():void { + public function testEnqueueFeeds(): void { $d = new Driver; $this->assertSame(3, $d->queue(1, 2, 3)); $this->assertSame(5, $d->queue(4, 5)); @@ -35,7 +35,7 @@ class TestSubprocess extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(1, $d->queue(5)); } - public function testRefreshFeeds():void { + public function testRefreshFeeds(): void { $d = \Phake::partialMock(Driver::class); \Phake::when($d)->execCmd->thenReturnCallback(function(string $cmd) { // FIXME: Does this work in Windows? diff --git a/tests/cases/TestArsse.php b/tests/cases/TestArsse.php index a6b28e7c..edb7e121 100644 --- a/tests/cases/TestArsse.php +++ b/tests/cases/TestArsse.php @@ -22,7 +22,7 @@ class TestArsse extends \JKingWeb\Arsse\Test\AbstractTest { self::clearData(); } - public function testLoadExistingData():void { + public function testLoadExistingData(): void { $lang = Arsse::$lang = \Phake::mock(Lang::class); $db = Arsse::$db = \Phake::mock(Database::class); $user = Arsse::$user = \Phake::mock(User::class); @@ -36,7 +36,7 @@ class TestArsse extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify($lang)->set("test"); } - public function testLoadNewData():void { + public function testLoadNewData(): void { if (!\JKingWeb\Arsse\Db\SQLite3\Driver::requirementsMet() && !\JKingWeb\Arsse\Db\SQLite3\PDODriver::requirementsMet()) { $this->markTestSkipped("A functional SQLite interface is required for this test"); } diff --git a/tests/cases/User/TestInternal.php b/tests/cases/User/TestInternal.php index ea1221b3..4b9cfb80 100644 --- a/tests/cases/User/TestInternal.php +++ b/tests/cases/User/TestInternal.php @@ -21,11 +21,11 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when(Arsse::$db)->begin->thenReturn(\Phake::mock(\JKingWeb\Arsse\Db\Transaction::class)); } - public function testConstruct():void { + public function testConstruct(): void { $this->assertInstanceOf(DriverInterface::class, new Driver); } - public function testFetchDriverName():void { + public function testFetchDriverName(): void { $this->assertTrue(strlen(Driver::driverName()) > 0); } @@ -33,7 +33,7 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { * @dataProvider provideAuthentication * @group slow */ - public function testAuthenticateAUser(bool $authorized, string $user, $password, bool $exp):void { + public function testAuthenticateAUser(bool $authorized, string $user, $password, bool $exp): void { if ($authorized) { \Phake::when(Arsse::$db)->userPasswordGet("john.doe@example.com")->thenReturn('$2y$10$1zbqRJhxM8uUjeSBPp4IhO90xrqK0XjEh9Z16iIYEFRV4U.zeAFom'); // hash of "secret" \Phake::when(Arsse::$db)->userPasswordGet("jane.doe@example.com")->thenReturn('$2y$10$bK1ljXfTSyc2D.NYvT.Eq..OpehLRXVbglW.23ihVuyhgwJCd.7Im'); // hash of "superman" @@ -74,12 +74,12 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { ]; } - public function testAuthorizeAnAction():void { + public function testAuthorizeAnAction(): void { \Phake::verifyNoFurtherInteraction(Arsse::$db); $this->assertTrue((new Driver)->authorize("someone", "something")); } - public function testListUsers():void { + public function testListUsers(): void { $john = "john.doe@example.com"; $jane = "jane.doe@example.com"; \Phake::when(Arsse::$db)->userList->thenReturn([$john, $jane])->thenReturn([$jane, $john]); @@ -89,7 +89,7 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db, \Phake::times(2))->userList; } - public function testCheckThatAUserExists():void { + public function testCheckThatAUserExists(): void { $john = "john.doe@example.com"; $jane = "jane.doe@example.com"; \Phake::when(Arsse::$db)->userExists($john)->thenReturn(true); @@ -101,7 +101,7 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db)->userExists($jane); } - public function testAddAUser():void { + public function testAddAUser(): void { $john = "john.doe@example.com"; \Phake::when(Arsse::$db)->userAdd->thenReturnCallback(function($user, $pass) { return $pass; @@ -114,7 +114,7 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::verify(Arsse::$db)->userAdd; } - public function testRemoveAUser():void { + public function testRemoveAUser(): void { $john = "john.doe@example.com"; \Phake::when(Arsse::$db)->userRemove->thenReturn(true)->thenThrow(new \JKingWeb\Arsse\User\Exception("doesNotExist")); $driver = new Driver; @@ -128,21 +128,21 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { } } - public function testSetAPassword():void { + public function testSetAPassword(): void { $john = "john.doe@example.com"; \Phake::verifyNoFurtherInteraction(Arsse::$db); $this->assertSame("superman", (new Driver)->userPasswordSet($john, "superman")); $this->assertSame(null, (new Driver)->userPasswordSet($john, null)); } - public function testUnsetAPassword():void { + public function testUnsetAPassword(): void { $drv = \Phake::partialMock(Driver::class); \Phake::when($drv)->userExists->thenReturn(true); \Phake::verifyNoFurtherInteraction(Arsse::$db); $this->assertTrue($drv->userPasswordUnset("john.doe@example.com")); } - public function testUnsetAPasswordForAMssingUser():void { + public function testUnsetAPasswordForAMssingUser(): void { $drv = \Phake::partialMock(Driver::class); \Phake::when($drv)->userExists->thenReturn(false); \Phake::verifyNoFurtherInteraction(Arsse::$db); diff --git a/tests/cases/User/TestUser.php b/tests/cases/User/TestUser.php index 4b0c3998..df31c591 100644 --- a/tests/cases/User/TestUser.php +++ b/tests/cases/User/TestUser.php @@ -24,12 +24,12 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { $this->drv = \Phake::mock(Driver::class); } - public function testConstruct():void { + public function testConstruct(): void { $this->assertInstanceOf(User::class, new User($this->drv)); $this->assertInstanceOf(User::class, new User); } - public function testConversionToString():void { + public function testConversionToString(): void { $u = new User; $u->id = "john.doe@example.com"; $this->assertSame("john.doe@example.com", (string) $u); @@ -38,7 +38,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideAuthentication */ - public function testAuthenticateAUser(bool $preAuth, string $user, string $password, bool $exp):void { + public function testAuthenticateAUser(bool $preAuth, string $user, string $password, bool $exp): void { Arsse::$conf->userPreAuth = $preAuth; \Phake::when($this->drv)->auth->thenReturn(false); \Phake::when($this->drv)->auth("john.doe@example.com", "secret")->thenReturn(true); @@ -69,7 +69,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideUserList */ - public function testListUsers(bool $authorized, $exp):void { + public function testListUsers(bool $authorized, $exp): void { $u = new User($this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userList->thenReturn(["john.doe@example.com", "jane.doe@example.com"]); @@ -89,7 +89,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideExistence */ - public function testCheckThatAUserExists(bool $authorized, string $user, $exp):void { + public function testCheckThatAUserExists(bool $authorized, string $user, $exp): void { $u = new User($this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userExists("john.doe@example.com")->thenReturn(true); @@ -112,7 +112,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideAdditions */ - public function testAddAUser(bool $authorized, string $user, $password, $exp):void { + public function testAddAUser(bool $authorized, string $user, $password, $exp): void { $u = new User($this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userAdd("john.doe@example.com", $this->anything())->thenThrow(new \JKingWeb\Arsse\User\Exception("alreadyExists")); @@ -130,7 +130,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideAdditions */ - public function testAddAUserWithARandomPassword(bool $authorized, string $user, $password, $exp):void { + public function testAddAUserWithARandomPassword(bool $authorized, string $user, $password, $exp): void { $u = \Phake::partialMock(User::class, $this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userAdd($this->anything(), $this->isNull())->thenReturn(null); @@ -172,7 +172,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideRemovals */ - public function testRemoveAUser(bool $authorized, string $user, bool $exists, $exp):void { + public function testRemoveAUser(bool $authorized, string $user, bool $exists, $exp): void { $u = new User($this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userRemove("john.doe@example.com")->thenReturn(true); @@ -210,7 +210,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider providePasswordChanges */ - public function testChangeAPassword(bool $authorized, string $user, $password, bool $exists, $exp):void { + public function testChangeAPassword(bool $authorized, string $user, $password, bool $exists, $exp): void { $u = new User($this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userPasswordSet("john.doe@example.com", $this->anything(), $this->anything())->thenReturnCallback(function($user, $pass, $old) { @@ -237,7 +237,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider providePasswordChanges */ - public function testChangeAPasswordToARandomPassword(bool $authorized, string $user, $password, bool $exists, $exp):void { + public function testChangeAPasswordToARandomPassword(bool $authorized, string $user, $password, bool $exists, $exp): void { $u = \Phake::partialMock(User::class, $this->drv); \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userPasswordSet($this->anything(), $this->isNull(), $this->anything())->thenReturn(null); @@ -289,7 +289,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider providePasswordClearings */ - public function testClearAPassword(bool $authorized, bool $exists, string $user, $exp):void { + public function testClearAPassword(bool $authorized, bool $exists, string $user, $exp): void { \Phake::when($this->drv)->authorize->thenReturn($authorized); \Phake::when($this->drv)->userPasswordUnset->thenReturn(true); \Phake::when($this->drv)->userPasswordUnset("jane.doe@example.net", null)->thenThrow(new \JKingWeb\Arsse\User\Exception("doesNotExist")); From e583ffea6728852da6946ecfbe9af29ecbfc8885 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Tue, 21 Jan 2020 08:42:38 -0500 Subject: [PATCH 11/50] Start on integrating well-maintained picofeed fork Picofeed configuration does not seem to get passed to Guzzle. --- composer.json | 8 +- composer.lock | 445 +++++++++++++++++++++++++++--- lib/AbstractException.php | 3 +- lib/Feed.php | 6 + lib/Feed/Exception.php | 36 ++- locale/en.php | 3 +- tests/cases/Feed/TestFetching.php | 6 +- 7 files changed, 457 insertions(+), 50 deletions(-) diff --git a/composer.json b/composer.json index 0fef64b7..6d05da07 100644 --- a/composer.json +++ b/composer.json @@ -17,13 +17,19 @@ } ], + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/JKingweb/picoFeed-1" + } + ], "require": { "php": "^7.1", "ext-intl": "*", "ext-json": "*", "ext-hash": "*", "ext-dom": "*", - "p3k/picofeed": "0.1.*", + "nicolus/picofeed": "dev-fixed", "hosteurope/password-generator": "1.*", "docopt/docopt": "1.*", "jkingweb/druuid": "3.*", diff --git a/composer.lock b/composer.lock index bc0f82a0..f61e035b 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": "356cebec1e1e689b4249b661f787b7d9", + "content-hash": "9710e0638278222dc8d6207d4141e529", "packages": [ { "name": "docopt/docopt", @@ -52,6 +52,195 @@ ], "time": "2019-12-03T02:48:46+00:00" }, + { + "name": "guzzlehttp/guzzle", + "version": "6.5.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "43ece0e75098b7ecd8d13918293029e555a50f82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82", + "reference": "43ece0e75098b7ecd8d13918293029e555a50f82", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2019-12-23T11:57:10+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2019-07-01T23:21:34+00:00" + }, { "name": "hosteurope/password-generator", "version": "v1.0.1", @@ -137,6 +326,81 @@ ], "time": "2017-02-09T14:17:01+00:00" }, + { + "name": "kevinrob/guzzle-cache-middleware", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/Kevinrob/guzzle-cache-middleware.git", + "reference": "6952064f7747756b0be7b4c234c0fd7535ea4c8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Kevinrob/guzzle-cache-middleware/zipball/6952064f7747756b0be7b4c234c0fd7535ea4c8c", + "reference": "6952064f7747756b0be7b4c234c0fd7535ea4c8c", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "cache/array-adapter": "^0.4", + "doctrine/cache": "^1.0", + "guzzlehttp/guzzle": "^6.0", + "illuminate/cache": "^5.0", + "league/flysystem": "^1.0", + "phpunit/phpunit": "^4.0 || ^5.0", + "psr/cache": "^1.0" + }, + "suggest": { + "doctrine/cache": "This library have a lot of ready-to-use cache storage (to be use with Kevinrob\\GuzzleCache\\Storage\\DoctrineCacheStorage)", + "guzzlehttp/guzzle": "For using this library. It was created for Guzzle6. (but you can use it with any PSR-7 HTTP Client)", + "laravel/framework": "To be use with Kevinrob\\GuzzleCache\\Storage\\LaravelCacheStorage", + "league/flysystem": "To be use with Kevinrob\\GuzzleCache\\Storage\\FlysystemStorage", + "psr/cache": "To be use with Kevinrob\\GuzzleCache\\Storage\\Psr6CacheStorage" + }, + "type": "library", + "autoload": { + "psr-4": { + "Kevinrob\\GuzzleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Robatel", + "email": "kevinrob2@gmail.com", + "homepage": "https://github.com/Kevinrob" + } + ], + "description": "A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)", + "homepage": "https://github.com/Kevinrob/guzzle-cache-middleware", + "keywords": [ + "Etag", + "Flysystem", + "Guzzle", + "cache", + "cache-control", + "doctrine", + "expiration", + "guzzle6", + "handler", + "http", + "http 1.1", + "middleware", + "performance", + "php", + "promise", + "psr6", + "psr7", + "rfc7234", + "validation" + ], + "time": "2017-08-17T12:23:43+00:00" + }, { "name": "laminas/laminas-diactoros", "version": "2.2.2", @@ -280,6 +544,56 @@ ], "time": "2019-12-31T17:06:16+00:00" }, + { + "name": "laminas/laminas-xml", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-xml.git", + "reference": "879cc66d1bba6a37705e98074f52a6960c220020" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-xml/zipball/879cc66d1bba6a37705e98074f52a6960c220020", + "reference": "879cc66d1bba6a37705e98074f52a6960c220020", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^5.6 || ^7.0" + }, + "replace": { + "zendframework/zendxml": "self.version" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev", + "dev-develop": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laminas\\Xml\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Utility library for XML usage, best practices, and security in PHP", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "security", + "xml" + ], + "time": "2019-12-31T18:05:42+00:00" + }, { "name": "laminas/laminas-zendframework-bridge", "version": "1.0.1", @@ -333,17 +647,17 @@ "time": "2020-01-07T22:58:31+00:00" }, { - "name": "p3k/picofeed", - "version": "v0.1.35", + "name": "nicolus/picofeed", + "version": "dev-fixed", "source": { "type": "git", - "url": "https://github.com/aaronpk/picofeed.git", - "reference": "b2a48acb026df91d2e21dfc8b4edbc1fc48f01f1" + "url": "https://github.com/JKingweb/picoFeed-1.git", + "reference": "419bc85afb18a84e43274029cf8e198cc5785425" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aaronpk/picofeed/zipball/b2a48acb026df91d2e21dfc8b4edbc1fc48f01f1", - "reference": "b2a48acb026df91d2e21dfc8b4edbc1fc48f01f1", + "url": "https://api.github.com/repos/JKingweb/picoFeed-1/zipball/419bc85afb18a84e43274029cf8e198cc5785425", + "reference": "419bc85afb18a84e43274029cf8e198cc5785425", "shasum": "" }, "require": { @@ -352,16 +666,22 @@ "ext-libxml": "*", "ext-simplexml": "*", "ext-xml": "*", - "php": ">=5.3.0", - "zendframework/zendxml": "^1.0" + "guzzlehttp/guzzle": "~6.0", + "kevinrob/guzzle-cache-middleware": "^2.1", + "laminas/laminas-xml": "^1.0", + "php": ">=7.1", + "psr/log": "^1.0" }, "require-dev": { + "blastcloud/guzzler": "^1.5", + "monolog/monolog": "^1.23", + "php-coveralls/php-coveralls": "^2.1", "phpdocumentor/reflection-docblock": "2.0.4", - "phpunit/phpunit": "4.8.26", - "symfony/yaml": "2.8.7" + "phpunit/phpunit": "^7.0.0" }, "suggest": { - "ext-curl": "PicoFeed will use cURL if present" + "ext-curl": "PicoFeed will use cURL if present", + "monolog/monolog": "You can set a monolog Logger to get debug information from PicoFeed" }, "bin": [ "picofeed" @@ -372,18 +692,23 @@ "PicoFeed": "lib/" } }, - "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Frédéric Guillot" + }, + { + "name": "Nicolas Bailly" } ], - "description": "Modern library to handle RSS/Atom feeds", - "homepage": "https://github.com/aaronpk/picoFeed", - "time": "2019-01-17T17:26:41+00:00" + "description": "RSS/Atom parsing library", + "homepage": "https://github.com/nicolus/picoFeed", + "support": { + "source": "https://github.com/JKingweb/picoFeed-1/tree/fixed" + }, + "time": "2020-01-21T00:09:22+00:00" }, { "name": "psr/http-factory", @@ -541,51 +866,91 @@ "time": "2018-10-30T16:46:14+00:00" }, { - "name": "zendframework/zendxml", - "version": "1.2.0", + "name": "psr/log", + "version": "1.1.2", "source": { "type": "git", - "url": "https://github.com/zendframework/ZendXml.git", - "reference": "eceab37a591c9e140772a1470338258857339e00" + "url": "https://github.com/php-fig/log.git", + "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/ZendXml/zipball/eceab37a591c9e140772a1470338258857339e00", - "reference": "eceab37a591c9e140772a1470338258857339e00", + "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", + "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", - "zendframework/zend-coding-standard": "~1.0.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev", - "dev-develop": "1.3.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { - "ZendXml\\": "src/" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], - "description": "Utility library for XML usage, best practices, and security in PHP", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ - "ZendFramework", - "security", - "xml", - "zf" + "log", + "psr", + "psr-3" ], - "abandoned": "laminas/laminas-xml", - "time": "2019-01-22T19:42:14+00:00" + "time": "2019-11-01T11:05:21+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" } ], "packages-dev": [ @@ -631,7 +996,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "nicolus/picofeed": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/lib/AbstractException.php b/lib/AbstractException.php index 0165d464..4c0496a6 100644 --- a/lib/AbstractException.php +++ b/lib/AbstractException.php @@ -77,11 +77,12 @@ abstract class AbstractException extends \Exception { "User/ExceptionSession.invalid" => 10431, "Feed/Exception.invalidCertificate" => 10501, "Feed/Exception.invalidUrl" => 10502, - "Feed/Exception.maxRedirect" => 10503, + "Feed/Exception.tooManyRedirects" => 10503, "Feed/Exception.maxSize" => 10504, "Feed/Exception.timeout" => 10505, "Feed/Exception.forbidden" => 10506, "Feed/Exception.unauthorized" => 10507, + "Feed/Exception.transmissionError" => 10508, "Feed/Exception.malformedXml" => 10511, "Feed/Exception.xmlEntity" => 10512, "Feed/Exception.subscriptionNotFound" => 10521, diff --git a/lib/Feed.php b/lib/Feed.php index 87e6016f..71f30da0 100644 --- a/lib/Feed.php +++ b/lib/Feed.php @@ -101,6 +101,8 @@ class Feed { return $client; } catch (PicoFeedException $e) { throw new Feed\Exception($url, $e); + } catch (\GuzzleHttp\Exception\GuzzleException $e) { + throw new Feed\Exception($url, $e); } } @@ -121,6 +123,10 @@ class Feed { // work around a PicoFeed memory leak libxml_use_internal_errors(false); throw new Feed\Exception($this->resource->getUrl(), $e); + } catch (\GuzzleHttp\Exception\GuzzleException $e) { + // work around a PicoFeed memory leak + libxml_use_internal_errors(false); + throw new Feed\Exception($this->resource->getUrl(), $e); } // PicoFeed does not provide valid ids when there is no id element. Its solution diff --git a/lib/Feed/Exception.php b/lib/Feed/Exception.php index 91fe085c..8e7bbab4 100644 --- a/lib/Feed/Exception.php +++ b/lib/Feed/Exception.php @@ -6,13 +6,39 @@ declare(strict_types=1); namespace JKingWeb\Arsse\Feed; +use GuzzleHttp\Exception\GuzzleException; + class Exception extends \JKingWeb\Arsse\AbstractException { public function __construct($url, \Throwable $e) { - $className = get_class($e); - // Convert the exception thrown by PicoFeed to the one to be thrown here. - $msgID = preg_replace('/^PicoFeed\\\(?:Client|Parser|Reader)\\\([A-Za-z]+)Exception$/', '$1', $className); - // If the message ID doesn't change then it's unknown. - $msgID = ($msgID !== $className) ? lcfirst($msgID) : ''; + if ($e instanceof GuzzleException) { + switch ($e->getCode()) { + case 401: + $msgID = "unauthorized"; + break; + case 403: + $msgID = "forbidden"; + break; + case 404: + case 410: + $msgID = "invalidUrl"; + break; + case 508: + $msgID = "tooManyRedirects"; + break; + default: + $c = $e->getCode(); + if ($c >= 400 && $c < 600) { + $msgID = "transmissionError"; + } + } + } + if (!($msgID ?? "")) { + $className = get_class($e); + // Convert the exception thrown by PicoFeed to the one to be thrown here. + $msgID = preg_replace('/^(?:PicoFeed\\\(?:Client|Parser|Reader)|GuzzleHttp\\\Exception)\\\([A-Za-z]+)Exception$/', '$1', $className); + // If the message ID doesn't change then it's unknown. + $msgID = ($msgID !== $className) ? lcfirst($msgID) : ''; + } parent::__construct($msgID, ['url' => $url], $e); } } diff --git a/locale/en.php b/locale/en.php index e095db8a..ff75bc8b 100644 --- a/locale/en.php +++ b/locale/en.php @@ -146,11 +146,12 @@ return [ 'Exception.JKingWeb/Arsse/User/ExceptionSession.invalid' => 'Session with ID {0} does not exist', 'Exception.JKingWeb/Arsse/Feed/Exception.invalidCertificate' => 'Could not download feed "{url}" because its server is serving an invalid SSL certificate', 'Exception.JKingWeb/Arsse/Feed/Exception.invalidUrl' => 'Feed URL "{url}" is invalid', - 'Exception.JKingWeb/Arsse/Feed/Exception.maxRedirect' => 'Could not download feed "{url}" because its server reached its maximum number of HTTP redirections', + 'Exception.JKingWeb/Arsse/Feed/Exception.tooManyRedirects' => 'Could not download feed "{url}" because its server reached its maximum number of HTTP redirections', 'Exception.JKingWeb/Arsse/Feed/Exception.maxSize' => 'Could not download feed "{url}" because its size exceeds the maximum allowed on its server', 'Exception.JKingWeb/Arsse/Feed/Exception.timeout' => 'Could not download feed "{url}" because its server timed out', 'Exception.JKingWeb/Arsse/Feed/Exception.forbidden' => 'Could not download feed "{url}" because you do not have permission to access it', 'Exception.JKingWeb/Arsse/Feed/Exception.unauthorized' => 'Could not download feed "{url}" because you provided insufficient or invalid credentials', + 'Exception.JKingWeb/Arsse/Feed/Exception.transmissionError' => 'Could not download feed "{url}" because of a network error', 'Exception.JKingWeb/Arsse/Feed/Exception.malformedXml' => 'Could not parse feed "{url}" because it is malformed', 'Exception.JKingWeb/Arsse/Feed/Exception.xmlEntity' => 'Refused to parse feed "{url}" because it contains an XXE attack', 'Exception.JKingWeb/Arsse/Feed/Exception.subscriptionNotFound' => 'Unable to find a feed at location "{url}"', diff --git a/tests/cases/Feed/TestFetching.php b/tests/cases/Feed/TestFetching.php index 573c7e96..c83f269c 100644 --- a/tests/cases/Feed/TestFetching.php +++ b/tests/cases/Feed/TestFetching.php @@ -28,7 +28,7 @@ class TestFetching extends \JKingWeb\Arsse\Test\AbstractTest { } public function testHandle400(): void { - $this->assertException("unsupportedFeedFormat", "Feed"); + $this->assertException("transmissionError", "Feed"); new Feed(null, $this->base."Fetching/Error?code=400"); } @@ -48,12 +48,12 @@ class TestFetching extends \JKingWeb\Arsse\Test\AbstractTest { } public function testHandle500(): void { - $this->assertException("unsupportedFeedFormat", "Feed"); + $this->assertException("transmissionError", "Feed"); new Feed(null, $this->base."Fetching/Error?code=500"); } public function testHandleARedirectLoop(): void { - $this->assertException("maxRedirect", "Feed"); + $this->assertException("tooManyRedirects", "Feed"); new Feed(null, $this->base."Fetching/EndlessLoop?i=0"); } From 49d003082d46e2eb1859a75fabc527916db31aac Mon Sep 17 00:00:00 2001 From: "J. King" Date: Thu, 23 Jan 2020 17:07:20 -0500 Subject: [PATCH 12/50] Fix problems with nicolus/picofeed This involved multiple fixes to Picofeed itself, not all of which have been merged upstream yet --- composer.lock | 8 +++--- lib/AbstractException.php | 2 +- lib/Feed.php | 2 +- lib/Feed/Exception.php | 27 +++++++++++++++--- locale/en.php | 2 +- tests/cases/Feed/TestFeed.php | 28 ++++++++++--------- tests/cases/Feed/TestFetching.php | 3 +- tests/docroot/Feed/Caching/304Conditional.php | 23 +++++++++++++++ tests/docroot/Feed/Caching/304ETagOnly.php | 2 +- tests/docroot/Feed/Caching/304LastModOnly.php | 2 +- tests/server.php | 2 ++ 11 files changed, 74 insertions(+), 27 deletions(-) create mode 100644 tests/docroot/Feed/Caching/304Conditional.php diff --git a/composer.lock b/composer.lock index f61e035b..55e69958 100644 --- a/composer.lock +++ b/composer.lock @@ -652,12 +652,12 @@ "source": { "type": "git", "url": "https://github.com/JKingweb/picoFeed-1.git", - "reference": "419bc85afb18a84e43274029cf8e198cc5785425" + "reference": "009250e98ff0975335176f74e5fea95104058d09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JKingweb/picoFeed-1/zipball/419bc85afb18a84e43274029cf8e198cc5785425", - "reference": "419bc85afb18a84e43274029cf8e198cc5785425", + "url": "https://api.github.com/repos/JKingweb/picoFeed-1/zipball/009250e98ff0975335176f74e5fea95104058d09", + "reference": "009250e98ff0975335176f74e5fea95104058d09", "shasum": "" }, "require": { @@ -708,7 +708,7 @@ "support": { "source": "https://github.com/JKingweb/picoFeed-1/tree/fixed" }, - "time": "2020-01-21T00:09:22+00:00" + "time": "2020-01-23T22:03:32+00:00" }, { "name": "psr/http-factory", diff --git a/lib/AbstractException.php b/lib/AbstractException.php index 4c0496a6..8aaff950 100644 --- a/lib/AbstractException.php +++ b/lib/AbstractException.php @@ -77,7 +77,7 @@ abstract class AbstractException extends \Exception { "User/ExceptionSession.invalid" => 10431, "Feed/Exception.invalidCertificate" => 10501, "Feed/Exception.invalidUrl" => 10502, - "Feed/Exception.tooManyRedirects" => 10503, + "Feed/Exception.maxRedirect" => 10503, "Feed/Exception.maxSize" => 10504, "Feed/Exception.timeout" => 10505, "Feed/Exception.forbidden" => 10506, diff --git a/lib/Feed.php b/lib/Feed.php index 71f30da0..984b4493 100644 --- a/lib/Feed.php +++ b/lib/Feed.php @@ -50,7 +50,7 @@ class Feed { $this->resource = self::download($url, $lastModified, $etag, $username, $password); // format the HTTP Last-Modified date returned $lastMod = $this->resource->getLastModified(); - if (strlen($lastMod)) { + if (strlen($lastMod ?? "")) { $this->lastModified = Date::normalize($lastMod, "http"); } $this->modified = $this->resource->isModified(); diff --git a/lib/Feed/Exception.php b/lib/Feed/Exception.php index 8e7bbab4..3cab2c93 100644 --- a/lib/Feed/Exception.php +++ b/lib/Feed/Exception.php @@ -6,11 +6,14 @@ declare(strict_types=1); namespace JKingWeb\Arsse\Feed; +use GuzzleHttp\Exception\BadResponseException; use GuzzleHttp\Exception\GuzzleException; +use GuzzleHttp\Exception\TooManyRedirectsException; +use PicoFeed\PicoFeedException; class Exception extends \JKingWeb\Arsse\AbstractException { public function __construct($url, \Throwable $e) { - if ($e instanceof GuzzleException) { + if ($e instanceof BadResponseException) { switch ($e->getCode()) { case 401: $msgID = "unauthorized"; @@ -31,13 +34,29 @@ class Exception extends \JKingWeb\Arsse\AbstractException { $msgID = "transmissionError"; } } - } - if (!($msgID ?? "")) { + } elseif ($e instanceof TooManyRedirectsException) { + $msgID = "maxRedirect"; + } elseif ($e instanceof GuzzleException) { + $m = $e->getMessage(); + if (preg_match("/^Error creating resource:/", $m)) { + // PHP stream error; the class of error is ambiguous + $msgID = "transmissionError"; // @codeCoverageIgnore + } elseif (preg_match("/^cURL error 35:/", $m)) { + $msgID = "invalidCertificate"; + } elseif (preg_match("/^cURL error 28:/", $m)) { + $msgID = "timeout"; + } else { + var_export($m); + exit; + } + } elseif ($e instanceof PicoFeedException) { $className = get_class($e); // Convert the exception thrown by PicoFeed to the one to be thrown here. - $msgID = preg_replace('/^(?:PicoFeed\\\(?:Client|Parser|Reader)|GuzzleHttp\\\Exception)\\\([A-Za-z]+)Exception$/', '$1', $className); + $msgID = preg_replace('/^PicoFeed\\\(?:Client|Parser|Reader)\\\([A-Za-z]+)Exception$/', '$1', $className); // If the message ID doesn't change then it's unknown. $msgID = ($msgID !== $className) ? lcfirst($msgID) : ''; + } else { + $msgID = get_class($e); } parent::__construct($msgID, ['url' => $url], $e); } diff --git a/locale/en.php b/locale/en.php index ff75bc8b..d66fddf3 100644 --- a/locale/en.php +++ b/locale/en.php @@ -146,7 +146,7 @@ return [ 'Exception.JKingWeb/Arsse/User/ExceptionSession.invalid' => 'Session with ID {0} does not exist', 'Exception.JKingWeb/Arsse/Feed/Exception.invalidCertificate' => 'Could not download feed "{url}" because its server is serving an invalid SSL certificate', 'Exception.JKingWeb/Arsse/Feed/Exception.invalidUrl' => 'Feed URL "{url}" is invalid', - 'Exception.JKingWeb/Arsse/Feed/Exception.tooManyRedirects' => 'Could not download feed "{url}" because its server reached its maximum number of HTTP redirections', + 'Exception.JKingWeb/Arsse/Feed/Exception.maxRedirect' => 'Could not download feed "{url}" because its server reached its maximum number of HTTP redirections', 'Exception.JKingWeb/Arsse/Feed/Exception.maxSize' => 'Could not download feed "{url}" because its size exceeds the maximum allowed on its server', 'Exception.JKingWeb/Arsse/Feed/Exception.timeout' => 'Could not download feed "{url}" because its server timed out', 'Exception.JKingWeb/Arsse/Feed/Exception.forbidden' => 'Could not download feed "{url}" because you do not have permission to access it', diff --git a/tests/cases/Feed/TestFeed.php b/tests/cases/Feed/TestFeed.php index e86628d3..1bcf50e5 100644 --- a/tests/cases/Feed/TestFeed.php +++ b/tests/cases/Feed/TestFeed.php @@ -198,24 +198,26 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame("http://example.com/1", $f->newItems[0]->url); } - public function testHandleCacheHeadersOn304(): void { - // upon 304, the client should re-use the caching header values it supplied the server - $t = time(); + /** @dataProvider provide304ResponseURLs */ + public function testHandleCacheHeadersOn304(string $url): void { + // upon 304, the client should re-use the caching header values it supplied to the server + $t = Date::transform("2010-01-01T00:00:00Z", "unix"); $e = "78567a"; - $f = new Feed(null, $this->base."Caching/304Random", Date::transform($t, "http"), $e); - $this->assertTime($t, $f->lastModified); - $this->assertSame($e, $f->resource->getETag()); - $f = new Feed(null, $this->base."Caching/304ETagOnly", Date::transform($t, "http"), $e); - $this->assertTime($t, $f->lastModified); - $this->assertSame($e, $f->resource->getETag()); - $f = new Feed(null, $this->base."Caching/304LastModOnly", Date::transform($t, "http"), $e); - $this->assertTime($t, $f->lastModified); - $this->assertSame($e, $f->resource->getETag()); - $f = new Feed(null, $this->base."Caching/304None", Date::transform($t, "http"), $e); + $f = new Feed(null, $this->base.$url."?t=$t&e=$e", Date::transform($t, "http"), $e); $this->assertTime($t, $f->lastModified); $this->assertSame($e, $f->resource->getETag()); } + public function provide304ResponseURLs() { + return [ + 'Control' => ["Caching/304Conditional"], + 'Random last-mod and ETag' => ["Caching/304Random"], + 'ETag only' => ["Caching/304ETagOnly"], + 'Last-mod only' => ["Caching/304LastModOnly"], + 'Neither last-mod nor ETag' => ["Caching/304None"], + ]; + } + public function testHandleCacheHeadersOn200(): void { // these tests should trust the server-returned time, even in cases of obviously incorrect results $t = time() - 2000; diff --git a/tests/cases/Feed/TestFetching.php b/tests/cases/Feed/TestFetching.php index c83f269c..4ac7ece5 100644 --- a/tests/cases/Feed/TestFetching.php +++ b/tests/cases/Feed/TestFetching.php @@ -53,11 +53,12 @@ class TestFetching extends \JKingWeb\Arsse\Test\AbstractTest { } public function testHandleARedirectLoop(): void { - $this->assertException("tooManyRedirects", "Feed"); + $this->assertException("maxRedirect", "Feed"); new Feed(null, $this->base."Fetching/EndlessLoop?i=0"); } public function testHandleAnOverlyLargeFeed(): void { + $this->markTestIncomplete(); Arsse::$conf->fetchSizeLimit = 512; $this->assertException("maxSize", "Feed"); new Feed(null, $this->base."Fetching/TooLarge"); diff --git a/tests/docroot/Feed/Caching/304Conditional.php b/tests/docroot/Feed/Caching/304Conditional.php new file mode 100644 index 00000000..3f55bb28 --- /dev/null +++ b/tests/docroot/Feed/Caching/304Conditional.php @@ -0,0 +1,23 @@ + 400, + ]; +} else { + return [ + 'code' => 304, + 'lastMod' => random_int(0, 2^31), + 'fields' => [ + "ETag: ".bin2hex(random_bytes(8)), + ], + ]; +} + diff --git a/tests/docroot/Feed/Caching/304ETagOnly.php b/tests/docroot/Feed/Caching/304ETagOnly.php index 3572d57d..e4986092 100644 --- a/tests/docroot/Feed/Caching/304ETagOnly.php +++ b/tests/docroot/Feed/Caching/304ETagOnly.php @@ -2,6 +2,6 @@ 'code' => 304, 'cache' => false, 'fields' => [ - "ETag: ".$_SERVER['HTTP_IF_NONE_MATCH'], + "ETag: ".($_SERVER['HTTP_IF_NONE_MATCH'] ?? "No ETag supplied"), ], ]; diff --git a/tests/docroot/Feed/Caching/304LastModOnly.php b/tests/docroot/Feed/Caching/304LastModOnly.php index 34838dc0..6576d60f 100644 --- a/tests/docroot/Feed/Caching/304LastModOnly.php +++ b/tests/docroot/Feed/Caching/304LastModOnly.php @@ -2,6 +2,6 @@ 'code' => 304, 'cache' => false, 'fields' => [ - 'Last-Modified: '.$_SERVER['HTTP_IF_MODIFIED_SINCE'], + 'Last-Modified: '.($_SERVER['HTTP_IF_MODIFIED_SINCE'] ?? "No timestamp supplied"), ], ]; diff --git a/tests/server.php b/tests/server.php index 713e0ee4..df9f28e1 100644 --- a/tests/server.php +++ b/tests/server.php @@ -31,6 +31,7 @@ which include the following data: ignore_user_abort(false); +ob_start(); $defaults = [ // default values for response 'code' => 200, 'content' => "", @@ -74,3 +75,4 @@ foreach ($response['fields'] as $h) { } // send the content echo $response['content']; +ob_end_flush(); From e29c57321056a9045ea6693bc6e29f4b2e33df9b Mon Sep 17 00:00:00 2001 From: "J. King" Date: Thu, 23 Jan 2020 17:07:32 -0500 Subject: [PATCH 13/50] Update tools --- vendor-bin/csfixer/composer.lock | 70 ++++++++++++++++---------------- vendor-bin/daux/composer.lock | 60 +++++++++++++-------------- vendor-bin/phpunit/composer.lock | 14 +++---- vendor-bin/robo/composer.lock | 60 +++++++++++++-------------- 4 files changed, 102 insertions(+), 102 deletions(-) diff --git a/vendor-bin/csfixer/composer.lock b/vendor-bin/csfixer/composer.lock index bfe93215..5c8486a2 100644 --- a/vendor-bin/csfixer/composer.lock +++ b/vendor-bin/csfixer/composer.lock @@ -571,16 +571,16 @@ }, { "name": "symfony/console", - "version": "v5.0.2", + "version": "v5.0.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "fe6e3cd889ca64172d7a742a2eb058541404ef47" + "reference": "345ab6ecb456b5147ea3b3271d7f1f00aadfd257" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/fe6e3cd889ca64172d7a742a2eb058541404ef47", - "reference": "fe6e3cd889ca64172d7a742a2eb058541404ef47", + "url": "https://api.github.com/repos/symfony/console/zipball/345ab6ecb456b5147ea3b3271d7f1f00aadfd257", + "reference": "345ab6ecb456b5147ea3b3271d7f1f00aadfd257", "shasum": "" }, "require": { @@ -643,20 +643,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-12-17T13:20:22+00:00" + "time": "2020-01-19T11:13:19+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.0.2", + "version": "v5.0.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "7b738a51645e10f864cc25c24d232fb03f37b475" + "reference": "4a7a8cdca1120c091b4797f0e5bba69c1e783224" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7b738a51645e10f864cc25c24d232fb03f37b475", - "reference": "7b738a51645e10f864cc25c24d232fb03f37b475", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4a7a8cdca1120c091b4797f0e5bba69c1e783224", + "reference": "4a7a8cdca1120c091b4797f0e5bba69c1e783224", "shasum": "" }, "require": { @@ -713,7 +713,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2019-11-18T17:27:11+00:00" + "time": "2020-01-10T21:57:37+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -775,16 +775,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.0.2", + "version": "v5.0.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "1d71f670bc5a07b9ccc97dc44f932177a322d4e6" + "reference": "3afadc0f57cd74f86379d073e694b0f2cda2a88c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/1d71f670bc5a07b9ccc97dc44f932177a322d4e6", - "reference": "1d71f670bc5a07b9ccc97dc44f932177a322d4e6", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3afadc0f57cd74f86379d073e694b0f2cda2a88c", + "reference": "3afadc0f57cd74f86379d073e694b0f2cda2a88c", "shasum": "" }, "require": { @@ -821,20 +821,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2019-11-26T23:25:11+00:00" + "time": "2020-01-21T08:40:24+00:00" }, { "name": "symfony/finder", - "version": "v5.0.2", + "version": "v5.0.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "17874dd8ab9a19422028ad56172fb294287a701b" + "reference": "4176e7cb846fe08f32518b7e0ed8462e2db8d9bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/17874dd8ab9a19422028ad56172fb294287a701b", - "reference": "17874dd8ab9a19422028ad56172fb294287a701b", + "url": "https://api.github.com/repos/symfony/finder/zipball/4176e7cb846fe08f32518b7e0ed8462e2db8d9bb", + "reference": "4176e7cb846fe08f32518b7e0ed8462e2db8d9bb", "shasum": "" }, "require": { @@ -870,20 +870,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2019-11-18T17:27:11+00:00" + "time": "2020-01-04T14:08:26+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.0.2", + "version": "v5.0.3", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "1ad3d0ffc00cc1990e5c9c7bb6b81578ec3f5f68" + "reference": "b1ab86ce52b0c0abe031367a173005a025e30e04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/1ad3d0ffc00cc1990e5c9c7bb6b81578ec3f5f68", - "reference": "1ad3d0ffc00cc1990e5c9c7bb6b81578ec3f5f68", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b1ab86ce52b0c0abe031367a173005a025e30e04", + "reference": "b1ab86ce52b0c0abe031367a173005a025e30e04", "shasum": "" }, "require": { @@ -924,7 +924,7 @@ "configuration", "options" ], - "time": "2019-11-18T17:27:11+00:00" + "time": "2020-01-04T14:08:26+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1217,16 +1217,16 @@ }, { "name": "symfony/process", - "version": "v5.0.2", + "version": "v5.0.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "ea2dc31b59d63abd9bc2356ac72eb7b3f3469f0e" + "reference": "f9ffd870f5ac01abec7b2b5e15f904ca9400ecd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/ea2dc31b59d63abd9bc2356ac72eb7b3f3469f0e", - "reference": "ea2dc31b59d63abd9bc2356ac72eb7b3f3469f0e", + "url": "https://api.github.com/repos/symfony/process/zipball/f9ffd870f5ac01abec7b2b5e15f904ca9400ecd1", + "reference": "f9ffd870f5ac01abec7b2b5e15f904ca9400ecd1", "shasum": "" }, "require": { @@ -1262,7 +1262,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-12-10T11:06:55+00:00" + "time": "2020-01-09T09:53:06+00:00" }, { "name": "symfony/service-contracts", @@ -1324,16 +1324,16 @@ }, { "name": "symfony/stopwatch", - "version": "v5.0.2", + "version": "v5.0.3", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "d410282956706e0b08681a5527447a8e6b6f421e" + "reference": "5d9add8034135b9a5f7b101d1e42c797e7f053e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/d410282956706e0b08681a5527447a8e6b6f421e", - "reference": "d410282956706e0b08681a5527447a8e6b6f421e", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5d9add8034135b9a5f7b101d1e42c797e7f053e4", + "reference": "5d9add8034135b9a5f7b101d1e42c797e7f053e4", "shasum": "" }, "require": { @@ -1370,7 +1370,7 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2019-11-18T17:27:11+00:00" + "time": "2020-01-04T14:08:26+00:00" } ], "aliases": [], diff --git a/vendor-bin/daux/composer.lock b/vendor-bin/daux/composer.lock index c53a0572..c6383be1 100644 --- a/vendor-bin/daux/composer.lock +++ b/vendor-bin/daux/composer.lock @@ -648,16 +648,16 @@ }, { "name": "symfony/console", - "version": "v4.4.2", + "version": "v4.4.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0" + "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/82437719dab1e6bdd28726af14cb345c2ec816d0", - "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0", + "url": "https://api.github.com/repos/symfony/console/zipball/e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", + "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", "shasum": "" }, "require": { @@ -720,20 +720,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-12-17T10:32:23+00:00" + "time": "2020-01-10T21:54:01+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.2", + "version": "v4.4.3", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62" + "reference": "c33998709f3fe9b8e27e0277535b07fbf6fde37a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/fcae1cff5b57b2a9c3aabefeb1527678705ddb62", - "reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c33998709f3fe9b8e27e0277535b07fbf6fde37a", + "reference": "c33998709f3fe9b8e27e0277535b07fbf6fde37a", "shasum": "" }, "require": { @@ -775,20 +775,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2019-12-19T15:57:49+00:00" + "time": "2020-01-04T13:00:46+00:00" }, { "name": "symfony/intl", - "version": "v5.0.2", + "version": "v5.0.3", "source": { "type": "git", "url": "https://github.com/symfony/intl.git", - "reference": "41f910d47883c6ab37087ca4a3332e21e1d682f4" + "reference": "2b3694976f02ed6a7894d8a772c9d55cee5d9677" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/intl/zipball/41f910d47883c6ab37087ca4a3332e21e1d682f4", - "reference": "41f910d47883c6ab37087ca4a3332e21e1d682f4", + "url": "https://api.github.com/repos/symfony/intl/zipball/2b3694976f02ed6a7894d8a772c9d55cee5d9677", + "reference": "2b3694976f02ed6a7894d8a772c9d55cee5d9677", "shasum": "" }, "require": { @@ -850,20 +850,20 @@ "l10n", "localization" ], - "time": "2019-11-26T23:25:11+00:00" + "time": "2020-01-04T14:08:26+00:00" }, { "name": "symfony/mime", - "version": "v5.0.2", + "version": "v5.0.3", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "0e6a4ced216e49d457eddcefb61132173a876d79" + "reference": "2a3c7fee1f1a0961fa9cf360d5da553d05095e59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/0e6a4ced216e49d457eddcefb61132173a876d79", - "reference": "0e6a4ced216e49d457eddcefb61132173a876d79", + "url": "https://api.github.com/repos/symfony/mime/zipball/2a3c7fee1f1a0961fa9cf360d5da553d05095e59", + "reference": "2a3c7fee1f1a0961fa9cf360d5da553d05095e59", "shasum": "" }, "require": { @@ -912,7 +912,7 @@ "mime", "mime-type" ], - "time": "2019-11-30T14:12:50+00:00" + "time": "2020-01-04T14:08:26+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1266,16 +1266,16 @@ }, { "name": "symfony/process", - "version": "v4.4.2", + "version": "v4.4.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b" + "reference": "f5697ab4cb14a5deed7473819e63141bf5352c36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/b84501ad50adb72a94fb460a5b5c91f693e99c9b", - "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b", + "url": "https://api.github.com/repos/symfony/process/zipball/f5697ab4cb14a5deed7473819e63141bf5352c36", + "reference": "f5697ab4cb14a5deed7473819e63141bf5352c36", "shasum": "" }, "require": { @@ -1311,7 +1311,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-12-06T10:06:46+00:00" + "time": "2020-01-09T09:50:08+00:00" }, { "name": "symfony/service-contracts", @@ -1373,16 +1373,16 @@ }, { "name": "symfony/yaml", - "version": "v4.4.2", + "version": "v4.4.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "a08832b974dd5fafe3085a66d41fe4c84bb2628c" + "reference": "cd014e425b3668220adb865f53bff64b3ad21767" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/a08832b974dd5fafe3085a66d41fe4c84bb2628c", - "reference": "a08832b974dd5fafe3085a66d41fe4c84bb2628c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/cd014e425b3668220adb865f53bff64b3ad21767", + "reference": "cd014e425b3668220adb865f53bff64b3ad21767", "shasum": "" }, "require": { @@ -1428,7 +1428,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2019-12-10T10:33:21+00:00" + "time": "2020-01-21T11:12:16+00:00" }, { "name": "webuni/commonmark-table-extension", diff --git a/vendor-bin/phpunit/composer.lock b/vendor-bin/phpunit/composer.lock index 3c3867b5..5b65c64b 100644 --- a/vendor-bin/phpunit/composer.lock +++ b/vendor-bin/phpunit/composer.lock @@ -561,24 +561,24 @@ }, { "name": "phpspec/prophecy", - "version": "1.10.1", + "version": "v1.10.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc" + "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9", + "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { "phpspec/phpspec": "^2.5 || ^3.2", @@ -620,7 +620,7 @@ "spy", "stub" ], - "time": "2019-12-22T21:05:45+00:00" + "time": "2020-01-20T15:57:02+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/vendor-bin/robo/composer.lock b/vendor-bin/robo/composer.lock index 49fe7d99..d7637a99 100644 --- a/vendor-bin/robo/composer.lock +++ b/vendor-bin/robo/composer.lock @@ -1095,16 +1095,16 @@ }, { "name": "symfony/console", - "version": "v4.4.2", + "version": "v4.4.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0" + "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/82437719dab1e6bdd28726af14cb345c2ec816d0", - "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0", + "url": "https://api.github.com/repos/symfony/console/zipball/e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", + "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", "shasum": "" }, "require": { @@ -1167,20 +1167,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-12-17T10:32:23+00:00" + "time": "2020-01-10T21:54:01+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.2", + "version": "v4.4.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b3c3068a72623287550fe20b84a2b01dcba2686f" + "reference": "9e3de195e5bc301704dd6915df55892f6dfc208b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b3c3068a72623287550fe20b84a2b01dcba2686f", - "reference": "b3c3068a72623287550fe20b84a2b01dcba2686f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9e3de195e5bc301704dd6915df55892f6dfc208b", + "reference": "9e3de195e5bc301704dd6915df55892f6dfc208b", "shasum": "" }, "require": { @@ -1237,7 +1237,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2019-11-28T13:33:56+00:00" + "time": "2020-01-10T21:54:01+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -1299,16 +1299,16 @@ }, { "name": "symfony/filesystem", - "version": "v4.4.2", + "version": "v4.4.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "40c2606131d56eff6f193b6e2ceb92414653b591" + "reference": "266c9540b475f26122b61ef8b23dd9198f5d1cfd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/40c2606131d56eff6f193b6e2ceb92414653b591", - "reference": "40c2606131d56eff6f193b6e2ceb92414653b591", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/266c9540b475f26122b61ef8b23dd9198f5d1cfd", + "reference": "266c9540b475f26122b61ef8b23dd9198f5d1cfd", "shasum": "" }, "require": { @@ -1345,20 +1345,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2019-11-26T23:16:41+00:00" + "time": "2020-01-21T08:20:44+00:00" }, { "name": "symfony/finder", - "version": "v4.4.2", + "version": "v4.4.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ce8743441da64c41e2a667b8eb66070444ed911e" + "reference": "3a50be43515590faf812fbd7708200aabc327ec3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ce8743441da64c41e2a667b8eb66070444ed911e", - "reference": "ce8743441da64c41e2a667b8eb66070444ed911e", + "url": "https://api.github.com/repos/symfony/finder/zipball/3a50be43515590faf812fbd7708200aabc327ec3", + "reference": "3a50be43515590faf812fbd7708200aabc327ec3", "shasum": "" }, "require": { @@ -1394,7 +1394,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2019-11-17T21:56:56+00:00" + "time": "2020-01-04T13:00:46+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1573,16 +1573,16 @@ }, { "name": "symfony/process", - "version": "v3.4.36", + "version": "v3.4.37", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "9a4545c01e1e4f473492bd52b71e574dcc401ca2" + "reference": "5b9d2bcffe4678911a4c941c00b7c161252cf09a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/9a4545c01e1e4f473492bd52b71e574dcc401ca2", - "reference": "9a4545c01e1e4f473492bd52b71e574dcc401ca2", + "url": "https://api.github.com/repos/symfony/process/zipball/5b9d2bcffe4678911a4c941c00b7c161252cf09a", + "reference": "5b9d2bcffe4678911a4c941c00b7c161252cf09a", "shasum": "" }, "require": { @@ -1618,7 +1618,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-11-28T10:05:51+00:00" + "time": "2020-01-01T11:03:25+00:00" }, { "name": "symfony/service-contracts", @@ -1680,16 +1680,16 @@ }, { "name": "symfony/yaml", - "version": "v4.4.2", + "version": "v4.4.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "a08832b974dd5fafe3085a66d41fe4c84bb2628c" + "reference": "cd014e425b3668220adb865f53bff64b3ad21767" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/a08832b974dd5fafe3085a66d41fe4c84bb2628c", - "reference": "a08832b974dd5fafe3085a66d41fe4c84bb2628c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/cd014e425b3668220adb865f53bff64b3ad21767", + "reference": "cd014e425b3668220adb865f53bff64b3ad21767", "shasum": "" }, "require": { @@ -1735,7 +1735,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2019-12-10T10:33:21+00:00" + "time": "2020-01-21T11:12:16+00:00" } ], "aliases": [], From 9cb7cf485df0452bea335ed94b22d1282fab4079 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Thu, 23 Jan 2020 17:07:58 -0500 Subject: [PATCH 14/50] Style fix --- tests/docroot/Feed/Caching/304Conditional.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/docroot/Feed/Caching/304Conditional.php b/tests/docroot/Feed/Caching/304Conditional.php index 3f55bb28..6b2002f0 100644 --- a/tests/docroot/Feed/Caching/304Conditional.php +++ b/tests/docroot/Feed/Caching/304Conditional.php @@ -1,9 +1,9 @@ Date: Fri, 24 Jan 2020 15:54:08 -0500 Subject: [PATCH 15/50] Fix remaining Picofeed-related test failures --- lib/Feed/Exception.php | 5 +---- tests/cases/CLI/TestCLI.php | 3 ++- tests/cases/Database/SeriesSubscription.php | 3 ++- tests/cases/Feed/TestFetching.php | 2 +- tests/cases/REST/TinyTinyRSS/TestAPI.php | 9 +++++---- tests/lib/AbstractTest.php | 14 ++++++++++++++ 6 files changed, 25 insertions(+), 11 deletions(-) diff --git a/lib/Feed/Exception.php b/lib/Feed/Exception.php index 3cab2c93..b9d20560 100644 --- a/lib/Feed/Exception.php +++ b/lib/Feed/Exception.php @@ -29,10 +29,7 @@ class Exception extends \JKingWeb\Arsse\AbstractException { $msgID = "tooManyRedirects"; break; default: - $c = $e->getCode(); - if ($c >= 400 && $c < 600) { - $msgID = "transmissionError"; - } + $msgID = "transmissionError"; } } elseif ($e instanceof TooManyRedirectsException) { $msgID = "maxRedirect"; diff --git a/tests/cases/CLI/TestCLI.php b/tests/cases/CLI/TestCLI.php index 6056912b..ef302f22 100644 --- a/tests/cases/CLI/TestCLI.php +++ b/tests/cases/CLI/TestCLI.php @@ -6,6 +6,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse\TestCase\CLI; +use GuzzleHttp\Exception\ClientException; use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Conf; use JKingWeb\Arsse\User; @@ -81,7 +82,7 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { public function testRefreshAFeed(string $cmd, int $exitStatus, string $output): void { Arsse::$db = \Phake::mock(Database::class); \Phake::when(Arsse::$db)->feedUpdate(1, true)->thenReturn(true); - \Phake::when(Arsse::$db)->feedUpdate(2, true)->thenThrow(new \JKingWeb\Arsse\Feed\Exception("http://example.com/", new \PicoFeed\Client\InvalidUrlException)); + \Phake::when(Arsse::$db)->feedUpdate(2, true)->thenThrow(new \JKingWeb\Arsse\Feed\Exception("http://example.com/", $this->mockGuzzleException(ClientException::class, "", 404))); $this->assertConsole($this->cli, $cmd, $exitStatus, $output); \Phake::verify($this->cli)->loadConf; \Phake::verify(Arsse::$db)->feedUpdate; diff --git a/tests/cases/Database/SeriesSubscription.php b/tests/cases/Database/SeriesSubscription.php index 434427e5..a89319e9 100644 --- a/tests/cases/Database/SeriesSubscription.php +++ b/tests/cases/Database/SeriesSubscription.php @@ -6,6 +6,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse\TestCase\Database; +use GuzzleHttp\Exception\ClientException; use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Test\Database; use JKingWeb\Arsse\Feed\Exception as FeedException; @@ -200,7 +201,7 @@ trait SeriesSubscription { public function testAddASubscriptionToAnInvalidFeed(): void { $url = "http://example.org/feed1"; $feedID = $this->nextID("arsse_feeds"); - \Phake::when(Arsse::$db)->feedUpdate->thenThrow(new FeedException($url, new \PicoFeed\Client\InvalidUrlException())); + \Phake::when(Arsse::$db)->feedUpdate->thenThrow(new FeedException($url, $this->mockGuzzleException(ClientException::class, "", 404))); $this->assertException("invalidUrl", "Feed"); try { Arsse::$db->subscriptionAdd($this->user, $url, "", "", false); diff --git a/tests/cases/Feed/TestFetching.php b/tests/cases/Feed/TestFetching.php index 4ac7ece5..3ce3e8d2 100644 --- a/tests/cases/Feed/TestFetching.php +++ b/tests/cases/Feed/TestFetching.php @@ -58,7 +58,7 @@ class TestFetching extends \JKingWeb\Arsse\Test\AbstractTest { } public function testHandleAnOverlyLargeFeed(): void { - $this->markTestIncomplete(); + $this->markTestIncomplete("The nicolus/picofeed library does not implement miniflux/picofeed's max-size setting"); Arsse::$conf->fetchSizeLimit = 512; $this->assertException("maxSize", "Feed"); new Feed(null, $this->base."Fetching/TooLarge"); diff --git a/tests/cases/REST/TinyTinyRSS/TestAPI.php b/tests/cases/REST/TinyTinyRSS/TestAPI.php index 8f94c76c..0db7f1f8 100644 --- a/tests/cases/REST/TinyTinyRSS/TestAPI.php +++ b/tests/cases/REST/TinyTinyRSS/TestAPI.php @@ -6,6 +6,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse\TestCase\REST\TinyTinyRSS; +use GuzzleHttp\Exception\ClientException; use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\User; use JKingWeb\Arsse\Database; @@ -785,12 +786,12 @@ LONG_STRING; ]; $out = [ ['code' => 1, 'feed_id' => 2], - ['code' => 5, 'message' => (new \JKingWeb\Arsse\Feed\Exception("http://example.com/1", new \PicoFeed\Client\UnauthorizedException()))->getMessage()], + ['code' => 5, 'message' => (new \JKingWeb\Arsse\Feed\Exception("http://example.com/1", $this->mockGuzzleException(ClientException::class, "", 401)))->getMessage()], ['code' => 1, 'feed_id' => 0], ['code' => 0, 'feed_id' => 3], ['code' => 0, 'feed_id' => 1], ['code' => 3, 'message' => (new \JKingWeb\Arsse\Feed\Exception("http://localhost:8000/Feed/Discovery/Invalid", new \PicoFeed\Reader\SubscriptionNotFoundException()))->getMessage()], - ['code' => 2, 'message' => (new \JKingWeb\Arsse\Feed\Exception("http://example.com/6", new \PicoFeed\Client\InvalidUrlException()))->getMessage()], + ['code' => 2, 'message' => (new \JKingWeb\Arsse\Feed\Exception("http://example.com/6", $this->mockGuzzleException(ClientException::class, "", 404)))->getMessage()], ['code' => 6, 'message' => (new \JKingWeb\Arsse\Feed\Exception("http://example.com/7", new \PicoFeed\Parser\MalformedXmlException()))->getMessage()], ['code' => 1, 'feed_id' => 4], ['code' => 0, 'feed_id' => 4], @@ -802,12 +803,12 @@ LONG_STRING; ['id' => 4, 'url' => "http://example.com/9"], ]; \Phake::when(Arsse::$db)->subscriptionAdd(...$db[0])->thenReturn(2); - \Phake::when(Arsse::$db)->subscriptionAdd(...$db[1])->thenThrow(new \JKingWeb\Arsse\Feed\Exception("http://example.com/1", new \PicoFeed\Client\UnauthorizedException())); + \Phake::when(Arsse::$db)->subscriptionAdd(...$db[1])->thenThrow(new \JKingWeb\Arsse\Feed\Exception("http://example.com/1", $this->mockGuzzleException(ClientException::class, "", 401))); \Phake::when(Arsse::$db)->subscriptionAdd(...$db[2])->thenReturn(2); \Phake::when(Arsse::$db)->subscriptionAdd(...$db[3])->thenThrow(new ExceptionInput("constraintViolation")); \Phake::when(Arsse::$db)->subscriptionAdd(...$db[4])->thenThrow(new ExceptionInput("constraintViolation")); \Phake::when(Arsse::$db)->subscriptionAdd(...$db[5])->thenThrow(new ExceptionInput("constraintViolation")); - \Phake::when(Arsse::$db)->subscriptionAdd(...$db[6])->thenThrow(new \JKingWeb\Arsse\Feed\Exception("http://example.com/6", new \PicoFeed\Client\InvalidUrlException())); + \Phake::when(Arsse::$db)->subscriptionAdd(...$db[6])->thenThrow(new \JKingWeb\Arsse\Feed\Exception("http://example.com/6", $this->mockGuzzleException(ClientException::class, "", 404))); \Phake::when(Arsse::$db)->subscriptionAdd(...$db[7])->thenThrow(new \JKingWeb\Arsse\Feed\Exception("http://example.com/7", new \PicoFeed\Parser\MalformedXmlException())); \Phake::when(Arsse::$db)->subscriptionAdd(...$db[8])->thenReturn(4); \Phake::when(Arsse::$db)->subscriptionAdd(...$db[9])->thenThrow(new ExceptionInput("constraintViolation")); diff --git a/tests/lib/AbstractTest.php b/tests/lib/AbstractTest.php index 0a553d13..1a032788 100644 --- a/tests/lib/AbstractTest.php +++ b/tests/lib/AbstractTest.php @@ -6,6 +6,8 @@ declare(strict_types=1); namespace JKingWeb\Arsse\Test; +use GuzzleHttp\Exception\GuzzleException; +use GuzzleHttp\Exception\RequestException; use JKingWeb\Arsse\Exception; use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Conf; @@ -325,4 +327,16 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { $this->assertArraySubset($expected, [], false, "Expectations not in result set."); } } + + /** Guzzle's exception classes require some fairly complicated construction; this abstracts it all away so that only message and code need be supplied */ + protected function mockGuzzleException(string $class, ?string $message = null, ?int $code = null, ?\Throwable $e = null): GuzzleException { + if (is_a($class, RequestException::class, true)) { + $req = \Phake::mock(RequestInterface::class); + $res = \Phake::mock(ResponseInterface::class); + \Phake::when($res)->getStatusCode->thenReturn($code ?? 0); + return new $class($message ?? "", $req, $res, $e); + } else { + return new $class($message ?? "", $code ?? 0, $e); + } + } } From 04878bda9d82db8a4c58e339b90a18431bc2e8a5 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 25 Jan 2020 11:18:51 -0500 Subject: [PATCH 16/50] Documentation changes --- CHANGELOG | 3 ++- UPGRADING | 14 ++++++++++++++ docs/en/020_Getting_Started/010_Requirements.md | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index f5618ba8..5894c7c5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,7 +2,8 @@ Version 0.8.3 (2020-??-??) ========================== Changes: -- Officially require PHP 7.1 (effectively required since version 0.8.0) +- Officially require PHP 7.1 (accidentally required since version 0.8.0) +- Various internal changes pursuant to use of PHP 7.1 Version 0.8.2 (2019-12-07) ========================== diff --git a/UPGRADING b/UPGRADING index a78867b1..42687d74 100644 --- a/UPGRADING +++ b/UPGRADING @@ -11,6 +11,20 @@ usually prudent: `composer install -o --no-dev` +Upgrading from 0.8.2 to 0.8.3 +============================= + +- PHP 7.1 is now required +- The following Composer dependencies have been added: + - nicolus/picofeed + - laminas/laminas-diactoros + - laminas/laminas-httphandlerrunner +- The following Composer dependencies have been removed: + - p3k/picofeed + - zendframework/zend-diactoros + - zendframework/zend-httphandlerrunner + + Upgrading from 0.8.1 to 0.8.2 ============================= diff --git a/docs/en/020_Getting_Started/010_Requirements.md b/docs/en/020_Getting_Started/010_Requirements.md index f7818699..7b3b6ef1 100644 --- a/docs/en/020_Getting_Started/010_Requirements.md +++ b/docs/en/020_Getting_Started/010_Requirements.md @@ -8,6 +8,7 @@ The Arsse has the following requirements: - [sqlite3](http://php.net/manual/en/book.sqlite3.php) or [pdo_sqlite](http://php.net/manual/en/ref.pdo-sqlite.php) for SQLite databases - [pgsql](http://php.net/manual/en/book.pgsql.php) or [pdo_pgsql](http://php.net/manual/en/ref.pdo-pgsql.php) for PostgreSQL 10 or later databases - [mysqli](http://php.net/manual/en/book.mysqli.php) or [pdo_mysql](http://php.net/manual/en/ref.pdo-mysql.php) for MySQL/Percona 8.0.11 or later databases + - [curl](http://php.net/manual/en/book.curl.php) (optional) - Privileges either to create and run systemd services, or to run cron jobs Instructions for how to satisfy the PHP extension requirements for Debian systems are included in the next section. From d7e10e40ee82556e663e2fc2a64133a1b814ff9b Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 1 Feb 2020 23:43:46 -0500 Subject: [PATCH 17/50] Prefer PCOV for code coverage --- README.md | 2 +- RoboFile.php | 39 ++++++++++++++++++++++++++------------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0658d785..f6932abe 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ There is also a `test:quick` Robo task which excludes slower tests, and a `test: ### Test coverage -Computing the coverage of tests can be done by running `./robo coverage`, after which an HTML-format coverage report will be written to `/tests/coverage/`. Either [Xdebug](https://xdebug.org) or [phpdbg](https://php.net/manual/en/book.phpdbg.php) is required for this. Xdebug is generally recommended as it is better maintained, though phpdbg is significantly faster. If using Xdebug, the extension need not be enabled globally; PHPUnit will enable it when needed. +Computing the coverage of tests can be done by running `./robo coverage`, after which an HTML-format coverage report will be written to `/tests/coverage/`. Either [PCOV](https://github.com/krakjoe/pcov), [Xdebug](https://xdebug.org), or [phpdbg](https://php.net/manual/en/book.phpdbg.php) is required for this. PCOV is generally recommended as it is faster than Xdebug; phpdbg is faster still, but less accurate. If using either PCOV or Xdebug, the extension need not be enabled globally; PHPUnit will enable it when needed. ## Enforcing coding style diff --git a/RoboFile.php b/RoboFile.php index f382090e..6a8472b6 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -53,9 +53,9 @@ class RoboFile extends \Robo\Tasks { * tests/coverage/. Additional reports may be produced by passing * arguments to this task as one would to PHPUnit. * - * Robo first tries to use phpdbg and will fall back to Xdebug if available. - * Because Xdebug slows down non-coverage tasks, however, phpdbg is highly - * recommended if debugging facilities are not otherwise needed. + * Robo first tries to use pcov and will fall back first to xdebug then + * phpdbg. Neither pcov nor xdebug need to be enabled to be used; they + * only need to be present in the extension load path to be used. */ public function coverage(array $args): Result { // run tests with code coverage reporting enabled @@ -89,17 +89,30 @@ class RoboFile extends \Robo\Tasks { } protected function findCoverageEngine(): string { - if (IS_WIN) { - $dbg = dirname(\PHP_BINARY)."\\phpdbg.exe"; - $dbg = file_exists($dbg) ? $dbg : ""; + $dir = rtrim(ini_get("extension_dir"), "/").\DIRECTORY_SEPARATOR; + $ext = IS_WIN ? "dll" : (IS_MAC ? "dylib" : "so"); + $php = escapeshellarg(\PHP_BINARY); + $code = escapeshellarg(BASE."lib"); + if (extension_loaded("pcov")) { + return "$php -d pcov.enabled=1 -d pcov.directory=$code"; + } elseif (extension_loaded("xdebug")) { + return $php; + } elseif (file_exists($dir."pcov.$ext")) { + return "$php -d extension=pcov.$ext -d pcov.enabled=1 -d pcov.directory=$code"; + } elseif (file_exists($dir."pcov.$ext")) { + return "$php -d zend_extension=xdebug.$ext"; } else { - $dbg = trim(`which phpdbg 2>/dev/null`); - } - if ($dbg) { - return escapeshellarg($dbg)." -qrr"; - } else { - $ext = IS_WIN ? "dll" : (IS_MAC ? "dylib" : "so"); - return escapeshellarg(\PHP_BINARY)." -d zend_extension=xdebug.$ext"; + if (IS_WIN) { + $dbg = dirname(\PHP_BINARY)."\\phpdbg.exe"; + $dbg = file_exists($dbg) ? $dbg : ""; + } else { + $dbg = trim(`which phpdbg 2>/dev/null`); + } + if ($dbg) { + return escapeshellarg($dbg)." -qrr"; + } else { + return $php; + } } } From 39a1895867aa674ff8611b20c35adfd77d77897f Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 3 Feb 2020 16:54:45 -0500 Subject: [PATCH 18/50] Refine and cover new Guzzle error handling --- lib/AbstractException.php | 2 + lib/Feed.php | 12 +- lib/Feed/Exception.php | 40 ++----- locale/en.php | 2 + tests/cases/Feed/TestException.php | 177 +++++++++++++++++++++++++++++ tests/cases/Feed/TestFeed.php | 1 - tests/phpunit.dist.xml | 1 + 7 files changed, 197 insertions(+), 38 deletions(-) create mode 100644 tests/cases/Feed/TestException.php diff --git a/lib/AbstractException.php b/lib/AbstractException.php index 8aaff950..31623458 100644 --- a/lib/AbstractException.php +++ b/lib/AbstractException.php @@ -75,6 +75,7 @@ abstract class AbstractException extends \Exception { "User/Exception.authFailed" => 10412, "User/ExceptionAuthz.notAuthorized" => 10421, "User/ExceptionSession.invalid" => 10431, + "Feed/Exception.internalError" => 10500, "Feed/Exception.invalidCertificate" => 10501, "Feed/Exception.invalidUrl" => 10502, "Feed/Exception.maxRedirect" => 10503, @@ -83,6 +84,7 @@ abstract class AbstractException extends \Exception { "Feed/Exception.forbidden" => 10506, "Feed/Exception.unauthorized" => 10507, "Feed/Exception.transmissionError" => 10508, + "Feed/Exception.connectionFailed" => 10509, "Feed/Exception.malformedXml" => 10511, "Feed/Exception.xmlEntity" => 10512, "Feed/Exception.subscriptionNotFound" => 10521, diff --git a/lib/Feed.php b/lib/Feed.php index 984b4493..e8e5dac2 100644 --- a/lib/Feed.php +++ b/lib/Feed.php @@ -100,7 +100,7 @@ class Feed { $client->reader = $reader; return $client; } catch (PicoFeedException $e) { - throw new Feed\Exception($url, $e); + throw new Feed\Exception($url, $e); // @codeCoverageIgnore } catch (\GuzzleHttp\Exception\GuzzleException $e) { throw new Feed\Exception($url, $e); } @@ -117,16 +117,10 @@ class Feed { // Some feeds might use a different domain (eg: feedburner), so the site url is // used instead of the feed's url. $this->favicon = (new Favicon)->find($feed->siteUrl); - // work around a PicoFeed memory leak - libxml_use_internal_errors(false); } catch (PicoFeedException $e) { - // work around a PicoFeed memory leak - libxml_use_internal_errors(false); - throw new Feed\Exception($this->resource->getUrl(), $e); - } catch (\GuzzleHttp\Exception\GuzzleException $e) { - // work around a PicoFeed memory leak - libxml_use_internal_errors(false); throw new Feed\Exception($this->resource->getUrl(), $e); + } catch (\GuzzleHttp\Exception\GuzzleException $e) { // @codeCoverageIgnore + throw new Feed\Exception($this->resource->getUrl(), $e); // @codeCoverageIgnore } // PicoFeed does not provide valid ids when there is no id element. Its solution diff --git a/lib/Feed/Exception.php b/lib/Feed/Exception.php index b9d20560..00c76524 100644 --- a/lib/Feed/Exception.php +++ b/lib/Feed/Exception.php @@ -12,48 +12,32 @@ use GuzzleHttp\Exception\TooManyRedirectsException; use PicoFeed\PicoFeedException; class Exception extends \JKingWeb\Arsse\AbstractException { + const CURL_ERROR_MAP = [1=>"invalidUrl",3=>"invalidUrl",5=>"transmissionError","connectionFailed","connectionFailed","transmissionError","forbidden","unauthorized","transmissionError","transmissionError","transmissionError","transmissionError","connectionFailed","connectionFailed","transmissionError","transmissionError","transmissionError","transmissionError","transmissionError","invalidUrl","transmissionError","transmissionError","transmissionError","transmissionError",28=>"timeout","transmissionError","transmissionError","transmissionError","transmissionError","transmissionError",35=>"invalidCertificate","transmissionError","transmissionError","transmissionError","transmissionError",45=>"transmissionError","unauthorized","maxRedirect",52=>"transmissionError","invalidCertificate","invalidCertificate","transmissionError","transmissionError",58=>"invalidCertificate","invalidCertificate","invalidCertificate","transmissionError","invalidUrl","transmissionError","invalidCertificate","transmissionError","invalidCertificate","forbidden","invalidUrl","forbidden","transmissionError",73=>"transmissionError","transmissionError",77=>"invalidCertificate","invalidUrl",90=>"invalidCertificate","invalidCertificate","transmissionError",94=>"unauthorized","transmissionError","connectionFailed"]; + const HTTP_ERROR_MAP = [401=>"unauthorized",403=>"forbidden",404=>"invalidUrl",408=>"timeout",410=>"invalidUrl",414=>"invalidUrl",451=>"invalidUrl"]; + public function __construct($url, \Throwable $e) { if ($e instanceof BadResponseException) { - switch ($e->getCode()) { - case 401: - $msgID = "unauthorized"; - break; - case 403: - $msgID = "forbidden"; - break; - case 404: - case 410: - $msgID = "invalidUrl"; - break; - case 508: - $msgID = "tooManyRedirects"; - break; - default: - $msgID = "transmissionError"; - } + $msgID = self::HTTP_ERROR_MAP[$e->getCode()] ?? "transmissionError"; } elseif ($e instanceof TooManyRedirectsException) { $msgID = "maxRedirect"; } elseif ($e instanceof GuzzleException) { - $m = $e->getMessage(); - if (preg_match("/^Error creating resource:/", $m)) { + $msg = $e->getMessage(); + if (preg_match("/^Error creating resource:/", $msg)) { // PHP stream error; the class of error is ambiguous - $msgID = "transmissionError"; // @codeCoverageIgnore - } elseif (preg_match("/^cURL error 35:/", $m)) { - $msgID = "invalidCertificate"; - } elseif (preg_match("/^cURL error 28:/", $m)) { - $msgID = "timeout"; + $msgID = "transmissionError"; + } elseif (preg_match("/^cURL error (\d+):/", $msg, $match)) { + $msgID = self::CURL_ERROR_MAP[(int) $match[1]] ?? "internalError"; } else { - var_export($m); - exit; + $msgID = "internalError"; } } elseif ($e instanceof PicoFeedException) { $className = get_class($e); // Convert the exception thrown by PicoFeed to the one to be thrown here. $msgID = preg_replace('/^PicoFeed\\\(?:Client|Parser|Reader)\\\([A-Za-z]+)Exception$/', '$1', $className); // If the message ID doesn't change then it's unknown. - $msgID = ($msgID !== $className) ? lcfirst($msgID) : ''; + $msgID = ($msgID !== $className) ? lcfirst($msgID) : "internalError"; } else { - $msgID = get_class($e); + $msgID = "internalError"; } parent::__construct($msgID, ['url' => $url], $e); } diff --git a/locale/en.php b/locale/en.php index d66fddf3..c19ac94b 100644 --- a/locale/en.php +++ b/locale/en.php @@ -144,6 +144,7 @@ return [ other {Authenticated user is not authorized to perform the action "{action}" on behalf of {user}} }', 'Exception.JKingWeb/Arsse/User/ExceptionSession.invalid' => 'Session with ID {0} does not exist', + 'Exception.JKingWeb/Arsse/Feed/Exception.internalError' => 'Could not download feed "{url}" because of an internal error which is probably a bug', 'Exception.JKingWeb/Arsse/Feed/Exception.invalidCertificate' => 'Could not download feed "{url}" because its server is serving an invalid SSL certificate', 'Exception.JKingWeb/Arsse/Feed/Exception.invalidUrl' => 'Feed URL "{url}" is invalid', 'Exception.JKingWeb/Arsse/Feed/Exception.maxRedirect' => 'Could not download feed "{url}" because its server reached its maximum number of HTTP redirections', @@ -152,6 +153,7 @@ return [ 'Exception.JKingWeb/Arsse/Feed/Exception.forbidden' => 'Could not download feed "{url}" because you do not have permission to access it', 'Exception.JKingWeb/Arsse/Feed/Exception.unauthorized' => 'Could not download feed "{url}" because you provided insufficient or invalid credentials', 'Exception.JKingWeb/Arsse/Feed/Exception.transmissionError' => 'Could not download feed "{url}" because of a network error', + 'Exception.JKingWeb/Arsse/Feed/Exception.connectionFailed' => 'Could not download feed "{url}" because its server could not be reached', 'Exception.JKingWeb/Arsse/Feed/Exception.malformedXml' => 'Could not parse feed "{url}" because it is malformed', 'Exception.JKingWeb/Arsse/Feed/Exception.xmlEntity' => 'Refused to parse feed "{url}" because it contains an XXE attack', 'Exception.JKingWeb/Arsse/Feed/Exception.subscriptionNotFound' => 'Unable to find a feed at location "{url}"', diff --git a/tests/cases/Feed/TestException.php b/tests/cases/Feed/TestException.php new file mode 100644 index 00000000..9fc35747 --- /dev/null +++ b/tests/cases/Feed/TestException.php @@ -0,0 +1,177 @@ +mockGuzzleException(TransferException::class, "cURL error $code: Some message", 0); + $this->assertException($message, "Feed"); + throw new FeedException("https://example.com/", $e); + } + + public function provideCurlErrors() { + return [ + 'CURLE_UNSUPPORTED_PROTOCOL' => [1, "invalidUrl"], + 'CURLE_FAILED_INIT' => [2, "internalError"], + 'CURLE_URL_MALFORMAT' => [3, "invalidUrl"], + 'CURLE_URL_MALFORMAT_USER' => [4, "internalError"], + 'CURLE_COULDNT_RESOLVE_PROXY' => [5, "transmissionError"], + 'CURLE_COULDNT_RESOLVE_HOST' => [6, "connectionFailed"], + 'CURLE_COULDNT_CONNECT' => [7, "connectionFailed"], + 'CURLE_WEIRD_SERVER_REPLY' => [8, "transmissionError"], + 'CURLE_FTP_ACCESS_DENIED' => [9, "forbidden"], + 'CURLE_FTP_USER_PASSWORD_INCORRECT' => [10, "unauthorized"], + 'CURLE_FTP_WEIRD_PASS_REPLY' => [11, "transmissionError"], + 'CURLE_FTP_WEIRD_USER_REPLY' => [12, "transmissionError"], + 'CURLE_FTP_WEIRD_PASV_REPLY' => [13, "transmissionError"], + 'CURLE_FTP_WEIRD_227_FORMAT' => [14, "transmissionError"], + 'CURLE_FTP_CANT_GET_HOST' => [15, "connectionFailed"], + 'CURLE_FTP_CANT_RECONNECT' => [16, "connectionFailed"], + 'CURLE_FTP_COULDNT_SET_BINARY' => [17, "transmissionError"], + 'CURLE_PARTIAL_FILE' => [18, "transmissionError"], + 'CURLE_FTP_COULDNT_RETR_FILE' => [19, "transmissionError"], + 'CURLE_FTP_WRITE_ERROR' => [20, "transmissionError"], + 'CURLE_FTP_QUOTE_ERROR' => [21, "transmissionError"], + 'CURLE_HTTP_NOT_FOUND' => [22, "invalidUrl"], + 'CURLE_WRITE_ERROR' => [23, "transmissionError"], + 'CURLE_MALFORMAT_USER' => [24, "transmissionError"], + 'CURLE_FTP_COULDNT_STOR_FILE' => [25, "transmissionError"], + 'CURLE_READ_ERROR' => [26, "transmissionError"], + 'CURLE_OUT_OF_MEMORY' => [27, "internalError"], + 'CURLE_OPERATION_TIMEDOUT' => [28, "timeout"], + 'CURLE_FTP_COULDNT_SET_ASCII' => [29, "transmissionError"], + 'CURLE_FTP_PORT_FAILED' => [30, "transmissionError"], + 'CURLE_FTP_COULDNT_USE_REST' => [31, "transmissionError"], + 'CURLE_FTP_COULDNT_GET_SIZE' => [32, "transmissionError"], + 'CURLE_HTTP_RANGE_ERROR' => [33, "transmissionError"], + 'CURLE_HTTP_POST_ERROR' => [34, "internalError"], + 'CURLE_SSL_CONNECT_ERROR' => [35, "invalidCertificate"], + 'CURLE_BAD_DOWNLOAD_RESUME' => [36, "transmissionError"], + 'CURLE_FILE_COULDNT_READ_FILE' => [37, "transmissionError"], + 'CURLE_LDAP_CANNOT_BIND' => [38, "transmissionError"], + 'CURLE_LDAP_SEARCH_FAILED' => [39, "transmissionError"], + 'CURLE_LIBRARY_NOT_FOUND' => [40, "internalError"], + 'CURLE_FUNCTION_NOT_FOUND' => [41, "internalError"], + 'CURLE_ABORTED_BY_CALLBACK' => [42, "internalError"], + 'CURLE_BAD_FUNCTION_ARGUMENT' => [43, "internalError"], + 'CURLE_BAD_CALLING_ORDER' => [44, "internalError"], + 'CURLE_HTTP_PORT_FAILED' => [45, "transmissionError"], + 'CURLE_BAD_PASSWORD_ENTERED' => [46, "unauthorized"], + 'CURLE_TOO_MANY_REDIRECTS' => [47, "maxRedirect"], + 'CURLE_UNKNOWN_TELNET_OPTION' => [48, "internalError"], + 'CURLE_TELNET_OPTION_SYNTAX' => [49, "internalError"], + 'Unknown error 50' => [50, "internalError"], + 'Unknown error 51' => [51, "internalError"], + 'CURLE_GOT_NOTHING' => [52, "transmissionError"], + 'CURLE_SSL_ENGINE_NOTFOUND' => [53, "invalidCertificate"], + 'CURLE_SSL_ENGINE_SETFAILED' => [54, "invalidCertificate"], + 'CURLE_SEND_ERROR' => [55, "transmissionError"], + 'CURLE_RECV_ERROR' => [56, "transmissionError"], + 'CURLE_SHARE_IN_USE' => [57, "internalError"], + 'CURLE_SSL_CERTPROBLEM' => [58, "invalidCertificate"], + 'CURLE_SSL_CIPHER' => [59, "invalidCertificate"], + 'CURLE_SSL_CACERT' => [60, "invalidCertificate"], + 'CURLE_BAD_CONTENT_ENCODING' => [61, "transmissionError"], + 'CURLE_LDAP_INVALID_URL' => [62, "invalidUrl"], + 'CURLE_FILESIZE_EXCEEDED' => [63, "transmissionError"], + 'CURLE_USE_SSL_FAILED' => [64, "invalidCertificate"], + 'CURLE_SEND_FAIL_REWIND' => [65, "transmissionError"], + 'CURLE_SSL_ENGINE_INITFAILED' => [66, "invalidCertificate"], + 'CURLE_LOGIN_DENIED' => [67, "forbidden"], + 'CURLE_TFTP_NOTFOUND' => [68, "invalidUrl"], + 'CURLE_TFTP_PERM' => [69, "forbidden"], + 'CURLE_REMOTE_DISK_FULL' => [70, "transmissionError"], + 'CURLE_TFTP_ILLEGAL' => [71, "internalError"], + 'CURLE_TFTP_UNKNOWNID' => [72, "internalError"], + 'CURLE_REMOTE_FILE_EXISTS' => [73, "transmissionError"], + 'CURLE_TFTP_NOSUCHUSER' => [74, "transmissionError"], + 'CURLE_CONV_FAILED' => [75, "internalError"], + 'CURLE_CONV_REQD' => [76, "internalError"], + 'CURLE_SSL_CACERT_BADFILE' => [77, "invalidCertificate"], + 'CURLE_REMOTE_FILE_NOT_FOUND' => [78, "invalidUrl"], + 'CURLE_SSH' => [79, "internalError"], + 'CURLE_SSL_PINNEDPUBKEYNOTMATCH' => [90, "invalidCertificate"], + 'CURLE_SSL_INVALIDCERTSTATUS' => [91, "invalidCertificate"], + 'CURLE_HTTP2_STREAM' => [92, "transmissionError"], + 'CURLE_RECURSIVE_API_CALL' => [93, "internalError"], + 'CURLE_AUTH_ERROR' => [94, "unauthorized"], + 'CURLE_HTTP3' => [95, "transmissionError"], + 'CURLE_QUIC_CONNECT_ERROR' => [96, "connectionFailed"], + 'Hypothetical error 2112' => [2112, "internalError"], + ]; + } + + /** @dataProvider provideHTTPErrors */ + public function testHandleHttpErrors(int $code, string $message): void { + $e = $this->mockGuzzleException(BadResponseException::class, "Irrelevant message", $code); + $this->assertException($message, "Feed"); + throw new FeedException("https://example.com/", $e); + } + + public function provideHTTPErrors() { + $specials = [ + 401 => "unauthorized", + 403 => "forbidden", + 404 => "invalidUrl", + 408 => "timeout", + 410 => "invalidUrl", + 414 => "invalidUrl", + 451 => "invalidUrl" + ]; + $out = array_fill(400, (600 - 400), "transmissionError"); + foreach ($specials as $k => $t) { + $out[$k] = $t; + } + foreach ($out as $k => $t) { + $out[$k] = [$k, $t]; + } + return $out; + } + + /** @dataProvider providePicoFeedException */ + public function testHandlePicofeedException(PicoFeedException $e, string $message) { + $this->assertException($message, "Feed"); + throw new FeedException("https://example.com/", $e); + } + + public function providePicoFeedException() { + return [ + 'Failed feed discovery' => [new \PicoFeed\Reader\SubscriptionNotFoundException(), "subscriptionNotFound"], + 'Unsupported format' => [new \PicoFeed\Reader\UnsupportedFeedFormatException(), "unsupportedFeedFormat"], + 'Malformed XML' => [new \PicoFeed\Parser\MalformedXmlException(), "malformedXml"], + 'XML entity expansion' => [new \PicoFeed\Parser\XmlEntityException(), "xmlEntity"], + ]; + } + + public function testHandleExcessRedirections() { + $e = $this->mockGuzzleException(TooManyRedirectsException::class, "Irrelevant message", 404); + $this->assertException("maxRedirect", "Feed"); + throw new FeedException("https://example.com/", $e); + } + + public function testHandleGenericStreamErrors() { + $e = $this->mockGuzzleException(TransferException::class, "Error creating resource: Irrelevant message", 403); + $this->assertException("transmissionError", "Feed"); + throw new FeedException("https://example.com/", $e); + } + + public function testHandleUnexpectedError() { + $e = new \Exception; + $this->assertException("internalError", "Feed"); + throw new FeedException("https://example.com/", $e); + } +} diff --git a/tests/cases/Feed/TestFeed.php b/tests/cases/Feed/TestFeed.php index 1bcf50e5..c419100e 100644 --- a/tests/cases/Feed/TestFeed.php +++ b/tests/cases/Feed/TestFeed.php @@ -14,7 +14,6 @@ use JKingWeb\Arsse\Test\Result; /** * @covers \JKingWeb\Arsse\Feed - * @covers \JKingWeb\Arsse\Feed\Exception * @group slow */ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { protected static $host = "http://localhost:8000/"; diff --git a/tests/phpunit.dist.xml b/tests/phpunit.dist.xml index 6732b56a..ece5eef9 100644 --- a/tests/phpunit.dist.xml +++ b/tests/phpunit.dist.xml @@ -56,6 +56,7 @@ cases/User/TestUser.php
+ cases/Feed/TestException.php cases/Feed/TestFetching.php cases/Feed/TestFeed.php From cf4a9e6436051b109be0c99079bc45fa5abe95ed Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 3 Feb 2020 16:55:45 -0500 Subject: [PATCH 19/50] Use archived copy of MySQL critique --- docs/en/020_Getting_Started/040_Database_Setup/020_MySQL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/020_Getting_Started/040_Database_Setup/020_MySQL.md b/docs/en/020_Getting_Started/040_Database_Setup/020_MySQL.md index d9e93006..d0ec1b31 100644 --- a/docs/en/020_Getting_Started/040_Database_Setup/020_MySQL.md +++ b/docs/en/020_Getting_Started/040_Database_Setup/020_MySQL.md @@ -13,7 +13,7 @@ While MySQL can be used as a database for The Arsse, this is **not recommended** due to MySQL's technical limitations. It is fully functional, but may fail with some newsfeeds where other database systems do not. Additionally, it is particularly important before upgrading from one version of The Arsse to the next to back up your database: a failure in a database upgrade can corrupt your database much more easily than when using other database systems. -You are therefore strongly advised not to use MySQL. Though our MySQL test suite ensures functionally identical behaviour to SQLite and PostgreSQL for the supplied test data in a default MySQL configuration, there are [many other subtle ways in which it can fail](https://grimoire.ca/mysql/choose-something-else), and we do not have the manpower to account for most of these with certainty. +You are therefore strongly advised not to use MySQL. Though our MySQL test suite ensures functionally identical behaviour to SQLite and PostgreSQL for the supplied test data in a default MySQL configuration, there are [many other subtle ways in which it can fail](https://web.archive.org/web/20190929090114/https://grimoire.ca/mysql/choose-something-else), and we do not have the manpower to account for most of these with certainty. Also please note that as of this writing MariaDB cannot be used in place of MySQL as it lacks features of MySQL 8 which The Arsse requires. The awkwardly-named [_Percona Server for MySQL_](https://www.percona.com/software/mysql-database/percona-server), on the other hand, will work. From 1d514e4739523b6ef675b5e4bfde8931a3b5e17c Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sun, 16 Feb 2020 17:37:13 -0500 Subject: [PATCH 20/50] Remove forked picofeed repository --- composer.json | 8 +- composer.lock | 18 ++--- vendor-bin/csfixer/composer.lock | 82 ++++++++++---------- vendor-bin/daux/composer.lock | 124 +++++++++++++++---------------- vendor-bin/phpunit/composer.lock | 57 +++++++------- vendor-bin/robo/composer.lock | 54 +++++++------- 6 files changed, 168 insertions(+), 175 deletions(-) diff --git a/composer.json b/composer.json index 6d05da07..eb42d847 100644 --- a/composer.json +++ b/composer.json @@ -17,19 +17,13 @@ } ], - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/JKingweb/picoFeed-1" - } - ], "require": { "php": "^7.1", "ext-intl": "*", "ext-json": "*", "ext-hash": "*", "ext-dom": "*", - "nicolus/picofeed": "dev-fixed", + "nicolus/picofeed": "dev-master#0ebdf92852a4725f4807c200dd49bf9fff3905b7", "hosteurope/password-generator": "1.*", "docopt/docopt": "1.*", "jkingweb/druuid": "3.*", diff --git a/composer.lock b/composer.lock index 55e69958..b56c64bf 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": "9710e0638278222dc8d6207d4141e529", + "content-hash": "1d03b34d159fbf69097aa783994f9cfa", "packages": [ { "name": "docopt/docopt", @@ -648,16 +648,16 @@ }, { "name": "nicolus/picofeed", - "version": "dev-fixed", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/JKingweb/picoFeed-1.git", - "reference": "009250e98ff0975335176f74e5fea95104058d09" + "url": "https://github.com/nicolus/picoFeed.git", + "reference": "0ebdf92852a4725f4807c200dd49bf9fff3905b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JKingweb/picoFeed-1/zipball/009250e98ff0975335176f74e5fea95104058d09", - "reference": "009250e98ff0975335176f74e5fea95104058d09", + "url": "https://api.github.com/repos/nicolus/picoFeed/zipball/0ebdf92852a4725f4807c200dd49bf9fff3905b7", + "reference": "0ebdf92852a4725f4807c200dd49bf9fff3905b7", "shasum": "" }, "require": { @@ -692,6 +692,7 @@ "PicoFeed": "lib/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -705,10 +706,7 @@ ], "description": "RSS/Atom parsing library", "homepage": "https://github.com/nicolus/picoFeed", - "support": { - "source": "https://github.com/JKingweb/picoFeed-1/tree/fixed" - }, - "time": "2020-01-23T22:03:32+00:00" + "time": "2020-02-13T06:43:47+00:00" }, { "name": "psr/http-factory", diff --git a/vendor-bin/csfixer/composer.lock b/vendor-bin/csfixer/composer.lock index 5c8486a2..eb68d097 100644 --- a/vendor-bin/csfixer/composer.lock +++ b/vendor-bin/csfixer/composer.lock @@ -571,16 +571,16 @@ }, { "name": "symfony/console", - "version": "v5.0.3", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "345ab6ecb456b5147ea3b3271d7f1f00aadfd257" + "reference": "91c294166c38d8c0858a86fad76d8c14dc1144c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/345ab6ecb456b5147ea3b3271d7f1f00aadfd257", - "reference": "345ab6ecb456b5147ea3b3271d7f1f00aadfd257", + "url": "https://api.github.com/repos/symfony/console/zipball/91c294166c38d8c0858a86fad76d8c14dc1144c8", + "reference": "91c294166c38d8c0858a86fad76d8c14dc1144c8", "shasum": "" }, "require": { @@ -643,11 +643,11 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-01-19T11:13:19+00:00" + "time": "2020-01-25T15:56:29+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.0.3", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -775,7 +775,7 @@ }, { "name": "symfony/filesystem", - "version": "v5.0.3", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -825,7 +825,7 @@ }, { "name": "symfony/finder", - "version": "v5.0.3", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -874,7 +874,7 @@ }, { "name": "symfony/options-resolver", - "version": "v5.0.3", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", @@ -928,16 +928,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", "shasum": "" }, "require": { @@ -949,7 +949,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -982,20 +982,20 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", "shasum": "" }, "require": { @@ -1007,7 +1007,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1041,20 +1041,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "af23c7bb26a73b850840823662dda371484926c4" + "reference": "419c4940024c30ccc033650373a1fe13890d3255" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/af23c7bb26a73b850840823662dda371484926c4", - "reference": "af23c7bb26a73b850840823662dda371484926c4", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/419c4940024c30ccc033650373a1fe13890d3255", + "reference": "419c4940024c30ccc033650373a1fe13890d3255", "shasum": "" }, "require": { @@ -1064,7 +1064,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1100,20 +1100,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", "shasum": "" }, "require": { @@ -1122,7 +1122,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1155,20 +1155,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", "shasum": "" }, "require": { @@ -1177,7 +1177,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1213,11 +1213,11 @@ "portable", "shim" ], - "time": "2019-11-27T16:25:15+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/process", - "version": "v5.0.3", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -1324,7 +1324,7 @@ }, { "name": "symfony/stopwatch", - "version": "v5.0.3", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", diff --git a/vendor-bin/daux/composer.lock b/vendor-bin/daux/composer.lock index c6383be1..83b0143f 100644 --- a/vendor-bin/daux/composer.lock +++ b/vendor-bin/daux/composer.lock @@ -580,16 +580,16 @@ }, { "name": "scrivo/highlight.php", - "version": "v9.17.1.0", + "version": "v9.18.1.0", "source": { "type": "git", "url": "https://github.com/scrivo/highlight.php.git", - "reference": "5451a9ad6d638559cf2a092880f935c39776134e" + "reference": "a57c858cb753f543965a1e17af386a648012ed8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/5451a9ad6d638559cf2a092880f935c39776134e", - "reference": "5451a9ad6d638559cf2a092880f935c39776134e", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/a57c858cb753f543965a1e17af386a648012ed8f", + "reference": "a57c858cb753f543965a1e17af386a648012ed8f", "shasum": "" }, "require": { @@ -599,8 +599,8 @@ }, "require-dev": { "phpunit/phpunit": "^4.8|^5.7", - "symfony/finder": "^3.4", - "symfony/var-dumper": "^3.4" + "symfony/finder": "^2.8|^3.4", + "symfony/var-dumper": "^2.8|^3.4" }, "suggest": { "ext-dom": "Needed to make use of the features in the utilities namespace" @@ -644,20 +644,20 @@ "highlight.php", "syntax" ], - "time": "2019-12-13T21:54:06+00:00" + "time": "2020-02-03T02:19:36+00:00" }, { "name": "symfony/console", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f" + "reference": "f512001679f37e6a042b51897ed24a2f05eba656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", - "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", + "url": "https://api.github.com/repos/symfony/console/zipball/f512001679f37e6a042b51897ed24a2f05eba656", + "reference": "f512001679f37e6a042b51897ed24a2f05eba656", "shasum": "" }, "require": { @@ -720,20 +720,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-01-10T21:54:01+00:00" + "time": "2020-01-25T12:44:29+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "c33998709f3fe9b8e27e0277535b07fbf6fde37a" + "reference": "491a20dfa87e0b3990170593bc2de0bb34d828a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c33998709f3fe9b8e27e0277535b07fbf6fde37a", - "reference": "c33998709f3fe9b8e27e0277535b07fbf6fde37a", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/491a20dfa87e0b3990170593bc2de0bb34d828a5", + "reference": "491a20dfa87e0b3990170593bc2de0bb34d828a5", "shasum": "" }, "require": { @@ -775,20 +775,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2020-01-04T13:00:46+00:00" + "time": "2020-01-31T09:11:17+00:00" }, { "name": "symfony/intl", - "version": "v5.0.3", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/intl.git", - "reference": "2b3694976f02ed6a7894d8a772c9d55cee5d9677" + "reference": "519bcb27ea53835c1e8e7f7c8a799c867d570156" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/intl/zipball/2b3694976f02ed6a7894d8a772c9d55cee5d9677", - "reference": "2b3694976f02ed6a7894d8a772c9d55cee5d9677", + "url": "https://api.github.com/repos/symfony/intl/zipball/519bcb27ea53835c1e8e7f7c8a799c867d570156", + "reference": "519bcb27ea53835c1e8e7f7c8a799c867d570156", "shasum": "" }, "require": { @@ -850,11 +850,11 @@ "l10n", "localization" ], - "time": "2020-01-04T14:08:26+00:00" + "time": "2020-01-31T09:13:47+00:00" }, { "name": "symfony/mime", - "version": "v5.0.3", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", @@ -916,16 +916,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", "shasum": "" }, "require": { @@ -937,7 +937,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -970,20 +970,20 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-intl-icu", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "b3dffd68afa61ca70f2327f2dd9bbeb6aa53d70b" + "reference": "727b3bb5bfa7ca9eeb86416784cf1c08a6289b86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/b3dffd68afa61ca70f2327f2dd9bbeb6aa53d70b", - "reference": "b3dffd68afa61ca70f2327f2dd9bbeb6aa53d70b", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/727b3bb5bfa7ca9eeb86416784cf1c08a6289b86", + "reference": "727b3bb5bfa7ca9eeb86416784cf1c08a6289b86", "shasum": "" }, "require": { @@ -996,7 +996,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1028,26 +1028,26 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46" + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6f9c239e61e1b0c9229a28ff89a812dc449c3d46", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6842f1a39cf7d580655688069a03dd7cd83d244a", + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a", "shasum": "" }, "require": { "php": ">=5.3.3", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.9" + "symfony/polyfill-php72": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -1055,7 +1055,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1090,20 +1090,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-17T12:01:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", "shasum": "" }, "require": { @@ -1115,7 +1115,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1149,20 +1149,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", "shasum": "" }, "require": { @@ -1171,7 +1171,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1204,20 +1204,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", "shasum": "" }, "require": { @@ -1226,7 +1226,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1262,11 +1262,11 @@ "portable", "shim" ], - "time": "2019-11-27T16:25:15+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/process", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -1373,7 +1373,7 @@ }, { "name": "symfony/yaml", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", diff --git a/vendor-bin/phpunit/composer.lock b/vendor-bin/phpunit/composer.lock index 5b65c64b..7dd90d31 100644 --- a/vendor-bin/phpunit/composer.lock +++ b/vendor-bin/phpunit/composer.lock @@ -462,41 +462,38 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "reference": "a48807183a4b819072f26e347bbd0b5199a9d15f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/a48807183a4b819072f26e347bbd0b5199a9d15f", + "reference": "a48807183a4b819072f26e347bbd0b5199a9d15f", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -507,10 +504,14 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-12-28T18:55:12+00:00" + "time": "2020-02-09T09:16:15+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -1574,16 +1575,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", "shasum": "" }, "require": { @@ -1595,7 +1596,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1628,7 +1629,7 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "theseer/tokenizer", @@ -1672,16 +1673,16 @@ }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", "shasum": "" }, "require": { @@ -1716,7 +1717,7 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+00:00" + "time": "2020-02-14T12:15:55+00:00" }, { "name": "webmozart/glob", diff --git a/vendor-bin/robo/composer.lock b/vendor-bin/robo/composer.lock index d7637a99..84e95e1f 100644 --- a/vendor-bin/robo/composer.lock +++ b/vendor-bin/robo/composer.lock @@ -1095,16 +1095,16 @@ }, { "name": "symfony/console", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f" + "reference": "f512001679f37e6a042b51897ed24a2f05eba656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", - "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", + "url": "https://api.github.com/repos/symfony/console/zipball/f512001679f37e6a042b51897ed24a2f05eba656", + "reference": "f512001679f37e6a042b51897ed24a2f05eba656", "shasum": "" }, "require": { @@ -1167,11 +1167,11 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-01-10T21:54:01+00:00" + "time": "2020-01-25T12:44:29+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -1299,7 +1299,7 @@ }, { "name": "symfony/filesystem", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -1349,7 +1349,7 @@ }, { "name": "symfony/finder", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -1398,16 +1398,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", "shasum": "" }, "require": { @@ -1419,7 +1419,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1452,20 +1452,20 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", "shasum": "" }, "require": { @@ -1477,7 +1477,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1511,20 +1511,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", "shasum": "" }, "require": { @@ -1533,7 +1533,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1569,7 +1569,7 @@ "portable", "shim" ], - "time": "2019-11-27T16:25:15+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/process", @@ -1680,7 +1680,7 @@ }, { "name": "symfony/yaml", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", From 9696d55b3186537cc78f817e69e6d5fb76850815 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sun, 16 Feb 2020 17:43:46 -0500 Subject: [PATCH 21/50] Prepare ugfix release --- CHANGELOG | 2 +- lib/Arsse.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5894c7c5..cc821fb1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -Version 0.8.3 (2020-??-??) +Version 0.8.3 (2020-02-16) ========================== Changes: diff --git a/lib/Arsse.php b/lib/Arsse.php index 6e120392..e6e451cb 100644 --- a/lib/Arsse.php +++ b/lib/Arsse.php @@ -7,7 +7,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; class Arsse { - const VERSION = "0.8.2"; + const VERSION = "0.8.3"; /** @var Lang */ public static $lang; From e8091fa740e07cedd12fad84df2427052d08c0b6 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 24 Feb 2020 18:52:14 -0500 Subject: [PATCH 22/50] Speed up coverage slightly. --- tests/phpunit.dist.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/phpunit.dist.xml b/tests/phpunit.dist.xml index ece5eef9..0c6f8a76 100644 --- a/tests/phpunit.dist.xml +++ b/tests/phpunit.dist.xml @@ -2,6 +2,7 @@ Date: Sun, 1 Mar 2020 10:17:16 -0500 Subject: [PATCH 23/50] Whitespace --- RoboFile.php | 2 +- tests/cases/Feed/TestException.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RoboFile.php b/RoboFile.php index 6a8472b6..f4c5ea76 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -54,7 +54,7 @@ class RoboFile extends \Robo\Tasks { * arguments to this task as one would to PHPUnit. * * Robo first tries to use pcov and will fall back first to xdebug then - * phpdbg. Neither pcov nor xdebug need to be enabled to be used; they + * phpdbg. Neither pcov nor xdebug need to be enabled to be used; they * only need to be present in the extension load path to be used. */ public function coverage(array $args): Result { diff --git a/tests/cases/Feed/TestException.php b/tests/cases/Feed/TestException.php index 9fc35747..8cb0f49f 100644 --- a/tests/cases/Feed/TestException.php +++ b/tests/cases/Feed/TestException.php @@ -126,7 +126,7 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { $specials = [ 401 => "unauthorized", 403 => "forbidden", - 404 => "invalidUrl", + 404 => "invalidUrl", 408 => "timeout", 410 => "invalidUrl", 414 => "invalidUrl", From a7f69c845f65fd6d360a5c390cf2774eb434c1c9 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sun, 1 Mar 2020 15:15:57 -0500 Subject: [PATCH 24/50] Use a more specific house style --- .php_cs.dist | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/.php_cs.dist b/.php_cs.dist index 49435d77..23a98afb 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -3,6 +3,7 @@ * Copyright 2017 J. King, Dustin Wilson et al. * See LICENSE and AUTHORS files for details */ +declare(strict_types=1); namespace JKingWeb\Arsse; const BASE = __DIR__.DIRECTORY_SEPARATOR; @@ -15,8 +16,57 @@ $paths = [ BASE."tests", ]; $rules = [ + // house rules where PSR series is silent + 'align_multiline_comment' => ['comment_type' => "phpdocs_only"], + 'array_syntax' => ['syntax' => "short"], + 'binary_operator_spaces' => [ + 'default' => "single_space", + 'operators' => ['=>' => "align_single_space"], + ], + 'cast_spaces' => ['space' => "single"], + 'concat_space' => ['spacing' => "none"], + 'declare_equal_normalize' => ['space' => "none"], + 'function_typehint_space' => true, + 'list_syntax' => ['syntax' => "short"], + 'lowercase_cast' => true, + 'lowercase_static_reference' => true, + 'magic_constant_casing' => true, + 'magic_method_casing' => true, + 'modernize_types_casting' => true, + 'native_function_casing' => true, + 'native_function_type_declaration_casing' => true, + 'new_with_braces' => false, // no option to specify absence of braces + 'no_alternative_syntax' => true, + 'no_binary_string' => true, + 'no_blank_lines_after_phpdoc' => true, + 'no_empty_comment' => true, + 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, + 'no_extra_blank_lines' => true, // this could probably use more configuration + 'no_leading_import_slash' => true, + 'no_leading_namespace_whitespace' => true, + 'no_mixed_echo_print' => ['use' => "echo"], + 'no_short_bool_cast' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unneeded_curly_braces' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'normalize_index_brace' => true, + 'object_operator_without_whitespace' => true, + 'pow_to_exponentiation' => true, + 'return_type_declaration' => ['space_before' => "none"], + 'set_type_to_cast' => true, + 'short_scalar_cast' => true, + 'standardize_not_equals' => true, + 'trailing_comma_in_multiline_array' => true, + 'unary_operator_spaces' => true, + 'yoda_style' => false, + // PSR standard to apply '@PSR2' => true, - 'braces' => ['position_after_functions_and_oop_constructs' => "same"], + // house exceptions to PSR rules + 'braces' => ['position_after_functions_and_oop_constructs' => "same"], 'function_declaration' => ['closure_function_spacing' => "none"], ]; @@ -28,4 +78,4 @@ foreach ($paths as $path) { $finder = $finder->in($path); } } -return \PhpCsFixer\Config::create()->setRules($rules)->setFinder($finder); +return \PhpCsFixer\Config::create()->setRiskyAllowed(true)->setRules($rules)->setFinder($finder); From bc53a2d24a6345831ac746acb37ab6927ddbfcf6 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sun, 1 Mar 2020 15:16:50 -0500 Subject: [PATCH 25/50] Style fixes --- RoboFile.php | 14 +- arsse.php | 2 +- lib/CLI.php | 2 +- lib/Conf.php | 98 ++-- lib/Database.php | 120 ++--- lib/Db/AbstractDriver.php | 6 +- lib/Db/AbstractStatement.php | 14 +- lib/Db/MySQL/Driver.php | 8 +- lib/Db/MySQL/PDODriver.php | 2 +- lib/Db/MySQL/Result.php | 2 +- lib/Db/MySQL/Statement.php | 6 +- lib/Db/PDODriver.php | 4 +- lib/Db/PDOResult.php | 2 +- lib/Db/PDOStatement.php | 4 +- lib/Db/PostgreSQL/Driver.php | 8 +- lib/Db/PostgreSQL/PDODriver.php | 3 +- lib/Db/PostgreSQL/Result.php | 2 +- lib/Db/PostgreSQL/Statement.php | 2 +- lib/Db/ResultEmpty.php | 2 +- lib/Db/SQLState.php | 4 - lib/Db/SQLite3/Driver.php | 5 +- lib/Db/SQLite3/PDODriver.php | 1 - lib/Db/SQLite3/Result.php | 2 +- lib/Db/SQLite3/Statement.php | 4 +- lib/Feed.php | 16 +- lib/Feed/Exception.php | 4 +- lib/ImportExport/AbstractImportExport.php | 4 +- lib/Lang.php | 6 +- lib/Misc/Query.php | 1 - lib/Misc/URL.php | 2 +- lib/Misc/ValueInfo.php | 42 +- lib/REST.php | 7 +- lib/REST/Fever/API.php | 10 +- lib/REST/NextcloudNews/V1_2.php | 24 +- lib/REST/NextcloudNews/Versions.php | 2 +- lib/REST/TinyTinyRSS/API.php | 194 +++---- lib/Service.php | 2 +- lib/User.php | 4 +- lib/User/Internal/Driver.php | 2 +- tests/cases/CLI/TestCLI.php | 4 +- tests/cases/Conf/TestConf.php | 12 +- tests/cases/Database/SeriesArticle.php | 500 +++++++++--------- tests/cases/Database/SeriesCleanup.php | 32 +- tests/cases/Database/SeriesFeed.php | 24 +- tests/cases/Database/SeriesFolder.php | 6 +- tests/cases/Database/SeriesLabel.php | 22 +- tests/cases/Database/SeriesSession.php | 10 +- tests/cases/Database/SeriesSubscription.php | 20 +- tests/cases/Database/SeriesTag.php | 8 +- tests/cases/Database/SeriesToken.php | 16 +- tests/cases/Database/TestDatabase.php | 4 +- tests/cases/Db/BaseDriver.php | 10 +- tests/cases/Db/BaseResult.php | 2 +- tests/cases/Db/BaseStatement.php | 338 ++++++------ tests/cases/Db/BaseUpdate.php | 2 +- tests/cases/Db/PostgreSQL/TestCreation.php | 2 +- tests/cases/Db/SQLite3/TestCreation.php | 24 +- tests/cases/Db/SQLite3PDO/TestCreation.php | 24 +- tests/cases/Feed/TestException.php | 2 +- tests/cases/Feed/TestFeed.php | 104 ++-- tests/cases/ImportExport/TestImportExport.php | 8 +- tests/cases/ImportExport/TestOPML.php | 2 +- tests/cases/Misc/TestContext.php | 74 +-- tests/cases/Misc/TestHTTP.php | 1 - tests/cases/Misc/TestQuery.php | 1 - tests/cases/Misc/TestURL.php | 2 +- tests/cases/Misc/TestValueInfo.php | 94 ++-- tests/cases/REST/Fever/TestAPI.php | 190 ++++--- tests/cases/REST/NextcloudNews/TestV1_2.php | 478 ++++++++--------- .../cases/REST/NextcloudNews/TestVersions.php | 1 - tests/cases/REST/TestREST.php | 52 +- tests/cases/REST/TinyTinyRSS/TestAPI.php | 331 ++++++------ tests/cases/REST/TinyTinyRSS/TestIcon.php | 1 - tests/cases/REST/TinyTinyRSS/TestSearch.php | 200 +++---- tests/cases/Service/TestSubprocess.php | 1 - tests/cases/TestArsse.php | 1 - tests/cases/User/TestInternal.php | 2 +- tests/cases/User/TestUser.php | 4 +- tests/docroot/Feed/Caching/304Conditional.php | 4 +- tests/docroot/Feed/Caching/304Random.php | 4 +- tests/docroot/Feed/Fetching/EndlessLoop.php | 2 +- tests/lib/AbstractTest.php | 12 +- tests/lib/DatabaseDrivers/MySQL.php | 4 +- tests/lib/DatabaseDrivers/MySQLPDO.php | 13 +- tests/lib/DatabaseDrivers/PostgreSQL.php | 4 +- tests/lib/DatabaseDrivers/PostgreSQLPDO.php | 4 +- tests/lib/DatabaseDrivers/SQLite3.php | 4 +- tests/lib/DatabaseDrivers/SQLite3PDO.php | 4 +- tests/server.php | 1 - 89 files changed, 1638 insertions(+), 1664 deletions(-) diff --git a/RoboFile.php b/RoboFile.php index f4c5ea76..17456c10 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -24,7 +24,7 @@ class RoboFile extends \Robo\Tasks { * ./robo test --testsuite TTRSS --exclude-group slow --testdox * * Please see the PHPUnit documentation for available options. - */ + */ public function test(array $args): Result { return $this->runTests(escapeshellarg(\PHP_BINARY), "typical", $args); } @@ -33,7 +33,7 @@ class RoboFile extends \Robo\Tasks { * * This includes pedantic tests which may help to identify problems. * See help for the "test" task for more details. - */ + */ public function testFull(array $args): Result { return $this->runTests(escapeshellarg(\PHP_BINARY), "full", $args); } @@ -42,7 +42,7 @@ class RoboFile extends \Robo\Tasks { * Runs a quick subset of the test suite * * See help for the "test" task for more details. - */ + */ public function testQuick(array $args): Result { return $this->runTests(escapeshellarg(\PHP_BINARY), "quick", $args); } @@ -56,7 +56,7 @@ class RoboFile extends \Robo\Tasks { * Robo first tries to use pcov and will fall back first to xdebug then * phpdbg. Neither pcov nor xdebug need to be enabled to be used; they * only need to be present in the extension load path to be used. - */ + */ public function coverage(array $args): Result { // run tests with code coverage reporting enabled $exec = $this->findCoverageEngine(); @@ -71,7 +71,7 @@ class RoboFile extends \Robo\Tasks { * run all tests which may cover code. * * See also help for the "coverage" task for more details. - */ + */ public function coverageFull(array $args): Result { // run tests with code coverage reporting enabled $exec = $this->findCoverageEngine(); @@ -121,7 +121,7 @@ class RoboFile extends \Robo\Tasks { return $all ? ">$hole 2>&1" : "2>$hole"; } - protected function runTests(string $executor, string $set, array $args) : Result { + protected function runTests(string $executor, string $set, array $args): Result { switch ($set) { case "typical": $set = ["--exclude-group", "optional"]; @@ -153,7 +153,7 @@ class RoboFile extends \Robo\Tasks { * Note that while it is possible to re-package old versions, the resultant tarball * may not be equivalent due to subsequent changes in the exclude list, or because * of new tooling. - */ + */ public function package(string $version = null): Result { // establish which commit to package $version = $version ?? $this->askDefault("Commit to package:", "HEAD"); diff --git a/arsse.php b/arsse.php index 1fe1870a..546723b9 100644 --- a/arsse.php +++ b/arsse.php @@ -3,6 +3,7 @@ * Copyright 2017 J. King, Dustin Wilson et al. * See LICENSE and AUTHORS files for details */ +declare(strict_types=1); namespace JKingWeb\Arsse; const BASE = __DIR__.DIRECTORY_SEPARATOR; @@ -13,7 +14,6 @@ ignore_user_abort(true); ini_set("memory_limit", "-1"); ini_set("max_execution_time", "0"); - if (\PHP_SAPI === "cli") { // initialize the CLI; this automatically handles --help and --version $cli = new CLI; diff --git a/lib/CLI.php b/lib/CLI.php index 017ad461..6d08c292 100644 --- a/lib/CLI.php +++ b/lib/CLI.php @@ -271,7 +271,7 @@ USAGE_TEXT; } protected function userAuthenticate(string $user, string $password, bool $fever = false): int { - $result = $fever ? $this->getInstance(Fever::class)->authenticate($user, $password) : Arsse::$user->auth($user, $password); + $result = $fever ? $this->getInstance(Fever::class)->authenticate($user, $password) : Arsse::$user->auth($user, $password); if ($result) { echo Arsse::$lang->msg("CLI.Auth.Success").\PHP_EOL; return 0; diff --git a/lib/Conf.php b/lib/Conf.php index 13635c89..3c1beb85 100644 --- a/lib/Conf.php +++ b/lib/Conf.php @@ -15,104 +15,104 @@ use JKingWeb\Arsse\Misc\ValueInfo as Value; * All public properties are configuration parameters that may be set by the server administrator. */ class Conf { /** @var string Default language to use for logging and errors */ - public $lang = "en"; + public $lang = "en"; /** @var string The database driver to use, one of "sqlite3", "postgresql", or "mysql". A fully-qualified class name may also be used for custom drivers */ - public $dbDriver = "sqlite3"; + public $dbDriver = "sqlite3"; /** @var boolean Whether to attempt to automatically update the database when upgrading to a new version with schema changes */ - public $dbAutoUpdate = true; + public $dbAutoUpdate = true; /** @var \DateInterval|null Number of seconds to wait before returning a timeout error when connecting to a database (null waits forever; not applicable to SQLite) */ - public $dbTimeoutConnect = 5.0; + public $dbTimeoutConnect = 5.0; /** @var \DateInterval|null Number of seconds to wait before returning a timeout error when executing a database operation (null waits forever; not applicable to SQLite) */ - public $dbTimeoutExec = null; + public $dbTimeoutExec = null; /** @var \DateInterval|null Number of seconds to wait before returning a timeout error when acquiring a database lock (null waits forever) */ - public $dbTimeoutLock = 60.0; + public $dbTimeoutLock = 60.0; /** @var string|null Full path and file name of SQLite database (if using SQLite) */ - public $dbSQLite3File = null; + public $dbSQLite3File = null; /** @var string Encryption key to use for SQLite database (if using a version of SQLite with SEE) */ - public $dbSQLite3Key = ""; + public $dbSQLite3Key = ""; /** @var string Host name, address, or socket path of PostgreSQL database server (if using PostgreSQL) */ - public $dbPostgreSQLHost = ""; + public $dbPostgreSQLHost = ""; /** @var string Log-in user name for PostgreSQL database server (if using PostgreSQL) */ - public $dbPostgreSQLUser = "arsse"; + public $dbPostgreSQLUser = "arsse"; /** @var string Log-in password for PostgreSQL database server (if using PostgreSQL) */ - public $dbPostgreSQLPass = ""; + public $dbPostgreSQLPass = ""; /** @var integer Listening port for PostgreSQL database server (if using PostgreSQL over TCP) */ - public $dbPostgreSQLPort = 5432; + public $dbPostgreSQLPort = 5432; /** @var string Database name on PostgreSQL database server (if using PostgreSQL) */ - public $dbPostgreSQLDb = "arsse"; + public $dbPostgreSQLDb = "arsse"; /** @var string Schema name in PostgreSQL database (if using PostgreSQL) */ - public $dbPostgreSQLSchema = ""; + public $dbPostgreSQLSchema = ""; /** @var string Service file entry to use (if using PostgreSQL); if using a service entry all above parameters except schema are ignored */ - public $dbPostgreSQLService = ""; + public $dbPostgreSQLService = ""; /** @var string Host name or address of MySQL database server (if using MySQL) */ - public $dbMySQLHost = "localhost"; + public $dbMySQLHost = "localhost"; /** @var string Log-in user name for MySQL database server (if using MySQL) */ - public $dbMySQLUser = "arsse"; + public $dbMySQLUser = "arsse"; /** @var string Log-in password for MySQL database server (if using MySQL) */ - public $dbMySQLPass = ""; + public $dbMySQLPass = ""; /** @var integer Listening port for MySQL database server (if using MySQL over TCP) */ - public $dbMySQLPort = 3306; + public $dbMySQLPort = 3306; /** @var string Database name on MySQL database server (if using MySQL) */ - public $dbMySQLDb = "arsse"; + public $dbMySQLDb = "arsse"; /** @var string Unix domain socket or named pipe to use for MySQL when not connecting over TCP */ - public $dbMySQLSocket = ""; + public $dbMySQLSocket = ""; /** @var string The user management driver to use, currently only "internal". A fully-qualified class name may also be used for custom drivers */ - public $userDriver = "internal"; + public $userDriver = "internal"; /** @var boolean Whether users are already authenticated by the Web server before the application is executed */ - public $userPreAuth = false; + public $userPreAuth = false; /** @var boolean Whether to require successful HTTP authentication before processing API-level authentication for protocols which have any. Normally the Tiny Tiny RSS relies on its own session-token authentication scheme, for example */ - public $userHTTPAuthRequired = false; + public $userHTTPAuthRequired = false; /** @var integer Desired length of temporary user passwords */ - public $userTempPasswordLength = 20; + public $userTempPasswordLength = 20; /** @var boolean Whether invalid or expired API session tokens should prevent logging in when HTTP authentication is used, for protocol which implement their own authentication */ - public $userSessionEnforced = true; + public $userSessionEnforced = true; /** @var \DateInterval Period of inactivity after which log-in sessions should be considered invalid, as an ISO 8601 duration (default: 24 hours) * @see https://en.wikipedia.org/wiki/ISO_8601#Durations */ - public $userSessionTimeout = "PT24H"; + public $userSessionTimeout = "PT24H"; /** @var \DateInterval Maximum lifetime of log-in sessions regardless of activity, as an ISO 8601 duration (default: 7 days); * @see https://en.wikipedia.org/wiki/ISO_8601#Durations */ - public $userSessionLifetime = "P7D"; + public $userSessionLifetime = "P7D"; /** @var string Feed update service driver to use, one of "serial" or "subprocess". A fully-qualified class name may also be used for custom drivers */ - public $serviceDriver = "subprocess"; + public $serviceDriver = "subprocess"; /** @var \DateInterval The interval between checks for new articles, as an ISO 8601 duration * @see https://en.wikipedia.org/wiki/ISO_8601#Durations */ - public $serviceFrequency = "PT2M"; + public $serviceFrequency = "PT2M"; /** @var integer Number of concurrent feed updates to perform */ - public $serviceQueueWidth = 5; + public $serviceQueueWidth = 5; /** @var \DateInterval Number of seconds to wait for data when fetching feeds from foreign servers */ - public $fetchTimeout = 10.0; + public $fetchTimeout = 10.0; /** @var integer Maximum size, in bytes, of data when fetching feeds from foreign servers */ - public $fetchSizeLimit = 2 * 1024 * 1024; + public $fetchSizeLimit = 2 * 1024 * 1024; /** @var boolean Whether to allow the possibility of fetching full article contents using an item's URL. Whether fetching will actually happen is also governed by a per-feed setting */ - public $fetchEnableScraping = true; + public $fetchEnableScraping = true; /** @var string|null User-Agent string to use when fetching feeds from foreign servers */ - public $fetchUserAgentString = null; + public $fetchUserAgentString = null; /** @var \DateInterval|null When to delete a feed from the database after all its subscriptions have been deleted, as an ISO 8601 duration (default: 24 hours; null for never) * @see https://en.wikipedia.org/wiki/ISO_8601#Durations */ - public $purgeFeeds = "PT24H"; + public $purgeFeeds = "PT24H"; /** @var \DateInterval|null When to delete an unstarred article in the database after it has been marked read by all users, as an ISO 8601 duration (default: 7 days; null for never) * @see https://en.wikipedia.org/wiki/ISO_8601#Durations */ - public $purgeArticlesRead = "P7D"; + public $purgeArticlesRead = "P7D"; /** @var \DateInterval|null When to delete an unstarred article in the database regardless of its read state, as an ISO 8601 duration (default: 21 days; null for never) * @see https://en.wikipedia.org/wiki/ISO_8601#Durations */ - public $purgeArticlesUnread = "P21D"; + public $purgeArticlesUnread = "P21D"; /** @var string Application name to present to clients during authentication */ - public $httpRealm = "The Advanced RSS Environment"; + public $httpRealm = "The Advanced RSS Environment"; /** @var string Space-separated list of origins from which to allow cross-origin resource sharing */ - public $httpOriginsAllowed = "*"; + public $httpOriginsAllowed = "*"; /** @var string Space-separated list of origins from which to deny cross-origin resource sharing */ - public $httpOriginsDenied = ""; + public $httpOriginsDenied = ""; ### OBSOLETE SETTINGS /** @var \DateInterval|null (OBSOLETE) Number of seconds for SQLite to wait before returning a timeout error when trying to acquire a write lock on the database (zero does not wait) */ - public $dbSQLite3Timeout = null; // previously 60.0 + public $dbSQLite3Timeout = null; // previously 60.0 const TYPE_NAMES = [ Value::T_BOOL => "boolean", @@ -254,10 +254,10 @@ class Conf { $match = explode("|", $match[1]); $nullable = (sizeof($match) > 1); $type = [ - 'string' => Value::T_STRING | Value::M_STRICT, - 'integer' => Value::T_INT | Value::M_STRICT, - 'boolean' => Value::T_BOOL | Value::M_STRICT, - 'float' => Value::T_FLOAT | Value::M_STRICT, + 'string' => Value::T_STRING | Value::M_STRICT, + 'integer' => Value::T_INT | Value::M_STRICT, + 'boolean' => Value::T_BOOL | Value::M_STRICT, + 'float' => Value::T_FLOAT | Value::M_STRICT, '\\DateInterval' => Value::T_INTERVAL | Value::M_LOOSE, ][$match[0]]; if ($nullable) { @@ -283,7 +283,7 @@ class Conf { // it is first converted to an interval and then converted to the numeric type if necessary $mode = $nullable ? Value::M_STRICT | Value::M_NULL : Value::M_STRICT; if (is_string($value)) { - $value = Value::normalize($value, Value::T_INTERVAL | $mode); + $value = Value::normalize($value, Value::T_INTERVAL | $mode); } switch (self::EXPECTED_TYPES[$key] ?? gettype($this->$key)) { case "integer": @@ -299,7 +299,7 @@ class Conf { throw new Conf\Exception("ambiguousDefault", ['param' => $key]); // @codeCoverageIgnore } } - $value = Value::normalize($value, $typeConst); + $value = Value::normalize($value, $typeConst); switch ($key) { case "dbDriver": $driver = $driver ?? Database::DRIVER_NAMES[strtolower($value)] ?? $value; @@ -319,7 +319,7 @@ class Conf { } return $value; } catch (ExceptionType $e) { - $type = static::$types[$key]['const'] & ~(Value::M_STRICT | Value::M_DROP | Value::M_NULL | Value::M_ARRAY); + $type = static::$types[$key]['const'] & ~(Value::M_STRICT | Value::M_DROP | Value::M_NULL | Value::M_ARRAY); throw new Conf\Exception("typeMismatch", ['param' => $key, 'type' => self::TYPE_NAMES[$type], 'file' => $file, 'nullable' => $nullable]); } } diff --git a/lib/Database.php b/lib/Database.php index 24475a64..8bdd4378 100644 --- a/lib/Database.php +++ b/lib/Database.php @@ -379,7 +379,7 @@ class Database { $max = Date::add(Arsse::$conf->userSessionTimeout, $now)->getTimestamp(); $diff = intdiv($max - $now, 2); // determine if the expiry time is less than half the session timeout into the future - return (($now + $diff) >= $expiry->getTimestamp()); + return ($now + $diff) >= $expiry->getTimestamp(); } /** Creates a new token for the given user in the given class @@ -388,7 +388,7 @@ class Database { * @param string $class The class of the token e.g. the protocol name * @param string|null $id The value of the token; if none is provided a UUID will be generated * @param \DateTimeInterface|null $expires An optional expiry date and time for the token - */ + */ public function tokenCreate(string $user, string $class, string $id = null, \DateTimeInterface $expires = null): string { // If the user isn't authorized to perform this action then throw an exception. if (!Arsse::$user->authorize($user, __FUNCTION__)) { @@ -584,10 +584,10 @@ class Database { return false; } $valid = [ - 'name' => "str", + 'name' => "str", 'parent' => "int", ]; - list($setClause, $setTypes, $setValues) = $this->generateSet($in, $valid); + [$setClause, $setTypes, $setValues] = $this->generateSet($in, $valid); return (bool) $this->db->prepare("UPDATE arsse_folders set $setClause, modified = CURRENT_TIMESTAMP where owner = ? and id = ?", $setTypes, "str", "int")->run($setValues, $user, $id)->changes(); } @@ -881,7 +881,7 @@ class Database { 'order_type' => "strict int", 'pinned' => "strict bool", ]; - list($setClause, $setTypes, $setValues) = $this->generateSet($data, $valid); + [$setClause, $setTypes, $setValues] = $this->generateSet($data, $valid); if (!$setClause) { // if no changes would actually be applied, just return return false; @@ -1220,10 +1220,10 @@ class Database { */ public function feedMatchIds(int $feedID, array $ids = [], array $hashesUT = [], array $hashesUC = [], array $hashesTC = []): Db\Result { // compile SQL IN() clauses and necessary type bindings for the four identifier lists - list($cId, $tId, $vId) = $this->generateIn($ids, "str"); - list($cHashUT, $tHashUT, $vHashUT) = $this->generateIn($hashesUT, "str"); - list($cHashUC, $tHashUC, $vHashUC) = $this->generateIn($hashesUC, "str"); - list($cHashTC, $tHashTC, $vHashTC) = $this->generateIn($hashesTC, "str"); + [$cId, $tId, $vId] = $this->generateIn($ids, "str"); + [$cHashUT, $tHashUT, $vHashUT] = $this->generateIn($hashesUT, "str"); + [$cHashUC, $tHashUC, $vHashUC] = $this->generateIn($hashesUC, "str"); + [$cHashTC, $tHashTC, $vHashTC] = $this->generateIn($hashesTC, "str"); // perform the query return $articles = $this->db->prepare( "SELECT id, edited, guid, url_title_hash, url_content_hash, title_content_hash FROM arsse_articles WHERE feed = ? and (guid in($cId) or url_title_hash in($cHashUT) or url_content_hash in($cHashUC) or title_content_hash in($cHashTC))", @@ -1242,27 +1242,27 @@ class Database { protected function articleColumns(): array { $greatest = $this->db->sqlToken("greatest"); return [ - 'id' => "arsse_articles.id", - 'edition' => "latest_editions.edition", - 'url' => "arsse_articles.url", - 'title' => "arsse_articles.title", - 'author' => "arsse_articles.author", - 'content' => "arsse_articles.content", - 'guid' => "arsse_articles.guid", - 'fingerprint' => "arsse_articles.url_title_hash || ':' || arsse_articles.url_content_hash || ':' || arsse_articles.title_content_hash", - 'folder' => "coalesce(arsse_subscriptions.folder,0)", - 'subscription' => "arsse_subscriptions.id", - 'feed' => "arsse_subscriptions.feed", - 'starred' => "coalesce(arsse_marks.starred,0)", - 'unread' => "abs(coalesce(arsse_marks.read,0) - 1)", - 'note' => "coalesce(arsse_marks.note,'')", - 'published_date' => "arsse_articles.published", - 'edited_date' => "arsse_articles.edited", - 'modified_date' => "arsse_articles.modified", - 'marked_date' => "$greatest(arsse_articles.modified, coalesce(arsse_marks.modified, '0001-01-01 00:00:00'), coalesce(label_stats.modified, '0001-01-01 00:00:00'))", + 'id' => "arsse_articles.id", + 'edition' => "latest_editions.edition", + 'url' => "arsse_articles.url", + 'title' => "arsse_articles.title", + 'author' => "arsse_articles.author", + 'content' => "arsse_articles.content", + 'guid' => "arsse_articles.guid", + 'fingerprint' => "arsse_articles.url_title_hash || ':' || arsse_articles.url_content_hash || ':' || arsse_articles.title_content_hash", + 'folder' => "coalesce(arsse_subscriptions.folder,0)", + 'subscription' => "arsse_subscriptions.id", + 'feed' => "arsse_subscriptions.feed", + 'starred' => "coalesce(arsse_marks.starred,0)", + 'unread' => "abs(coalesce(arsse_marks.read,0) - 1)", + 'note' => "coalesce(arsse_marks.note,'')", + 'published_date' => "arsse_articles.published", + 'edited_date' => "arsse_articles.edited", + 'modified_date' => "arsse_articles.modified", + 'marked_date' => "$greatest(arsse_articles.modified, coalesce(arsse_marks.modified, '0001-01-01 00:00:00'), coalesce(label_stats.modified, '0001-01-01 00:00:00'))", 'subscription_title' => "coalesce(arsse_subscriptions.title, arsse_feeds.title)", - 'media_url' => "arsse_enclosures.url", - 'media_type' => "arsse_enclosures.type", + 'media_url' => "arsse_enclosures.url", + 'media_type' => "arsse_enclosures.type", ]; } @@ -1359,7 +1359,7 @@ class Database { "unread" => ["unread", "=", "bool", ""], "starred" => ["starred", "=", "bool", ""], ]; - foreach ($options as $m => list($col, $op, $type, $pair)) { + foreach ($options as $m => [$col, $op, $type, $pair]) { if (!$context->$m()) { // context is not being used continue; @@ -1368,7 +1368,7 @@ class Database { if (!$context->$m) { throw new Db\ExceptionInput("tooShort", ['field' => $m, 'action' => $this->caller(), 'min' => 1]); // must have at least one array element } - list($clause, $types, $values) = $this->generateIn($context->$m, $type); + [$clause, $types, $values] = $this->generateIn($context->$m, $type); $q->setWhere("{$colDefs[$col]} $op ($clause)", $types, $values); } elseif ($pair && $context->$pair()) { // option is paired with another which is also being used @@ -1383,7 +1383,7 @@ class Database { } } // further handle exclusionary options if specified - foreach ($options as $m => list($col, $op, $type, $pair)) { + foreach ($options as $m => [$col, $op, $type, $pair]) { if (!method_exists($context->not, $m) || !$context->not->$m()) { // context option is not being used continue; @@ -1392,7 +1392,7 @@ class Database { // for exclusions we don't care if the array is empty continue; } - list($clause, $types, $values) = $this->generateIn($context->not->$m, $type); + [$clause, $types, $values] = $this->generateIn($context->not->$m, $type); $q->setWhereNot("{$colDefs[$col]} $op ($clause)", $types, $values); } elseif ($pair && $context->not->$pair()) { // option is paired with another which is also being used @@ -1409,13 +1409,13 @@ class Database { // handle labels and tags $options = [ 'label' => [ - 'match_col' => "arsse_articles.id", - 'cte_name' => "labelled", - 'cte_cols' => ["article", "label_id", "label_name"], - 'cte_body' => "SELECT m.article, l.id, l.name from arsse_label_members as m join arsse_labels as l on l.id = m.label where l.owner = ? and m.assigned = 1", - 'cte_types' => ["str"], + 'match_col' => "arsse_articles.id", + 'cte_name' => "labelled", + 'cte_cols' => ["article", "label_id", "label_name"], + 'cte_body' => "SELECT m.article, l.id, l.name from arsse_label_members as m join arsse_labels as l on l.id = m.label where l.owner = ? and m.assigned = 1", + 'cte_types' => ["str"], 'cte_values' => [$user], - 'options' => [ + 'options' => [ 'label' => ['use_name' => false, 'multi' => false], 'labels' => ['use_name' => false, 'multi' => true], 'labelName' => ['use_name' => true, 'multi' => false], @@ -1423,13 +1423,13 @@ class Database { ], ], 'tag' => [ - 'match_col' => "arsse_subscriptions.id", - 'cte_name' => "tagged", - 'cte_cols' => ["subscription", "tag_id", "tag_name"], - 'cte_body' => "SELECT m.subscription, t.id, t.name from arsse_tag_members as m join arsse_tags as t on t.id = m.tag where t.owner = ? and m.assigned = 1", - 'cte_types' => ["str"], + 'match_col' => "arsse_subscriptions.id", + 'cte_name' => "tagged", + 'cte_cols' => ["subscription", "tag_id", "tag_name"], + 'cte_body' => "SELECT m.subscription, t.id, t.name from arsse_tag_members as m join arsse_tags as t on t.id = m.tag where t.owner = ? and m.assigned = 1", + 'cte_types' => ["str"], 'cte_values' => [$user], - 'options' => [ + 'options' => [ 'tag' => ['use_name' => false, 'multi' => false], 'tags' => ['use_name' => false, 'multi' => true], 'tagName' => ['use_name' => true, 'multi' => false], @@ -1452,7 +1452,7 @@ class Database { throw new Db\ExceptionInput("tooShort", ['field' => $m, 'action' => $this->caller(), 'min' => 1]); // must have at least one array element } if ($multi) { - list($test, $types, $values) = $this->generateIn($context->$m, $named ? "str" : "int"); + [$test, $types, $values] = $this->generateIn($context->$m, $named ? "str" : "int"); $test = "in ($test)"; } else { $test = "= ?"; @@ -1464,7 +1464,7 @@ class Database { if ($context->not->$m()) { $seen = true; if ($multi) { - list($test, $types, $values) = $this->generateIn($context->not->$m, $named ? "str" : "int"); + [$test, $types, $values] = $this->generateIn($context->not->$m, $named ? "str" : "int"); $test = "in ($test)"; } else { $test = "= ?"; @@ -1496,7 +1496,7 @@ class Database { $q->setWhere("coalesce(arsse_subscriptions.folder,0) in (select folder from folders)"); } if ($context->folders()) { - list($inClause, $inTypes, $inValues) = $this->generateIn($context->folders, "int"); + [$inClause, $inTypes, $inValues] = $this->generateIn($context->folders, "int"); // add a common table expression to list the folders and their children so that we select from the entire subtree $q->setCTE("folders_multi(folder)", "SELECT id as folder from (select id from (select 0 as id union select id from arsse_folders where owner = ?) as f where id in ($inClause)) as folders_multi union select id from arsse_folders join folders_multi on coalesce(parent,0) = folder", ["str", $inTypes], [$user, $inValues]); // limit subscriptions to the listed folders @@ -1509,7 +1509,7 @@ class Database { $q->setWhereNot("coalesce(arsse_subscriptions.folder,0) in (select folder from folders_excluded)"); } if ($context->not->folders()) { - list($inClause, $inTypes, $inValues) = $this->generateIn($context->not->folders, "int"); + [$inClause, $inTypes, $inValues] = $this->generateIn($context->not->folders, "int"); // add a common table expression to list the folders and their children so that we select from the entire subtree $q->setCTE("folders_multi_excluded(folder)", "SELECT id as folder from (select id from (select 0 as id union select id from arsse_folders where owner = ?) as f where id in ($inClause)) as folders_multi_excluded union select id from arsse_folders join folders_multi_excluded on coalesce(parent,0) = folder", ["str", $inTypes], [$user, $inValues]); // limit subscriptions to the listed folders @@ -1623,9 +1623,9 @@ class Database { throw new User\ExceptionAuthz("notAuthorized", ["action" => __FUNCTION__, "user" => $user]); } $data = [ - 'read' => $data['read'] ?? null, + 'read' => $data['read'] ?? null, 'starred' => $data['starred'] ?? null, - 'note' => $data['note'] ?? null, + 'note' => $data['note'] ?? null, ]; if (!isset($data['read']) && !isset($data['starred']) && !isset($data['note'])) { return 0; @@ -1664,7 +1664,7 @@ class Database { $data = array_filter($data, function($v) { return isset($v); }); - list($set, $setTypes, $setValues) = $this->generateSet($data, ['starred' => "bool", 'note' => "str"]); + [$set, $setTypes, $setValues] = $this->generateSet($data, ['starred' => "bool", 'note' => "str"]); $q->setBody("UPDATE arsse_marks set touched = 1, $set where article in(select article from target_articles) and subscription in(select distinct subscription from target_articles)", $setTypes, $setValues); $this->db->prepare($q->getQuery(), $q->getTypes())->run($q->getValues()); } @@ -1688,7 +1688,7 @@ class Database { $data = array_filter($data, function($v) { return isset($v); }); - list($set, $setTypes, $setValues) = $this->generateSet($data, ['read' => "bool", 'starred' => "bool", 'note' => "str"]); + [$set, $setTypes, $setValues] = $this->generateSet($data, ['read' => "bool", 'starred' => "bool", 'note' => "str"]); $q->setBody("UPDATE arsse_marks set $set, modified = CURRENT_TIMESTAMP where article in(select article from target_articles) and subscription in(select distinct subscription from target_articles)", $setTypes, $setValues); $out = $this->db->prepare($q->getQuery(), $q->getTypes())->run($q->getValues())->changes(); } @@ -1860,7 +1860,7 @@ class Database { public function editionArticle(int ...$edition): array { $out = []; $context = (new Context)->editions($edition); - list($in, $inTypes, $inValues) = $this->generateIn($context->editions, "int"); + [$in, $inTypes, $inValues] = $this->generateIn($context->editions, "int"); $out = $this->db->prepare("SELECT id as edition, article from arsse_editions where id in($in)", $inTypes)->run($inValues)->getAll(); return $out ? array_combine(array_column($out, "edition"), array_column($out, "article")) : []; } @@ -2018,7 +2018,7 @@ class Database { $valid = [ 'name' => "str", ]; - list($setClause, $setTypes, $setValues) = $this->generateSet($data, $valid); + [$setClause, $setTypes, $setValues] = $this->generateSet($data, $valid); if (!$setClause) { // if no changes would actually be applied, just return return false; @@ -2086,7 +2086,7 @@ class Database { $articles = array_column($articles, "id"); } // prepare up to three queries: removing requires one, adding two, and replacing three - list($inClause, $inTypes, $inValues) = $this->generateIn($articles, "int"); + [$inClause, $inTypes, $inValues] = $this->generateIn($articles, "int"); $updateQ = "UPDATE arsse_label_members set assigned = ?, modified = CURRENT_TIMESTAMP where label = ? and assigned <> ? and article %in% ($inClause)"; $updateT = ["bool", "int", "bool", $inTypes]; $insertQ = "INSERT INTO arsse_label_members(label,article,subscription) SELECT ?,a.id,s.id from arsse_articles as a join arsse_subscriptions as s on a.feed = s.feed where s.owner = ? and a.id not in (select article from arsse_label_members where label = ?) and a.id in ($inClause)"; @@ -2112,7 +2112,7 @@ class Database { // execute them in a transaction $out = 0; $tr = $this->begin(); - foreach ($qList as list($q, $t, $v)) { + foreach ($qList as [$q, $t, $v]) { $out += $this->db->prepare($q, ...$t)->run(...$v)->changes(); } $tr->commit(); @@ -2321,7 +2321,7 @@ class Database { $valid = [ 'name' => "str", ]; - list($setClause, $setTypes, $setValues) = $this->generateSet($data, $valid); + [$setClause, $setTypes, $setValues] = $this->generateSet($data, $valid); if (!$setClause) { // if no changes would actually be applied, just return return false; @@ -2385,7 +2385,7 @@ class Database { } } // prepare up to three queries: removing requires one, adding two, and replacing three - list($inClause, $inTypes, $inValues) = $this->generateIn($subscriptions, "int"); + [$inClause, $inTypes, $inValues] = $this->generateIn($subscriptions, "int"); $updateQ = "UPDATE arsse_tag_members set assigned = ?, modified = CURRENT_TIMESTAMP where tag = ? and assigned <> ? and subscription in (select id from arsse_subscriptions where owner = ? and id %in% ($inClause))"; $updateT = ["bool", "int", "bool", "str", $inTypes]; $insertQ = "INSERT INTO arsse_tag_members(tag,subscription) SELECT ?,id from arsse_subscriptions where id not in (select subscription from arsse_tag_members where tag = ?) and owner = ? and id in ($inClause)"; @@ -2411,7 +2411,7 @@ class Database { // execute them in a transaction $out = 0; $tr = $this->begin(); - foreach ($qList as list($q, $t, $v)) { + foreach ($qList as [$q, $t, $v]) { $out += $this->db->prepare($q, ...$t)->run(...$v)->changes(); } $tr->commit(); diff --git a/lib/Db/AbstractDriver.php b/lib/Db/AbstractDriver.php index fd377b2a..2a6a973e 100644 --- a/lib/Db/AbstractDriver.php +++ b/lib/Db/AbstractDriver.php @@ -40,9 +40,9 @@ abstract class AbstractDriver implements Driver { throw new Exception("updateFileUnreadable", ['file' => $file, 'driver_name' => $this->driverName(), 'current' => $a]); } $sql = @file_get_contents($file); - if ($sql===false) { + if ($sql === false) { throw new Exception("updateFileUnusable", ['file' => $file, 'driver_name' => $this->driverName(), 'current' => $a]); // @codeCoverageIgnore - } elseif ($sql==="") { + } elseif ($sql === "") { throw new Exception("updateFileIncomplete", ['file' => $file, 'driver_name' => $this->driverName(), 'current' => $a]); } try { @@ -50,7 +50,7 @@ abstract class AbstractDriver implements Driver { } catch (\Throwable $e) { throw new Exception("updateFileError", ['file' => $file, 'driver_name' => $this->driverName(), 'current' => $a, 'message' => $e->getMessage()]); } - if ($this->schemaVersion() != $a+1) { + if ($this->schemaVersion() != $a + 1) { throw new Exception("updateFileIncomplete", ['file' => $file, 'driver_name' => $this->driverName(), 'current' => $a]); } } catch (\Throwable $e) { diff --git a/lib/Db/AbstractStatement.php b/lib/Db/AbstractStatement.php index 45b6801e..1aa7e20b 100644 --- a/lib/Db/AbstractStatement.php +++ b/lib/Db/AbstractStatement.php @@ -13,12 +13,12 @@ abstract class AbstractStatement implements Statement { use SQLState; const TYPE_NORM_MAP = [ - self::T_INTEGER => ValueInfo::M_NULL | ValueInfo::T_INT, - self::T_STRING => ValueInfo::M_NULL | ValueInfo::T_STRING, - self::T_BOOLEAN => ValueInfo::M_NULL | ValueInfo::T_BOOL, - self::T_DATETIME => ValueInfo::M_NULL | ValueInfo::T_DATE, - self::T_FLOAT => ValueInfo::M_NULL | ValueInfo::T_FLOAT, - self::T_BINARY => ValueInfo::M_NULL | ValueInfo::T_STRING, + self::T_INTEGER => ValueInfo::M_NULL | ValueInfo::T_INT, + self::T_STRING => ValueInfo::M_NULL | ValueInfo::T_STRING, + self::T_BOOLEAN => ValueInfo::M_NULL | ValueInfo::T_BOOL, + self::T_DATETIME => ValueInfo::M_NULL | ValueInfo::T_DATE, + self::T_FLOAT => ValueInfo::M_NULL | ValueInfo::T_FLOAT, + self::T_BINARY => ValueInfo::M_NULL | ValueInfo::T_STRING, self::T_NOT_NULL + self::T_INTEGER => ValueInfo::T_INT, self::T_NOT_NULL + self::T_STRING => ValueInfo::T_STRING, self::T_NOT_NULL + self::T_BOOLEAN => ValueInfo::T_BOOL, @@ -78,7 +78,7 @@ abstract class AbstractStatement implements Statement { $value = $this->cast($value, $this->types[$a]); $this->bindValue($value, $this->types[$a] % self::T_NOT_NULL, ++$a); } else { - throw new Exception("paramTypeMissing", $a+1); + throw new Exception("paramTypeMissing", $a + 1); } } // once all values are bound, check that all parameters have been supplied values and bind null for any missing ones diff --git a/lib/Db/MySQL/Driver.php b/lib/Db/MySQL/Driver.php index 6be8c3f4..49ed00df 100644 --- a/lib/Db/MySQL/Driver.php +++ b/lib/Db/MySQL/Driver.php @@ -163,7 +163,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { $this->db->options(\MYSQLI_OPT_CONNECT_TIMEOUT, ceil(Arsse::$conf->dbTimeoutConnect)); @$this->db->real_connect($host, $user, $password, $db, $port, $socket); if ($this->db->connect_errno) { - list($excClass, $excMsg, $excData) = $this->buildConnectionException($this->db->connect_errno, $this->db->connect_error); + [$excClass, $excMsg, $excData] = $this->buildConnectionException($this->db->connect_errno, $this->db->connect_error); throw new $excClass($excMsg, $excData); } $this->db->set_charset("utf8mb4"); @@ -184,11 +184,11 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { do { if ($this->db->sqlstate !== "00000") { if ($this->db->sqlstate === "HY000") { - list($excClass, $excMsg, $excData) = $this->buildEngineException($this->db->errno, $this->db->error); + [$excClass, $excMsg, $excData] = $this->buildEngineException($this->db->errno, $this->db->error); } else { - list($excClass, $excMsg, $excData) = $this->buildStandardException($this->db->sqlstate, $this->db->error); + [$excClass, $excMsg, $excData] = $this->buildStandardException($this->db->sqlstate, $this->db->error); } - $e = new $excClass($excMsg, $excData, $e); + $e = new $excClass($excMsg, $excData, $e); } $r = $this->db->store_result(); } while ($this->db->more_results() && $this->db->next_result()); diff --git a/lib/Db/MySQL/PDODriver.php b/lib/Db/MySQL/PDODriver.php index a2947104..e669fca7 100644 --- a/lib/Db/MySQL/PDODriver.php +++ b/lib/Db/MySQL/PDODriver.php @@ -34,7 +34,7 @@ class PDODriver extends Driver { $msg = $e->getMessage(); $code = (int) substr($msg, 17, 4); $msg = substr($msg, 23); - list($excClass, $excMsg, $excData) = $this->buildConnectionException($code, $msg); + [$excClass, $excMsg, $excData] = $this->buildConnectionException($code, $msg); throw new $excClass($excMsg, $excData); } } diff --git a/lib/Db/MySQL/Result.php b/lib/Db/MySQL/Result.php index d2a2619d..45e8225a 100644 --- a/lib/Db/MySQL/Result.php +++ b/lib/Db/MySQL/Result.php @@ -44,6 +44,6 @@ class Result extends \JKingWeb\Arsse\Db\AbstractResult { public function valid() { $this->cur = $this->set ? $this->set->fetch_assoc() : null; - return ($this->cur !== null); + return $this->cur !== null; } } diff --git a/lib/Db/MySQL/Statement.php b/lib/Db/MySQL/Statement.php index b6c6ceb4..02b56bde 100644 --- a/lib/Db/MySQL/Statement.php +++ b/lib/Db/MySQL/Statement.php @@ -37,7 +37,7 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { protected function prepare(string $query): bool { $this->st = $this->db->prepare($query); if (!$this->st) { // @codeCoverageIgnore - list($excClass, $excMsg, $excData) = $this->buildEngineException($this->db->errno, $this->db->error); // @codeCoverageIgnore + [$excClass, $excMsg, $excData] = $this->buildEngineException($this->db->errno, $this->db->error); // @codeCoverageIgnore throw new $excClass($excMsg, $excData); // @codeCoverageIgnore } return true; @@ -76,9 +76,9 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { // check for errors if ($this->st->sqlstate !== "00000") { if ($this->st->sqlstate === "HY000") { - list($excClass, $excMsg, $excData) = $this->buildEngineException($this->st->errno, $this->st->error); + [$excClass, $excMsg, $excData] = $this->buildEngineException($this->st->errno, $this->st->error); } else { - list($excClass, $excMsg, $excData) = $this->buildStandardException($this->st->sqlstate, $this->st->error); + [$excClass, $excMsg, $excData] = $this->buildStandardException($this->st->sqlstate, $this->st->error); } throw new $excClass($excMsg, $excData); } diff --git a/lib/Db/PDODriver.php b/lib/Db/PDODriver.php index df5dcc3b..df01bacf 100644 --- a/lib/Db/PDODriver.php +++ b/lib/Db/PDODriver.php @@ -14,7 +14,7 @@ trait PDODriver { $this->db->exec($query); return true; } catch (\PDOException $e) { - list($excClass, $excMsg, $excData) = $this->buildPDOException(); + [$excClass, $excMsg, $excData] = $this->buildPDOException(); throw new $excClass($excMsg, $excData); } } @@ -23,7 +23,7 @@ trait PDODriver { try { $r = $this->db->query($query); } catch (\PDOException $e) { - list($excClass, $excMsg, $excData) = $this->buildPDOException(); + [$excClass, $excMsg, $excData] = $this->buildPDOException(); throw new $excClass($excMsg, $excData); } return new PDOResult($this->db, $r); diff --git a/lib/Db/PDOResult.php b/lib/Db/PDOResult.php index 276e12ce..67023015 100644 --- a/lib/Db/PDOResult.php +++ b/lib/Db/PDOResult.php @@ -45,6 +45,6 @@ class PDOResult extends AbstractResult { public function valid() { $this->cur = $this->set->fetch(\PDO::FETCH_ASSOC); - return ($this->cur !== false); + return $this->cur !== false; } } diff --git a/lib/Db/PDOStatement.php b/lib/Db/PDOStatement.php index 2175231f..132e1e7b 100644 --- a/lib/Db/PDOStatement.php +++ b/lib/Db/PDOStatement.php @@ -34,7 +34,7 @@ abstract class PDOStatement extends AbstractStatement { $this->st = $this->db->prepare($query); return true; } catch (\PDOException $e) { // @codeCoverageIgnore - list($excClass, $excMsg, $excData) = $this->buildPDOException(); // @codeCoverageIgnore + [$excClass, $excMsg, $excData] = $this->buildPDOException(); // @codeCoverageIgnore throw new $excClass($excMsg, $excData); // @codeCoverageIgnore } } @@ -49,7 +49,7 @@ abstract class PDOStatement extends AbstractStatement { try { $this->st->execute(); } catch (\PDOException $e) { - list($excClass, $excMsg, $excData) = $this->buildPDOException(true); + [$excClass, $excMsg, $excData] = $this->buildPDOException(true); throw new $excClass($excMsg, $excData); } return new PDOResult($this->db, $this->st); diff --git a/lib/Db/PostgreSQL/Driver.php b/lib/Db/PostgreSQL/Driver.php index f06518ec..a06b6a58 100644 --- a/lib/Db/PostgreSQL/Driver.php +++ b/lib/Db/PostgreSQL/Driver.php @@ -37,9 +37,9 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { public static function makeConnectionString(bool $pdo, string $user, string $pass, string $db, string $host, int $port, string $service): string { $base = [ - 'client_encoding' => "UTF8", + 'client_encoding' => "UTF8", 'application_name' => "arsse", - 'connect_timeout' => (string) (int) ceil(Arsse::$conf->dbTimeoutConnect), + 'connect_timeout' => (string) (int) ceil(Arsse::$conf->dbTimeoutConnect), ]; $out = []; if ($service != "") { @@ -198,7 +198,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { pg_send_query($this->db, $query); while ($result = pg_get_result($this->db)) { if (($code = pg_result_error_field($result, \PGSQL_DIAG_SQLSTATE)) && isset($code) && $code) { - list($excClass, $excMsg, $excData) = $this->buildStandardException($code, pg_result_error($result)); + [$excClass, $excMsg, $excData] = $this->buildStandardException($code, pg_result_error($result)); throw new $excClass($excMsg, $excData); } } @@ -210,7 +210,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { if (is_resource($r)) { return new Result($this->db, $r); } else { - list($excClass, $excMsg, $excData) = $r; + [$excClass, $excMsg, $excData] = $r; throw new $excClass($excMsg, $excData); } } diff --git a/lib/Db/PostgreSQL/PDODriver.php b/lib/Db/PostgreSQL/PDODriver.php index fe6f0a55..93daf667 100644 --- a/lib/Db/PostgreSQL/PDODriver.php +++ b/lib/Db/PostgreSQL/PDODriver.php @@ -22,7 +22,7 @@ class PDODriver extends Driver { $dsn = $this->makeconnectionString(true, $user, $pass, $db, $host, $port, $service); try { $this->db = new \PDO("pgsql:$dsn", $user, $pass, [ - \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, + \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, \PDO::ATTR_PERSISTENT => true, ]); } catch (\PDOException $e) { @@ -53,7 +53,6 @@ class PDODriver extends Driver { } } - public static function driverName(): string { return Arsse::$lang->msg("Driver.Db.PostgreSQLPDO.Name"); } diff --git a/lib/Db/PostgreSQL/Result.php b/lib/Db/PostgreSQL/Result.php index 299cf9f7..03dba17f 100644 --- a/lib/Db/PostgreSQL/Result.php +++ b/lib/Db/PostgreSQL/Result.php @@ -41,6 +41,6 @@ class Result extends \JKingWeb\Arsse\Db\AbstractResult { public function valid() { $this->cur = pg_fetch_row($this->r, null, \PGSQL_ASSOC); - return ($this->cur !== false); + return $this->cur !== false; } } diff --git a/lib/Db/PostgreSQL/Statement.php b/lib/Db/PostgreSQL/Statement.php index 4e062f27..058ca2ee 100644 --- a/lib/Db/PostgreSQL/Statement.php +++ b/lib/Db/PostgreSQL/Statement.php @@ -38,7 +38,7 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { if (is_resource($r)) { return new Result($this->db, $r); } else { - list($excClass, $excMsg, $excData) = $r; + [$excClass, $excMsg, $excData] = $r; throw new $excClass($excMsg, $excData); } } diff --git a/lib/Db/ResultEmpty.php b/lib/Db/ResultEmpty.php index 569400ef..f0f23de8 100644 --- a/lib/Db/ResultEmpty.php +++ b/lib/Db/ResultEmpty.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\Db; class ResultEmpty extends AbstractResult { protected $changes = 0; protected $id = 0; - + public function __construct(int $changes = 0, int $id = 0) { $this->changes = $changes; $this->id = $id; diff --git a/lib/Db/SQLState.php b/lib/Db/SQLState.php index 7e4fa295..30d9f2cc 100644 --- a/lib/Db/SQLState.php +++ b/lib/Db/SQLState.php @@ -6,10 +6,6 @@ declare(strict_types=1); namespace JKingWeb\Arsse\Db; -use JKingWeb\Arsse\Db\Exception; -use JKingWeb\Arsse\Db\ExceptionInput; -use JKingWeb\Arsse\Db\ExceptionTimeout; - trait SQLState { protected static function buildStandardException(string $code, string $msg): array { switch ($code) { diff --git a/lib/Db/SQLite3/Driver.php b/lib/Db/SQLite3/Driver.php index d76dedd1..cb23ac60 100644 --- a/lib/Db/SQLite3/Driver.php +++ b/lib/Db/SQLite3/Driver.php @@ -98,7 +98,6 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { } } - public static function driverName(): string { return Arsse::$lang->msg("Driver.Db.SQLite3.Name"); } @@ -146,7 +145,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { try { return (bool) $this->db->exec($query); } catch (\Exception $e) { - list($excClass, $excMsg, $excData) = $this->buildException(); + [$excClass, $excMsg, $excData] = $this->buildException(); throw new $excClass($excMsg, $excData); } } @@ -155,7 +154,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { try { $r = $this->db->query($query); } catch (\Exception $e) { - list($excClass, $excMsg, $excData) = $this->buildException(); + [$excClass, $excMsg, $excData] = $this->buildException(); throw new $excClass($excMsg, $excData); } $changes = $this->db->changes(); diff --git a/lib/Db/SQLite3/PDODriver.php b/lib/Db/SQLite3/PDODriver.php index c590d510..506c46a2 100644 --- a/lib/Db/SQLite3/PDODriver.php +++ b/lib/Db/SQLite3/PDODriver.php @@ -37,7 +37,6 @@ class PDODriver extends AbstractPDODriver { } } - public static function driverName(): string { return Arsse::$lang->msg("Driver.Db.SQLite3PDO.Name"); } diff --git a/lib/Db/SQLite3/Result.php b/lib/Db/SQLite3/Result.php index 6b7aab2a..ad8aa051 100644 --- a/lib/Db/SQLite3/Result.php +++ b/lib/Db/SQLite3/Result.php @@ -44,6 +44,6 @@ class Result extends \JKingWeb\Arsse\Db\AbstractResult { public function valid() { $this->cur = $this->set->fetchArray(\SQLITE3_ASSOC); - return ($this->cur !== false); + return $this->cur !== false; } } diff --git a/lib/Db/SQLite3/Statement.php b/lib/Db/SQLite3/Statement.php index d2eee30b..3374689b 100644 --- a/lib/Db/SQLite3/Statement.php +++ b/lib/Db/SQLite3/Statement.php @@ -37,7 +37,7 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { $this->st = $this->db->prepare($query); return true; } catch (\Exception $e) { // @codeCoverageIgnore - list($excClass, $excMsg, $excData) = $this->buildException(); // @codeCoverageIgnore + [$excClass, $excMsg, $excData] = $this->buildException(); // @codeCoverageIgnore throw new $excClass($excMsg, $excData); // @codeCoverageIgnore } } @@ -56,7 +56,7 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { try { $r = $this->st->execute(); } catch (\Exception $e) { - list($excClass, $excMsg, $excData) = $this->buildException(); + [$excClass, $excMsg, $excData] = $this->buildException(); throw new $excClass($excMsg, $excData); } $changes = $this->db->changes(); diff --git a/lib/Feed.php b/lib/Feed.php index e8e5dac2..e6a8ebcf 100644 --- a/lib/Feed.php +++ b/lib/Feed.php @@ -221,8 +221,8 @@ class Feed { // if the two items have the same ID or any one hash matches, they are two versions of the same item if ( ($item->id && $check->id && $item->id === $check->id) || - ($item->urlTitleHash && $item->urlTitleHash === $check->urlTitleHash) || - ($item->urlContentHash && $item->urlContentHash === $check->urlContentHash) || + ($item->urlTitleHash && $item->urlTitleHash === $check->urlTitleHash) || + ($item->urlContentHash && $item->urlContentHash === $check->urlContentHash) || ($item->titleContentHash && $item->titleContentHash === $check->titleContentHash) ) { if (// because newsfeeds are usually order newest-first, the later item should only be used if... @@ -259,7 +259,7 @@ class Feed { // get as many of the latest articles in the database as there are in the feed $articles = Arsse::$db->feedMatchLatest($feedID, sizeof($items))->getAll(); // perform a first pass matching the latest articles against items in the feed - list($this->newItems, $this->changedItems) = $this->matchItems($items, $articles); + [$this->newItems, $this->changedItems] = $this->matchItems($items, $articles); if (sizeof($this->newItems) && sizeof($items) <= sizeof($articles)) { // if we need to, perform a second pass on the database looking specifically for IDs and hashes of the new items $ids = $hashesUT = $hashesUC = $hashesTC = []; @@ -278,7 +278,7 @@ class Feed { } } $articles = Arsse::$db->feedMatchIds($feedID, $ids, $hashesUT, $hashesUC, $hashesTC)->getAll(); - list($this->newItems, $changed) = $this->matchItems($this->newItems, $articles); + [$this->newItems, $changed] = $this->matchItems($this->newItems, $articles); // merge the two change-lists, preserving keys $this->changedItems = array_combine(array_merge(array_keys($this->changedItems), array_keys($changed)), array_merge($this->changedItems, $changed)); } @@ -286,7 +286,7 @@ class Feed { } protected function matchItems(array $items, array $articles): array { - $new = $edited = []; + $new = $edited = []; // iterate through the articles and for each determine whether it is existing, edited, or entirely new foreach ($items as $i) { $found = false; @@ -299,8 +299,8 @@ class Feed { // the item matches if the GUID matches... ($i->id && $i->id === $a['guid']) || // ... or if any one of the hashes match - ($i->urlTitleHash && $i->urlTitleHash === $a['url_title_hash']) || - ($i->urlContentHash && $i->urlContentHash === $a['url_content_hash']) || + ($i->urlTitleHash && $i->urlTitleHash === $a['url_title_hash']) || + ($i->urlContentHash && $i->urlContentHash === $a['url_content_hash']) || ($i->titleContentHash && $i->titleContentHash === $a['title_content_hash']) ) { if ($i->updatedDate && Date::transform($i->updatedDate, "sql") !== $a['edited']) { @@ -348,7 +348,7 @@ class Feed { $dates = $this->gatherDates(); if (sizeof($dates) > 3) { for ($a = 0; $a < 3; $a++) { - $diff = $dates[$a] - $dates[$a+1]; + $diff = $dates[$a] - $dates[$a + 1]; $offsets[] = $this->normalizeDateDiff($diff); } if ($offsets[0] === $offsets[1] || $offsets[0] === $offsets[2]) { diff --git a/lib/Feed/Exception.php b/lib/Feed/Exception.php index 00c76524..39936b3a 100644 --- a/lib/Feed/Exception.php +++ b/lib/Feed/Exception.php @@ -12,8 +12,8 @@ use GuzzleHttp\Exception\TooManyRedirectsException; use PicoFeed\PicoFeedException; class Exception extends \JKingWeb\Arsse\AbstractException { - const CURL_ERROR_MAP = [1=>"invalidUrl",3=>"invalidUrl",5=>"transmissionError","connectionFailed","connectionFailed","transmissionError","forbidden","unauthorized","transmissionError","transmissionError","transmissionError","transmissionError","connectionFailed","connectionFailed","transmissionError","transmissionError","transmissionError","transmissionError","transmissionError","invalidUrl","transmissionError","transmissionError","transmissionError","transmissionError",28=>"timeout","transmissionError","transmissionError","transmissionError","transmissionError","transmissionError",35=>"invalidCertificate","transmissionError","transmissionError","transmissionError","transmissionError",45=>"transmissionError","unauthorized","maxRedirect",52=>"transmissionError","invalidCertificate","invalidCertificate","transmissionError","transmissionError",58=>"invalidCertificate","invalidCertificate","invalidCertificate","transmissionError","invalidUrl","transmissionError","invalidCertificate","transmissionError","invalidCertificate","forbidden","invalidUrl","forbidden","transmissionError",73=>"transmissionError","transmissionError",77=>"invalidCertificate","invalidUrl",90=>"invalidCertificate","invalidCertificate","transmissionError",94=>"unauthorized","transmissionError","connectionFailed"]; - const HTTP_ERROR_MAP = [401=>"unauthorized",403=>"forbidden",404=>"invalidUrl",408=>"timeout",410=>"invalidUrl",414=>"invalidUrl",451=>"invalidUrl"]; + const CURL_ERROR_MAP = [1 => "invalidUrl",3 => "invalidUrl",5 => "transmissionError","connectionFailed","connectionFailed","transmissionError","forbidden","unauthorized","transmissionError","transmissionError","transmissionError","transmissionError","connectionFailed","connectionFailed","transmissionError","transmissionError","transmissionError","transmissionError","transmissionError","invalidUrl","transmissionError","transmissionError","transmissionError","transmissionError",28 => "timeout","transmissionError","transmissionError","transmissionError","transmissionError","transmissionError",35 => "invalidCertificate","transmissionError","transmissionError","transmissionError","transmissionError",45 => "transmissionError","unauthorized","maxRedirect",52 => "transmissionError","invalidCertificate","invalidCertificate","transmissionError","transmissionError",58 => "invalidCertificate","invalidCertificate","invalidCertificate","transmissionError","invalidUrl","transmissionError","invalidCertificate","transmissionError","invalidCertificate","forbidden","invalidUrl","forbidden","transmissionError",73 => "transmissionError","transmissionError",77 => "invalidCertificate","invalidUrl",90 => "invalidCertificate","invalidCertificate","transmissionError",94 => "unauthorized","transmissionError","connectionFailed"]; + const HTTP_ERROR_MAP = [401 => "unauthorized",403 => "forbidden",404 => "invalidUrl",408 => "timeout",410 => "invalidUrl",414 => "invalidUrl",451 => "invalidUrl"]; public function __construct($url, \Throwable $e) { if ($e instanceof BadResponseException) { diff --git a/lib/ImportExport/AbstractImportExport.php b/lib/ImportExport/AbstractImportExport.php index 19fa5fc7..22c1f2b1 100644 --- a/lib/ImportExport/AbstractImportExport.php +++ b/lib/ImportExport/AbstractImportExport.php @@ -17,7 +17,7 @@ abstract class AbstractImportExport { throw new UserException("doesNotExist", ["action" => __FUNCTION__, "user" => $user]); } // first extract useful information from the input - list($feeds, $folders) = $this->parse($data, $flat); + [$feeds, $folders] = $this->parse($data, $flat); $folderMap = []; foreach ($folders as $f) { // check to make sure folder names are all valid @@ -42,7 +42,7 @@ abstract class AbstractImportExport { $tr = Arsse::$db->begin(); // get current state of database $foldersDb = iterator_to_array(Arsse::$db->folderList($user)); - $feedsDb = iterator_to_array(Arsse::$db->subscriptionList($user)); + $feedsDb = iterator_to_array(Arsse::$db->subscriptionList($user)); $tagsDb = iterator_to_array(Arsse::$db->tagList($user)); // reconcile folders $folderMap = [0 => 0]; diff --git a/lib/Lang.php b/lib/Lang.php index b636f3b8..920dddaf 100644 --- a/lib/Lang.php +++ b/lib/Lang.php @@ -97,7 +97,7 @@ class Lang { } $msg = $this->strings[$msgID]; // variables fed to MessageFormatter must be contained in an array - if ($vars===null) { + if ($vars === null) { // even though strings not given parameters will not get formatted, we do not optimize this case away: we still want to catch invalid strings $vars = []; } elseif (!is_array($vars)) { @@ -108,7 +108,7 @@ class Lang { throw new Lang\Exception("stringInvalid", ['error' => $this->formatter->getErrorMessage(), 'msgID' => $msgID, 'fileList' => implode(", ", $this->loaded)]); } $msg = $this->formatter->format($vars); - if ($msg===false) { + if ($msg === false) { throw new Lang\Exception("dataInvalid", ['error' => $this->formatter->getErrorMessage(), 'msgID' => $msgID, 'fileList' => implode(", ", $this->loaded)]); // @codeCoverageIgnore } return $msg; @@ -148,7 +148,7 @@ class Lang { // trim the returned file paths to return just the language tag $out = array_map(function($file) { $file = str_replace(DIRECTORY_SEPARATOR, "/", $file); // we replace the directory separator because we don't use native paths in testing - $file = substr($file, strrpos($file, "/")+1); + $file = substr($file, strrpos($file, "/") + 1); return strtolower(substr($file, 0, strrpos($file, "."))); }, $out); // sort the results diff --git a/lib/Misc/Query.php b/lib/Misc/Query.php index 95b5c2c0..a2965dc2 100644 --- a/lib/Misc/Query.php +++ b/lib/Misc/Query.php @@ -24,7 +24,6 @@ class Query { protected $limit = 0; protected $offset = 0; - public function __construct(string $body = "", $types = null, $values = null) { $this->setBody($body, $types, $values); } diff --git a/lib/Misc/URL.php b/lib/Misc/URL.php index 4a4459ce..df16e6fd 100644 --- a/lib/Misc/URL.php +++ b/lib/Misc/URL.php @@ -77,7 +77,7 @@ class URL { $c = $part[$pos]; if ($c === "%") { // the % character signals an encoded character... - $d = substr($part, $pos+1, 2); + $d = substr($part, $pos + 1, 2); if (!preg_match("/^[0-9a-fA-F]{2}$/", $d)) { // unless there are fewer than two characters left in the string or the two characters are not hex digits $d = ord($c); diff --git a/lib/Misc/ValueInfo.php b/lib/Misc/ValueInfo.php index 75a81bae..806f6a34 100644 --- a/lib/Misc/ValueInfo.php +++ b/lib/Misc/ValueInfo.php @@ -11,30 +11,30 @@ use JKingWeb\Arsse\ExceptionType; class ValueInfo { // universal const VALID = 1 << 0; - const NULL = 1 << 1; + const NULL = 1 << 1; // integers - const ZERO = 1 << 2; - const NEG = 1 << 3; + const ZERO = 1 << 2; + const NEG = 1 << 3; const FLOAT = 1 << 4; // strings const EMPTY = 1 << 2; const WHITE = 1 << 3; // normalization types - const T_MIXED = 0; // pass through unchanged - const T_NULL = 1; // convert to null - const T_BOOL = 2; // convert to boolean - const T_INT = 3; // convert to integer - const T_FLOAT = 4; // convert to floating point - const T_DATE = 5; // convert to DateTimeInterface instance - const T_STRING = 6; // convert to string - const T_ARRAY = 7; // convert to array + const T_MIXED = 0; // pass through unchanged + const T_NULL = 1; // convert to null + const T_BOOL = 2; // convert to boolean + const T_INT = 3; // convert to integer + const T_FLOAT = 4; // convert to floating point + const T_DATE = 5; // convert to DateTimeInterface instance + const T_STRING = 6; // convert to string + const T_ARRAY = 7; // convert to array const T_INTERVAL = 8; // convert to time interval // normalization modes - const M_LOOSE = 0; - const M_NULL = 1 << 28; // pass nulls through regardless of target type - const M_DROP = 1 << 29; // drop the value (return null) if the type doesn't match - const M_STRICT = 1 << 30; // throw an exception if the type doesn't match - const M_ARRAY = 1 << 31; // the value should be a flat array of values of the specified type; indexed and associative are both acceptable + const M_LOOSE = 0; + const M_NULL = 1 << 28; // pass nulls through regardless of target type + const M_DROP = 1 << 29; // drop the value (return null) if the type doesn't match + const M_STRICT = 1 << 30; // throw an exception if the type doesn't match + const M_ARRAY = 1 << 31; // the value should be a flat array of values of the specified type; indexed and associative are both acceptable // symbolic date and time formats const DATE_FORMATS = [ // in out 'iso8601' => ["!Y-m-d\TH:i:s", "Y-m-d\TH:i:s\Z" ], // NOTE: ISO 8601 dates require special input processing because of varying formats for timezone offsets @@ -50,10 +50,10 @@ class ValueInfo { public static function normalize($value, int $type, string $dateInFormat = null, $dateOutFormat = null) { $allowNull = ($type & self::M_NULL); - $strict = ($type & (self::M_STRICT | self::M_DROP)); - $drop = ($type & self::M_DROP); - $arrayVal = ($type & self::M_ARRAY); - $type = ($type & ~(self::M_NULL | self::M_DROP | self::M_STRICT | self::M_ARRAY)); + $strict = ($type & (self::M_STRICT | self::M_DROP)); + $drop = ($type & self::M_DROP); + $arrayVal = ($type & self::M_ARRAY); + $type = ($type & ~(self::M_NULL | self::M_DROP | self::M_STRICT | self::M_ARRAY)); // if the value is null and this is allowed, simply return if ($allowNull && is_null($value)) { return null; @@ -166,7 +166,7 @@ class ValueInfo { throw new ExceptionType("strictFailure", $type); } $out = filter_var($value, \FILTER_VALIDATE_FLOAT); - if ($strict && $out===false) { + if ($strict && $out === false) { // if strict and input is not a float, this is an error if ($drop) { return null; diff --git a/lib/REST.php b/lib/REST.php index b375f3c9..317a650d 100644 --- a/lib/REST.php +++ b/lib/REST.php @@ -6,7 +6,6 @@ declare(strict_types=1); namespace JKingWeb\Arsse; -use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Misc\URL; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ServerRequestInterface; @@ -71,7 +70,7 @@ class REST { $req = $req ?? ServerRequestFactory::fromGlobals(); // find the API to handle try { - list($api, $target, $class) = $this->apiMatch($req->getRequestTarget(), $this->apis); + [$api, $target, $class] = $this->apiMatch($req->getRequestTarget(), $this->apis); // authenticate the request pre-emptively $req = $this->authenticateRequest($req); // modify the request to have an uppercase method and a stripped target @@ -108,7 +107,7 @@ class REST { // find a match foreach ($map as $id => $api) { // first try a simple substring match - if (strpos($url, $api['match'])===0) { + if (strpos($url, $api['match']) === 0) { // if it matches, perform a more rigorous match and then strip off any defined prefix $pattern = "<^".preg_quote($api['match'])."([/\?#]|$)>"; if ($url === $api['match'] || in_array(substr($api['match'], -1, 1), ["/", "?", "#"]) || preg_match($pattern, $url)) { @@ -200,7 +199,7 @@ class REST { if ($req->hasHeader("Access-Control-Request-Headers")) { $res = $res->withHeader("Access-Control-Allow-Headers", $req->getHeaderLine("Access-Control-Request-Headers")); } - $res = $res->withHeader("Access-Control-Max-Age", (string) (60 *60 *24)); // one day + $res = $res->withHeader("Access-Control-Max-Age", (string) (60 * 60 * 24)); // one day } $res = $res->withHeader("Access-Control-Allow-Origin", $req->getHeaderLine("Origin")); $res = $res->withHeader("Access-Control-Allow-Credentials", "true"); diff --git a/lib/REST/Fever/API.php b/lib/REST/Fever/API.php index 776490c9..ac6bb679 100644 --- a/lib/REST/Fever/API.php +++ b/lib/REST/Fever/API.php @@ -67,7 +67,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { switch ($req->getMethod()) { case "OPTIONS": return new EmptyResponse(204, [ - 'Allow' => "POST", + 'Allow' => "POST", 'Accept' => self::ACCEPTED_TYPE, ]); case "POST": @@ -76,7 +76,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { } $out = [ 'api_version' => self::LEVEL, - 'auth' => 0, + 'auth' => 0, ]; if ($req->getAttribute("authenticated", false)) { // if HTTP authentication was successfully used, set the expected user ID @@ -153,7 +153,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { // we provide a single blank favicon for now $out['favicons'] = [ [ - 'id' => 0, + 'id' => 0, 'data' => self::GENERIC_ICON_TYPE.",".self::GENERIC_ICON_DATA, ], ]; @@ -178,7 +178,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { protected function baseResponse(bool $authenticated): array { $out = [ 'api_version' => self::LEVEL, - 'auth' => (int) $authenticated, + 'auth' => (int) $authenticated, ]; if ($authenticated) { // authenticated requests always include the most recent feed refresh @@ -346,7 +346,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { $out = []; foreach (Arsse::$db->tagList(Arsse::$user->id) as $member) { $out[] = [ - 'id' => (int) $member['id'], + 'id' => (int) $member['id'], 'title' => $member['name'], ]; } diff --git a/lib/REST/NextcloudNews/V1_2.php b/lib/REST/NextcloudNews/V1_2.php index 90e7009e..6e1fb275 100644 --- a/lib/REST/NextcloudNews/V1_2.php +++ b/lib/REST/NextcloudNews/V1_2.php @@ -215,7 +215,7 @@ class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler { return $feed; } - protected function articleTranslate(array $article) :array { + protected function articleTranslate(array $article): array { // map fields to proper names $article = $this->fieldMapNames($article, [ 'id' => "edition", @@ -616,7 +616,7 @@ class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler { $c = new Context; $c->article((int) $url[2]); // determine whether to mark read or unread - $set = ($url[3] ==="star"); + $set = ($url[3] === "star"); try { Arsse::$db->articleMark(Arsse::$user->id, ['starred' => $set], $c); } catch (ExceptionInput $e) { @@ -629,7 +629,7 @@ class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler { // mark an array of articles as read protected function articleMarkReadMulti(array $url, array $data): ResponseInterface { // determine whether to mark read or unread - $set = ($url[1] ==="read"); + $set = ($url[1] === "read"); // initialize the matching context $c = new Context; $c->editions($data['items'] ?? []); @@ -643,7 +643,7 @@ class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler { // mark an array of articles as starred protected function articleMarkStarredMulti(array $url, array $data): ResponseInterface { // determine whether to mark starred or unstarred - $set = ($url[1] ==="star"); + $set = ($url[1] === "star"); // initialize the matching context $c = new Context; $c->articles(array_column($data['items'] ?? [], "guidHash")); @@ -656,10 +656,10 @@ class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler { protected function userStatus(array $url, array $data): ResponseInterface { return new Response([ - 'userId' => (string) Arsse::$user->id, - 'displayName' => (string) Arsse::$user->id, + 'userId' => (string) Arsse::$user->id, + 'displayName' => (string) Arsse::$user->id, 'lastLoginTimestamp' => time(), - 'avatar' => null, + 'avatar' => null, ]); } @@ -676,19 +676,19 @@ class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler { // return the server version protected function serverVersion(array $url, array $data): ResponseInterface { return new Response([ - 'version' => self::VERSION, + 'version' => self::VERSION, 'arsse_version' => Arsse::VERSION, ]); } protected function serverStatus(array $url, array $data): ResponseInterface { return new Response([ - 'version' => self::VERSION, + 'version' => self::VERSION, 'arsse_version' => Arsse::VERSION, - 'warnings' => [ + 'warnings' => [ 'improperlyConfiguredCron' => !Service::hasCheckedIn(), - 'incorrectDbCharset' => !Arsse::$db->driverCharsetAcceptable(), - ] + 'incorrectDbCharset' => !Arsse::$db->driverCharsetAcceptable(), + ], ]); } } diff --git a/lib/REST/NextcloudNews/Versions.php b/lib/REST/NextcloudNews/Versions.php index a8db7a71..8337736b 100644 --- a/lib/REST/NextcloudNews/Versions.php +++ b/lib/REST/NextcloudNews/Versions.php @@ -29,7 +29,7 @@ class Versions implements \JKingWeb\Arsse\REST\Handler { $out = [ 'apiLevels' => [ 'v1-2', - ] + ], ]; return new Response($out); default: diff --git a/lib/REST/TinyTinyRSS/API.php b/lib/REST/TinyTinyRSS/API.php index 4049a2a0..d0df548e 100644 --- a/lib/REST/TinyTinyRSS/API.php +++ b/lib/REST/TinyTinyRSS/API.php @@ -135,14 +135,14 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { throw new Exception("UNKNOWN_METHOD", ['method' => $data['op']]); } return new Response([ - 'seq' => $data['seq'], - 'status' => 0, + 'seq' => $data['seq'], + 'status' => 0, 'content' => $this->$method($data), ]); } catch (Exception $e) { return new Response([ - 'seq' => $data['seq'], - 'status' => 1, + 'seq' => $data['seq'], + 'status' => 1, 'content' => $e->getData(), ]); } catch (AbstractException $e) { @@ -190,7 +190,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { // are not enforced, create a session for the HTTP user regardless // of which user the API call mentions $id = Arsse::$db->sessionCreate(Arsse::$user->id); - } elseif ((!Arsse::$conf->userPreAuth && (Arsse::$user->auth($user, $pass) || Arsse::$user->auth($user, base64_decode($pass)))) || (Arsse::$conf->userPreAuth && Arsse::$user->id===$user)) { + } elseif ((!Arsse::$conf->userPreAuth && (Arsse::$user->auth($user, $pass) || Arsse::$user->auth($user, base64_decode($pass)))) || (Arsse::$conf->userPreAuth && Arsse::$user->id === $user)) { // otherwise both cleartext and base64 passwords are accepted // if pre-authentication is in use, just make sure the user names match $id = Arsse::$db->sessionCreate($user); @@ -199,7 +199,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { } return [ 'session_id' => $id, - 'api_level' => self::LEVEL + 'api_level' => self::LEVEL, ]; } @@ -215,10 +215,10 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { public function opGetConfig(array $data): array { return [ - 'icons_dir' => "feed-icons", - 'icons_url' => "feed-icons", + 'icons_dir' => "feed-icons", + 'icons_url' => "feed-icons", 'daemon_is_running' => Service::hasCheckedIn(), - 'num_feeds' => Arsse::$db->subscriptionCount(Arsse::$user->id), + 'num_feeds' => Arsse::$db->subscriptionCount(Arsse::$user->id), ]; } @@ -304,7 +304,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { return array_merge($special, $labels, $feeds, $cats); } - public function opGetFeedTree(array $data) : array { + public function opGetFeedTree(array $data): array { $all = $data['include_empty'] ?? false; $user = Arsse::$user->id; $tSpecial = [ @@ -319,55 +319,55 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { $subs = Arsse::$db->subscriptionList($user)->getAll(); // start with the special feeds $out[] = [ - 'name' => Arsse::$lang->msg("API.TTRSS.Category.Special"), - 'id' => "CAT:".self::CAT_SPECIAL, + 'name' => Arsse::$lang->msg("API.TTRSS.Category.Special"), + 'id' => "CAT:".self::CAT_SPECIAL, 'bare_id' => self::CAT_SPECIAL, - 'type' => "category", - 'unread' => 0, - 'items' => [ + 'type' => "category", + 'unread' => 0, + 'items' => [ array_merge([ // All articles - 'name' => Arsse::$lang->msg("API.TTRSS.Feed.All"), - 'id' => "FEED:".self::FEED_ALL, + 'name' => Arsse::$lang->msg("API.TTRSS.Feed.All"), + 'id' => "FEED:".self::FEED_ALL, 'bare_id' => self::FEED_ALL, - 'icon' => "images/folder.png", - 'unread' => array_reduce($subs, function($sum, $value) { + 'icon' => "images/folder.png", + 'unread' => array_reduce($subs, function($sum, $value) { return $sum + $value['unread']; }, 0), // the sum of all feeds' unread is the total unread ], $tSpecial), array_merge([ // Fresh articles - 'name' => Arsse::$lang->msg("API.TTRSS.Feed.Fresh"), - 'id' => "FEED:".self::FEED_FRESH, + 'name' => Arsse::$lang->msg("API.TTRSS.Feed.Fresh"), + 'id' => "FEED:".self::FEED_FRESH, 'bare_id' => self::FEED_FRESH, - 'icon' => "images/fresh.png", - 'unread' => Arsse::$db->articleCount($user, (new Context)->unread(true)->modifiedSince(Date::sub("PT24H"))), + 'icon' => "images/fresh.png", + 'unread' => Arsse::$db->articleCount($user, (new Context)->unread(true)->modifiedSince(Date::sub("PT24H"))), ], $tSpecial), array_merge([ // Starred articles - 'name' => Arsse::$lang->msg("API.TTRSS.Feed.Starred"), - 'id' => "FEED:".self::FEED_STARRED, + 'name' => Arsse::$lang->msg("API.TTRSS.Feed.Starred"), + 'id' => "FEED:".self::FEED_STARRED, 'bare_id' => self::FEED_STARRED, - 'icon' => "images/star.png", - 'unread' => (int) Arsse::$db->articleStarred($user)['unread'], + 'icon' => "images/star.png", + 'unread' => (int) Arsse::$db->articleStarred($user)['unread'], ], $tSpecial), array_merge([ // Published articles - 'name' => Arsse::$lang->msg("API.TTRSS.Feed.Published"), - 'id' => "FEED:".self::FEED_PUBLISHED, + 'name' => Arsse::$lang->msg("API.TTRSS.Feed.Published"), + 'id' => "FEED:".self::FEED_PUBLISHED, 'bare_id' => self::FEED_PUBLISHED, - 'icon' => "images/feed.png", - 'unread' => 0, // TODO: unread count should be populated if the Published feed is ever implemented + 'icon' => "images/feed.png", + 'unread' => 0, // TODO: unread count should be populated if the Published feed is ever implemented ], $tSpecial), array_merge([ // Archived articles - 'name' => Arsse::$lang->msg("API.TTRSS.Feed.Archived"), - 'id' => "FEED:".self::FEED_ARCHIVED, + 'name' => Arsse::$lang->msg("API.TTRSS.Feed.Archived"), + 'id' => "FEED:".self::FEED_ARCHIVED, 'bare_id' => self::FEED_ARCHIVED, - 'icon' => "images/archive.png", - 'unread' => 0, // Article archiving is not exposed by the API, so this is always zero + 'icon' => "images/archive.png", + 'unread' => 0, // Article archiving is not exposed by the API, so this is always zero ], $tSpecial), array_merge([ // Recently read - 'name' => Arsse::$lang->msg("API.TTRSS.Feed.Read"), - 'id' => "FEED:".self::FEED_READ, + 'name' => Arsse::$lang->msg("API.TTRSS.Feed.Read"), + 'id' => "FEED:".self::FEED_READ, 'bare_id' => self::FEED_READ, - 'icon' => "images/time.png", - 'unread' => 0, // this is by definition zero; unread articles do not appear in this feed + 'icon' => "images/time.png", + 'unread' => 0, // this is by definition zero; unread articles do not appear in this feed ], $tSpecial), ], ]; @@ -394,12 +394,12 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { // if there are labels, all the label category, if ($items) { $out[] = [ - 'name' => Arsse::$lang->msg("API.TTRSS.Category.Labels"), - 'id' => "CAT:".self::CAT_LABELS, + 'name' => Arsse::$lang->msg("API.TTRSS.Category.Labels"), + 'id' => "CAT:".self::CAT_LABELS, 'bare_id' => self::CAT_LABELS, - 'type' => "category", - 'unread' => $unread, - 'items' => $items, + 'type' => "category", + 'unread' => $unread, + 'items' => $items, ]; } // get the lists of categories and feeds @@ -459,7 +459,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { // if the category is the wrong level, or if it's empty and we're not including empties, skip it continue; } - $children = $c['children'] ? $this->enumerateCategories($cats, $subs, $c['id'], $all) : ['list' => [], 'feeds' => 0]; + $children = $c['children'] ? $this->enumerateCategories($cats, $subs, $c['id'], $all) : ['list' => [], 'feeds' => 0]; $feeds = $c['feeds'] ? $this->enumerateFeeds($subs, $c['id']) : []; $count = sizeof($feeds) + (int) $children['feeds']; $out[] = [ @@ -843,7 +843,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { $subs = Arsse::$db->subscriptionList(Arsse::$user->id); $id = false; foreach ($subs as $sub) { - if ($sub['url']===$url) { + if ($sub['url'] === $url) { $id = (int) $sub['id']; break; } @@ -940,11 +940,11 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { return 0; } } - return (abs($id) - self::LABEL_OFFSET); + return abs($id) - self::LABEL_OFFSET; } protected function labelOut($id): int { - return ((int) $id * -1 - self::LABEL_OFFSET); + return (int) $id * -1 - self::LABEL_OFFSET; } public function opGetLabels(array $data): array { @@ -1201,32 +1201,32 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { ]; foreach (Arsse::$db->articleList(Arsse::$user->id, (new Context)->articles($articles), $columns) as $article) { $out[] = [ - 'id' => (string) $article['id'], // string cast to be consistent with TTRSS - 'guid' => $article['guid'] ? "SHA256:".$article['guid'] : null, - 'title' => $article['title'], - 'link' => $article['url'], - 'labels' => $this->articleLabelList($labels, $article['id']), - 'unread' => (bool) $article['unread'], - 'marked' => (bool) $article['starred'], - 'published' => false, // TODO: if the Published feed is implemented, the getArticle operation should be amended accordingly - 'comments' => "", // FIXME: What is this? - 'author' => $article['author'], - 'updated' => Date::transform($article['edited_date'], "unix", "sql"), - 'feed_id' => (string) $article['subscription'], // string cast to be consistent with TTRSS - 'feed_title' => $article['subscription_title'], + 'id' => (string) $article['id'], // string cast to be consistent with TTRSS + 'guid' => $article['guid'] ? "SHA256:".$article['guid'] : null, + 'title' => $article['title'], + 'link' => $article['url'], + 'labels' => $this->articleLabelList($labels, $article['id']), + 'unread' => (bool) $article['unread'], + 'marked' => (bool) $article['starred'], + 'published' => false, // TODO: if the Published feed is implemented, the getArticle operation should be amended accordingly + 'comments' => "", // FIXME: What is this? + 'author' => $article['author'], + 'updated' => Date::transform($article['edited_date'], "unix", "sql"), + 'feed_id' => (string) $article['subscription'], // string cast to be consistent with TTRSS + 'feed_title' => $article['subscription_title'], 'attachments' => $article['media_url'] ? [[ - 'id' => (string) 0, // string cast to be consistent with TTRSS; nonsense ID because we don't use them for enclosures - 'content_url' => $article['media_url'], + 'id' => (string) 0, // string cast to be consistent with TTRSS; nonsense ID because we don't use them for enclosures + 'content_url' => $article['media_url'], 'content_type' => $article['media_type'], - 'title' => "", - 'duration' => "", - 'width' => "", - 'height' => "", - 'post_id' => (string) $article['id'], // string cast to be consistent with TTRSS + 'title' => "", + 'duration' => "", + 'width' => "", + 'height' => "", + 'post_id' => (string) $article['id'], // string cast to be consistent with TTRSS ]] : [], // TODO: We need to support multiple enclosures - 'score' => 0, // score is not implemented as it is not modifiable from the TTRSS API - 'note' => strlen((string) $article['note']) ? $article['note'] : null, - 'lang' => "", // FIXME: picoFeed should be able to retrieve this information + 'score' => 0, // score is not implemented as it is not modifiable from the TTRSS API + 'note' => strlen((string) $article['note']) ? $article['note'] : null, + 'lang' => "", // FIXME: picoFeed should be able to retrieve this information 'content' => $article['content'], ]; } @@ -1302,25 +1302,25 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { ]; foreach ($this->fetchArticles($data, $columns) as $article) { $row = [ - 'id' => (int) $article['id'], - 'guid' => $article['guid'] ? "SHA256:".$article['guid'] : "", - 'title' => $article['title'], - 'link' => $article['url'], - 'labels' => $this->articleLabelList($labels, $article['id']), - 'unread' => (bool) $article['unread'], - 'marked' => (bool) $article['starred'], - 'published' => false, // TODO: if the Published feed is implemented, the getHeadlines operation should be amended accordingly - 'author' => $article['author'], - 'updated' => Date::transform($article['edited_date'], "unix", "sql"), - 'is_updated' => ($article['published_date'] < $article['edited_date']), - 'feed_id' => (string) $article['subscription'], // string cast to be consistent with TTRSS - 'feed_title' => $article['subscription_title'], - 'score' => 0, // score is not implemented as it is not modifiable from the TTRSS API - 'note' => strlen((string) $article['note']) ? $article['note'] : null, - 'lang' => "", // FIXME: picoFeed should be able to retrieve this information - 'tags' => Arsse::$db->articleCategoriesGet(Arsse::$user->id, $article['id']), - 'comments_count' => 0, - 'comments_link' => "", + 'id' => (int) $article['id'], + 'guid' => $article['guid'] ? "SHA256:".$article['guid'] : "", + 'title' => $article['title'], + 'link' => $article['url'], + 'labels' => $this->articleLabelList($labels, $article['id']), + 'unread' => (bool) $article['unread'], + 'marked' => (bool) $article['starred'], + 'published' => false, // TODO: if the Published feed is implemented, the getHeadlines operation should be amended accordingly + 'author' => $article['author'], + 'updated' => Date::transform($article['edited_date'], "unix", "sql"), + 'is_updated' => ($article['published_date'] < $article['edited_date']), + 'feed_id' => (string) $article['subscription'], // string cast to be consistent with TTRSS + 'feed_title' => $article['subscription_title'], + 'score' => 0, // score is not implemented as it is not modifiable from the TTRSS API + 'note' => strlen((string) $article['note']) ? $article['note'] : null, + 'lang' => "", // FIXME: picoFeed should be able to retrieve this information + 'tags' => Arsse::$db->articleCategoriesGet(Arsse::$user->id, $article['id']), + 'comments_count' => 0, + 'comments_link' => "", 'always_display_attachments' => false, ]; if ($data['show_content']) { @@ -1336,14 +1336,14 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { } if ($data['include_attachments']) { $row['attachments'] = $article['media_url'] ? [[ - 'id' => (string) 0, // string cast to be consistent with TTRSS; nonsense ID because we don't use them for enclosures - 'content_url' => $article['media_url'], + 'id' => (string) 0, // string cast to be consistent with TTRSS; nonsense ID because we don't use them for enclosures + 'content_url' => $article['media_url'], 'content_type' => $article['media_type'], - 'title' => "", - 'duration' => "", - 'width' => "", - 'height' => "", - 'post_id' => (string) $article['id'], // string cast to be consistent with TTRSS + 'title' => "", + 'duration' => "", + 'width' => "", + 'height' => "", + 'post_id' => (string) $article['id'], // string cast to be consistent with TTRSS ]] : []; // TODO: We need to support multiple enclosures } $out[] = $row; diff --git a/lib/Service.php b/lib/Service.php index ed234d68..fc77e802 100644 --- a/lib/Service.php +++ b/lib/Service.php @@ -66,7 +66,7 @@ class Service { $limit->sub($int); $limit->sub($int); // return whether the check-in time is within the acceptable limit - return ($checkin >= $limit); + return $checkin >= $limit; } public static function cleanupPre(): bool { diff --git a/lib/User.php b/lib/User.php index 713f17c3..15d902c1 100644 --- a/lib/User.php +++ b/lib/User.php @@ -15,9 +15,7 @@ class User { public $id = null; - /** - * @var User\Driver - */ + /** @var User\Driver */ protected $u; public function __construct(\JKingWeb\Arsse\User\Driver $driver = null) { diff --git a/lib/User/Internal/Driver.php b/lib/User/Internal/Driver.php index c9e78d1c..4fc787f1 100644 --- a/lib/User/Internal/Driver.php +++ b/lib/User/Internal/Driver.php @@ -26,7 +26,7 @@ class Driver implements \JKingWeb\Arsse\User\Driver { } catch (Exception $e) { return false; } - if ($password==="" && $hash==="") { + if ($password === "" && $hash === "") { return true; } return password_verify($password, $hash); diff --git a/tests/cases/CLI/TestCLI.php b/tests/cases/CLI/TestCLI.php index ef302f22..e6c19e2d 100644 --- a/tests/cases/CLI/TestCLI.php +++ b/tests/cases/CLI/TestCLI.php @@ -163,10 +163,10 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { // FIXME: Phake is somehow unable to mock the User class correctly, so we use PHPUnit's mocks instead Arsse::$user = $this->createMock(User::class); Arsse::$user->method("auth")->will($this->returnCallback(function($user, $pass) { - return ( + return ($user === "john.doe@example.com" && $pass === "secret") || ($user === "jane.doe@example.com" && $pass === "superman") - ); + ; })); $fever = \Phake::mock(FeverUser::class); \Phake::when($fever)->authenticate->thenReturn(false); diff --git a/tests/cases/Conf/TestConf.php b/tests/cases/Conf/TestConf.php index 67283338..e99eda3e 100644 --- a/tests/cases/Conf/TestConf.php +++ b/tests/cases/Conf/TestConf.php @@ -45,7 +45,7 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { /** @depends testLoadDefaultValues */ public function testImportFromArray(): void { $arr = [ - 'lang' => "xx", + 'lang' => "xx", 'purgeFeeds' => "P2D", ]; $conf = new Conf; @@ -125,9 +125,9 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { $conf->serviceFrequency = new \DateInterval("PT1H"); // should be exported (as string): value changed $conf->someCustomProperty = "Look at me!"; // should be exported: unknown property $exp = [ - 'dbSQLite3File' => "test.db", - 'userDriver' => null, - 'serviceFrequency' => "PT1H", + 'dbSQLite3File' => "test.db", + 'userDriver' => null, + 'serviceFrequency' => "PT1H", 'someCustomProperty' => "Look at me!", ]; $this->assertSame($exp, $conf->export()); @@ -147,8 +147,8 @@ class TestConf extends \JKingWeb\Arsse\Test\AbstractTest { $conf->exportFile(self::$path."confNotArray"); $arr = (include self::$path."confNotArray"); $exp = [ - 'dbSQLite3File' => "test.db", - 'userDriver' => null, + 'dbSQLite3File' => "test.db", + 'userDriver' => null, 'someCustomProperty' => "Look at me!", ]; $this->assertSame($exp, $arr); diff --git a/tests/cases/Database/SeriesArticle.php b/tests/cases/Database/SeriesArticle.php index 13a5e930..d268d2a8 100644 --- a/tests/cases/Database/SeriesArticle.php +++ b/tests/cases/Database/SeriesArticle.php @@ -47,7 +47,7 @@ trait SeriesArticle { [11,"http://example.com/11", "Feed 11"], [12,"http://example.com/12", "Feed 12"], [13,"http://example.com/13", "Feed 13"], - ] + ], ], 'arsse_folders' => [ 'columns' => [ @@ -66,7 +66,7 @@ trait SeriesArticle { [7, "john.doe@example.net", null, "Technology"], [8, "john.doe@example.net", 7, "Software"], [9, "john.doe@example.net", null, "Politics"], - ] + ], ], 'arsse_tags' => [ 'columns' => [ @@ -83,7 +83,7 @@ trait SeriesArticle { [6, "john.doe@example.net", "Technology"], [7, "john.doe@example.net", "Software"], [8, "john.doe@example.net", "Politics"], - ] + ], ], 'arsse_subscriptions' => [ 'columns' => [ @@ -108,7 +108,7 @@ trait SeriesArticle { [12,"john.doe@example.net",2, 9,null], [13,"john.doe@example.net",3, 8,"Subscription 13"], [14,"john.doe@example.net",4, 7,null], - ] + ], ], 'arsse_tag_members' => [ 'columns' => [ @@ -171,7 +171,7 @@ trait SeriesArticle { [103,12,'http://example.com/3','Article title 3','','2000-01-03 00:00:00','2000-01-03 00:00:03','

Article content 3

','31a6594500a48b59fcc8a075ce82b946c9c3c782460d088bd7b8ef3ede97ad92','f74b06b240bd08abf4d3fdfc20dba6a6f6eb8b4f1a00e9a617efd63a87180a4b','b278380e984cefe63f0e412b88ffc9cb0befdfa06fdc00bace1da99a8daff406','ad622b31e739cd3a3f3c788991082cf4d2f7a8773773008e75f0572e58cd373b','2000-01-03 03:00:00'], [104,12,'http://example.com/4','Article title 4','','2000-01-04 00:00:00','2000-01-04 00:00:04','

Article content 4

','804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180','f3615c7f16336d3ea242d35cf3fc17dbc4ee3afb78376bf49da2dd7a5a25dec8','f11c2b4046f207579aeb9c69a8c20ca5461cef49756ccfa5ba5e2344266da3b3','ab2da63276acce431250b18d3d49b988b226a99c7faadf275c90b751aee05be9','2000-01-04 04:00:00'], [105,13,'http://example.com/5','Article title 5','','2000-01-05 00:00:00','2000-01-05 00:00:05','

Article content 5

','db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41','d40da96e39eea6c55948ccbe9b3d275b5f931298288dbe953990c5f496097022','834240f84501b5341d375414718204ec421561f3825d34c22bf9182203e42900','43b970ac6ec5f8a9647b2c7e4eed8b1d7f62e154a95eed748b0294c1256764ba','2000-01-05 05:00:00'], - ] + ], ], 'arsse_enclosures' => [ 'columns' => [ @@ -185,7 +185,7 @@ trait SeriesArticle { [104,"http://example.com/image","image/svg+xml"], [105,"http://example.com/audio","audio/ogg"], - ] + ], ], 'arsse_editions' => [ 'columns' => [ @@ -224,7 +224,7 @@ trait SeriesArticle { [205,105], [305,105], [1001,20], - ] + ], ], 'arsse_marks' => [ 'columns' => [ @@ -249,7 +249,7 @@ trait SeriesArticle { [12, 3,0,1,'2017-01-01 00:00:00','ack'], [12, 4,1,1,'2017-01-01 00:00:00','ach'], [1, 2,0,0,'2010-01-01 00:00:00','Some Note'], - ] + ], ], 'arsse_categories' => [ // author-supplied categories 'columns' => [ @@ -298,104 +298,104 @@ trait SeriesArticle { ]; $this->matches = [ [ - 'id' => 101, - 'url' => 'http://example.com/1', - 'title' => 'Article title 1', + 'id' => 101, + 'url' => 'http://example.com/1', + 'title' => 'Article title 1', 'subscription_title' => "Feed 11", - 'author' => '', - 'content' => '

Article content 1

', - 'guid' => 'e433653cef2e572eee4215fa299a4a5af9137b2cefd6283c85bd69a32915beda', - 'published_date' => '2000-01-01 00:00:00', - 'edited_date' => '2000-01-01 00:00:01', - 'modified_date' => '2000-01-01 01:00:00', - 'unread' => 1, - 'starred' => 0, - 'edition' => 101, - 'subscription' => 8, - 'fingerprint' => 'f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6:fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4:18fdd4fa93d693128c43b004399e5c9cea6c261ddfa002518d3669f55d8c2207', - 'media_url' => null, - 'media_type' => null, - 'note' => "", + 'author' => '', + 'content' => '

Article content 1

', + 'guid' => 'e433653cef2e572eee4215fa299a4a5af9137b2cefd6283c85bd69a32915beda', + 'published_date' => '2000-01-01 00:00:00', + 'edited_date' => '2000-01-01 00:00:01', + 'modified_date' => '2000-01-01 01:00:00', + 'unread' => 1, + 'starred' => 0, + 'edition' => 101, + 'subscription' => 8, + 'fingerprint' => 'f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6:fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4:18fdd4fa93d693128c43b004399e5c9cea6c261ddfa002518d3669f55d8c2207', + 'media_url' => null, + 'media_type' => null, + 'note' => "", ], [ - 'id' => 102, - 'url' => 'http://example.com/2', - 'title' => 'Article title 2', + 'id' => 102, + 'url' => 'http://example.com/2', + 'title' => 'Article title 2', 'subscription_title' => "Feed 11", - 'author' => '', - 'content' => '

Article content 2

', - 'guid' => '5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7', - 'published_date' => '2000-01-02 00:00:00', - 'edited_date' => '2000-01-02 00:00:02', - 'modified_date' => '2000-01-02 02:00:00', - 'unread' => 0, - 'starred' => 0, - 'edition' => 202, - 'subscription' => 8, - 'fingerprint' => '0e86d2de822a174fe3c44a466953e63ca1f1a58a19cbf475fce0855d4e3d5153:13075894189c47ffcfafd1dfe7fbb539f7c74a69d35a399b3abf8518952714f9:2abd0a8cba83b8214a66c8f0293ba63e467d720540e29ff8ddcdab069d4f1c9e', - 'media_url' => "http://example.com/text", - 'media_type' => "text/plain", - 'note' => "Note 2", + 'author' => '', + 'content' => '

Article content 2

', + 'guid' => '5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7', + 'published_date' => '2000-01-02 00:00:00', + 'edited_date' => '2000-01-02 00:00:02', + 'modified_date' => '2000-01-02 02:00:00', + 'unread' => 0, + 'starred' => 0, + 'edition' => 202, + 'subscription' => 8, + 'fingerprint' => '0e86d2de822a174fe3c44a466953e63ca1f1a58a19cbf475fce0855d4e3d5153:13075894189c47ffcfafd1dfe7fbb539f7c74a69d35a399b3abf8518952714f9:2abd0a8cba83b8214a66c8f0293ba63e467d720540e29ff8ddcdab069d4f1c9e', + 'media_url' => "http://example.com/text", + 'media_type' => "text/plain", + 'note' => "Note 2", ], [ - 'id' => 103, - 'url' => 'http://example.com/3', - 'title' => 'Article title 3', + 'id' => 103, + 'url' => 'http://example.com/3', + 'title' => 'Article title 3', 'subscription_title' => "Subscription 9", - 'author' => '', - 'content' => '

Article content 3

', - 'guid' => '31a6594500a48b59fcc8a075ce82b946c9c3c782460d088bd7b8ef3ede97ad92', - 'published_date' => '2000-01-03 00:00:00', - 'edited_date' => '2000-01-03 00:00:03', - 'modified_date' => '2000-01-03 03:00:00', - 'unread' => 1, - 'starred' => 1, - 'edition' => 203, - 'subscription' => 9, - 'fingerprint' => 'f74b06b240bd08abf4d3fdfc20dba6a6f6eb8b4f1a00e9a617efd63a87180a4b:b278380e984cefe63f0e412b88ffc9cb0befdfa06fdc00bace1da99a8daff406:ad622b31e739cd3a3f3c788991082cf4d2f7a8773773008e75f0572e58cd373b', - 'media_url' => "http://example.com/video", - 'media_type' => "video/webm", - 'note' => "Note 3", + 'author' => '', + 'content' => '

Article content 3

', + 'guid' => '31a6594500a48b59fcc8a075ce82b946c9c3c782460d088bd7b8ef3ede97ad92', + 'published_date' => '2000-01-03 00:00:00', + 'edited_date' => '2000-01-03 00:00:03', + 'modified_date' => '2000-01-03 03:00:00', + 'unread' => 1, + 'starred' => 1, + 'edition' => 203, + 'subscription' => 9, + 'fingerprint' => 'f74b06b240bd08abf4d3fdfc20dba6a6f6eb8b4f1a00e9a617efd63a87180a4b:b278380e984cefe63f0e412b88ffc9cb0befdfa06fdc00bace1da99a8daff406:ad622b31e739cd3a3f3c788991082cf4d2f7a8773773008e75f0572e58cd373b', + 'media_url' => "http://example.com/video", + 'media_type' => "video/webm", + 'note' => "Note 3", ], [ - 'id' => 104, - 'url' => 'http://example.com/4', - 'title' => 'Article title 4', + 'id' => 104, + 'url' => 'http://example.com/4', + 'title' => 'Article title 4', 'subscription_title' => "Subscription 9", - 'author' => '', - 'content' => '

Article content 4

', - 'guid' => '804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180', - 'published_date' => '2000-01-04 00:00:00', - 'edited_date' => '2000-01-04 00:00:04', - 'modified_date' => '2000-01-04 04:00:00', - 'unread' => 0, - 'starred' => 1, - 'edition' => 204, - 'subscription' => 9, - 'fingerprint' => 'f3615c7f16336d3ea242d35cf3fc17dbc4ee3afb78376bf49da2dd7a5a25dec8:f11c2b4046f207579aeb9c69a8c20ca5461cef49756ccfa5ba5e2344266da3b3:ab2da63276acce431250b18d3d49b988b226a99c7faadf275c90b751aee05be9', - 'media_url' => "http://example.com/image", - 'media_type' => "image/svg+xml", - 'note' => "Note 4", + 'author' => '', + 'content' => '

Article content 4

', + 'guid' => '804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180', + 'published_date' => '2000-01-04 00:00:00', + 'edited_date' => '2000-01-04 00:00:04', + 'modified_date' => '2000-01-04 04:00:00', + 'unread' => 0, + 'starred' => 1, + 'edition' => 204, + 'subscription' => 9, + 'fingerprint' => 'f3615c7f16336d3ea242d35cf3fc17dbc4ee3afb78376bf49da2dd7a5a25dec8:f11c2b4046f207579aeb9c69a8c20ca5461cef49756ccfa5ba5e2344266da3b3:ab2da63276acce431250b18d3d49b988b226a99c7faadf275c90b751aee05be9', + 'media_url' => "http://example.com/image", + 'media_type' => "image/svg+xml", + 'note' => "Note 4", ], [ - 'id' => 105, - 'url' => 'http://example.com/5', - 'title' => 'Article title 5', + 'id' => 105, + 'url' => 'http://example.com/5', + 'title' => 'Article title 5', 'subscription_title' => "Feed 13", - 'author' => '', - 'content' => '

Article content 5

', - 'guid' => 'db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41', - 'published_date' => '2000-01-05 00:00:00', - 'edited_date' => '2000-01-05 00:00:05', - 'modified_date' => '2000-01-05 05:00:00', - 'unread' => 1, - 'starred' => 0, - 'edition' => 305, - 'subscription' => 10, - 'fingerprint' => 'd40da96e39eea6c55948ccbe9b3d275b5f931298288dbe953990c5f496097022:834240f84501b5341d375414718204ec421561f3825d34c22bf9182203e42900:43b970ac6ec5f8a9647b2c7e4eed8b1d7f62e154a95eed748b0294c1256764ba', - 'media_url' => "http://example.com/audio", - 'media_type' => "audio/ogg", - 'note' => "", + 'author' => '', + 'content' => '

Article content 5

', + 'guid' => 'db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41', + 'published_date' => '2000-01-05 00:00:00', + 'edited_date' => '2000-01-05 00:00:05', + 'modified_date' => '2000-01-05 05:00:00', + 'unread' => 1, + 'starred' => 0, + 'edition' => 305, + 'subscription' => 10, + 'fingerprint' => 'd40da96e39eea6c55948ccbe9b3d275b5f931298288dbe953990c5f496097022:834240f84501b5341d375414718204ec421561f3825d34c22bf9182203e42900:43b970ac6ec5f8a9647b2c7e4eed8b1d7f62e154a95eed748b0294c1256764ba', + 'media_url' => "http://example.com/audio", + 'media_type' => "audio/ogg", + 'note' => "", ], ]; $this->fields = [ @@ -404,7 +404,7 @@ trait SeriesArticle { "content", "media_url", "media_type", "note", ]; - $this->checkTables = ['arsse_marks' => ["subscription","article","read","starred","modified","note"],]; + $this->checkTables = ['arsse_marks' => ["subscription","article","read","starred","modified","note"]]; $this->user = "john.doe@example.net"; } @@ -422,132 +422,132 @@ trait SeriesArticle { public function provideContextMatches(): iterable { return [ - 'Blank context' => [new Context, [1,2,3,4,5,6,7,8,19,20]], - 'Folder tree' => [(new Context)->folder(1), [5,6,7,8]], - 'Entire folder tree' => [(new Context)->folder(0), [1,2,3,4,5,6,7,8,19,20]], - 'Leaf folder' => [(new Context)->folder(6), [7,8]], - 'Multiple folder trees' => [(new Context)->folders([1,5]), [5,6,7,8,19,20]], - 'Multiple folder trees including root' => [(new Context)->folders([0,1,5]), [1,2,3,4,5,6,7,8,19,20]], - 'Shallow folder' => [(new Context)->folderShallow(1), [5,6]], - 'Root folder only' => [(new Context)->folderShallow(0), [1,2,3,4]], - 'Multiple shallow folders' => [(new Context)->foldersShallow([1,6]), [5,6,7,8]], - 'Subscription' => [(new Context)->subscription(5), [19,20]], - 'Multiple subscriptions' => [(new Context)->subscriptions([4,5]), [7,8,19,20]], - 'Unread' => [(new Context)->subscription(5)->unread(true), [20]], - 'Read' => [(new Context)->subscription(5)->unread(false), [19]], - 'Starred' => [(new Context)->starred(true), [1,20]], - 'Unstarred' => [(new Context)->starred(false), [2,3,4,5,6,7,8,19]], - 'Starred and Read' => [(new Context)->starred(true)->unread(false), [1]], - 'Starred and Read in subscription' => [(new Context)->starred(true)->unread(false)->subscription(5), []], - 'Annotated' => [(new Context)->annotated(true), [2]], - 'Not annotated' => [(new Context)->annotated(false), [1,3,4,5,6,7,8,19,20]], - 'Labelled' => [(new Context)->labelled(true), [1,5,8,19,20]], - 'Not labelled' => [(new Context)->labelled(false), [2,3,4,6,7]], - 'Not after edition 999' => [(new Context)->subscription(5)->latestEdition(999), [19]], - 'Not after edition 19' => [(new Context)->subscription(5)->latestEdition(19), [19]], - 'Not before edition 999' => [(new Context)->subscription(5)->oldestEdition(999), [20]], - 'Not before edition 1001' => [(new Context)->subscription(5)->oldestEdition(1001), [20]], - 'Not after article 3' => [(new Context)->latestArticle(3), [1,2,3]], - 'Not before article 19' => [(new Context)->oldestArticle(19), [19,20]], - 'Modified by author since 2005' => [(new Context)->modifiedSince("2005-01-01T00:00:00Z"), [2,4,6,8,20]], - 'Modified by author since 2010' => [(new Context)->modifiedSince("2010-01-01T00:00:00Z"), [2,4,6,8,20]], - 'Not modified by author since 2005' => [(new Context)->notModifiedSince("2005-01-01T00:00:00Z"), [1,3,5,7,19]], - 'Not modified by author since 2000' => [(new Context)->notModifiedSince("2000-01-01T00:00:00Z"), [1,3,5,7,19]], - 'Marked or labelled since 2014' => [(new Context)->markedSince("2014-01-01T00:00:00Z"), [8,19]], - 'Marked or labelled since 2010' => [(new Context)->markedSince("2010-01-01T00:00:00Z"), [2,4,6,8,19,20]], - 'Not marked or labelled since 2014' => [(new Context)->notMarkedSince("2014-01-01T00:00:00Z"), [1,2,3,4,5,6,7,20]], - 'Not marked or labelled since 2005' => [(new Context)->notMarkedSince("2005-01-01T00:00:00Z"), [1,3,5,7]], - 'Marked or labelled between 2000 and 2015' => [(new Context)->markedSince("2000-01-01T00:00:00Z")->notMarkedSince("2015-12-31T23:59:59Z"), [1,2,3,4,5,6,7,8,20]], - 'Marked or labelled in 2010' => [(new Context)->markedSince("2010-01-01T00:00:00Z")->notMarkedSince("2010-12-31T23:59:59Z"), [2,4,6,20]], - 'Paged results' => [(new Context)->limit(2)->oldestEdition(4), [4,5]], - 'With label ID 1' => [(new Context)->label(1), [1,19]], - 'With label ID 2' => [(new Context)->label(2), [1,5,20]], - 'With label ID 1 or 2' => [(new Context)->labels([1,2]), [1,5,19,20]], - 'With label "Interesting"' => [(new Context)->labelName("Interesting"), [1,19]], - 'With label "Fascinating"' => [(new Context)->labelName("Fascinating"), [1,5,20]], - 'With label "Interesting" or "Fascinating"' => [(new Context)->labelNames(["Interesting","Fascinating"]), [1,5,19,20]], - 'Article ID 20' => [(new Context)->article(20), [20]], - 'Edition ID 1001' => [(new Context)->edition(1001), [20]], - 'Multiple articles' => [(new Context)->articles([1,20,50]), [1,20]], - 'Multiple starred articles' => [(new Context)->articles([1,2,3])->starred(true), [1]], - 'Multiple unstarred articles' => [(new Context)->articles([1,2,3])->starred(false), [2,3]], - 'Multiple articles' => [(new Context)->articles([1,20,50]), [1,20]], - 'Multiple editions' => [(new Context)->editions([1,1001,50]), [1,20]], - '150 articles' => [(new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)), [1,2,3,4,5,6,7,8,19,20]], - 'Search title or content 1' => [(new Context)->searchTerms(["Article"]), [1,2,3]], - 'Search title or content 2' => [(new Context)->searchTerms(["one", "first"]), [1]], - 'Search title or content 3' => [(new Context)->searchTerms(["one first"]), []], - 'Search title 1' => [(new Context)->titleTerms(["two"]), [2]], - 'Search title 2' => [(new Context)->titleTerms(["title two"]), [2]], - 'Search title 3' => [(new Context)->titleTerms(["two", "title"]), [2]], - 'Search title 4' => [(new Context)->titleTerms(["two title"]), []], - 'Search note 1' => [(new Context)->annotationTerms(["some"]), [2]], - 'Search note 2' => [(new Context)->annotationTerms(["some Note"]), [2]], - 'Search note 3' => [(new Context)->annotationTerms(["note", "some"]), [2]], - 'Search note 4' => [(new Context)->annotationTerms(["some", "sauce"]), []], - 'Search author 1' => [(new Context)->authorTerms(["doe"]), [4,5,6,7]], - 'Search author 2' => [(new Context)->authorTerms(["jane doe"]), [6,7]], - 'Search author 3' => [(new Context)->authorTerms(["doe", "jane"]), [6,7]], - 'Search author 4' => [(new Context)->authorTerms(["doe jane"]), []], - 'Folder tree 1 excluding subscription 4' => [(new Context)->not->subscription(4)->folder(1), [5,6]], - 'Folder tree 1 excluding articles 7 and 8' => [(new Context)->folder(1)->not->articles([7,8]), [5,6]], - 'Folder tree 1 excluding no articles' => [(new Context)->folder(1)->not->articles([]), [5,6,7,8]], + 'Blank context' => [new Context, [1,2,3,4,5,6,7,8,19,20]], + 'Folder tree' => [(new Context)->folder(1), [5,6,7,8]], + 'Entire folder tree' => [(new Context)->folder(0), [1,2,3,4,5,6,7,8,19,20]], + 'Leaf folder' => [(new Context)->folder(6), [7,8]], + 'Multiple folder trees' => [(new Context)->folders([1,5]), [5,6,7,8,19,20]], + 'Multiple folder trees including root' => [(new Context)->folders([0,1,5]), [1,2,3,4,5,6,7,8,19,20]], + 'Shallow folder' => [(new Context)->folderShallow(1), [5,6]], + 'Root folder only' => [(new Context)->folderShallow(0), [1,2,3,4]], + 'Multiple shallow folders' => [(new Context)->foldersShallow([1,6]), [5,6,7,8]], + 'Subscription' => [(new Context)->subscription(5), [19,20]], + 'Multiple subscriptions' => [(new Context)->subscriptions([4,5]), [7,8,19,20]], + 'Unread' => [(new Context)->subscription(5)->unread(true), [20]], + 'Read' => [(new Context)->subscription(5)->unread(false), [19]], + 'Starred' => [(new Context)->starred(true), [1,20]], + 'Unstarred' => [(new Context)->starred(false), [2,3,4,5,6,7,8,19]], + 'Starred and Read' => [(new Context)->starred(true)->unread(false), [1]], + 'Starred and Read in subscription' => [(new Context)->starred(true)->unread(false)->subscription(5), []], + 'Annotated' => [(new Context)->annotated(true), [2]], + 'Not annotated' => [(new Context)->annotated(false), [1,3,4,5,6,7,8,19,20]], + 'Labelled' => [(new Context)->labelled(true), [1,5,8,19,20]], + 'Not labelled' => [(new Context)->labelled(false), [2,3,4,6,7]], + 'Not after edition 999' => [(new Context)->subscription(5)->latestEdition(999), [19]], + 'Not after edition 19' => [(new Context)->subscription(5)->latestEdition(19), [19]], + 'Not before edition 999' => [(new Context)->subscription(5)->oldestEdition(999), [20]], + 'Not before edition 1001' => [(new Context)->subscription(5)->oldestEdition(1001), [20]], + 'Not after article 3' => [(new Context)->latestArticle(3), [1,2,3]], + 'Not before article 19' => [(new Context)->oldestArticle(19), [19,20]], + 'Modified by author since 2005' => [(new Context)->modifiedSince("2005-01-01T00:00:00Z"), [2,4,6,8,20]], + 'Modified by author since 2010' => [(new Context)->modifiedSince("2010-01-01T00:00:00Z"), [2,4,6,8,20]], + 'Not modified by author since 2005' => [(new Context)->notModifiedSince("2005-01-01T00:00:00Z"), [1,3,5,7,19]], + 'Not modified by author since 2000' => [(new Context)->notModifiedSince("2000-01-01T00:00:00Z"), [1,3,5,7,19]], + 'Marked or labelled since 2014' => [(new Context)->markedSince("2014-01-01T00:00:00Z"), [8,19]], + 'Marked or labelled since 2010' => [(new Context)->markedSince("2010-01-01T00:00:00Z"), [2,4,6,8,19,20]], + 'Not marked or labelled since 2014' => [(new Context)->notMarkedSince("2014-01-01T00:00:00Z"), [1,2,3,4,5,6,7,20]], + 'Not marked or labelled since 2005' => [(new Context)->notMarkedSince("2005-01-01T00:00:00Z"), [1,3,5,7]], + 'Marked or labelled between 2000 and 2015' => [(new Context)->markedSince("2000-01-01T00:00:00Z")->notMarkedSince("2015-12-31T23:59:59Z"), [1,2,3,4,5,6,7,8,20]], + 'Marked or labelled in 2010' => [(new Context)->markedSince("2010-01-01T00:00:00Z")->notMarkedSince("2010-12-31T23:59:59Z"), [2,4,6,20]], + 'Paged results' => [(new Context)->limit(2)->oldestEdition(4), [4,5]], + 'With label ID 1' => [(new Context)->label(1), [1,19]], + 'With label ID 2' => [(new Context)->label(2), [1,5,20]], + 'With label ID 1 or 2' => [(new Context)->labels([1,2]), [1,5,19,20]], + 'With label "Interesting"' => [(new Context)->labelName("Interesting"), [1,19]], + 'With label "Fascinating"' => [(new Context)->labelName("Fascinating"), [1,5,20]], + 'With label "Interesting" or "Fascinating"' => [(new Context)->labelNames(["Interesting","Fascinating"]), [1,5,19,20]], + 'Article ID 20' => [(new Context)->article(20), [20]], + 'Edition ID 1001' => [(new Context)->edition(1001), [20]], + 'Multiple articles' => [(new Context)->articles([1,20,50]), [1,20]], + 'Multiple starred articles' => [(new Context)->articles([1,2,3])->starred(true), [1]], + 'Multiple unstarred articles' => [(new Context)->articles([1,2,3])->starred(false), [2,3]], + 'Multiple articles' => [(new Context)->articles([1,20,50]), [1,20]], + 'Multiple editions' => [(new Context)->editions([1,1001,50]), [1,20]], + '150 articles' => [(new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)), [1,2,3,4,5,6,7,8,19,20]], + 'Search title or content 1' => [(new Context)->searchTerms(["Article"]), [1,2,3]], + 'Search title or content 2' => [(new Context)->searchTerms(["one", "first"]), [1]], + 'Search title or content 3' => [(new Context)->searchTerms(["one first"]), []], + 'Search title 1' => [(new Context)->titleTerms(["two"]), [2]], + 'Search title 2' => [(new Context)->titleTerms(["title two"]), [2]], + 'Search title 3' => [(new Context)->titleTerms(["two", "title"]), [2]], + 'Search title 4' => [(new Context)->titleTerms(["two title"]), []], + 'Search note 1' => [(new Context)->annotationTerms(["some"]), [2]], + 'Search note 2' => [(new Context)->annotationTerms(["some Note"]), [2]], + 'Search note 3' => [(new Context)->annotationTerms(["note", "some"]), [2]], + 'Search note 4' => [(new Context)->annotationTerms(["some", "sauce"]), []], + 'Search author 1' => [(new Context)->authorTerms(["doe"]), [4,5,6,7]], + 'Search author 2' => [(new Context)->authorTerms(["jane doe"]), [6,7]], + 'Search author 3' => [(new Context)->authorTerms(["doe", "jane"]), [6,7]], + 'Search author 4' => [(new Context)->authorTerms(["doe jane"]), []], + 'Folder tree 1 excluding subscription 4' => [(new Context)->not->subscription(4)->folder(1), [5,6]], + 'Folder tree 1 excluding articles 7 and 8' => [(new Context)->folder(1)->not->articles([7,8]), [5,6]], + 'Folder tree 1 excluding no articles' => [(new Context)->folder(1)->not->articles([]), [5,6,7,8]], 'Marked or labelled between 2000 and 2015 excluding in 2010' => [(new Context)->markedSince("2000-01-01T00:00:00Z")->notMarkedSince("2015-12-31T23:59:59")->not->markedSince("2010-01-01T00:00:00Z")->not->notMarkedSince("2010-12-31T23:59:59Z"), [1,3,5,7,8]], - 'Search with exclusion' => [(new Context)->searchTerms(["Article"])->not->searchTerms(["one", "two"]), [3]], - 'Excluded folder tree' => [(new Context)->not->folder(1), [1,2,3,4,19,20]], - 'Excluding label ID 2' => [(new Context)->not->label(2), [2,3,4,6,7,8,19]], - 'Excluding label "Fascinating"' => [(new Context)->not->labelName("Fascinating"), [2,3,4,6,7,8,19]], - 'Search 501 terms' => [(new Context)->searchTerms(array_merge(range(1, 500), [str_repeat("a", 1000)])), []], - 'With tag ID 1' => [(new Context)->tag(1), [5,6,7,8]], - 'With tag ID 5' => [(new Context)->tag(5), [7,8,19,20]], - 'With tag ID 1 or 5' => [(new Context)->tags([1,5]), [5,6,7,8,19,20]], - 'With tag "Technology"' => [(new Context)->tagName("Technology"), [5,6,7,8]], - 'With tag "Politics"' => [(new Context)->tagName("Politics"), [7,8,19,20]], - 'With tag "Technology" or "Politics"' => [(new Context)->tagNames(["Technology","Politics"]), [5,6,7,8,19,20]], - 'Excluding tag ID 1' => [(new Context)->not->tag(1), [1,2,3,4,19,20]], - 'Excluding tag ID 5' => [(new Context)->not->tag(5), [1,2,3,4,5,6]], - 'Excluding tag "Technology"' => [(new Context)->not->tagName("Technology"), [1,2,3,4,19,20]], - 'Excluding tag "Politics"' => [(new Context)->not->tagName("Politics"), [1,2,3,4,5,6]], - 'Excluding tags ID 1 and 5' => [(new Context)->not->tags([1,5]), [1,2,3,4]], - 'Excluding tags "Technology" and "Politics"' => [(new Context)->not->tagNames(["Technology","Politics"]), [1,2,3,4]], - 'Excluding entire folder tree' => [(new Context)->not->folder(0), []], - 'Excluding multiple folder trees' => [(new Context)->not->folders([1,5]), [1,2,3,4]], - 'Excluding multiple folder trees including root' => [(new Context)->not->folders([0,1,5]), []], + 'Search with exclusion' => [(new Context)->searchTerms(["Article"])->not->searchTerms(["one", "two"]), [3]], + 'Excluded folder tree' => [(new Context)->not->folder(1), [1,2,3,4,19,20]], + 'Excluding label ID 2' => [(new Context)->not->label(2), [2,3,4,6,7,8,19]], + 'Excluding label "Fascinating"' => [(new Context)->not->labelName("Fascinating"), [2,3,4,6,7,8,19]], + 'Search 501 terms' => [(new Context)->searchTerms(array_merge(range(1, 500), [str_repeat("a", 1000)])), []], + 'With tag ID 1' => [(new Context)->tag(1), [5,6,7,8]], + 'With tag ID 5' => [(new Context)->tag(5), [7,8,19,20]], + 'With tag ID 1 or 5' => [(new Context)->tags([1,5]), [5,6,7,8,19,20]], + 'With tag "Technology"' => [(new Context)->tagName("Technology"), [5,6,7,8]], + 'With tag "Politics"' => [(new Context)->tagName("Politics"), [7,8,19,20]], + 'With tag "Technology" or "Politics"' => [(new Context)->tagNames(["Technology","Politics"]), [5,6,7,8,19,20]], + 'Excluding tag ID 1' => [(new Context)->not->tag(1), [1,2,3,4,19,20]], + 'Excluding tag ID 5' => [(new Context)->not->tag(5), [1,2,3,4,5,6]], + 'Excluding tag "Technology"' => [(new Context)->not->tagName("Technology"), [1,2,3,4,19,20]], + 'Excluding tag "Politics"' => [(new Context)->not->tagName("Politics"), [1,2,3,4,5,6]], + 'Excluding tags ID 1 and 5' => [(new Context)->not->tags([1,5]), [1,2,3,4]], + 'Excluding tags "Technology" and "Politics"' => [(new Context)->not->tagNames(["Technology","Politics"]), [1,2,3,4]], + 'Excluding entire folder tree' => [(new Context)->not->folder(0), []], + 'Excluding multiple folder trees' => [(new Context)->not->folders([1,5]), [1,2,3,4]], + 'Excluding multiple folder trees including root' => [(new Context)->not->folders([0,1,5]), []], ]; } public function testRetrieveArticleIdsForEditions(): void { $exp = [ - 1 => 1, - 2 => 2, - 3 => 3, - 4 => 4, - 5 => 5, - 6 => 6, - 7 => 7, - 8 => 8, - 9 => 9, - 10 => 10, - 11 => 11, - 12 => 12, - 13 => 13, - 14 => 14, - 15 => 15, - 16 => 16, - 17 => 17, - 18 => 18, - 19 => 19, - 20 => 20, - 101 => 101, - 102 => 102, - 103 => 103, - 104 => 104, - 105 => 105, - 202 => 102, - 203 => 103, - 204 => 104, - 205 => 105, - 305 => 105, + 1 => 1, + 2 => 2, + 3 => 3, + 4 => 4, + 5 => 5, + 6 => 6, + 7 => 7, + 8 => 8, + 9 => 9, + 10 => 10, + 11 => 11, + 12 => 12, + 13 => 13, + 14 => 14, + 15 => 15, + 16 => 16, + 17 => 17, + 18 => 18, + 19 => 19, + 20 => 20, + 101 => 101, + 102 => 102, + 103 => 103, + 104 => 104, + 105 => 105, + 202 => 102, + 203 => 103, + 204 => 104, + 205 => 105, + 305 => 105, 1001 => 20, ]; $this->assertEquals($exp, Arsse::$db->editionArticle(...range(1, 1001))); @@ -606,7 +606,7 @@ trait SeriesArticle { } public function testMarkAllArticlesUnread(): void { - Arsse::$db->articleMark($this->user, ['read'=>false]); + Arsse::$db->articleMark($this->user, ['read' => false]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][9][2] = 0; @@ -617,7 +617,7 @@ trait SeriesArticle { } public function testMarkAllArticlesRead(): void { - Arsse::$db->articleMark($this->user, ['read'=>true]); + Arsse::$db->articleMark($this->user, ['read' => true]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][8][2] = 1; @@ -632,7 +632,7 @@ trait SeriesArticle { } public function testMarkAllArticlesUnstarred(): void { - Arsse::$db->articleMark($this->user, ['starred'=>false]); + Arsse::$db->articleMark($this->user, ['starred' => false]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][10][3] = 0; @@ -643,7 +643,7 @@ trait SeriesArticle { } public function testMarkAllArticlesStarred(): void { - Arsse::$db->articleMark($this->user, ['starred'=>true]); + Arsse::$db->articleMark($this->user, ['starred' => true]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][8][3] = 1; @@ -658,7 +658,7 @@ trait SeriesArticle { } public function testMarkAllArticlesUnreadAndUnstarred(): void { - Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>false]); + Arsse::$db->articleMark($this->user, ['read' => false,'starred' => false]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][9][2] = 0; @@ -672,7 +672,7 @@ trait SeriesArticle { } public function testMarkAllArticlesReadAndStarred(): void { - Arsse::$db->articleMark($this->user, ['read'=>true,'starred'=>true]); + Arsse::$db->articleMark($this->user, ['read' => true,'starred' => true]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][8][2] = 1; @@ -690,7 +690,7 @@ trait SeriesArticle { } public function testMarkAllArticlesUnreadAndStarred(): void { - Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true]); + Arsse::$db->articleMark($this->user, ['read' => false,'starred' => true]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][8][3] = 1; @@ -708,7 +708,7 @@ trait SeriesArticle { } public function testMarkAllArticlesReadAndUnstarred(): void { - Arsse::$db->articleMark($this->user, ['read'=>true,'starred'=>false]); + Arsse::$db->articleMark($this->user, ['read' => true,'starred' => false]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][8][2] = 1; @@ -726,7 +726,7 @@ trait SeriesArticle { } public function testSetNoteForAllArticles(): void { - Arsse::$db->articleMark($this->user, ['note'=>"New note"]); + Arsse::$db->articleMark($this->user, ['note' => "New note"]); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][8][5] = "New note"; @@ -745,7 +745,7 @@ trait SeriesArticle { } public function testMarkATreeFolder(): void { - Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(7)); + Arsse::$db->articleMark($this->user, ['read' => true], (new Context)->folder(7)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][] = [13,5,1,0,$now,'']; @@ -756,7 +756,7 @@ trait SeriesArticle { } public function testMarkALeafFolder(): void { - Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(8)); + Arsse::$db->articleMark($this->user, ['read' => true], (new Context)->folder(8)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][] = [13,5,1,0,$now,'']; @@ -766,11 +766,11 @@ trait SeriesArticle { public function testMarkAMissingFolder(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); - Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(42)); + Arsse::$db->articleMark($this->user, ['read' => true], (new Context)->folder(42)); } public function testMarkASubscription(): void { - Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->subscription(13)); + Arsse::$db->articleMark($this->user, ['read' => true], (new Context)->subscription(13)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][] = [13,5,1,0,$now,'']; @@ -780,11 +780,11 @@ trait SeriesArticle { public function testMarkAMissingSubscription(): void { $this->assertException("idMissing", "Db", "ExceptionInput"); - Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(2112)); + Arsse::$db->articleMark($this->user, ['read' => true], (new Context)->folder(2112)); } public function testMarkAnArticle(): void { - Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->article(20)); + Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->article(20)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][9][3] = 1; @@ -793,7 +793,7 @@ trait SeriesArticle { } public function testMarkMultipleArticles(): void { - Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->articles([2,4,7,20])); + Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->articles([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][9][3] = 1; @@ -803,7 +803,7 @@ trait SeriesArticle { } public function testMarkMultipleArticlessUnreadAndStarred(): void { - Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->articles([2,4,7,20])); + Arsse::$db->articleMark($this->user, ['read' => false,'starred' => true], (new Context)->articles([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][9][2] = 0; @@ -816,16 +816,16 @@ trait SeriesArticle { } public function testMarkTooManyMultipleArticles(): void { - $this->assertSame(7, Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)))); + $this->assertSame(7, Arsse::$db->articleMark($this->user, ['read' => false,'starred' => true], (new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)))); } public function testMarkAMissingArticle(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); - Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->article(1)); + Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->article(1)); } public function testMarkAnEdition(): void { - Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->edition(1001)); + Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->edition(1001)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][9][3] = 1; @@ -834,7 +834,7 @@ trait SeriesArticle { } public function testMarkMultipleEditions(): void { - Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->editions([2,4,7,20])); + Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->editions([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][9][3] = 1; @@ -844,13 +844,13 @@ trait SeriesArticle { } public function testMarkMultipleMissingEditions(): void { - $this->assertSame(0, Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->editions([500,501]))); + $this->assertSame(0, Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->editions([500,501]))); $state = $this->primeExpectations($this->data, $this->checkTables); $this->compareExpectations(static::$drv, $state); } public function testMarkMultipleEditionsUnread(): void { - Arsse::$db->articleMark($this->user, ['read'=>false], (new Context)->editions([2,4,7,1001])); + Arsse::$db->articleMark($this->user, ['read' => false], (new Context)->editions([2,4,7,1001])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][9][2] = 0; @@ -861,7 +861,7 @@ trait SeriesArticle { } public function testMarkMultipleEditionsUnreadWithStale(): void { - Arsse::$db->articleMark($this->user, ['read'=>false], (new Context)->editions([2,4,7,20])); + Arsse::$db->articleMark($this->user, ['read' => false], (new Context)->editions([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][11][2] = 0; @@ -870,7 +870,7 @@ trait SeriesArticle { } public function testMarkMultipleEditionsUnreadAndStarredWithStale(): void { - Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->editions([2,4,7,20])); + Arsse::$db->articleMark($this->user, ['read' => false,'starred' => true], (new Context)->editions([2,4,7,20])); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][9][3] = 1; @@ -882,17 +882,17 @@ trait SeriesArticle { } public function testMarkTooManyMultipleEditions(): void { - $this->assertSame(7, Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->editions(range(1, 51)))); + $this->assertSame(7, Arsse::$db->articleMark($this->user, ['read' => false,'starred' => true], (new Context)->editions(range(1, 51)))); } public function testMarkAStaleEditionUnread(): void { - Arsse::$db->articleMark($this->user, ['read'=>false], (new Context)->edition(20)); // no changes occur + Arsse::$db->articleMark($this->user, ['read' => false], (new Context)->edition(20)); // no changes occur $state = $this->primeExpectations($this->data, $this->checkTables); $this->compareExpectations(static::$drv, $state); } public function testMarkAStaleEditionStarred(): void { - Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->edition(20)); + Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->edition(20)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][9][3] = 1; @@ -901,7 +901,7 @@ trait SeriesArticle { } public function testMarkAStaleEditionUnreadAndStarred(): void { - Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->edition(20)); // only starred is changed + Arsse::$db->articleMark($this->user, ['read' => false,'starred' => true], (new Context)->edition(20)); // only starred is changed $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][9][3] = 1; @@ -910,18 +910,18 @@ trait SeriesArticle { } public function testMarkAStaleEditionUnreadAndUnstarred(): void { - Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>false], (new Context)->edition(20)); // no changes occur + Arsse::$db->articleMark($this->user, ['read' => false,'starred' => false], (new Context)->edition(20)); // no changes occur $state = $this->primeExpectations($this->data, $this->checkTables); $this->compareExpectations(static::$drv, $state); } public function testMarkAMissingEdition(): void { $this->assertException("subjectMissing", "Db", "ExceptionInput"); - Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->edition(2)); + Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->edition(2)); } public function testMarkByOldestEdition(): void { - Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->oldestEdition(19)); + Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->oldestEdition(19)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][8][3] = 1; @@ -932,7 +932,7 @@ trait SeriesArticle { } public function testMarkByLatestEdition(): void { - Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->latestEdition(20)); + Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->latestEdition(20)); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][8][3] = 1; @@ -945,7 +945,7 @@ trait SeriesArticle { } public function testMarkByLastMarked(): void { - Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->markedSince('2017-01-01T00:00:00Z')); + Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->markedSince('2017-01-01T00:00:00Z')); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][8][3] = 1; @@ -956,7 +956,7 @@ trait SeriesArticle { } public function testMarkByNotLastMarked(): void { - Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->notMarkedSince('2000-01-01T00:00:00Z')); + Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->notMarkedSince('2000-01-01T00:00:00Z')); $now = Date::transform(time(), "sql"); $state = $this->primeExpectations($this->data, $this->checkTables); $state['arsse_marks']['rows'][] = [13,5,0,1,$now,'']; @@ -967,7 +967,7 @@ trait SeriesArticle { public function testMarkArticlesWithoutAuthority(): void { \Phake::when(Arsse::$user)->authorize->thenReturn(false); $this->assertException("notAuthorized", "User", "ExceptionAuthz"); - Arsse::$db->articleMark($this->user, ['read'=>false]); + Arsse::$db->articleMark($this->user, ['read' => false]); } public function testCountArticles(): void { diff --git a/tests/cases/Database/SeriesCleanup.php b/tests/cases/Database/SeriesCleanup.php index 3a33f651..4746ed86 100644 --- a/tests/cases/Database/SeriesCleanup.php +++ b/tests/cases/Database/SeriesCleanup.php @@ -16,7 +16,7 @@ trait SeriesCleanup { 'userSessionLifetime' => "PT24H", ]); // set up the test data - $nowish = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); + $nowish = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); $yesterday = gmdate("Y-m-d H:i:s", strtotime("now - 1 day")); $daybefore = gmdate("Y-m-d H:i:s", strtotime("now - 2 days")); $daysago = gmdate("Y-m-d H:i:s", strtotime("now - 7 days")); @@ -53,7 +53,7 @@ trait SeriesCleanup { 'columns' => [ 'id' => "str", 'class' => "str", - 'user' => "str", + 'user' => "str", 'expires' => "datetime", ], 'rows' => [ @@ -76,7 +76,7 @@ trait SeriesCleanup { [2,"http://example.com/2","",$yesterday,0], [3,"http://example.com/3","",null,0], [4,"http://example.com/4","",$nowish,0], - ] + ], ], 'arsse_subscriptions' => [ 'columns' => [ @@ -89,7 +89,7 @@ trait SeriesCleanup { [1,'jane.doe@example.com',1], // other subscriptions exist for article cleanup tests [2,'john.doe@example.com',1], - ] + ], ], 'arsse_articles' => [ 'columns' => [ @@ -110,7 +110,7 @@ trait SeriesCleanup { [7,1,"","","",$weeksago], // meets the unread threshold without marks, thus is deleted [8,1,"","","",$weeksago], // meets the unread threshold even with marks, thus is deleted [9,1,"","","",$weeksago], // meets the read threshold, thus is deleted - ] + ], ], 'arsse_editions' => [ 'columns' => [ @@ -124,7 +124,7 @@ trait SeriesCleanup { [4,4], [201,1], [102,2], - ] + ], ], 'arsse_marks' => [ 'columns' => [ @@ -142,7 +142,7 @@ trait SeriesCleanup { [8,1,1,0,$weeksago], [9,1,1,0,$daysago], [9,2,1,0,$daysago], - ] + ], ], ]; } @@ -155,7 +155,7 @@ trait SeriesCleanup { Arsse::$db->feedCleanup(); $now = gmdate("Y-m-d H:i:s"); $state = $this->primeExpectations($this->data, [ - 'arsse_feeds' => ["id","orphaned"] + 'arsse_feeds' => ["id","orphaned"], ]); $state['arsse_feeds']['rows'][0][1] = null; unset($state['arsse_feeds']['rows'][1]); @@ -170,7 +170,7 @@ trait SeriesCleanup { Arsse::$db->feedCleanup(); $now = gmdate("Y-m-d H:i:s"); $state = $this->primeExpectations($this->data, [ - 'arsse_feeds' => ["id","orphaned"] + 'arsse_feeds' => ["id","orphaned"], ]); $state['arsse_feeds']['rows'][0][1] = null; $state['arsse_feeds']['rows'][2][1] = $now; @@ -180,7 +180,7 @@ trait SeriesCleanup { public function testCleanUpOldArticlesWithStandardRetention(): void { Arsse::$db->articleCleanup(); $state = $this->primeExpectations($this->data, [ - 'arsse_articles' => ["id"] + 'arsse_articles' => ["id"], ]); foreach ([7,8,9] as $id) { unset($state['arsse_articles']['rows'][$id - 1]); @@ -194,7 +194,7 @@ trait SeriesCleanup { ]); Arsse::$db->articleCleanup(); $state = $this->primeExpectations($this->data, [ - 'arsse_articles' => ["id"] + 'arsse_articles' => ["id"], ]); foreach ([7,8] as $id) { unset($state['arsse_articles']['rows'][$id - 1]); @@ -208,7 +208,7 @@ trait SeriesCleanup { ]); Arsse::$db->articleCleanup(); $state = $this->primeExpectations($this->data, [ - 'arsse_articles' => ["id"] + 'arsse_articles' => ["id"], ]); foreach ([9] as $id) { unset($state['arsse_articles']['rows'][$id - 1]); @@ -218,12 +218,12 @@ trait SeriesCleanup { public function testCleanUpOldArticlesWithUnlimitedRetention(): void { Arsse::$conf->import([ - 'purgeArticlesRead' => null, + 'purgeArticlesRead' => null, 'purgeArticlesUnread' => null, ]); Arsse::$db->articleCleanup(); $state = $this->primeExpectations($this->data, [ - 'arsse_articles' => ["id"] + 'arsse_articles' => ["id"], ]); $this->compareExpectations(static::$drv, $state); } @@ -231,7 +231,7 @@ trait SeriesCleanup { public function testCleanUpExpiredSessions(): void { Arsse::$db->sessionCleanup(); $state = $this->primeExpectations($this->data, [ - 'arsse_sessions' => ["id"] + 'arsse_sessions' => ["id"], ]); foreach ([3,4,5] as $id) { unset($state['arsse_sessions']['rows'][$id - 1]); @@ -242,7 +242,7 @@ trait SeriesCleanup { public function testCleanUpExpiredTokens(): void { Arsse::$db->tokenCleanup(); $state = $this->primeExpectations($this->data, [ - 'arsse_tokens' => ["id", "class"] + 'arsse_tokens' => ["id", "class"], ]); foreach ([2] as $id) { unset($state['arsse_tokens']['rows'][$id - 1]); diff --git a/tests/cases/Database/SeriesFeed.php b/tests/cases/Database/SeriesFeed.php index ee19bb19..d4a75213 100644 --- a/tests/cases/Database/SeriesFeed.php +++ b/tests/cases/Database/SeriesFeed.php @@ -11,7 +11,7 @@ use JKingWeb\Arsse\Arsse; trait SeriesFeed { protected function setUpSeriesFeed(): void { // set up the test data - $past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); + $past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); $future = gmdate("Y-m-d H:i:s", strtotime("now + 1 minute")); $now = gmdate("Y-m-d H:i:s", strtotime("now")); $this->data = [ @@ -42,7 +42,7 @@ trait SeriesFeed { [3,"http://localhost:8000/Feed/Fetching/Error?code=404","Ack",0,"",$past,$now,0], [4,"http://localhost:8000/Feed/NextFetch/NotModified?t=".time(),"Ooook",0,"",$past,$past,0], [5,"http://localhost:8000/Feed/Parsing/Valid","Ooook",0,"",$past,$future,0], - ] + ], ], 'arsse_subscriptions' => [ 'columns' => [ @@ -57,7 +57,7 @@ trait SeriesFeed { [4,'john.doe@example.com',4], [5,'john.doe@example.com',5], [6,'jane.doe@example.com',1], - ] + ], ], 'arsse_articles' => [ 'columns' => [ @@ -82,8 +82,8 @@ trait SeriesFeed { [4,1,'http://example.com/4','Article title 4','','2000-01-04 00:00:00','2000-01-04 00:00:00','

Article content 4

','804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180','f3615c7f16336d3ea242d35cf3fc17dbc4ee3afb78376bf49da2dd7a5a25dec8','f11c2b4046f207579aeb9c69a8c20ca5461cef49756ccfa5ba5e2344266da3b3','ab2da63276acce431250b18d3d49b988b226a99c7faadf275c90b751aee05be9',$past], [5,1,'http://example.com/5','Article title 5','','2000-01-05 00:00:00','2000-01-05 00:00:00','

Article content 5

','db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41','d40da96e39eea6c55948ccbe9b3d275b5f931298288dbe953990c5f496097022','834240f84501b5341d375414718204ec421561f3825d34c22bf9182203e42900','43b970ac6ec5f8a9647b2c7e4eed8b1d7f62e154a95eed748b0294c1256764ba',$past], [6,2,'http://example.com/1','Article title 1','','2000-01-01 00:00:00','2000-01-01 00:00:00','

Article content 1

','e433653cef2e572eee4215fa299a4a5af9137b2cefd6283c85bd69a32915beda','f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6','fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4','18fdd4fa93d693128c43b004399e5c9cea6c261ddfa002518d3669f55d8c2207',$past], - [7,5,'' ,'' ,'','2000-01-01 00:00:00','2000-01-01 00:00:00','' ,'205e986f4f8b3acfa281227beadb14f5e8c32c8dae4737f888c94c0df49c56f8','' ,'' ,'' ,$past], - ] + [7,5,'', '', '','2000-01-01 00:00:00','2000-01-01 00:00:00','', '205e986f4f8b3acfa281227beadb14f5e8c32c8dae4737f888c94c0df49c56f8','', '', '', $past], + ], ], 'arsse_editions' => [ 'columns' => [ @@ -97,7 +97,7 @@ trait SeriesFeed { [3,3,$past], [4,4,$past], [5,5,$past], - ] + ], ], 'arsse_marks' => [ 'columns' => [ @@ -118,7 +118,7 @@ trait SeriesFeed { [1,1,1,0,$past], [3,1,1,0,$past], [4,1,0,1,$past], - ] + ], ], 'arsse_enclosures' => [ 'columns' => [ @@ -128,16 +128,16 @@ trait SeriesFeed { ], 'rows' => [ [7,'http://example.com/png','image/png'], - ] + ], ], 'arsse_categories' => [ 'columns' => [ - 'article' => "int", + 'article' => "int", 'name' => "str", ], 'rows' => [ - [7,'Syrinx'] - ] + [7,'Syrinx'], + ], ], ]; $this->matches = [ @@ -191,7 +191,7 @@ trait SeriesFeed { ]); $state['arsse_articles']['rows'][2] = [3,1,'http://example.com/3','Article title 3 (updated)','','2000-01-03 00:00:00','2000-01-03 00:00:00','

Article content 3

','31a6594500a48b59fcc8a075ce82b946c9c3c782460d088bd7b8ef3ede97ad92','6cc99be662ef3486fef35a890123f18d74c29a32d714802d743c5b4ef713315a','b278380e984cefe63f0e412b88ffc9cb0befdfa06fdc00bace1da99a8daff406','d5faccc13bf8267850a1e8e61f95950a0f34167df2c8c58011c0aaa6367026ac',$now]; $state['arsse_articles']['rows'][3] = [4,1,'http://example.com/4','Article title 4','','2000-01-04 00:00:00','2000-01-04 00:00:01','

Article content 4

','804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180','f3615c7f16336d3ea242d35cf3fc17dbc4ee3afb78376bf49da2dd7a5a25dec8','f11c2b4046f207579aeb9c69a8c20ca5461cef49756ccfa5ba5e2344266da3b3','ab2da63276acce431250b18d3d49b988b226a99c7faadf275c90b751aee05be9',$now]; - $state['arsse_articles']['rows'][] = [8,1,'http://example.com/6','Article title 6','','2000-01-06 00:00:00','2000-01-06 00:00:00','

Article content 6

','b3461ab8e8759eeb1d65a818c65051ec00c1dfbbb32a3c8f6999434e3e3b76ab','91d051a8e6749d014506848acd45e959af50bf876427c4f0e3a1ec0f04777b51','211d78b1a040d40d17e747a363cc283f58767b2e502630d8de9b8f1d5e941d18','5ed68ccb64243b8c1931241d2c9276274c3b1d87f223634aa7a1ab0141292ca7',$now]; + $state['arsse_articles']['rows'][] = [8,1,'http://example.com/6','Article title 6','','2000-01-06 00:00:00','2000-01-06 00:00:00','

Article content 6

','b3461ab8e8759eeb1d65a818c65051ec00c1dfbbb32a3c8f6999434e3e3b76ab','91d051a8e6749d014506848acd45e959af50bf876427c4f0e3a1ec0f04777b51','211d78b1a040d40d17e747a363cc283f58767b2e502630d8de9b8f1d5e941d18','5ed68ccb64243b8c1931241d2c9276274c3b1d87f223634aa7a1ab0141292ca7',$now]; $state['arsse_editions']['rows'] = array_merge($state['arsse_editions']['rows'], [ [6,8,$now], [7,3,$now], diff --git a/tests/cases/Database/SeriesFolder.php b/tests/cases/Database/SeriesFolder.php index bc1ae3a1..6d69f64a 100644 --- a/tests/cases/Database/SeriesFolder.php +++ b/tests/cases/Database/SeriesFolder.php @@ -45,7 +45,7 @@ trait SeriesFolder { [4, "jane.doe@example.com", null, "Politics"], [5, "john.doe@example.com", null, "Politics"], [6, "john.doe@example.com", 2, "Politics"], - ] + ], ], 'arsse_feeds' => [ 'columns' => [ @@ -67,7 +67,7 @@ trait SeriesFolder { [11,"http://example.com/11", "Feed 11"], [12,"http://example.com/12", "Feed 12"], [13,"http://example.com/13", "Feed 13"], - ] + ], ], 'arsse_subscriptions' => [ 'columns' => [ @@ -88,7 +88,7 @@ trait SeriesFolder { [9, "jane.doe@example.com",2, 4], [10,"jane.doe@example.com",3, 4], [11,"jane.doe@example.com",4, 4], - ] + ], ], ]; } diff --git a/tests/cases/Database/SeriesLabel.php b/tests/cases/Database/SeriesLabel.php index 74fdee47..db9c4989 100644 --- a/tests/cases/Database/SeriesLabel.php +++ b/tests/cases/Database/SeriesLabel.php @@ -42,7 +42,7 @@ trait SeriesLabel { [7, "john.doe@example.net", null, "Technology"], [8, "john.doe@example.net", 7, "Software"], [9, "john.doe@example.net", null, "Politics"], - ] + ], ], 'arsse_feeds' => [ 'columns' => [ @@ -63,7 +63,7 @@ trait SeriesLabel { [11,"http://example.com/11"], [12,"http://example.com/12"], [13,"http://example.com/13"], - ] + ], ], 'arsse_subscriptions' => [ 'columns' => [ @@ -87,7 +87,7 @@ trait SeriesLabel { [12,"john.doe@example.net",2,9], [13,"john.doe@example.net",3,8], [14,"john.doe@example.net",4,7], - ] + ], ], 'arsse_articles' => [ 'columns' => [ @@ -131,7 +131,7 @@ trait SeriesLabel { [103,12,'http://example.com/3','Article title 3','','2000-01-03 00:00:00','2000-01-03 00:00:03','

Article content 3

','31a6594500a48b59fcc8a075ce82b946c9c3c782460d088bd7b8ef3ede97ad92','f74b06b240bd08abf4d3fdfc20dba6a6f6eb8b4f1a00e9a617efd63a87180a4b','b278380e984cefe63f0e412b88ffc9cb0befdfa06fdc00bace1da99a8daff406','ad622b31e739cd3a3f3c788991082cf4d2f7a8773773008e75f0572e58cd373b','2000-01-03 03:00:00'], [104,12,'http://example.com/4','Article title 4','','2000-01-04 00:00:00','2000-01-04 00:00:04','

Article content 4

','804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180','f3615c7f16336d3ea242d35cf3fc17dbc4ee3afb78376bf49da2dd7a5a25dec8','f11c2b4046f207579aeb9c69a8c20ca5461cef49756ccfa5ba5e2344266da3b3','ab2da63276acce431250b18d3d49b988b226a99c7faadf275c90b751aee05be9','2000-01-04 04:00:00'], [105,13,'http://example.com/5','Article title 5','','2000-01-05 00:00:00','2000-01-05 00:00:05','

Article content 5

','db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41','d40da96e39eea6c55948ccbe9b3d275b5f931298288dbe953990c5f496097022','834240f84501b5341d375414718204ec421561f3825d34c22bf9182203e42900','43b970ac6ec5f8a9647b2c7e4eed8b1d7f62e154a95eed748b0294c1256764ba','2000-01-05 05:00:00'], - ] + ], ], 'arsse_enclosures' => [ 'columns' => [ @@ -145,7 +145,7 @@ trait SeriesLabel { [104,"http://example.com/image","image/svg+xml"], [105,"http://example.com/audio","audio/ogg"], - ] + ], ], 'arsse_editions' => [ 'columns' => [ @@ -184,7 +184,7 @@ trait SeriesLabel { [205,105], [305,105], [1001,20], - ] + ], ], 'arsse_marks' => [ 'columns' => [ @@ -192,7 +192,7 @@ trait SeriesLabel { 'article' => "int", 'read' => "bool", 'starred' => "bool", - 'modified' => "datetime" + 'modified' => "datetime", ], 'rows' => [ [1, 1,1,1,'2000-01-01 00:00:00'], @@ -207,7 +207,7 @@ trait SeriesLabel { [11, 20,1,0,'2017-01-01 00:00:00'], [12, 3,0,1,'2017-01-01 00:00:00'], [12, 4,1,1,'2017-01-01 00:00:00'], - ] + ], ], 'arsse_labels' => [ 'columns' => [ @@ -224,10 +224,10 @@ trait SeriesLabel { ], 'arsse_label_members' => [ 'columns' => [ - 'label' => "int", - 'article' => "int", + 'label' => "int", + 'article' => "int", 'subscription' => "int", - 'assigned' => "bool", + 'assigned' => "bool", ], 'rows' => [ [1, 1,1,1], diff --git a/tests/cases/Database/SeriesSession.php b/tests/cases/Database/SeriesSession.php index f3a84b6f..9a354f66 100644 --- a/tests/cases/Database/SeriesSession.php +++ b/tests/cases/Database/SeriesSession.php @@ -17,7 +17,7 @@ trait SeriesSession { 'userSessionLifetime' => "PT24H", ]); // set up the test data - $past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); + $past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); $future = gmdate("Y-m-d H:i:s", strtotime("now + 1 minute")); $faroff = gmdate("Y-m-d H:i:s", strtotime("now + 1 hour")); $old = gmdate("Y-m-d H:i:s", strtotime("now - 2 days")); @@ -55,12 +55,12 @@ trait SeriesSession { public function testResumeAValidSession(): void { $exp1 = [ - 'id' => "80fa94c1a11f11e78667001e673b2560", - 'user' => "jane.doe@example.com" + 'id' => "80fa94c1a11f11e78667001e673b2560", + 'user' => "jane.doe@example.com", ]; $exp2 = [ - 'id' => "da772f8fa13c11e78667001e673b2560", - 'user' => "john.doe@example.com" + 'id' => "da772f8fa13c11e78667001e673b2560", + 'user' => "john.doe@example.com", ]; $this->assertArraySubset($exp1, Arsse::$db->sessionResume("80fa94c1a11f11e78667001e673b2560")); $this->assertArraySubset($exp2, Arsse::$db->sessionResume("da772f8fa13c11e78667001e673b2560")); diff --git a/tests/cases/Database/SeriesSubscription.php b/tests/cases/Database/SeriesSubscription.php index a89319e9..d8614e24 100644 --- a/tests/cases/Database/SeriesSubscription.php +++ b/tests/cases/Database/SeriesSubscription.php @@ -38,7 +38,7 @@ trait SeriesSubscription { [4, "jane.doe@example.com", null, "Politics"], [5, "john.doe@example.com", null, "Politics"], [6, "john.doe@example.com", 2, "Politics"], - ] + ], ], 'arsse_feeds' => [ 'columns' => [ @@ -51,7 +51,7 @@ trait SeriesSubscription { 'next_fetch' => "datetime", 'favicon' => "str", ], - 'rows' => [] // filled in the series setup + 'rows' => [], // filled in the series setup ], 'arsse_subscriptions' => [ 'columns' => [ @@ -67,7 +67,7 @@ trait SeriesSubscription { [1,"john.doe@example.com",2,null,null,1,2], [2,"jane.doe@example.com",2,null,null,0,0], [3,"john.doe@example.com",3,"Ook",2,0,1], - ] + ], ], 'arsse_tags' => [ 'columns' => [ @@ -84,9 +84,9 @@ trait SeriesSubscription { ], 'arsse_tag_members' => [ 'columns' => [ - 'tag' => "int", + 'tag' => "int", 'subscription' => "int", - 'assigned' => "bool", + 'assigned' => "bool", ], 'rows' => [ [1,1,1], @@ -113,7 +113,7 @@ trait SeriesSubscription { [6,3,"","",""], [7,3,"","",""], [8,3,"","",""], - ] + ], ], 'arsse_marks' => [ 'columns' => [ @@ -131,7 +131,7 @@ trait SeriesSubscription { [1,1,1,0], [7,3,1,0], [8,3,0,0], - ] + ], ], ]; $this->data['arsse_feeds']['rows'] = [ @@ -379,9 +379,9 @@ trait SeriesSubscription { public function testSetThePropertiesOfASubscription(): void { Arsse::$db->subscriptionPropertiesSet($this->user, 1, [ - 'title' => "Ook Ook", - 'folder' => 3, - 'pinned' => false, + 'title' => "Ook Ook", + 'folder' => 3, + 'pinned' => false, 'order_type' => 0, ]); \Phake::verify(Arsse::$user)->authorize($this->user, "subscriptionPropertiesSet"); diff --git a/tests/cases/Database/SeriesTag.php b/tests/cases/Database/SeriesTag.php index 07b99fd6..f6a3f4ea 100644 --- a/tests/cases/Database/SeriesTag.php +++ b/tests/cases/Database/SeriesTag.php @@ -44,7 +44,7 @@ trait SeriesTag { [11,"http://example.com/11",""], [12,"http://example.com/12",""], [13,"http://example.com/13",""], - ] + ], ], 'arsse_subscriptions' => [ 'columns' => [ @@ -68,7 +68,7 @@ trait SeriesTag { [12,"john.doe@example.net", 2,null], [13,"john.doe@example.net", 3,null], [14,"john.doe@example.net", 4,null], - ] + ], ], 'arsse_tags' => [ 'columns' => [ @@ -85,9 +85,9 @@ trait SeriesTag { ], 'arsse_tag_members' => [ 'columns' => [ - 'tag' => "int", + 'tag' => "int", 'subscription' => "int", - 'assigned' => "bool", + 'assigned' => "bool", ], 'rows' => [ [1,1,1], diff --git a/tests/cases/Database/SeriesToken.php b/tests/cases/Database/SeriesToken.php index 8ed84e2b..aad4a875 100644 --- a/tests/cases/Database/SeriesToken.php +++ b/tests/cases/Database/SeriesToken.php @@ -11,7 +11,7 @@ use JKingWeb\Arsse\Arsse; trait SeriesToken { protected function setUpSeriesToken(): void { // set up the test data - $past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); + $past = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); $future = gmdate("Y-m-d H:i:s", strtotime("now + 1 minute")); $faroff = gmdate("Y-m-d H:i:s", strtotime("now + 1 hour")); $old = gmdate("Y-m-d H:i:s", strtotime("now - 2 days")); @@ -30,7 +30,7 @@ trait SeriesToken { 'columns' => [ 'id' => "str", 'class' => "str", - 'user' => "str", + 'user' => "str", 'expires' => "datetime", ], 'rows' => [ @@ -49,19 +49,19 @@ trait SeriesToken { public function testLookUpAValidToken(): void { $exp1 = [ - 'id' => "80fa94c1a11f11e78667001e673b2560", + 'id' => "80fa94c1a11f11e78667001e673b2560", 'class' => "fever.login", - 'user' => "jane.doe@example.com" + 'user' => "jane.doe@example.com", ]; $exp2 = [ - 'id' => "da772f8fa13c11e78667001e673b2560", + 'id' => "da772f8fa13c11e78667001e673b2560", 'class' => "class.class", - 'user' => "john.doe@example.com" + 'user' => "john.doe@example.com", ]; $exp3 = [ - 'id' => "ab3b3eb8a13311e78667001e673b2560", + 'id' => "ab3b3eb8a13311e78667001e673b2560", 'class' => "class.class", - 'user' => "jane.doe@example.com" + 'user' => "jane.doe@example.com", ]; $this->assertArraySubset($exp1, Arsse::$db->tokenLookup("fever.login", "80fa94c1a11f11e78667001e673b2560")); $this->assertArraySubset($exp2, Arsse::$db->tokenLookup("class.class", "da772f8fa13c11e78667001e673b2560")); diff --git a/tests/cases/Database/TestDatabase.php b/tests/cases/Database/TestDatabase.php index 0bce9166..581bc23f 100644 --- a/tests/cases/Database/TestDatabase.php +++ b/tests/cases/Database/TestDatabase.php @@ -11,7 +11,7 @@ use JKingWeb\Arsse\Database; /** @covers \JKingWeb\Arsse\Database */ class TestDatabase extends \JKingWeb\Arsse\Test\AbstractTest { protected $db = null; - + public function setUp(): void { self::clearData(); self::setConf(); @@ -49,7 +49,7 @@ class TestDatabase extends \JKingWeb\Arsse\Test\AbstractTest { ["?,?", [null, null], [null, null], "str"], ["null", [], array_fill(0, $l, null), "str"], ["$intList", [], $ints, "int"], - ["$intList,".($l+1), [], array_merge($ints, [$l+1]), "int"], + ["$intList,".($l + 1), [], array_merge($ints, [$l + 1]), "int"], ["$intList,0", [], array_merge($ints, ["OOK"]), "int"], ["$intList", [], array_merge($ints, [null]), "int"], ["$stringList,''", [], array_merge($strings, [""]), "str"], diff --git a/tests/cases/Db/BaseDriver.php b/tests/cases/Db/BaseDriver.php index 017deaaa..94091ac5 100644 --- a/tests/cases/Db/BaseDriver.php +++ b/tests/cases/Db/BaseDriver.php @@ -17,8 +17,8 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { protected $lock; protected $setVersion; protected static $conf = [ - 'dbTimeoutExec' => 0.5, - 'dbTimeoutLock' => 0.001, + 'dbTimeoutExec' => 0.5, + 'dbTimeoutLock' => 0.001, 'dbSQLite3Timeout' => 0, //'dbSQLite3File' => "(temporary file)", ]; @@ -29,7 +29,7 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { static::setConf(static::$conf); static::$interface = static::dbInterface(); } - + public function setUp(): void { self::clearData(); self::setConf(static::$conf); @@ -75,12 +75,12 @@ abstract class BaseDriver extends \JKingWeb\Arsse\Test\AbstractTest { } # TESTS - + public function testFetchDriverName(): void { $class = get_class($this->drv); $this->assertTrue(strlen($class::driverName()) > 0); } - + public function testFetchSchemaId(): void { $class = get_class($this->drv); $this->assertTrue(strlen($class::schemaID()) > 0); diff --git a/tests/cases/Db/BaseResult.php b/tests/cases/Db/BaseResult.php index 3391cf0e..4d3d2c49 100644 --- a/tests/cases/Db/BaseResult.php +++ b/tests/cases/Db/BaseResult.php @@ -21,7 +21,7 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest { static::setConf(); static::$interface = static::dbInterface(); } - + public function setUp(): void { self::clearData(); self::setConf(); diff --git a/tests/cases/Db/BaseStatement.php b/tests/cases/Db/BaseStatement.php index f2f166f8..206aed79 100644 --- a/tests/cases/Db/BaseStatement.php +++ b/tests/cases/Db/BaseStatement.php @@ -21,7 +21,7 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { static::setConf(); static::$interface = static::dbInterface(); } - + public function setUp(): void { self::clearData(); self::setConf(); @@ -134,138 +134,138 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { $dateImmutable = new \DateTimeImmutable("Noon Today", new \DateTimezone("America/Toronto")); $dateUTC = new \DateTime("@".$dateMutable->getTimestamp(), new \DateTimezone("UTC")); $tests = [ - 'Null as integer' => [null, "integer", "null"], - 'Null as float' => [null, "float", "null"], - 'Null as string' => [null, "string", "null"], - 'Null as datetime' => [null, "datetime", "null"], - 'Null as boolean' => [null, "boolean", "null"], - 'Null as strict integer' => [null, "strict integer", "0"], - 'Null as strict float' => [null, "strict float", "0.0"], - 'Null as strict string' => [null, "strict string", "''"], - 'Null as strict datetime' => [null, "strict datetime", "'0001-01-01 00:00:00'"], - 'Null as strict boolean' => [null, "strict boolean", "0"], - 'True as integer' => [true, "integer", "1"], - 'True as float' => [true, "float", "1.0"], - 'True as string' => [true, "string", "'1'"], - 'True as datetime' => [true, "datetime", "null"], - 'True as boolean' => [true, "boolean", "1"], - 'True as strict integer' => [true, "strict integer", "1"], - 'True as strict float' => [true, "strict float", "1.0"], - 'True as strict string' => [true, "strict string", "'1'"], - 'True as strict datetime' => [true, "strict datetime", "'0001-01-01 00:00:00'"], - 'True as strict boolean' => [true, "strict boolean", "1"], - 'False as integer' => [false, "integer", "0"], - 'False as float' => [false, "float", "0.0"], - 'False as string' => [false, "string", "''"], - 'False as datetime' => [false, "datetime", "null"], - 'False as boolean' => [false, "boolean", "0"], - 'False as strict integer' => [false, "strict integer", "0"], - 'False as strict float' => [false, "strict float", "0.0"], - 'False as strict string' => [false, "strict string", "''"], - 'False as strict datetime' => [false, "strict datetime", "'0001-01-01 00:00:00'"], - 'False as strict boolean' => [false, "strict boolean", "0"], - 'Integer as integer' => [2112, "integer", "2112"], - 'Integer as float' => [2112, "float", "2112.0"], - 'Integer as string' => [2112, "string", "'2112'"], - 'Integer as datetime' => [2112, "datetime", "'1970-01-01 00:35:12'"], - 'Integer as boolean' => [2112, "boolean", "1"], - 'Integer as strict integer' => [2112, "strict integer", "2112"], - 'Integer as strict float' => [2112, "strict float", "2112.0"], - 'Integer as strict string' => [2112, "strict string", "'2112'"], - 'Integer as strict datetime' => [2112, "strict datetime", "'1970-01-01 00:35:12'"], - 'Integer as strict boolean' => [2112, "strict boolean", "1"], - 'Integer zero as integer' => [0, "integer", "0"], - 'Integer zero as float' => [0, "float", "0.0"], - 'Integer zero as string' => [0, "string", "'0'"], - 'Integer zero as datetime' => [0, "datetime", "'1970-01-01 00:00:00'"], - 'Integer zero as boolean' => [0, "boolean", "0"], - 'Integer zero as strict integer' => [0, "strict integer", "0"], - 'Integer zero as strict float' => [0, "strict float", "0.0"], - 'Integer zero as strict string' => [0, "strict string", "'0'"], - 'Integer zero as strict datetime' => [0, "strict datetime", "'1970-01-01 00:00:00'"], - 'Integer zero as strict boolean' => [0, "strict boolean", "0"], - 'Float as integer' => [2112.5, "integer", "2112"], - 'Float as float' => [2112.5, "float", "2112.5"], - 'Float as string' => [2112.5, "string", "'2112.5'"], - 'Float as datetime' => [2112.5, "datetime", "'1970-01-01 00:35:12'"], - 'Float as boolean' => [2112.5, "boolean", "1"], - 'Float as strict integer' => [2112.5, "strict integer", "2112"], - 'Float as strict float' => [2112.5, "strict float", "2112.5"], - 'Float as strict string' => [2112.5, "strict string", "'2112.5'"], - 'Float as strict datetime' => [2112.5, "strict datetime", "'1970-01-01 00:35:12'"], - 'Float as strict boolean' => [2112.5, "strict boolean", "1"], - 'Float zero as integer' => [0.0, "integer", "0"], - 'Float zero as float' => [0.0, "float", "0.0"], - 'Float zero as string' => [0.0, "string", "'0'"], - 'Float zero as datetime' => [0.0, "datetime", "'1970-01-01 00:00:00'"], - 'Float zero as boolean' => [0.0, "boolean", "0"], - 'Float zero as strict integer' => [0.0, "strict integer", "0"], - 'Float zero as strict float' => [0.0, "strict float", "0.0"], - 'Float zero as strict string' => [0.0, "strict string", "'0'"], - 'Float zero as strict datetime' => [0.0, "strict datetime", "'1970-01-01 00:00:00'"], - 'Float zero as strict boolean' => [0.0, "strict boolean", "0"], - 'ASCII string as integer' => ["Random string", "integer", "0"], - 'ASCII string as float' => ["Random string", "float", "0.0"], - 'ASCII string as string' => ["Random string", "string", "'Random string'"], - 'ASCII string as datetime' => ["Random string", "datetime", "null"], - 'ASCII string as boolean' => ["Random string", "boolean", "1"], - 'ASCII string as strict integer' => ["Random string", "strict integer", "0"], - 'ASCII string as strict float' => ["Random string", "strict float", "0.0"], - 'ASCII string as strict string' => ["Random string", "strict string", "'Random string'"], - 'ASCII string as strict datetime' => ["Random string", "strict datetime", "'0001-01-01 00:00:00'"], - 'ASCII string as strict boolean' => ["Random string", "strict boolean", "1"], - 'UTF-8 string as integer' => ["\u{e9}", "integer", "0"], - 'UTF-8 string as float' => ["\u{e9}", "float", "0.0"], - 'UTF-8 string as string' => ["\u{e9}", "string", "char(233)"], - 'UTF-8 string as datetime' => ["\u{e9}", "datetime", "null"], - 'UTF-8 string as boolean' => ["\u{e9}", "boolean", "1"], - 'UTF-8 string as strict integer' => ["\u{e9}", "strict integer", "0"], - 'UTF-8 string as strict float' => ["\u{e9}", "strict float", "0.0"], - 'UTF-8 string as strict string' => ["\u{e9}", "strict string", "char(233)"], - 'UTF-8 string as strict datetime' => ["\u{e9}", "strict datetime", "'0001-01-01 00:00:00'"], - 'UTF-8 string as strict boolean' => ["\u{e9}", "strict boolean", "1"], - 'ISO 8601 string as integer' => ["2017-01-09T13:11:17", "integer", "0"], - 'ISO 8601 string as float' => ["2017-01-09T13:11:17", "float", "0.0"], - 'ISO 8601 string as string' => ["2017-01-09T13:11:17", "string", "'2017-01-09T13:11:17'"], - 'ISO 8601 string as datetime' => ["2017-01-09T13:11:17", "datetime", "'2017-01-09 13:11:17'"], - 'ISO 8601 string as boolean' => ["2017-01-09T13:11:17", "boolean", "1"], - 'ISO 8601 string as strict integer' => ["2017-01-09T13:11:17", "strict integer", "0"], - 'ISO 8601 string as strict float' => ["2017-01-09T13:11:17", "strict float", "0.0"], - 'ISO 8601 string as strict string' => ["2017-01-09T13:11:17", "strict string", "'2017-01-09T13:11:17'"], - 'ISO 8601 string as strict datetime' => ["2017-01-09T13:11:17", "strict datetime", "'2017-01-09 13:11:17'"], - 'ISO 8601 string as strict boolean' => ["2017-01-09T13:11:17", "strict boolean", "1"], - 'Arbitrary date string as integer' => ["Today", "integer", "0"], - 'Arbitrary date string as float' => ["Today", "float", "0.0"], - 'Arbitrary date string as string' => ["Today", "string", "'Today'"], - 'Arbitrary date string as datetime' => ["Today", "datetime", "'".date_create("Today", new \DateTimezone("UTC"))->format("Y-m-d H:i:s")."'"], - 'Arbitrary date string as boolean' => ["Today", "boolean", "1"], - 'Arbitrary date string as strict integer' => ["Today", "strict integer", "0"], - 'Arbitrary date string as strict float' => ["Today", "strict float", "0.0"], - 'Arbitrary date string as strict string' => ["Today", "strict string", "'Today'"], + 'Null as integer' => [null, "integer", "null"], + 'Null as float' => [null, "float", "null"], + 'Null as string' => [null, "string", "null"], + 'Null as datetime' => [null, "datetime", "null"], + 'Null as boolean' => [null, "boolean", "null"], + 'Null as strict integer' => [null, "strict integer", "0"], + 'Null as strict float' => [null, "strict float", "0.0"], + 'Null as strict string' => [null, "strict string", "''"], + 'Null as strict datetime' => [null, "strict datetime", "'0001-01-01 00:00:00'"], + 'Null as strict boolean' => [null, "strict boolean", "0"], + 'True as integer' => [true, "integer", "1"], + 'True as float' => [true, "float", "1.0"], + 'True as string' => [true, "string", "'1'"], + 'True as datetime' => [true, "datetime", "null"], + 'True as boolean' => [true, "boolean", "1"], + 'True as strict integer' => [true, "strict integer", "1"], + 'True as strict float' => [true, "strict float", "1.0"], + 'True as strict string' => [true, "strict string", "'1'"], + 'True as strict datetime' => [true, "strict datetime", "'0001-01-01 00:00:00'"], + 'True as strict boolean' => [true, "strict boolean", "1"], + 'False as integer' => [false, "integer", "0"], + 'False as float' => [false, "float", "0.0"], + 'False as string' => [false, "string", "''"], + 'False as datetime' => [false, "datetime", "null"], + 'False as boolean' => [false, "boolean", "0"], + 'False as strict integer' => [false, "strict integer", "0"], + 'False as strict float' => [false, "strict float", "0.0"], + 'False as strict string' => [false, "strict string", "''"], + 'False as strict datetime' => [false, "strict datetime", "'0001-01-01 00:00:00'"], + 'False as strict boolean' => [false, "strict boolean", "0"], + 'Integer as integer' => [2112, "integer", "2112"], + 'Integer as float' => [2112, "float", "2112.0"], + 'Integer as string' => [2112, "string", "'2112'"], + 'Integer as datetime' => [2112, "datetime", "'1970-01-01 00:35:12'"], + 'Integer as boolean' => [2112, "boolean", "1"], + 'Integer as strict integer' => [2112, "strict integer", "2112"], + 'Integer as strict float' => [2112, "strict float", "2112.0"], + 'Integer as strict string' => [2112, "strict string", "'2112'"], + 'Integer as strict datetime' => [2112, "strict datetime", "'1970-01-01 00:35:12'"], + 'Integer as strict boolean' => [2112, "strict boolean", "1"], + 'Integer zero as integer' => [0, "integer", "0"], + 'Integer zero as float' => [0, "float", "0.0"], + 'Integer zero as string' => [0, "string", "'0'"], + 'Integer zero as datetime' => [0, "datetime", "'1970-01-01 00:00:00'"], + 'Integer zero as boolean' => [0, "boolean", "0"], + 'Integer zero as strict integer' => [0, "strict integer", "0"], + 'Integer zero as strict float' => [0, "strict float", "0.0"], + 'Integer zero as strict string' => [0, "strict string", "'0'"], + 'Integer zero as strict datetime' => [0, "strict datetime", "'1970-01-01 00:00:00'"], + 'Integer zero as strict boolean' => [0, "strict boolean", "0"], + 'Float as integer' => [2112.5, "integer", "2112"], + 'Float as float' => [2112.5, "float", "2112.5"], + 'Float as string' => [2112.5, "string", "'2112.5'"], + 'Float as datetime' => [2112.5, "datetime", "'1970-01-01 00:35:12'"], + 'Float as boolean' => [2112.5, "boolean", "1"], + 'Float as strict integer' => [2112.5, "strict integer", "2112"], + 'Float as strict float' => [2112.5, "strict float", "2112.5"], + 'Float as strict string' => [2112.5, "strict string", "'2112.5'"], + 'Float as strict datetime' => [2112.5, "strict datetime", "'1970-01-01 00:35:12'"], + 'Float as strict boolean' => [2112.5, "strict boolean", "1"], + 'Float zero as integer' => [0.0, "integer", "0"], + 'Float zero as float' => [0.0, "float", "0.0"], + 'Float zero as string' => [0.0, "string", "'0'"], + 'Float zero as datetime' => [0.0, "datetime", "'1970-01-01 00:00:00'"], + 'Float zero as boolean' => [0.0, "boolean", "0"], + 'Float zero as strict integer' => [0.0, "strict integer", "0"], + 'Float zero as strict float' => [0.0, "strict float", "0.0"], + 'Float zero as strict string' => [0.0, "strict string", "'0'"], + 'Float zero as strict datetime' => [0.0, "strict datetime", "'1970-01-01 00:00:00'"], + 'Float zero as strict boolean' => [0.0, "strict boolean", "0"], + 'ASCII string as integer' => ["Random string", "integer", "0"], + 'ASCII string as float' => ["Random string", "float", "0.0"], + 'ASCII string as string' => ["Random string", "string", "'Random string'"], + 'ASCII string as datetime' => ["Random string", "datetime", "null"], + 'ASCII string as boolean' => ["Random string", "boolean", "1"], + 'ASCII string as strict integer' => ["Random string", "strict integer", "0"], + 'ASCII string as strict float' => ["Random string", "strict float", "0.0"], + 'ASCII string as strict string' => ["Random string", "strict string", "'Random string'"], + 'ASCII string as strict datetime' => ["Random string", "strict datetime", "'0001-01-01 00:00:00'"], + 'ASCII string as strict boolean' => ["Random string", "strict boolean", "1"], + 'UTF-8 string as integer' => ["\u{e9}", "integer", "0"], + 'UTF-8 string as float' => ["\u{e9}", "float", "0.0"], + 'UTF-8 string as string' => ["\u{e9}", "string", "char(233)"], + 'UTF-8 string as datetime' => ["\u{e9}", "datetime", "null"], + 'UTF-8 string as boolean' => ["\u{e9}", "boolean", "1"], + 'UTF-8 string as strict integer' => ["\u{e9}", "strict integer", "0"], + 'UTF-8 string as strict float' => ["\u{e9}", "strict float", "0.0"], + 'UTF-8 string as strict string' => ["\u{e9}", "strict string", "char(233)"], + 'UTF-8 string as strict datetime' => ["\u{e9}", "strict datetime", "'0001-01-01 00:00:00'"], + 'UTF-8 string as strict boolean' => ["\u{e9}", "strict boolean", "1"], + 'ISO 8601 string as integer' => ["2017-01-09T13:11:17", "integer", "0"], + 'ISO 8601 string as float' => ["2017-01-09T13:11:17", "float", "0.0"], + 'ISO 8601 string as string' => ["2017-01-09T13:11:17", "string", "'2017-01-09T13:11:17'"], + 'ISO 8601 string as datetime' => ["2017-01-09T13:11:17", "datetime", "'2017-01-09 13:11:17'"], + 'ISO 8601 string as boolean' => ["2017-01-09T13:11:17", "boolean", "1"], + 'ISO 8601 string as strict integer' => ["2017-01-09T13:11:17", "strict integer", "0"], + 'ISO 8601 string as strict float' => ["2017-01-09T13:11:17", "strict float", "0.0"], + 'ISO 8601 string as strict string' => ["2017-01-09T13:11:17", "strict string", "'2017-01-09T13:11:17'"], + 'ISO 8601 string as strict datetime' => ["2017-01-09T13:11:17", "strict datetime", "'2017-01-09 13:11:17'"], + 'ISO 8601 string as strict boolean' => ["2017-01-09T13:11:17", "strict boolean", "1"], + 'Arbitrary date string as integer' => ["Today", "integer", "0"], + 'Arbitrary date string as float' => ["Today", "float", "0.0"], + 'Arbitrary date string as string' => ["Today", "string", "'Today'"], + 'Arbitrary date string as datetime' => ["Today", "datetime", "'".date_create("Today", new \DateTimezone("UTC"))->format("Y-m-d H:i:s")."'"], + 'Arbitrary date string as boolean' => ["Today", "boolean", "1"], + 'Arbitrary date string as strict integer' => ["Today", "strict integer", "0"], + 'Arbitrary date string as strict float' => ["Today", "strict float", "0.0"], + 'Arbitrary date string as strict string' => ["Today", "strict string", "'Today'"], 'Arbitrary date string as strict datetime' => ["Today", "strict datetime", "'".date_create("Today", new \DateTimezone("UTC"))->format("Y-m-d H:i:s")."'"], - 'Arbitrary date string as strict boolean' => ["Today", "strict boolean", "1"], - 'DateTime as integer' => [$dateMutable, "integer", (string) $dateUTC->getTimestamp()], - 'DateTime as float' => [$dateMutable, "float", $dateUTC->getTimestamp().".0"], - 'DateTime as string' => [$dateMutable, "string", "'".$dateUTC->format("Y-m-d H:i:s")."'"], - 'DateTime as datetime' => [$dateMutable, "datetime", "'".$dateUTC->format("Y-m-d H:i:s")."'"], - 'DateTime as boolean' => [$dateMutable, "boolean", "1"], - 'DateTime as strict integer' => [$dateMutable, "strict integer", (string) $dateUTC->getTimestamp()], - 'DateTime as strict float' => [$dateMutable, "strict float", $dateUTC->getTimestamp().".0"], - 'DateTime as strict string' => [$dateMutable, "strict string", "'".$dateUTC->format("Y-m-d H:i:s")."'"], - 'DateTime as strict datetime' => [$dateMutable, "strict datetime", "'".$dateUTC->format("Y-m-d H:i:s")."'"], - 'DateTime as strict boolean' => [$dateMutable, "strict boolean", "1"], - 'DateTimeImmutable as integer' => [$dateImmutable, "integer", (string) $dateUTC->getTimestamp()], - 'DateTimeImmutable as float' => [$dateImmutable, "float", $dateUTC->getTimestamp().".0"], - 'DateTimeImmutable as string' => [$dateImmutable, "string", "'".$dateUTC->format("Y-m-d H:i:s")."'"], - 'DateTimeImmutable as datetime' => [$dateImmutable, "datetime", "'".$dateUTC->format("Y-m-d H:i:s")."'"], - 'DateTimeImmutable as boolean' => [$dateImmutable, "boolean", "1"], - 'DateTimeImmutable as strict integer' => [$dateImmutable, "strict integer", (string) $dateUTC->getTimestamp()], - 'DateTimeImmutable as strict float' => [$dateImmutable, "strict float", $dateUTC->getTimestamp().".0"], - 'DateTimeImmutable as strict string' => [$dateImmutable, "strict string", "'".$dateUTC->format("Y-m-d H:i:s")."'"], - 'DateTimeImmutable as strict datetime' => [$dateImmutable, "strict datetime", "'".$dateUTC->format("Y-m-d H:i:s")."'"], - 'DateTimeImmutable as strict boolean' => [$dateImmutable, "strict boolean", "1"], + 'Arbitrary date string as strict boolean' => ["Today", "strict boolean", "1"], + 'DateTime as integer' => [$dateMutable, "integer", (string) $dateUTC->getTimestamp()], + 'DateTime as float' => [$dateMutable, "float", $dateUTC->getTimestamp().".0"], + 'DateTime as string' => [$dateMutable, "string", "'".$dateUTC->format("Y-m-d H:i:s")."'"], + 'DateTime as datetime' => [$dateMutable, "datetime", "'".$dateUTC->format("Y-m-d H:i:s")."'"], + 'DateTime as boolean' => [$dateMutable, "boolean", "1"], + 'DateTime as strict integer' => [$dateMutable, "strict integer", (string) $dateUTC->getTimestamp()], + 'DateTime as strict float' => [$dateMutable, "strict float", $dateUTC->getTimestamp().".0"], + 'DateTime as strict string' => [$dateMutable, "strict string", "'".$dateUTC->format("Y-m-d H:i:s")."'"], + 'DateTime as strict datetime' => [$dateMutable, "strict datetime", "'".$dateUTC->format("Y-m-d H:i:s")."'"], + 'DateTime as strict boolean' => [$dateMutable, "strict boolean", "1"], + 'DateTimeImmutable as integer' => [$dateImmutable, "integer", (string) $dateUTC->getTimestamp()], + 'DateTimeImmutable as float' => [$dateImmutable, "float", $dateUTC->getTimestamp().".0"], + 'DateTimeImmutable as string' => [$dateImmutable, "string", "'".$dateUTC->format("Y-m-d H:i:s")."'"], + 'DateTimeImmutable as datetime' => [$dateImmutable, "datetime", "'".$dateUTC->format("Y-m-d H:i:s")."'"], + 'DateTimeImmutable as boolean' => [$dateImmutable, "boolean", "1"], + 'DateTimeImmutable as strict integer' => [$dateImmutable, "strict integer", (string) $dateUTC->getTimestamp()], + 'DateTimeImmutable as strict float' => [$dateImmutable, "strict float", $dateUTC->getTimestamp().".0"], + 'DateTimeImmutable as strict string' => [$dateImmutable, "strict string", "'".$dateUTC->format("Y-m-d H:i:s")."'"], + 'DateTimeImmutable as strict datetime' => [$dateImmutable, "strict datetime", "'".$dateUTC->format("Y-m-d H:i:s")."'"], + 'DateTimeImmutable as strict boolean' => [$dateImmutable, "strict boolean", "1"], ]; - foreach ($tests as $index => list($value, $type, $exp)) { + foreach ($tests as $index => [$value, $type, $exp]) { $t = preg_replace("<^strict >", "", $type); $exp = ($exp === "null") ? $exp : $this->decorateTypeSyntax($exp, $t); yield $index => [$value, $type, $exp]; @@ -277,46 +277,46 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest { $dateImmutable = new \DateTimeImmutable("Noon Today", new \DateTimezone("America/Toronto")); $dateUTC = new \DateTime("@".$dateMutable->getTimestamp(), new \DateTimezone("UTC")); $tests = [ - 'Null as binary' => [null, "binary", "null"], - 'Null as strict binary' => [null, "strict binary", "x''"], - 'True as binary' => [true, "binary", "x'31'"], - 'True as strict binary' => [true, "strict binary", "x'31'"], - 'False as binary' => [false, "binary", "x''"], - 'False as strict binary' => [false, "strict binary", "x''"], - 'Integer as binary' => [2112, "binary", "x'32313132'"], - 'Integer as strict binary' => [2112, "strict binary", "x'32313132'"], - 'Integer zero as binary' => [0, "binary", "x'30'"], - 'Integer zero as strict binary' => [0, "strict binary", "x'30'"], - 'Float as binary' => [2112.5, "binary", "x'323131322e35'"], - 'Float as strict binary' => [2112.5, "strict binary", "x'323131322e35'"], - 'Float zero as binary' => [0.0, "binary", "x'30'"], - 'Float zero as strict binary' => [0.0, "strict binary", "x'30'"], - 'ASCII string as binary' => ["Random string", "binary", "x'52616e646f6d20737472696e67'"], - 'ASCII string as strict binary' => ["Random string", "strict binary", "x'52616e646f6d20737472696e67'"], - 'UTF-8 string as binary' => ["\u{e9}", "binary", "x'c3a9'"], - 'UTF-8 string as strict binary' => ["\u{e9}", "strict binary", "x'c3a9'"], - 'Binary string as integer' => [chr(233).chr(233), "integer", "0"], - 'Binary string as float' => [chr(233).chr(233), "float", "0.0"], - 'Binary string as string' => [chr(233).chr(233), "string", "'".chr(233).chr(233)."'"], - 'Binary string as binary' => [chr(233).chr(233), "binary", "x'e9e9'"], - 'Binary string as datetime' => [chr(233).chr(233), "datetime", "null"], - 'Binary string as boolean' => [chr(233).chr(233), "boolean", "1"], - 'Binary string as strict integer' => [chr(233).chr(233), "strict integer", "0"], - 'Binary string as strict float' => [chr(233).chr(233), "strict float", "0.0"], - 'Binary string as strict string' => [chr(233).chr(233), "strict string", "'".chr(233).chr(233)."'"], - 'Binary string as strict binary' => [chr(233).chr(233), "strict binary", "x'e9e9'"], - 'Binary string as strict datetime' => [chr(233).chr(233), "strict datetime", "'0001-01-01 00:00:00'"], - 'Binary string as strict boolean' => [chr(233).chr(233), "strict boolean", "1"], - 'ISO 8601 string as binary' => ["2017-01-09T13:11:17", "binary", "x'323031372d30312d30395431333a31313a3137'"], - 'ISO 8601 string as strict binary' => ["2017-01-09T13:11:17", "strict binary", "x'323031372d30312d30395431333a31313a3137'"], - 'Arbitrary date string as binary' => ["Today", "binary", "x'546f646179'"], + 'Null as binary' => [null, "binary", "null"], + 'Null as strict binary' => [null, "strict binary", "x''"], + 'True as binary' => [true, "binary", "x'31'"], + 'True as strict binary' => [true, "strict binary", "x'31'"], + 'False as binary' => [false, "binary", "x''"], + 'False as strict binary' => [false, "strict binary", "x''"], + 'Integer as binary' => [2112, "binary", "x'32313132'"], + 'Integer as strict binary' => [2112, "strict binary", "x'32313132'"], + 'Integer zero as binary' => [0, "binary", "x'30'"], + 'Integer zero as strict binary' => [0, "strict binary", "x'30'"], + 'Float as binary' => [2112.5, "binary", "x'323131322e35'"], + 'Float as strict binary' => [2112.5, "strict binary", "x'323131322e35'"], + 'Float zero as binary' => [0.0, "binary", "x'30'"], + 'Float zero as strict binary' => [0.0, "strict binary", "x'30'"], + 'ASCII string as binary' => ["Random string", "binary", "x'52616e646f6d20737472696e67'"], + 'ASCII string as strict binary' => ["Random string", "strict binary", "x'52616e646f6d20737472696e67'"], + 'UTF-8 string as binary' => ["\u{e9}", "binary", "x'c3a9'"], + 'UTF-8 string as strict binary' => ["\u{e9}", "strict binary", "x'c3a9'"], + 'Binary string as integer' => [chr(233).chr(233), "integer", "0"], + 'Binary string as float' => [chr(233).chr(233), "float", "0.0"], + 'Binary string as string' => [chr(233).chr(233), "string", "'".chr(233).chr(233)."'"], + 'Binary string as binary' => [chr(233).chr(233), "binary", "x'e9e9'"], + 'Binary string as datetime' => [chr(233).chr(233), "datetime", "null"], + 'Binary string as boolean' => [chr(233).chr(233), "boolean", "1"], + 'Binary string as strict integer' => [chr(233).chr(233), "strict integer", "0"], + 'Binary string as strict float' => [chr(233).chr(233), "strict float", "0.0"], + 'Binary string as strict string' => [chr(233).chr(233), "strict string", "'".chr(233).chr(233)."'"], + 'Binary string as strict binary' => [chr(233).chr(233), "strict binary", "x'e9e9'"], + 'Binary string as strict datetime' => [chr(233).chr(233), "strict datetime", "'0001-01-01 00:00:00'"], + 'Binary string as strict boolean' => [chr(233).chr(233), "strict boolean", "1"], + 'ISO 8601 string as binary' => ["2017-01-09T13:11:17", "binary", "x'323031372d30312d30395431333a31313a3137'"], + 'ISO 8601 string as strict binary' => ["2017-01-09T13:11:17", "strict binary", "x'323031372d30312d30395431333a31313a3137'"], + 'Arbitrary date string as binary' => ["Today", "binary", "x'546f646179'"], 'Arbitrary date string as strict binary' => ["Today", "strict binary", "x'546f646179'"], - 'DateTime as binary' => [$dateMutable, "binary", "x'".bin2hex($dateUTC->format("Y-m-d H:i:s"))."'"], - 'DateTime as strict binary' => [$dateMutable, "strict binary", "x'".bin2hex($dateUTC->format("Y-m-d H:i:s"))."'"], - 'DateTimeImmutable as binary' => [$dateImmutable, "binary", "x'".bin2hex($dateUTC->format("Y-m-d H:i:s"))."'"], - 'DateTimeImmutable as strict binary' => [$dateImmutable, "strict binary", "x'".bin2hex($dateUTC->format("Y-m-d H:i:s"))."'"], + 'DateTime as binary' => [$dateMutable, "binary", "x'".bin2hex($dateUTC->format("Y-m-d H:i:s"))."'"], + 'DateTime as strict binary' => [$dateMutable, "strict binary", "x'".bin2hex($dateUTC->format("Y-m-d H:i:s"))."'"], + 'DateTimeImmutable as binary' => [$dateImmutable, "binary", "x'".bin2hex($dateUTC->format("Y-m-d H:i:s"))."'"], + 'DateTimeImmutable as strict binary' => [$dateImmutable, "strict binary", "x'".bin2hex($dateUTC->format("Y-m-d H:i:s"))."'"], ]; - foreach ($tests as $index => list($value, $type, $exp)) { + foreach ($tests as $index => [$value, $type, $exp]) { $t = preg_replace("<^strict >", "", $type); $exp = ($exp === "null") ? $exp : $this->decorateTypeSyntax($exp, $t); yield $index => [$value, $type, $exp]; diff --git a/tests/cases/Db/BaseUpdate.php b/tests/cases/Db/BaseUpdate.php index 06db9db7..d5415134 100644 --- a/tests/cases/Db/BaseUpdate.php +++ b/tests/cases/Db/BaseUpdate.php @@ -24,7 +24,7 @@ class BaseUpdate extends \JKingWeb\Arsse\Test\AbstractTest { static::setConf(); static::$interface = static::dbInterface(); } - + public function setUp(): void { if (!static::$interface) { $this->markTestSkipped(static::$implementation." database driver not available"); diff --git a/tests/cases/Db/PostgreSQL/TestCreation.php b/tests/cases/Db/PostgreSQL/TestCreation.php index 7b3dd761..606dc8df 100644 --- a/tests/cases/Db/PostgreSQL/TestCreation.php +++ b/tests/cases/Db/PostgreSQL/TestCreation.php @@ -18,7 +18,7 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { $this->markTestSkipped("PostgreSQL extension not loaded"); } } - + /** @dataProvider provideConnectionStrings */ public function testGenerateConnectionString(bool $pdo, string $user, string $pass, string $db, string $host, int $port, string $service, string $exp): void { self::setConf(); diff --git a/tests/cases/Db/SQLite3/TestCreation.php b/tests/cases/Db/SQLite3/TestCreation.php index ecb942f3..1a4eef91 100644 --- a/tests/cases/Db/SQLite3/TestCreation.php +++ b/tests/cases/Db/SQLite3/TestCreation.php @@ -27,8 +27,8 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { $this->files = [ // cannot create files 'Cmain' => [], - 'Cshm' => [ - 'arsse.db' => "", + 'Cshm' => [ + 'arsse.db' => "", 'arsse.db-wal' => "", ], 'Cwal' => [ @@ -36,55 +36,55 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { ], // cannot write to files 'Wmain' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], 'Wwal' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], 'Wshm' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], // cannot read from files 'Rmain' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], 'Rwal' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], 'Rshm' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], // can neither read from or write to files 'Amain' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], 'Awal' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], 'Ashm' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], // non-filesystem errors 'corrupt' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], diff --git a/tests/cases/Db/SQLite3PDO/TestCreation.php b/tests/cases/Db/SQLite3PDO/TestCreation.php index 50e2fe25..3b28cd50 100644 --- a/tests/cases/Db/SQLite3PDO/TestCreation.php +++ b/tests/cases/Db/SQLite3PDO/TestCreation.php @@ -29,8 +29,8 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { $this->files = [ // cannot create files 'Cmain' => [], - 'Cshm' => [ - 'arsse.db' => "", + 'Cshm' => [ + 'arsse.db' => "", 'arsse.db-wal' => "", ], 'Cwal' => [ @@ -38,55 +38,55 @@ class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { ], // cannot write to files 'Wmain' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], 'Wwal' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], 'Wshm' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], // cannot read from files 'Rmain' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], 'Rwal' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], 'Rshm' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], // can neither read from or write to files 'Amain' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], 'Awal' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], 'Ashm' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], // non-filesystem errors 'corrupt' => [ - 'arsse.db' => "", + 'arsse.db' => "", 'arsse.db-wal' => "", 'arsse.db-shm' => "", ], diff --git a/tests/cases/Feed/TestException.php b/tests/cases/Feed/TestException.php index 8cb0f49f..95adde1d 100644 --- a/tests/cases/Feed/TestException.php +++ b/tests/cases/Feed/TestException.php @@ -130,7 +130,7 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest { 408 => "timeout", 410 => "invalidUrl", 414 => "invalidUrl", - 451 => "invalidUrl" + 451 => "invalidUrl", ]; $out = array_fill(400, (600 - 400), "transmissionError"); foreach ($specials as $k => $t) { diff --git a/tests/cases/Feed/TestFeed.php b/tests/cases/Feed/TestFeed.php index c419100e..01f4f5f1 100644 --- a/tests/cases/Feed/TestFeed.php +++ b/tests/cases/Feed/TestFeed.php @@ -20,69 +20,69 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { protected $base = ""; protected $latest = [ [ - 'id' => 1, - 'edited' => '2000-01-01 00:00:00', - 'guid' => 'e433653cef2e572eee4215fa299a4a5af9137b2cefd6283c85bd69a32915beda', - 'url_title_hash' => 'f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6', - 'url_content_hash' => 'fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4', + 'id' => 1, + 'edited' => '2000-01-01 00:00:00', + 'guid' => 'e433653cef2e572eee4215fa299a4a5af9137b2cefd6283c85bd69a32915beda', + 'url_title_hash' => 'f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6', + 'url_content_hash' => 'fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4', 'title_content_hash' => '18fdd4fa93d693128c43b004399e5c9cea6c261ddfa002518d3669f55d8c2207', ], [ - 'id' => 2, - 'edited' => '2000-01-02 00:00:00', - 'guid' => '5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7', - 'url_title_hash' => '0e86d2de822a174fe3c44a466953e63ca1f1a58a19cbf475fce0855d4e3d5153', - 'url_content_hash' => '13075894189c47ffcfafd1dfe7fbb539f7c74a69d35a399b3abf8518952714f9', + 'id' => 2, + 'edited' => '2000-01-02 00:00:00', + 'guid' => '5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7', + 'url_title_hash' => '0e86d2de822a174fe3c44a466953e63ca1f1a58a19cbf475fce0855d4e3d5153', + 'url_content_hash' => '13075894189c47ffcfafd1dfe7fbb539f7c74a69d35a399b3abf8518952714f9', 'title_content_hash' => '2abd0a8cba83b8214a66c8f0293ba63e467d720540e29ff8ddcdab069d4f1c9e', ], [ - 'id' => 3, - 'edited' => '2000-01-03 00:00:00', - 'guid' => '31a6594500a48b59fcc8a075ce82b946c9c3c782460d088bd7b8ef3ede97ad92', - 'url_title_hash' => 'f74b06b240bd08abf4d3fdfc20dba6a6f6eb8b4f1a00e9a617efd63a87180a4b', - 'url_content_hash' => 'b278380e984cefe63f0e412b88ffc9cb0befdfa06fdc00bace1da99a8daff406', + 'id' => 3, + 'edited' => '2000-01-03 00:00:00', + 'guid' => '31a6594500a48b59fcc8a075ce82b946c9c3c782460d088bd7b8ef3ede97ad92', + 'url_title_hash' => 'f74b06b240bd08abf4d3fdfc20dba6a6f6eb8b4f1a00e9a617efd63a87180a4b', + 'url_content_hash' => 'b278380e984cefe63f0e412b88ffc9cb0befdfa06fdc00bace1da99a8daff406', 'title_content_hash' => 'ad622b31e739cd3a3f3c788991082cf4d2f7a8773773008e75f0572e58cd373b', ], [ - 'id' => 4, - 'edited' => '2000-01-04 00:00:00', - 'guid' => '804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180', - 'url_title_hash' => 'f3615c7f16336d3ea242d35cf3fc17dbc4ee3afb78376bf49da2dd7a5a25dec8', - 'url_content_hash' => 'f11c2b4046f207579aeb9c69a8c20ca5461cef49756ccfa5ba5e2344266da3b3', + 'id' => 4, + 'edited' => '2000-01-04 00:00:00', + 'guid' => '804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180', + 'url_title_hash' => 'f3615c7f16336d3ea242d35cf3fc17dbc4ee3afb78376bf49da2dd7a5a25dec8', + 'url_content_hash' => 'f11c2b4046f207579aeb9c69a8c20ca5461cef49756ccfa5ba5e2344266da3b3', 'title_content_hash' => 'ab2da63276acce431250b18d3d49b988b226a99c7faadf275c90b751aee05be9', ], [ - 'id' => 5, - 'edited' => '2000-01-05 00:00:00', - 'guid' => 'db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41', - 'url_title_hash' => 'd40da96e39eea6c55948ccbe9b3d275b5f931298288dbe953990c5f496097022', - 'url_content_hash' => '834240f84501b5341d375414718204ec421561f3825d34c22bf9182203e42900', + 'id' => 5, + 'edited' => '2000-01-05 00:00:00', + 'guid' => 'db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41', + 'url_title_hash' => 'd40da96e39eea6c55948ccbe9b3d275b5f931298288dbe953990c5f496097022', + 'url_content_hash' => '834240f84501b5341d375414718204ec421561f3825d34c22bf9182203e42900', 'title_content_hash' => '43b970ac6ec5f8a9647b2c7e4eed8b1d7f62e154a95eed748b0294c1256764ba', ], ]; protected $others = [ [ - 'id' => 6, - 'edited' => '2000-01-06 00:00:00', - 'guid' => 'b3461ab8e8759eeb1d65a818c65051ec00c1dfbbb32a3c8f6999434e3e3b76ab', - 'url_title_hash' => '91d051a8e6749d014506848acd45e959af50bf876427c4f0e3a1ec0f04777b51', - 'url_content_hash' => '211d78b1a040d40d17e747a363cc283f58767b2e502630d8de9b8f1d5e941d18', + 'id' => 6, + 'edited' => '2000-01-06 00:00:00', + 'guid' => 'b3461ab8e8759eeb1d65a818c65051ec00c1dfbbb32a3c8f6999434e3e3b76ab', + 'url_title_hash' => '91d051a8e6749d014506848acd45e959af50bf876427c4f0e3a1ec0f04777b51', + 'url_content_hash' => '211d78b1a040d40d17e747a363cc283f58767b2e502630d8de9b8f1d5e941d18', 'title_content_hash' => '5ed68ccb64243b8c1931241d2c9276274c3b1d87f223634aa7a1ab0141292ca7', ], [ - 'id' => 7, - 'edited' => '2000-01-07 00:00:00', - 'guid' => 'f4fae999d6531747523f4ff0c74f3f0c7c588b67e4f32d8f7dba5f6f36e8a45d', - 'url_title_hash' => 'b92f805f0d0643dad1d6c0bb5cbaec24729f5f71b37b831cf7ad31f6c9403ac8', - 'url_content_hash' => '4fc8789b787246e9be08ca1bac0d4a1ac4db1984f0db07f7142417598cf7211f', + 'id' => 7, + 'edited' => '2000-01-07 00:00:00', + 'guid' => 'f4fae999d6531747523f4ff0c74f3f0c7c588b67e4f32d8f7dba5f6f36e8a45d', + 'url_title_hash' => 'b92f805f0d0643dad1d6c0bb5cbaec24729f5f71b37b831cf7ad31f6c9403ac8', + 'url_content_hash' => '4fc8789b787246e9be08ca1bac0d4a1ac4db1984f0db07f7142417598cf7211f', 'title_content_hash' => '491df9338740b5297b3a3e8292be992ac112eb676c34595f7a38f3ee646ffe84', ], [ - 'id' => 8, - 'edited' => '2000-01-08 00:00:00', - 'guid' => 'b9d2d58e3172096b1d23b42a59961fabc89962836c3cd5de54f3d3a98ff08e6c', - 'url_title_hash' => '53a6cbcfeb66b46d09cbb7b25035df0562da35786933319c83b04be29acfb6f4', - 'url_content_hash' => 'c6f3722b4445b49d19d39c3bf5b11a7cf23dd69873e2a0a458aab662f1cd9438', + 'id' => 8, + 'edited' => '2000-01-08 00:00:00', + 'guid' => 'b9d2d58e3172096b1d23b42a59961fabc89962836c3cd5de54f3d3a98ff08e6c', + 'url_title_hash' => '53a6cbcfeb66b46d09cbb7b25035df0562da35786933319c83b04be29acfb6f4', + 'url_content_hash' => 'c6f3722b4445b49d19d39c3bf5b11a7cf23dd69873e2a0a458aab662f1cd9438', 'title_content_hash' => '607d2da48807ca984ce2a9faa1d291bd9e3de9e912f83306167f4f5cd3c23bbd', ], ]; @@ -209,10 +209,10 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { public function provide304ResponseURLs() { return [ - 'Control' => ["Caching/304Conditional"], - 'Random last-mod and ETag' => ["Caching/304Random"], - 'ETag only' => ["Caching/304ETagOnly"], - 'Last-mod only' => ["Caching/304LastModOnly"], + 'Control' => ["Caching/304Conditional"], + 'Random last-mod and ETag' => ["Caching/304Random"], + 'ETag only' => ["Caching/304ETagOnly"], + 'Last-mod only' => ["Caching/304LastModOnly"], 'Neither last-mod nor ETag' => ["Caching/304None"], ]; } @@ -267,16 +267,16 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest { public function provide304Timestamps(): iterable { return [ - 'less than half an hour 1' => ["now", "now + 15 minutes"], - 'less than half an hour 2' => ["now - 29 minutes", "now + 15 minutes"], - 'less than one hour 1' => ["now - 30 minutes", "now + 30 minutes"], - 'less than one hour 2' => ["now - 59 minutes", "now + 30 minutes"], - 'less than three hours 1' => ["now - 1 hour", "now + 1 hour"], - 'less than three hours 2' => ["now - 2 hours 59 minutes", "now + 1 hour"], + 'less than half an hour 1' => ["now", "now + 15 minutes"], + 'less than half an hour 2' => ["now - 29 minutes", "now + 15 minutes"], + 'less than one hour 1' => ["now - 30 minutes", "now + 30 minutes"], + 'less than one hour 2' => ["now - 59 minutes", "now + 30 minutes"], + 'less than three hours 1' => ["now - 1 hour", "now + 1 hour"], + 'less than three hours 2' => ["now - 2 hours 59 minutes", "now + 1 hour"], 'more than thirty-six hours 1' => ["now - 36 hours", "now + 1 day"], 'more than thirty-six hours 2' => ["now - 2 years", "now + 1 day"], - 'fallback 1' => ["now - 3 hours", "now + 3 hours"], - 'fallback 2' => ["now - 35 hours", "now + 3 hours"], + 'fallback 1' => ["now - 3 hours", "now + 3 hours"], + 'fallback 2' => ["now - 35 hours", "now + 3 hours"], ]; } diff --git a/tests/cases/ImportExport/TestImportExport.php b/tests/cases/ImportExport/TestImportExport.php index ee8830c3..4d3fef30 100644 --- a/tests/cases/ImportExport/TestImportExport.php +++ b/tests/cases/ImportExport/TestImportExport.php @@ -117,9 +117,9 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { ], 'arsse_tag_members' => [ 'columns' => [ - 'tag' => "int", + 'tag' => "int", 'subscription' => "int", - 'assigned' => "bool", + 'assigned' => "bool", ], 'rows' => [ [1, 2, 1], @@ -181,7 +181,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { ['url' => "http://localhost:8000/Import/citizen", 'title' => "Ottawa Citizen", 'folder' => 6, 'tags' => ["news", "canada"]], ['url' => "http://localhost:8000/Import/eurogamer", 'title' => "Eurogamer", 'folder' => 0, 'tags' => ["gaming", "frequent"]], ['url' => "http://localhost:8000/Import/cbc", 'title' => "CBC News", 'folder' => 6, 'tags' => ["news", "canada"]], - ], [1 => + ], [1 => ['id' => 1, 'name' => "Photography", 'parent' => 0], ['id' => 2, 'name' => "Science", 'parent' => 0], ['id' => 3, 'name' => "Rocketry", 'parent' => 2], @@ -205,7 +205,7 @@ class TestImportExport extends \JKingWeb\Arsse\Test\AbstractTest { ['url' => "http://localhost:8000/Import/citizen", 'title' => "Ottawa Citizen", 'folder' => 6, 'tags' => ["news", "canada"]], ['url' => "http://localhost:8000/Import/eurogamer", 'title' => "Eurogamer", 'folder' => 0, 'tags' => ["gaming", "frequent"]], ['url' => "http://localhost:8000/Import/cbc", 'title' => "CBC", 'folder' => 0, 'tags' => ["news", "canada"]], // moved to root and renamed - ], [1 => + ], [1 => ['id' => 1, 'name' => "Photography", 'parent' => 0], ['id' => 2, 'name' => "Science", 'parent' => 0], ['id' => 3, 'name' => "Rocketry", 'parent' => 2], diff --git a/tests/cases/ImportExport/TestOPML.php b/tests/cases/ImportExport/TestOPML.php index 234d6b5c..1e65fa1e 100644 --- a/tests/cases/ImportExport/TestOPML.php +++ b/tests/cases/ImportExport/TestOPML.php @@ -152,7 +152,7 @@ OPML_EXPORT_SERIALIZATION; ['url' => "https://www.thestar.com/content/thestar/feed.RSSManagerServlet.topstories.rss", 'title' => "Toronto Star", 'folder' => 5, 'tags' => ["news", "canada", "toronto"]], ['url' => "http://rss.canada.com/get/?F239", 'title' => "Ottawa Citizen", 'folder' => 6, 'tags' => ["news", "canada"]], ['url' => "https://www.eurogamer.net/?format=rss", 'title' => "Eurogamer", 'folder' => 0, 'tags' => ["gaming", "frequent"]], - ], [1 => + ], [1 => ['id' => 1, 'name' => "Photography", 'parent' => 0], ['id' => 2, 'name' => "Science", 'parent' => 0], ['id' => 3, 'name' => "Rocketry", 'parent' => 2], diff --git a/tests/cases/Misc/TestContext.php b/tests/cases/Misc/TestContext.php index b4f51c5c..037ca8e1 100644 --- a/tests/cases/Misc/TestContext.php +++ b/tests/cases/Misc/TestContext.php @@ -25,44 +25,44 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { public function testSetContextOptions(): void { $v = [ - 'reverse' => true, - 'limit' => 10, - 'offset' => 5, - 'folder' => 42, - 'folders' => [12,22], - 'folderShallow' => 42, - 'foldersShallow' => [0,1], - 'tag' => 44, - 'tags' => [44, 2112], - 'tagName' => "XLIV", - 'tagNames' => ["XLIV", "MMCXII"], - 'subscription' => 2112, - 'subscriptions' => [44, 2112], - 'article' => 255, - 'edition' => 65535, - 'latestArticle' => 47, - 'oldestArticle' => 1337, - 'latestEdition' => 47, - 'oldestEdition' => 1337, - 'unread' => true, - 'starred' => true, - 'modifiedSince' => new \DateTime(), + 'reverse' => true, + 'limit' => 10, + 'offset' => 5, + 'folder' => 42, + 'folders' => [12,22], + 'folderShallow' => 42, + 'foldersShallow' => [0,1], + 'tag' => 44, + 'tags' => [44, 2112], + 'tagName' => "XLIV", + 'tagNames' => ["XLIV", "MMCXII"], + 'subscription' => 2112, + 'subscriptions' => [44, 2112], + 'article' => 255, + 'edition' => 65535, + 'latestArticle' => 47, + 'oldestArticle' => 1337, + 'latestEdition' => 47, + 'oldestEdition' => 1337, + 'unread' => true, + 'starred' => true, + 'modifiedSince' => new \DateTime(), 'notModifiedSince' => new \DateTime(), - 'markedSince' => new \DateTime(), - 'notMarkedSince' => new \DateTime(), - 'editions' => [1,2], - 'articles' => [1,2], - 'label' => 2112, - 'labels' => [2112, 1984], - 'labelName' => "Rush", - 'labelNames' => ["Rush", "Orwell"], - 'labelled' => true, - 'annotated' => true, - 'searchTerms' => ["foo", "bar"], - 'annotationTerms' => ["foo", "bar"], - 'titleTerms' => ["foo", "bar"], - 'authorTerms' => ["foo", "bar"], - 'not' => (new Context)->subscription(5), + 'markedSince' => new \DateTime(), + 'notMarkedSince' => new \DateTime(), + 'editions' => [1,2], + 'articles' => [1,2], + 'label' => 2112, + 'labels' => [2112, 1984], + 'labelName' => "Rush", + 'labelNames' => ["Rush", "Orwell"], + 'labelled' => true, + 'annotated' => true, + 'searchTerms' => ["foo", "bar"], + 'annotationTerms' => ["foo", "bar"], + 'titleTerms' => ["foo", "bar"], + 'authorTerms' => ["foo", "bar"], + 'not' => (new Context)->subscription(5), ]; $times = ['modifiedSince','notModifiedSince','markedSince','notMarkedSince']; $c = new Context; diff --git a/tests/cases/Misc/TestHTTP.php b/tests/cases/Misc/TestHTTP.php index 04199d10..9bffe073 100644 --- a/tests/cases/Misc/TestHTTP.php +++ b/tests/cases/Misc/TestHTTP.php @@ -7,7 +7,6 @@ declare(strict_types=1); namespace JKingWeb\Arsse\TestCase\Misc; use JKingWeb\Arsse\Misc\HTTP; -use Psr\Http\Message\ResponseInterface; /** @covers \JKingWeb\Arsse\Misc\HTTP */ class TestHTTP extends \JKingWeb\Arsse\Test\AbstractTest { diff --git a/tests/cases/Misc/TestQuery.php b/tests/cases/Misc/TestQuery.php index 7d94f90d..db8a6295 100644 --- a/tests/cases/Misc/TestQuery.php +++ b/tests/cases/Misc/TestQuery.php @@ -7,7 +7,6 @@ declare(strict_types=1); namespace JKingWeb\Arsse\TestCase\Misc; use JKingWeb\Arsse\Misc\Query; -use JKingWeb\Arsse\Misc\ValueInfo; /** @covers \JKingWeb\Arsse\Misc\Query */ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { diff --git a/tests/cases/Misc/TestURL.php b/tests/cases/Misc/TestURL.php index 46f5886a..52bafa42 100644 --- a/tests/cases/Misc/TestURL.php +++ b/tests/cases/Misc/TestURL.php @@ -13,7 +13,7 @@ class TestURL extends \JKingWeb\Arsse\Test\AbstractTest { public function setUp(): void { self::clearData(); } - + /** @dataProvider provideNormalizations */ public function testNormalizeAUrl(string $url, string $exp, string $user = null, string $pass = null): void { $this->assertSame($exp, URL::normalize($url, $user, $pass)); diff --git a/tests/cases/Misc/TestValueInfo.php b/tests/cases/Misc/TestValueInfo.php index a35040b6..6a4c6ba0 100644 --- a/tests/cases/Misc/TestValueInfo.php +++ b/tests/cases/Misc/TestValueInfo.php @@ -87,7 +87,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { [" 1 ", I::VALID], ]; foreach ($tests as $test) { - list($value, $exp) = $test; + [$value, $exp] = $test; $this->assertSame($exp, I::int($value), "Test returned ".decbin(I::int($value))." for value: ".var_export($value, true)); } } @@ -157,7 +157,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { [new StrClass(" "), I::VALID | I::WHITE], ]; foreach ($tests as $test) { - list($value, $exp) = $test; + [$value, $exp] = $test; $this->assertSame($exp, I::str($value), "Test returned ".decbin(I::str($value))." for value: ".var_export($value, true)); } } @@ -228,7 +228,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { [new StrClass(" "), false, false], ]; foreach ($tests as $test) { - list($value, $exp, $expNull) = $test; + [$value, $exp, $expNull] = $test; $this->assertSame($exp, I::id($value), "Non-null test failed for value: ".var_export($value, true)); $this->assertSame($expNull, I::id($value, true), "Null test failed for value: ".var_export($value, true)); } @@ -300,7 +300,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { [new StrClass(" "), null], ]; foreach ($tests as $test) { - list($value, $exp) = $test; + [$value, $exp] = $test; $this->assertSame($exp, I::bool($value), "Null Test failed for value: ".var_export($value, true)); if (is_null($exp)) { $this->assertTrue(I::bool($value, true), "True Test failed for value: ".var_export($value, true)); @@ -400,14 +400,14 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { public function testNormalizeComplexValues(): void { // Array-mode tests $tests = [ - [I::T_INT | I::M_DROP, [1, 2, 2.2, 3], [1,2,null,3] ], + [I::T_INT | I::M_DROP, [1, 2, 2.2, 3], [1,2,null,3] ], [I::T_INT, [1, 2, 2.2, 3], [1,2,2,3] ], - [I::T_INT | I::M_DROP, new Result([1, 2, 2.2, 3]), [1,2,null,3] ], + [I::T_INT | I::M_DROP, new Result([1, 2, 2.2, 3]), [1,2,null,3] ], [I::T_INT, new Result([1, 2, 2.2, 3]), [1,2,2,3] ], [I::T_STRING | I::M_STRICT, "Bare string", ["Bare string"]], ]; foreach ($tests as $index => $test) { - list($type, $value, $exp) = $test; + [$type, $value, $exp] = $test; $this->assertEquals($exp, I::normalize($value, $type | I::M_ARRAY, "iso8601"), "Failed test #$index"); } // Date-to-string format tests @@ -525,15 +525,15 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { [$this->d("2010-01-01T00:00:00", 0, 1), [null,true], [true, false], [1262304000, false], [1262304000.0, false], ["2010-01-01T00:00:00Z",true], [[$this->d("2010-01-01T00:00:00", 0, 1)],false], [null, false]], [$this->d("2010-01-01T00:00:00", 1, 0), [null,true], [true, false], [1262322000, false], [1262322000.0, false], ["2010-01-01T05:00:00Z",true], [[$this->d("2010-01-01T00:00:00", 1, 0)],false], [null, false]], [$this->d("2010-01-01T00:00:00", 1, 1), [null,true], [true, false], [1262322000, false], [1262322000.0, false], ["2010-01-01T05:00:00Z",true], [[$this->d("2010-01-01T00:00:00", 1, 1)],false], [null, false]], - [1e14, [null,true], [true, false], [pow(10, 14), true], [1e14, true], ["100000000000000", true], [[1e14], false], [$this->i("P1157407407DT9H46M40S"), false]], + [1e14, [null,true], [true, false], [10 ** 14, true], [1e14, true], ["100000000000000", true], [[1e14], false], [$this->i("P1157407407DT9H46M40S"), false]], [1e-6, [null,true], [true, false], [0, false], [1e-6, true], ["0.000001", true], [[1e-6], false], [$this->i("PT0S", 1e-6), false]], [[1,2,3], [null,true], [true, false], [0, false], [0.0, false], ["", false], [[1,2,3], true], [null, false]], - [['a'=>1,'b'=>2], [null,true], [true, false], [0, false], [0.0, false], ["", false], [['a'=>1,'b'=>2], true], [null, false]], - [new Result([['a'=>1,'b'=>2]]), [null,true], [true, false], [0, false], [0.0, false], ["", false], [[['a'=>1,'b'=>2]], true], [null, false]], - [$this->i("PT1H"), [null,true], [true, false], [60*60, false], [60.0*60.0, false], ["PT1H", true], [[$this->i("PT1H")], false], [$this->i("PT1H"), true]], - [$this->i("P2DT1H"), [null,true], [true, false], [(48+1)*60*60, false], [1.0*(48+1)*60*60, false], ["P2DT1H", true], [[$this->i("P2DT1H")], false], [$this->i("P2DT1H"), true]], + [['a' => 1,'b' => 2], [null,true], [true, false], [0, false], [0.0, false], ["", false], [['a' => 1,'b' => 2], true], [null, false]], + [new Result([['a' => 1,'b' => 2]]), [null,true], [true, false], [0, false], [0.0, false], ["", false], [[['a' => 1,'b' => 2]], true], [null, false]], + [$this->i("PT1H"), [null,true], [true, false], [60 * 60, false], [60.0 * 60.0, false], ["PT1H", true], [[$this->i("PT1H")], false], [$this->i("PT1H"), true]], + [$this->i("P2DT1H"), [null,true], [true, false], [(48 + 1) * 60 * 60, false], [1.0 * (48 + 1) * 60 * 60, false], ["P2DT1H", true], [[$this->i("P2DT1H")], false], [$this->i("P2DT1H"), true]], [$this->i("PT0H"), [null,true], [true, false], [0, false], [0.0, false], ["PT0S", true], [[$this->i("PT0H")], false], [$this->i("PT0H"), true]], - [$dateDiff, [null,true], [true, false], [366*24*60*60, false], [1.0*366*24*60*60, false], ["P366D", true], [[$dateDiff], false], [$dateNorm, true]], + [$dateDiff, [null,true], [true, false], [366 * 24 * 60 * 60, false], [1.0 * 366 * 24 * 60 * 60, false], ["P366D", true], [[$dateDiff], false], [$dateNorm, true]], ["1 year, 2 days", [null,true], [true, false], [0, false], [0.0, false], ["1 year, 2 days", true], [["1 year, 2 days"], false], [$this->i("P1Y2D"), false]], ["P1Y2D", [null,true], [true, false], [0, false], [0.0, false], ["P1Y2D", true], [["P1Y2D"], false], [$this->i("P1Y2D"), true]], ] as $set) { @@ -542,14 +542,14 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { // shift a mixed-type passthrough test onto the set array_unshift($set, [$input, true]); // generate a set of tests for each target data type - foreach ($set as $type => list($exp, $pass)) { + foreach ($set as $type => [$exp, $pass]) { // emit one test each for loose mode, strict mode, drop mode, and strict+drop mode foreach ([ [false, false], [true, false], [false, true], [true, true], - ] as list($strict, $drop)) { + ] as [$strict, $drop]) { yield [$input, $types[$type], $exp, $pass, $strict, $drop]; } } @@ -572,37 +572,37 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { ]; foreach ([ /* Input value microtime iso8601 iso8601m http sql date time unix float '!M j, Y (D)' *strtotime* (null) */ - [null, null, null, null, null, null, null, null, null, null, null, null, ], - [INF, null, null, null, null, null, null, null, null, null, null, null, ], - [NAN, null, null, null, null, null, null, null, null, null, null, null, ], - [$this->d("2010-01-01T00:00:00", 0, 0), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), ], - [$this->d("2010-01-01T00:00:00", 0, 1), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), ], - [$this->d("2010-01-01T00:00:00", 1, 0), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), ], - [$this->d("2010-01-01T00:00:00", 1, 1), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), ], - [1262304000, $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), ], - [1262304000.123456, $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), ], - [1262304000.42, $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), ], - ["0.12345600 1262304000", $this->t(1262304000.123456), null, null, null, null, null, null, null, null, null, null, ], - ["0.42 1262304000", null, null, null, null, null, null, null, null, null, null, null, ], - ["2010-01-01T00:00:00", null, $this->t(1262304000), $this->t(1262304000), null, null, null, null, null, null, null, $this->t(1262304000), ], - ["2010-01-01T00:00:00Z", null, $this->t(1262304000), $this->t(1262304000), null, null, null, null, null, null, null, $this->t(1262304000), ], - ["2010-01-01T00:00:00+0000", null, $this->t(1262304000), $this->t(1262304000), null, null, null, null, null, null, null, $this->t(1262304000), ], - ["2010-01-01T00:00:00-0000", null, $this->t(1262304000), $this->t(1262304000), null, null, null, null, null, null, null, $this->t(1262304000), ], - ["2010-01-01T00:00:00+00:00", null, $this->t(1262304000), $this->t(1262304000), null, null, null, null, null, null, null, $this->t(1262304000), ], - ["2010-01-01T00:00:00-05:00", null, $this->t(1262322000), $this->t(1262322000), null, null, null, null, null, null, null, $this->t(1262322000), ], - ["2010-01-01T00:00:00.123456Z", null, null, $this->t(1262304000.123456), null, null, null, null, null, null, null, $this->t(1262304000.123456), ], - ["Fri, 01 Jan 2010 00:00:00 GMT", null, null, null, $this->t(1262304000), null, null, null, null, null, null, $this->t(1262304000), ], - ["2010-01-01 00:00:00", null, null, null, null, $this->t(1262304000), null, null, null, null, null, $this->t(1262304000), ], - ["2010-01-01", null, null, null, null, null, $this->t(1262304000), null, null, null, null, $this->t(1262304000), ], - ["12:34:56", null, null, null, null, null, null, $this->t(45296), null, null, null, $this->t(date_create("today", new \DateTimezone("UTC"))->getTimestamp()+45296), ], - ["1262304000", null, null, null, null, null, null, null, $this->t(1262304000), null, null, null, ], - ["1262304000.123456", null, null, null, null, null, null, null, null, $this->t(1262304000.123456), null, null, ], - ["1262304000.42", null, null, null, null, null, null, null, null, $this->t(1262304000.42), null, null, ], - ["Jan 1, 2010 (Fri)", null, null, null, null, null, null, null, null, null, $this->t(1262304000), null, ], - ["First day of Jan 2010 12AM", null, null, null, null, null, null, null, null, null, null, $this->t(1262304000), ], - [[], null, null, null, null, null, null, null, null, null, null, null, ], - [$this->i("P1Y2D"), null, null, null, null, null, null, null, null, null, null, null, ], - ["P1Y2D", null, null, null, null, null, null, null, null, null, null, null, ], + [null, null, null, null, null, null, null, null, null, null, null, null], + [INF, null, null, null, null, null, null, null, null, null, null, null], + [NAN, null, null, null, null, null, null, null, null, null, null, null], + [$this->d("2010-01-01T00:00:00", 0, 0), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000)], + [$this->d("2010-01-01T00:00:00", 0, 1), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000)], + [$this->d("2010-01-01T00:00:00", 1, 0), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000)], + [$this->d("2010-01-01T00:00:00", 1, 1), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000), $this->t(1262322000)], + [1262304000, $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000), $this->t(1262304000)], + [1262304000.123456, $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456), $this->t(1262304000.123456)], + [1262304000.42, $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42), $this->t(1262304000.42)], + ["0.12345600 1262304000", $this->t(1262304000.123456), null, null, null, null, null, null, null, null, null, null], + ["0.42 1262304000", null, null, null, null, null, null, null, null, null, null, null], + ["2010-01-01T00:00:00", null, $this->t(1262304000), $this->t(1262304000), null, null, null, null, null, null, null, $this->t(1262304000)], + ["2010-01-01T00:00:00Z", null, $this->t(1262304000), $this->t(1262304000), null, null, null, null, null, null, null, $this->t(1262304000)], + ["2010-01-01T00:00:00+0000", null, $this->t(1262304000), $this->t(1262304000), null, null, null, null, null, null, null, $this->t(1262304000)], + ["2010-01-01T00:00:00-0000", null, $this->t(1262304000), $this->t(1262304000), null, null, null, null, null, null, null, $this->t(1262304000)], + ["2010-01-01T00:00:00+00:00", null, $this->t(1262304000), $this->t(1262304000), null, null, null, null, null, null, null, $this->t(1262304000)], + ["2010-01-01T00:00:00-05:00", null, $this->t(1262322000), $this->t(1262322000), null, null, null, null, null, null, null, $this->t(1262322000)], + ["2010-01-01T00:00:00.123456Z", null, null, $this->t(1262304000.123456), null, null, null, null, null, null, null, $this->t(1262304000.123456)], + ["Fri, 01 Jan 2010 00:00:00 GMT", null, null, null, $this->t(1262304000), null, null, null, null, null, null, $this->t(1262304000)], + ["2010-01-01 00:00:00", null, null, null, null, $this->t(1262304000), null, null, null, null, null, $this->t(1262304000)], + ["2010-01-01", null, null, null, null, null, $this->t(1262304000), null, null, null, null, $this->t(1262304000)], + ["12:34:56", null, null, null, null, null, null, $this->t(45296), null, null, null, $this->t(date_create("today", new \DateTimezone("UTC"))->getTimestamp() + 45296)], + ["1262304000", null, null, null, null, null, null, null, $this->t(1262304000), null, null, null], + ["1262304000.123456", null, null, null, null, null, null, null, null, $this->t(1262304000.123456), null, null], + ["1262304000.42", null, null, null, null, null, null, null, null, $this->t(1262304000.42), null, null], + ["Jan 1, 2010 (Fri)", null, null, null, null, null, null, null, null, null, $this->t(1262304000), null], + ["First day of Jan 2010 12AM", null, null, null, null, null, null, null, null, null, null, $this->t(1262304000)], + [[], null, null, null, null, null, null, null, null, null, null, null], + [$this->i("P1Y2D"), null, null, null, null, null, null, null, null, null, null, null], + ["P1Y2D", null, null, null, null, null, null, null, null, null, null, null], ] as $set) { // shift the input value off the set $input = array_shift($set); @@ -614,7 +614,7 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { [true, false], [false, true], [true, true], - ] as list($strict, $drop)) { + ] as [$strict, $drop]) { yield [$input, $formats[$format], $exp, $strict, $drop]; } } diff --git a/tests/cases/REST/Fever/TestAPI.php b/tests/cases/REST/Fever/TestAPI.php index 6bdce399..f65de41a 100644 --- a/tests/cases/REST/Fever/TestAPI.php +++ b/tests/cases/REST/Fever/TestAPI.php @@ -28,115 +28,115 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { protected $articles = [ 'db' => [ [ - 'id' => 101, - 'url' => 'http://example.com/1', - 'title' => 'Article title 1', - 'author' => '', - 'content' => '

Article content 1

', + 'id' => 101, + 'url' => 'http://example.com/1', + 'title' => 'Article title 1', + 'author' => '', + 'content' => '

Article content 1

', 'published_date' => '2000-01-01 00:00:00', - 'unread' => 1, - 'starred' => 0, - 'subscription' => 8, + 'unread' => 1, + 'starred' => 0, + 'subscription' => 8, ], [ - 'id' => 102, - 'url' => 'http://example.com/2', - 'title' => 'Article title 2', - 'author' => '', - 'content' => '

Article content 2

', + 'id' => 102, + 'url' => 'http://example.com/2', + 'title' => 'Article title 2', + 'author' => '', + 'content' => '

Article content 2

', 'published_date' => '2000-01-02 00:00:00', - 'unread' => 0, - 'starred' => 0, - 'subscription' => 8, + 'unread' => 0, + 'starred' => 0, + 'subscription' => 8, ], [ - 'id' => 103, - 'url' => 'http://example.com/3', - 'title' => 'Article title 3', - 'author' => '', - 'content' => '

Article content 3

', + 'id' => 103, + 'url' => 'http://example.com/3', + 'title' => 'Article title 3', + 'author' => '', + 'content' => '

Article content 3

', 'published_date' => '2000-01-03 00:00:00', - 'unread' => 1, - 'starred' => 1, - 'subscription' => 9, + 'unread' => 1, + 'starred' => 1, + 'subscription' => 9, ], [ - 'id' => 104, - 'url' => 'http://example.com/4', - 'title' => 'Article title 4', - 'author' => '', - 'content' => '

Article content 4

', + 'id' => 104, + 'url' => 'http://example.com/4', + 'title' => 'Article title 4', + 'author' => '', + 'content' => '

Article content 4

', 'published_date' => '2000-01-04 00:00:00', - 'unread' => 0, - 'starred' => 1, - 'subscription' => 9, + 'unread' => 0, + 'starred' => 1, + 'subscription' => 9, ], [ - 'id' => 105, - 'url' => 'http://example.com/5', - 'title' => 'Article title 5', - 'author' => '', - 'content' => '

Article content 5

', + 'id' => 105, + 'url' => 'http://example.com/5', + 'title' => 'Article title 5', + 'author' => '', + 'content' => '

Article content 5

', 'published_date' => '2000-01-05 00:00:00', - 'unread' => 1, - 'starred' => 0, - 'subscription' => 10, + 'unread' => 1, + 'starred' => 0, + 'subscription' => 10, ], ], 'rest' => [ [ - 'id' => 101, - 'feed_id' => 8, - 'title' => 'Article title 1', - 'author' => '', - 'html' => '

Article content 1

', - 'url' => 'http://example.com/1', - 'is_saved' => 0, - 'is_read' => 0, + 'id' => 101, + 'feed_id' => 8, + 'title' => 'Article title 1', + 'author' => '', + 'html' => '

Article content 1

', + 'url' => 'http://example.com/1', + 'is_saved' => 0, + 'is_read' => 0, 'created_on_time' => 946684800, ], [ - 'id' => 102, - 'feed_id' => 8, - 'title' => 'Article title 2', - 'author' => '', - 'html' => '

Article content 2

', - 'url' => 'http://example.com/2', - 'is_saved' => 0, - 'is_read' => 1, + 'id' => 102, + 'feed_id' => 8, + 'title' => 'Article title 2', + 'author' => '', + 'html' => '

Article content 2

', + 'url' => 'http://example.com/2', + 'is_saved' => 0, + 'is_read' => 1, 'created_on_time' => 946771200, ], [ - 'id' => 103, - 'feed_id' => 9, - 'title' => 'Article title 3', - 'author' => '', - 'html' => '

Article content 3

', - 'url' => 'http://example.com/3', - 'is_saved' => 1, - 'is_read' => 0, + 'id' => 103, + 'feed_id' => 9, + 'title' => 'Article title 3', + 'author' => '', + 'html' => '

Article content 3

', + 'url' => 'http://example.com/3', + 'is_saved' => 1, + 'is_read' => 0, 'created_on_time' => 946857600, ], [ - 'id' => 104, - 'feed_id' => 9, - 'title' => 'Article title 4', - 'author' => '', - 'html' => '

Article content 4

', - 'url' => 'http://example.com/4', - 'is_saved' => 1, - 'is_read' => 1, + 'id' => 104, + 'feed_id' => 9, + 'title' => 'Article title 4', + 'author' => '', + 'html' => '

Article content 4

', + 'url' => 'http://example.com/4', + 'is_saved' => 1, + 'is_read' => 1, 'created_on_time' => 946944000, ], [ - 'id' => 105, - 'feed_id' => 10, - 'title' => 'Article title 5', - 'author' => '', - 'html' => '

Article content 5

', - 'url' => 'http://example.com/5', - 'is_saved' => 0, - 'is_read' => 0, + 'id' => 105, + 'feed_id' => 10, + 'title' => 'Article title 5', + 'author' => '', + 'html' => '

Article content 5

', + 'url' => 'http://example.com/5', + 'is_saved' => 0, + 'is_read' => 0, 'created_on_time' => 947030400, ], ], @@ -176,7 +176,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { public function testAuthenticateAUserToken(bool $httpRequired, bool $tokenEnforced, string $httpUser = null, array $dataPost, array $dataGet, ResponseInterface $exp): void { self::setConf([ 'userHTTPAuthRequired' => $httpRequired, - 'userSessionEnforced' => $tokenEnforced, + 'userSessionEnforced' => $tokenEnforced, ], true); Arsse::$user->id = null; \Phake::when(Arsse::$db)->tokenLookup->thenThrow(new ExceptionInput("subjectMissing")); @@ -305,7 +305,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when(Arsse::$db)->articleList->thenReturn(new Result($this->articles['db'])); \Phake::when(Arsse::$db)->articleCount(Arsse::$user->id)->thenReturn(1024); $exp = new JsonResponse([ - 'items' => $this->articles['rest'], + 'items' => $this->articles['rest'], 'total_items' => 1024, ]); $act = $this->h->dispatch($this->req("api&$url")); @@ -334,21 +334,15 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { $unread = [['id' => 4],['id' => 5],['id' => 6]]; \Phake::when(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->starred(true))->thenReturn(new Result($saved)); \Phake::when(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->unread(true))->thenReturn(new Result($unread)); - $exp = new JsonResponse([ - 'saved_item_ids' => "1,2,3" - ]); + $exp = new JsonResponse(['saved_item_ids' => "1,2,3"]); $this->assertMessage($exp, $this->h->dispatch($this->req("api&saved_item_ids"))); - $exp = new JsonResponse([ - 'unread_item_ids' => "4,5,6" - ]); + $exp = new JsonResponse(['unread_item_ids' => "4,5,6"]); $this->assertMessage($exp, $this->h->dispatch($this->req("api&unread_item_ids"))); } public function testListHotLinks(): void { // hot links are not actually implemented, so an empty array should be all we get - $exp = new JsonResponse([ - 'links' => [] - ]); + $exp = new JsonResponse(['links' => []]); $this->assertMessage($exp, $this->h->dispatch($this->req("api&links"))); } @@ -444,16 +438,16 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when($this->h)->logIn->thenReturn(true); \Phake::when(Arsse::$db)->subscriptionRefreshed(Arsse::$user->id)->thenReturn(new \DateTimeImmutable("2000-01-01T00:00:00Z")); $exp = new JsonResponse([ - 'api_version' => API::LEVEL, - 'auth' => 1, + 'api_version' => API::LEVEL, + 'auth' => 1, 'last_refreshed_on_time' => 946684800, ]); $act = $this->h->dispatch($this->req("api")); $this->assertMessage($exp, $act); \Phake::when(Arsse::$db)->subscriptionRefreshed(Arsse::$user->id)->thenReturn(null); // no subscriptions $exp = new JsonResponse([ - 'api_version' => API::LEVEL, - 'auth' => 1, + 'api_version' => API::LEVEL, + 'auth' => 1, 'last_refreshed_on_time' => null, ]); $act = $this->h->dispatch($this->req("api")); @@ -461,7 +455,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when($this->h)->logIn->thenReturn(false); $exp = new JsonResponse([ 'api_version' => API::LEVEL, - 'auth' => 0, + 'auth' => 0, ]); $act = $this->h->dispatch($this->req("api")); $this->assertMessage($exp, $act); @@ -485,7 +479,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { public function testOutputToXml(): void { \Phake::when($this->h)->processRequest->thenReturn([ - 'items' => $this->articles['rest'], + 'items' => $this->articles['rest'], 'total_items' => 1024, ]); $exp = new XmlResponse("1018Article title 1<p>Article content 1</p>http://example.com/1009466848001028Article title 2<p>Article content 2</p>http://example.com/2019467712001039Article title 3<p>Article content 3</p>http://example.com/3109468576001049Article title 4<p>Article content 4</p>http://example.com/41194694400010510Article title 5<p>Article content 5</p>http://example.com/5009470304001024"); @@ -502,7 +496,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { public function testAnswerOptionsRequest(): void { $act = $this->h->dispatch($this->req("api", "", "OPTIONS")); $exp = new EmptyResponse(204, [ - 'Allow' => "POST", + 'Allow' => "POST", 'Accept' => "application/x-www-form-urlencoded", ]); $this->assertMessage($exp, $act); diff --git a/tests/cases/REST/NextcloudNews/TestV1_2.php b/tests/cases/REST/NextcloudNews/TestV1_2.php index dfe30083..5e8c7d13 100644 --- a/tests/cases/REST/NextcloudNews/TestV1_2.php +++ b/tests/cases/REST/NextcloudNews/TestV1_2.php @@ -26,274 +26,274 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { protected $feeds = [ // expected sample output of a feed list from the database, and the resultant expected transformation by the REST handler 'db' => [ [ - 'id' => 2112, - 'url' => 'http://example.com/news.atom', - 'favicon' => 'http://example.com/favicon.png', - 'source' => 'http://example.com/', - 'folder' => null, + 'id' => 2112, + 'url' => 'http://example.com/news.atom', + 'favicon' => 'http://example.com/favicon.png', + 'source' => 'http://example.com/', + 'folder' => null, 'top_folder' => null, - 'pinned' => 0, - 'err_count' => 0, - 'err_msg' => '', + 'pinned' => 0, + 'err_count' => 0, + 'err_msg' => '', 'order_type' => 0, - 'added' => '2017-05-20 13:35:54', - 'title' => 'First example feed', - 'unread' => 50048, + 'added' => '2017-05-20 13:35:54', + 'title' => 'First example feed', + 'unread' => 50048, ], [ - 'id' => 42, - 'url' => 'http://example.org/news.atom', - 'favicon' => 'http://example.org/favicon.png', - 'source' => 'http://example.org/', - 'folder' => 12, + 'id' => 42, + 'url' => 'http://example.org/news.atom', + 'favicon' => 'http://example.org/favicon.png', + 'source' => 'http://example.org/', + 'folder' => 12, 'top_folder' => 8, - 'pinned' => 1, - 'err_count' => 0, - 'err_msg' => '', + 'pinned' => 1, + 'err_count' => 0, + 'err_msg' => '', 'order_type' => 2, - 'added' => '2017-05-20 13:35:54', - 'title' => 'Second example feed', - 'unread' => 23, + 'added' => '2017-05-20 13:35:54', + 'title' => 'Second example feed', + 'unread' => 23, ], [ - 'id' => 47, - 'url' => 'http://example.net/news.atom', - 'favicon' => 'http://example.net/favicon.png', - 'source' => 'http://example.net/', - 'folder' => null, + 'id' => 47, + 'url' => 'http://example.net/news.atom', + 'favicon' => 'http://example.net/favicon.png', + 'source' => 'http://example.net/', + 'folder' => null, 'top_folder' => null, - 'pinned' => 0, - 'err_count' => 0, - 'err_msg' => null, + 'pinned' => 0, + 'err_count' => 0, + 'err_msg' => null, 'order_type' => 1, - 'added' => '2017-05-20 13:35:54', - 'title' => 'Third example feed', - 'unread' => 0, + 'added' => '2017-05-20 13:35:54', + 'title' => 'Third example feed', + 'unread' => 0, ], ], 'rest' => [ [ - 'id' => 2112, - 'url' => 'http://example.com/news.atom', - 'title' => 'First example feed', - 'added' => 1495287354, - 'pinned' => false, - 'link' => 'http://example.com/', - 'faviconLink' => 'http://example.com/favicon.png', - 'folderId' => 0, - 'unreadCount' => 50048, - 'ordering' => 0, + 'id' => 2112, + 'url' => 'http://example.com/news.atom', + 'title' => 'First example feed', + 'added' => 1495287354, + 'pinned' => false, + 'link' => 'http://example.com/', + 'faviconLink' => 'http://example.com/favicon.png', + 'folderId' => 0, + 'unreadCount' => 50048, + 'ordering' => 0, 'updateErrorCount' => 0, - 'lastUpdateError' => '', + 'lastUpdateError' => '', ], [ - 'id' => 42, - 'url' => 'http://example.org/news.atom', - 'title' => 'Second example feed', - 'added' => 1495287354, - 'pinned' => true, - 'link' => 'http://example.org/', - 'faviconLink' => 'http://example.org/favicon.png', - 'folderId' => 8, - 'unreadCount' => 23, - 'ordering' => 2, + 'id' => 42, + 'url' => 'http://example.org/news.atom', + 'title' => 'Second example feed', + 'added' => 1495287354, + 'pinned' => true, + 'link' => 'http://example.org/', + 'faviconLink' => 'http://example.org/favicon.png', + 'folderId' => 8, + 'unreadCount' => 23, + 'ordering' => 2, 'updateErrorCount' => 0, - 'lastUpdateError' => '', + 'lastUpdateError' => '', ], [ - 'id' => 47, - 'url' => 'http://example.net/news.atom', - 'title' => 'Third example feed', - 'added' => 1495287354, - 'pinned' => false, - 'link' => 'http://example.net/', - 'faviconLink' => 'http://example.net/favicon.png', - 'folderId' => 0, - 'unreadCount' => 0, - 'ordering' => 1, + 'id' => 47, + 'url' => 'http://example.net/news.atom', + 'title' => 'Third example feed', + 'added' => 1495287354, + 'pinned' => false, + 'link' => 'http://example.net/', + 'faviconLink' => 'http://example.net/favicon.png', + 'folderId' => 0, + 'unreadCount' => 0, + 'ordering' => 1, 'updateErrorCount' => 0, - 'lastUpdateError' => '', + 'lastUpdateError' => '', ], ], ]; protected $articles = [ 'db' => [ [ - 'id' => 101, - 'url' => 'http://example.com/1', - 'title' => 'Article title 1', - 'author' => '', - 'content' => '

Article content 1

', - 'guid' => 'e433653cef2e572eee4215fa299a4a5af9137b2cefd6283c85bd69a32915beda', + 'id' => 101, + 'url' => 'http://example.com/1', + 'title' => 'Article title 1', + 'author' => '', + 'content' => '

Article content 1

', + 'guid' => 'e433653cef2e572eee4215fa299a4a5af9137b2cefd6283c85bd69a32915beda', 'published_date' => '2000-01-01 00:00:00', - 'edited_date' => '2000-01-01 00:00:01', - 'modified_date' => '2000-01-01 01:00:00', - 'unread' => 1, - 'starred' => 0, - 'edition' => 101, - 'subscription' => 8, - 'fingerprint' => 'f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6:fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4:18fdd4fa93d693128c43b004399e5c9cea6c261ddfa002518d3669f55d8c2207', - 'media_url' => null, - 'media_type' => null, + 'edited_date' => '2000-01-01 00:00:01', + 'modified_date' => '2000-01-01 01:00:00', + 'unread' => 1, + 'starred' => 0, + 'edition' => 101, + 'subscription' => 8, + 'fingerprint' => 'f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6:fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4:18fdd4fa93d693128c43b004399e5c9cea6c261ddfa002518d3669f55d8c2207', + 'media_url' => null, + 'media_type' => null, ], [ - 'id' => 102, - 'url' => 'http://example.com/2', - 'title' => 'Article title 2', - 'author' => '', - 'content' => '

Article content 2

', - 'guid' => '5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7', + 'id' => 102, + 'url' => 'http://example.com/2', + 'title' => 'Article title 2', + 'author' => '', + 'content' => '

Article content 2

', + 'guid' => '5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7', 'published_date' => '2000-01-02 00:00:00', - 'edited_date' => '2000-01-02 00:00:02', - 'modified_date' => '2000-01-02 02:00:00', - 'unread' => 0, - 'starred' => 0, - 'edition' => 202, - 'subscription' => 8, - 'fingerprint' => '0e86d2de822a174fe3c44a466953e63ca1f1a58a19cbf475fce0855d4e3d5153:13075894189c47ffcfafd1dfe7fbb539f7c74a69d35a399b3abf8518952714f9:2abd0a8cba83b8214a66c8f0293ba63e467d720540e29ff8ddcdab069d4f1c9e', - 'media_url' => "http://example.com/text", - 'media_type' => "text/plain", + 'edited_date' => '2000-01-02 00:00:02', + 'modified_date' => '2000-01-02 02:00:00', + 'unread' => 0, + 'starred' => 0, + 'edition' => 202, + 'subscription' => 8, + 'fingerprint' => '0e86d2de822a174fe3c44a466953e63ca1f1a58a19cbf475fce0855d4e3d5153:13075894189c47ffcfafd1dfe7fbb539f7c74a69d35a399b3abf8518952714f9:2abd0a8cba83b8214a66c8f0293ba63e467d720540e29ff8ddcdab069d4f1c9e', + 'media_url' => "http://example.com/text", + 'media_type' => "text/plain", ], [ - 'id' => 103, - 'url' => 'http://example.com/3', - 'title' => 'Article title 3', - 'author' => '', - 'content' => '

Article content 3

', - 'guid' => '31a6594500a48b59fcc8a075ce82b946c9c3c782460d088bd7b8ef3ede97ad92', + 'id' => 103, + 'url' => 'http://example.com/3', + 'title' => 'Article title 3', + 'author' => '', + 'content' => '

Article content 3

', + 'guid' => '31a6594500a48b59fcc8a075ce82b946c9c3c782460d088bd7b8ef3ede97ad92', 'published_date' => '2000-01-03 00:00:00', - 'edited_date' => '2000-01-03 00:00:03', - 'modified_date' => '2000-01-03 03:00:00', - 'unread' => 1, - 'starred' => 1, - 'edition' => 203, - 'subscription' => 9, - 'fingerprint' => 'f74b06b240bd08abf4d3fdfc20dba6a6f6eb8b4f1a00e9a617efd63a87180a4b:b278380e984cefe63f0e412b88ffc9cb0befdfa06fdc00bace1da99a8daff406:ad622b31e739cd3a3f3c788991082cf4d2f7a8773773008e75f0572e58cd373b', - 'media_url' => "http://example.com/video", - 'media_type' => "video/webm", + 'edited_date' => '2000-01-03 00:00:03', + 'modified_date' => '2000-01-03 03:00:00', + 'unread' => 1, + 'starred' => 1, + 'edition' => 203, + 'subscription' => 9, + 'fingerprint' => 'f74b06b240bd08abf4d3fdfc20dba6a6f6eb8b4f1a00e9a617efd63a87180a4b:b278380e984cefe63f0e412b88ffc9cb0befdfa06fdc00bace1da99a8daff406:ad622b31e739cd3a3f3c788991082cf4d2f7a8773773008e75f0572e58cd373b', + 'media_url' => "http://example.com/video", + 'media_type' => "video/webm", ], [ - 'id' => 104, - 'url' => 'http://example.com/4', - 'title' => 'Article title 4', - 'author' => '', - 'content' => '

Article content 4

', - 'guid' => '804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180', + 'id' => 104, + 'url' => 'http://example.com/4', + 'title' => 'Article title 4', + 'author' => '', + 'content' => '

Article content 4

', + 'guid' => '804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180', 'published_date' => '2000-01-04 00:00:00', - 'edited_date' => '2000-01-04 00:00:04', - 'modified_date' => '2000-01-04 04:00:00', - 'unread' => 0, - 'starred' => 1, - 'edition' => 204, - 'subscription' => 9, - 'fingerprint' => 'f3615c7f16336d3ea242d35cf3fc17dbc4ee3afb78376bf49da2dd7a5a25dec8:f11c2b4046f207579aeb9c69a8c20ca5461cef49756ccfa5ba5e2344266da3b3:ab2da63276acce431250b18d3d49b988b226a99c7faadf275c90b751aee05be9', - 'media_url' => "http://example.com/image", - 'media_type' => "image/svg+xml", + 'edited_date' => '2000-01-04 00:00:04', + 'modified_date' => '2000-01-04 04:00:00', + 'unread' => 0, + 'starred' => 1, + 'edition' => 204, + 'subscription' => 9, + 'fingerprint' => 'f3615c7f16336d3ea242d35cf3fc17dbc4ee3afb78376bf49da2dd7a5a25dec8:f11c2b4046f207579aeb9c69a8c20ca5461cef49756ccfa5ba5e2344266da3b3:ab2da63276acce431250b18d3d49b988b226a99c7faadf275c90b751aee05be9', + 'media_url' => "http://example.com/image", + 'media_type' => "image/svg+xml", ], [ - 'id' => 105, - 'url' => 'http://example.com/5', - 'title' => 'Article title 5', - 'author' => '', - 'content' => '

Article content 5

', - 'guid' => 'db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41', + 'id' => 105, + 'url' => 'http://example.com/5', + 'title' => 'Article title 5', + 'author' => '', + 'content' => '

Article content 5

', + 'guid' => 'db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41', 'published_date' => '2000-01-05 00:00:00', - 'edited_date' => '2000-01-05 00:00:05', - 'modified_date' => '2000-01-05 05:00:00', - 'unread' => 1, - 'starred' => 0, - 'edition' => 305, - 'subscription' => 10, - 'fingerprint' => 'd40da96e39eea6c55948ccbe9b3d275b5f931298288dbe953990c5f496097022:834240f84501b5341d375414718204ec421561f3825d34c22bf9182203e42900:43b970ac6ec5f8a9647b2c7e4eed8b1d7f62e154a95eed748b0294c1256764ba', - 'media_url' => "http://example.com/audio", - 'media_type' => "audio/ogg", + 'edited_date' => '2000-01-05 00:00:05', + 'modified_date' => '2000-01-05 05:00:00', + 'unread' => 1, + 'starred' => 0, + 'edition' => 305, + 'subscription' => 10, + 'fingerprint' => 'd40da96e39eea6c55948ccbe9b3d275b5f931298288dbe953990c5f496097022:834240f84501b5341d375414718204ec421561f3825d34c22bf9182203e42900:43b970ac6ec5f8a9647b2c7e4eed8b1d7f62e154a95eed748b0294c1256764ba', + 'media_url' => "http://example.com/audio", + 'media_type' => "audio/ogg", ], ], 'rest' => [ [ - 'id' => 101, - 'guid' => 'e433653cef2e572eee4215fa299a4a5af9137b2cefd6283c85bd69a32915beda', - 'guidHash' => "101", - 'url' => 'http://example.com/1', - 'title' => 'Article title 1', - 'author' => '', - 'pubDate' => 946684801, - 'body' => '

Article content 1

', + 'id' => 101, + 'guid' => 'e433653cef2e572eee4215fa299a4a5af9137b2cefd6283c85bd69a32915beda', + 'guidHash' => "101", + 'url' => 'http://example.com/1', + 'title' => 'Article title 1', + 'author' => '', + 'pubDate' => 946684801, + 'body' => '

Article content 1

', 'enclosureMime' => "", 'enclosureLink' => "", - 'feedId' => 8, - 'unread' => true, - 'starred' => false, - 'lastModified' => 946688400, - 'fingerprint' => 'f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6:fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4:18fdd4fa93d693128c43b004399e5c9cea6c261ddfa002518d3669f55d8c2207', + 'feedId' => 8, + 'unread' => true, + 'starred' => false, + 'lastModified' => 946688400, + 'fingerprint' => 'f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6:fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4:18fdd4fa93d693128c43b004399e5c9cea6c261ddfa002518d3669f55d8c2207', ], [ - 'id' => 202, - 'guid' => '5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7', - 'guidHash' => "102", - 'url' => 'http://example.com/2', - 'title' => 'Article title 2', - 'author' => '', - 'pubDate' => 946771202, - 'body' => '

Article content 2

', + 'id' => 202, + 'guid' => '5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7', + 'guidHash' => "102", + 'url' => 'http://example.com/2', + 'title' => 'Article title 2', + 'author' => '', + 'pubDate' => 946771202, + 'body' => '

Article content 2

', 'enclosureMime' => "text/plain", 'enclosureLink' => "http://example.com/text", - 'feedId' => 8, - 'unread' => false, - 'starred' => false, - 'lastModified' => 946778400, - 'fingerprint' => '0e86d2de822a174fe3c44a466953e63ca1f1a58a19cbf475fce0855d4e3d5153:13075894189c47ffcfafd1dfe7fbb539f7c74a69d35a399b3abf8518952714f9:2abd0a8cba83b8214a66c8f0293ba63e467d720540e29ff8ddcdab069d4f1c9e', + 'feedId' => 8, + 'unread' => false, + 'starred' => false, + 'lastModified' => 946778400, + 'fingerprint' => '0e86d2de822a174fe3c44a466953e63ca1f1a58a19cbf475fce0855d4e3d5153:13075894189c47ffcfafd1dfe7fbb539f7c74a69d35a399b3abf8518952714f9:2abd0a8cba83b8214a66c8f0293ba63e467d720540e29ff8ddcdab069d4f1c9e', ], [ - 'id' => 203, - 'guid' => '31a6594500a48b59fcc8a075ce82b946c9c3c782460d088bd7b8ef3ede97ad92', - 'guidHash' => "103", - 'url' => 'http://example.com/3', - 'title' => 'Article title 3', - 'author' => '', - 'pubDate' => 946857603, - 'body' => '

Article content 3

', + 'id' => 203, + 'guid' => '31a6594500a48b59fcc8a075ce82b946c9c3c782460d088bd7b8ef3ede97ad92', + 'guidHash' => "103", + 'url' => 'http://example.com/3', + 'title' => 'Article title 3', + 'author' => '', + 'pubDate' => 946857603, + 'body' => '

Article content 3

', 'enclosureMime' => "video/webm", 'enclosureLink' => "http://example.com/video", - 'feedId' => 9, - 'unread' => true, - 'starred' => true, - 'lastModified' => 946868400, - 'fingerprint' => 'f74b06b240bd08abf4d3fdfc20dba6a6f6eb8b4f1a00e9a617efd63a87180a4b:b278380e984cefe63f0e412b88ffc9cb0befdfa06fdc00bace1da99a8daff406:ad622b31e739cd3a3f3c788991082cf4d2f7a8773773008e75f0572e58cd373b', + 'feedId' => 9, + 'unread' => true, + 'starred' => true, + 'lastModified' => 946868400, + 'fingerprint' => 'f74b06b240bd08abf4d3fdfc20dba6a6f6eb8b4f1a00e9a617efd63a87180a4b:b278380e984cefe63f0e412b88ffc9cb0befdfa06fdc00bace1da99a8daff406:ad622b31e739cd3a3f3c788991082cf4d2f7a8773773008e75f0572e58cd373b', ], [ - 'id' => 204, - 'guid' => '804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180', - 'guidHash' => "104", - 'url' => 'http://example.com/4', - 'title' => 'Article title 4', - 'author' => '', - 'pubDate' => 946944004, - 'body' => '

Article content 4

', + 'id' => 204, + 'guid' => '804e517d623390e71497982c77cf6823180342ebcd2e7d5e32da1e55b09dd180', + 'guidHash' => "104", + 'url' => 'http://example.com/4', + 'title' => 'Article title 4', + 'author' => '', + 'pubDate' => 946944004, + 'body' => '

Article content 4

', 'enclosureMime' => "image/svg+xml", 'enclosureLink' => "http://example.com/image", - 'feedId' => 9, - 'unread' => false, - 'starred' => true, - 'lastModified' => 946958400, - 'fingerprint' => 'f3615c7f16336d3ea242d35cf3fc17dbc4ee3afb78376bf49da2dd7a5a25dec8:f11c2b4046f207579aeb9c69a8c20ca5461cef49756ccfa5ba5e2344266da3b3:ab2da63276acce431250b18d3d49b988b226a99c7faadf275c90b751aee05be9', + 'feedId' => 9, + 'unread' => false, + 'starred' => true, + 'lastModified' => 946958400, + 'fingerprint' => 'f3615c7f16336d3ea242d35cf3fc17dbc4ee3afb78376bf49da2dd7a5a25dec8:f11c2b4046f207579aeb9c69a8c20ca5461cef49756ccfa5ba5e2344266da3b3:ab2da63276acce431250b18d3d49b988b226a99c7faadf275c90b751aee05be9', ], [ - 'id' => 305, - 'guid' => 'db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41', - 'guidHash' => "105", - 'url' => 'http://example.com/5', - 'title' => 'Article title 5', - 'author' => '', - 'pubDate' => 947030405, - 'body' => '

Article content 5

', + 'id' => 305, + 'guid' => 'db3e736c2c492f5def5c5da33ddcbea1824040e9ced2142069276b0a6e291a41', + 'guidHash' => "105", + 'url' => 'http://example.com/5', + 'title' => 'Article title 5', + 'author' => '', + 'pubDate' => 947030405, + 'body' => '

Article content 5

', 'enclosureMime' => "audio/ogg", 'enclosureLink' => "http://example.com/audio", - 'feedId' => 10, - 'unread' => true, - 'starred' => false, - 'lastModified' => 947048400, - 'fingerprint' => 'd40da96e39eea6c55948ccbe9b3d275b5f931298288dbe953990c5f496097022:834240f84501b5341d375414718204ec421561f3825d34c22bf9182203e42900:43b970ac6ec5f8a9647b2c7e4eed8b1d7f62e154a95eed748b0294c1256764ba', + 'feedId' => 10, + 'unread' => true, + 'starred' => false, + 'lastModified' => 947048400, + 'fingerprint' => 'd40da96e39eea6c55948ccbe9b3d275b5f931298288dbe953990c5f496097022:834240f84501b5341d375414718204ec421561f3825d34c22bf9182203e42900:43b970ac6ec5f8a9647b2c7e4eed8b1d7f62e154a95eed748b0294c1256764ba', ], ], ]; @@ -430,10 +430,10 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { public function provideFolderCreations(): array { return [ - [['name' => "Software"], true, 1, new Response(['folders' => [['id'=> 1, 'name' => "Software"]]])], - [['name' => "Software"], false, 1, new Response(['folders' => [['id'=> 1, 'name' => "Software"]]])], - [['name' => "Hardware"], true, "2", new Response(['folders' => [['id'=> 2, 'name' => "Hardware"]]])], - [['name' => "Hardware"], false, "2", new Response(['folders' => [['id'=> 2, 'name' => "Hardware"]]])], + [['name' => "Software"], true, 1, new Response(['folders' => [['id' => 1, 'name' => "Software"]]])], + [['name' => "Software"], false, 1, new Response(['folders' => [['id' => 1, 'name' => "Software"]]])], + [['name' => "Hardware"], true, "2", new Response(['folders' => [['id' => 2, 'name' => "Hardware"]]])], + [['name' => "Hardware"], false, "2", new Response(['folders' => [['id' => 2, 'name' => "Hardware"]]])], [['name' => "Software"], true, new ExceptionInput("constraintViolation"), new EmptyResponse(409)], [['name' => ""], true, new ExceptionInput("whitespace"), new EmptyResponse(422)], [['name' => " "], true, new ExceptionInput("whitespace"), new EmptyResponse(422)], @@ -476,7 +476,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { public function testRetrieveServerVersion(): void { $exp = new Response([ - 'version' => V1_2::VERSION, + 'version' => V1_2::VERSION, 'arsse_version' => Arsse::VERSION, ]); $this->assertMessage($exp, $this->req("GET", "/version")); @@ -484,7 +484,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { public function testListSubscriptions(): void { $exp1 = [ - 'feeds' => [], + 'feeds' => [], 'starredCount' => 0, ]; $exp2 = [ @@ -558,10 +558,10 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { public function testMoveASubscription(): void { $in = [ ['folderId' => 0], - ['folderId' => 42], + ['folderId' => 42], ['folderId' => 2112], - ['folderId' => 42], - ['folderId' => -1], + ['folderId' => 42], + ['folderId' => -1], [], ]; \Phake::when(Arsse::$db)->subscriptionPropertiesSet(Arsse::$user->id, 1, ['folder' => 42])->thenReturn(true); @@ -616,11 +616,11 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { public function testListStaleFeeds(): void { $out = [ [ - 'id' => 42, + 'id' => 42, 'userId' => "", ], [ - 'id' => 2112, + 'id' => 2112, 'userId' => "", ], ]; @@ -632,10 +632,10 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { public function testUpdateAFeed(): void { $in = [ ['feedId' => 42], // valid - ['feedId' => 2112], // feed does not exist + ['feedId' => 2112], // feed does not exist ['feedId' => "ook"], // invalid ID - ['feedId' => -1], // invalid ID - ['feed' => 42], // invalid input + ['feedId' => -1], // invalid ID + ['feed' => 42], // invalid input ]; \Phake::when(Arsse::$db)->feedUpdate(42)->thenReturn(true); \Phake::when(Arsse::$db)->feedUpdate(2112)->thenThrow(new ExceptionInput("subjectMissing")); @@ -654,17 +654,17 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $t = new \DateTime; $in = [ ['type' => 0, 'id' => 42], // type=0 => subscription/feed - ['type' => 1, 'id' => 2112], // type=1 => folder - ['type' => 0, 'id' => -1], // type=0 => subscription/feed; invalid ID - ['type' => 1, 'id' => -1], // type=1 => folder; invalid ID - ['type' => 2, 'id' => 0], // type=2 => starred - ['type' => 3, 'id' => 0], // type=3 => all (default); base context - ['oldestFirst' => true, 'batchSize' => 10, 'offset' => 5], - ['oldestFirst' => false, 'batchSize' => 5, 'offset' => 5], - ['getRead' => true], // base context - ['getRead' => false], + ['type' => 1, 'id' => 2112], // type=1 => folder + ['type' => 0, 'id' => -1], // type=0 => subscription/feed; invalid ID + ['type' => 1, 'id' => -1], // type=1 => folder; invalid ID + ['type' => 2, 'id' => 0], // type=2 => starred + ['type' => 3, 'id' => 0], // type=3 => all (default); base context + ['oldestFirst' => true, 'batchSize' => 10, 'offset' => 5], + ['oldestFirst' => false, 'batchSize' => 5, 'offset' => 5], + ['getRead' => true], // base context + ['getRead' => false], ['lastModified' => $t->getTimestamp()], - ['oldestFirst' => false, 'batchSize' => 5, 'offset' => 0], // offset=0 should not set the latestEdition context + ['oldestFirst' => false, 'batchSize' => 5, 'offset' => 0], // offset=0 should not set the latestEdition context ]; \Phake::when(Arsse::$db)->articleList->thenReturn(new Result($this->v($this->articles['db']))); \Phake::when(Arsse::$db)->articleList(Arsse::$user->id, (new Context)->subscription(42), $this->anything(), ["edition desc"])->thenThrow(new ExceptionInput("idMissing")); @@ -834,12 +834,12 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { \Phake::when(Arsse::$db)->metaGet("service_last_checkin")->thenReturn(Date::transform($valid, "sql"))->thenReturn(Date::transform($invalid, "sql")); \Phake::when(Arsse::$db)->driverCharsetAcceptable->thenReturn(true)->thenReturn(false); $arr1 = $arr2 = [ - 'version' => V1_2::VERSION, + 'version' => V1_2::VERSION, 'arsse_version' => Arsse::VERSION, - 'warnings' => [ + 'warnings' => [ 'improperlyConfiguredCron' => false, - 'incorrectDbCharset' => false, - ] + 'incorrectDbCharset' => false, + ], ]; $arr2['warnings']['improperlyConfiguredCron'] = true; $arr2['warnings']['incorrectDbCharset'] = true; @@ -864,14 +864,14 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { public function testQueryTheUserStatus(): void { $act = $this->req("GET", "/user"); $exp = new Response([ - 'userId' => Arsse::$user->id, - 'displayName' => Arsse::$user->id, + 'userId' => Arsse::$user->id, + 'displayName' => Arsse::$user->id, 'lastLoginTimestamp' => $this->approximateTime($act->getPayload()['lastLoginTimestamp'], new \DateTimeImmutable), - 'avatar' => null, + 'avatar' => null, ]); $this->assertMessage($exp, $act); } - + public function testPreferJsonOverQueryParameters(): void { $in = ['name' => "Software"]; $url = "/folders?name=Hardware"; @@ -884,7 +884,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest { $exp = new Response(['folders' => [$out1]]); $this->assertMessage($exp, $this->req("POST", "/folders?name=Hardware", json_encode($in))); } - + public function testMeldJsonAndQueryParameters(): void { $in = ['oldestFirst' => true]; $url = "/items?type=2"; diff --git a/tests/cases/REST/NextcloudNews/TestVersions.php b/tests/cases/REST/NextcloudNews/TestVersions.php index ba0ae3a0..aadb88d5 100644 --- a/tests/cases/REST/NextcloudNews/TestVersions.php +++ b/tests/cases/REST/NextcloudNews/TestVersions.php @@ -8,7 +8,6 @@ namespace JKingWeb\Arsse\TestCase\REST\NextcloudNews; use JKingWeb\Arsse\REST\NextcloudNews\Versions; use Psr\Http\Message\ResponseInterface; -use Laminas\Diactoros\ServerRequest; use Laminas\Diactoros\Response\JsonResponse as Response; use Laminas\Diactoros\Response\EmptyResponse; diff --git a/tests/cases/REST/TestREST.php b/tests/cases/REST/TestREST.php index 3983fd29..da458930 100644 --- a/tests/cases/REST/TestREST.php +++ b/tests/cases/REST/TestREST.php @@ -199,53 +199,53 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { public function provideCorsHeaders(): iterable { return [ ["GET", ['Origin' => "null"], [], [ - 'Access-Control-Allow-Origin' => "null", + 'Access-Control-Allow-Origin' => "null", 'Access-Control-Allow-Credentials' => "true", - 'Vary' => "Origin", + 'Vary' => "Origin", ]], ["GET", ['Origin' => "http://example"], [], [ - 'Access-Control-Allow-Origin' => "http://example", + 'Access-Control-Allow-Origin' => "http://example", 'Access-Control-Allow-Credentials' => "true", - 'Vary' => "Origin", + 'Vary' => "Origin", ]], ["GET", ['Origin' => "http://example"], ['Content-Type' => "text/plain; charset=utf-8"], [ - 'Access-Control-Allow-Origin' => "http://example", + 'Access-Control-Allow-Origin' => "http://example", 'Access-Control-Allow-Credentials' => "true", - 'Vary' => "Origin", - 'Content-Type' => "text/plain; charset=utf-8", + 'Vary' => "Origin", + 'Content-Type' => "text/plain; charset=utf-8", ]], ["GET", ['Origin' => "http://example"], ['Vary' => "Content-Type"], [ - 'Access-Control-Allow-Origin' => "http://example", + 'Access-Control-Allow-Origin' => "http://example", 'Access-Control-Allow-Credentials' => "true", - 'Vary' => ["Content-Type", "Origin"], + 'Vary' => ["Content-Type", "Origin"], ]], ["OPTIONS", ['Origin' => "http://example"], [], [ - 'Access-Control-Allow-Origin' => "http://example", + 'Access-Control-Allow-Origin' => "http://example", 'Access-Control-Allow-Credentials' => "true", - 'Access-Control-Max-Age' => (string) (60 *60 *24), - 'Vary' => "Origin", + 'Access-Control-Max-Age' => (string) (60 * 60 * 24), + 'Vary' => "Origin", ]], ["OPTIONS", ['Origin' => "http://example"], ['Allow' => "GET, PUT, HEAD, OPTIONS"], [ - 'Allow' => "GET, PUT, HEAD, OPTIONS", - 'Access-Control-Allow-Origin' => "http://example", + 'Allow' => "GET, PUT, HEAD, OPTIONS", + 'Access-Control-Allow-Origin' => "http://example", 'Access-Control-Allow-Credentials' => "true", - 'Access-Control-Allow-Methods' => "GET, PUT, HEAD, OPTIONS", - 'Access-Control-Max-Age' => (string) (60 *60 *24), - 'Vary' => "Origin", + 'Access-Control-Allow-Methods' => "GET, PUT, HEAD, OPTIONS", + 'Access-Control-Max-Age' => (string) (60 * 60 * 24), + 'Vary' => "Origin", ]], ["OPTIONS", ['Origin' => "http://example", 'Access-Control-Request-Headers' => "Content-Type, If-None-Match"], [], [ - 'Access-Control-Allow-Origin' => "http://example", + 'Access-Control-Allow-Origin' => "http://example", 'Access-Control-Allow-Credentials' => "true", - 'Access-Control-Allow-Headers' => "Content-Type, If-None-Match", - 'Access-Control-Max-Age' => (string) (60 *60 *24), - 'Vary' => "Origin", + 'Access-Control-Allow-Headers' => "Content-Type, If-None-Match", + 'Access-Control-Max-Age' => (string) (60 * 60 * 24), + 'Vary' => "Origin", ]], ["OPTIONS", ['Origin' => "http://example", 'Access-Control-Request-Headers' => ["Content-Type", "If-None-Match"]], [], [ - 'Access-Control-Allow-Origin' => "http://example", + 'Access-Control-Allow-Origin' => "http://example", 'Access-Control-Allow-Credentials' => "true", - 'Access-Control-Allow-Headers' => "Content-Type,If-None-Match", - 'Access-Control-Max-Age' => (string) (60 *60 *24), - 'Vary' => "Origin", + 'Access-Control-Allow-Headers' => "Content-Type,If-None-Match", + 'Access-Control-Max-Age' => (string) (60 * 60 * 24), + 'Vary' => "Origin", ]], ]; } @@ -295,7 +295,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { } /** @dataProvider provideMockRequests */ - public function testDispatchRequests(ServerRequest $req, string $method, bool $called, string $class = "", string $target =""): void { + public function testDispatchRequests(ServerRequest $req, string $method, bool $called, string $class = "", string $target = ""): void { $r = \Phake::partialMock(REST::class); \Phake::when($r)->normalizeResponse->thenReturnCallback(function($res) { return $res; diff --git a/tests/cases/REST/TinyTinyRSS/TestAPI.php b/tests/cases/REST/TinyTinyRSS/TestAPI.php index 0db7f1f8..cfd671af 100644 --- a/tests/cases/REST/TinyTinyRSS/TestAPI.php +++ b/tests/cases/REST/TinyTinyRSS/TestAPI.php @@ -17,7 +17,6 @@ use JKingWeb\Arsse\Db\ExceptionInput; use JKingWeb\Arsse\Db\Transaction; use JKingWeb\Arsse\REST\TinyTinyRSS\API; use Psr\Http\Message\ResponseInterface; -use Laminas\Diactoros\ServerRequest; use Laminas\Diactoros\Response\JsonResponse as Response; use Laminas\Diactoros\Response\EmptyResponse; @@ -58,44 +57,44 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { protected $starred = ['total' => 10, 'unread' => 4, 'read' => 6]; protected $articles = [ [ - 'id' => 101, - 'url' => 'http://example.com/1', - 'title' => 'Article title 1', + 'id' => 101, + 'url' => 'http://example.com/1', + 'title' => 'Article title 1', 'subscription_title' => "Feed 11", - 'author' => '', - 'content' => '

Article content 1

', - 'guid' => '', - 'published_date' => '2000-01-01 00:00:00', - 'edited_date' => '2000-01-01 00:00:01', - 'modified_date' => '2000-01-01 01:00:00', - 'unread' => 1, - 'starred' => 0, - 'edition' => 101, - 'subscription' => 8, - 'fingerprint' => 'f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6:fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4:18fdd4fa93d693128c43b004399e5c9cea6c261ddfa002518d3669f55d8c2207', - 'media_url' => null, - 'media_type' => null, - 'note' => "", + 'author' => '', + 'content' => '

Article content 1

', + 'guid' => '', + 'published_date' => '2000-01-01 00:00:00', + 'edited_date' => '2000-01-01 00:00:01', + 'modified_date' => '2000-01-01 01:00:00', + 'unread' => 1, + 'starred' => 0, + 'edition' => 101, + 'subscription' => 8, + 'fingerprint' => 'f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6:fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4:18fdd4fa93d693128c43b004399e5c9cea6c261ddfa002518d3669f55d8c2207', + 'media_url' => null, + 'media_type' => null, + 'note' => "", ], [ - 'id' => 102, - 'url' => 'http://example.com/2', - 'title' => 'Article title 2', + 'id' => 102, + 'url' => 'http://example.com/2', + 'title' => 'Article title 2', 'subscription_title' => "Feed 11", - 'author' => 'J. King', - 'content' => '

Article content 2

', - 'guid' => '5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7', - 'published_date' => '2000-01-02 00:00:00', - 'edited_date' => '2000-01-02 00:00:02', - 'modified_date' => '2000-01-02 02:00:00', - 'unread' => 0, - 'starred' => 0, - 'edition' => 202, - 'subscription' => 8, - 'fingerprint' => '0e86d2de822a174fe3c44a466953e63ca1f1a58a19cbf475fce0855d4e3d5153:13075894189c47ffcfafd1dfe7fbb539f7c74a69d35a399b3abf8518952714f9:2abd0a8cba83b8214a66c8f0293ba63e467d720540e29ff8ddcdab069d4f1c9e', - 'media_url' => "http://example.com/text", - 'media_type' => "text/plain", - 'note' => "Note 2", + 'author' => 'J. King', + 'content' => '

Article content 2

', + 'guid' => '5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7', + 'published_date' => '2000-01-02 00:00:00', + 'edited_date' => '2000-01-02 00:00:02', + 'modified_date' => '2000-01-02 02:00:00', + 'unread' => 0, + 'starred' => 0, + 'edition' => 202, + 'subscription' => 8, + 'fingerprint' => '0e86d2de822a174fe3c44a466953e63ca1f1a58a19cbf475fce0855d4e3d5153:13075894189c47ffcfafd1dfe7fbb539f7c74a69d35a399b3abf8518952714f9:2abd0a8cba83b8214a66c8f0293ba63e467d720540e29ff8ddcdab069d4f1c9e', + 'media_url' => "http://example.com/text", + 'media_type' => "text/plain", + 'note' => "Note 2", ], ]; // text from https://corrigeur.fr/lorem-ipsum-traduction-origine.php @@ -140,8 +139,8 @@ LONG_STRING; protected function respGood($content = null, $seq = 0): Response { return new Response([ - 'seq' => $seq, - 'status' => 0, + 'seq' => $seq, + 'status' => 0, 'content' => $content, ]); } @@ -149,8 +148,8 @@ LONG_STRING; protected function respErr(string $msg, $content = [], $seq = 0): Response { $err = ['error' => $msg]; return new Response([ - 'seq' => $seq, - 'status' => 1, + 'seq' => $seq, + 'status' => 1, 'content' => array_merge($err, $content, $err), ]); } @@ -167,7 +166,7 @@ LONG_STRING; \Phake::when(Arsse::$db)->begin->thenReturn(\Phake::mock(Transaction::class)); \Phake::when(Arsse::$db)->sessionResume->thenThrow(new \JKingWeb\Arsse\User\ExceptionSession("invalid")); \Phake::when(Arsse::$db)->sessionResume("PriestsOfSyrinx")->thenReturn([ - 'id' => "PriestsOfSyrinx", + 'id' => "PriestsOfSyrinx", 'created' => "2000-01-01 00:00:00", 'expires' => "2112-12-21 21:12:00", 'user' => Arsse::$user->id, @@ -241,13 +240,13 @@ LONG_STRING; Arsse::$user->id = null; self::setConf($conf); \Phake::when(Arsse::$db)->sessionResume("PriestsOfSyrinx")->thenReturn([ - 'id' => "PriestsOfSyrinx", + 'id' => "PriestsOfSyrinx", 'created' => "2000-01-01 00:00:00", 'expires' => "2112-12-21 21:12:00", 'user' => "john.doe@example.com", ]); \Phake::when(Arsse::$db)->sessionResume("ClockworkAngels")->thenReturn([ - 'id' => "ClockworkAngels", + 'id' => "ClockworkAngels", 'created' => "2000-01-01 00:00:00", 'expires' => "2112-12-21 21:12:00", 'user' => "jane.doe@example.com", @@ -277,21 +276,21 @@ LONG_STRING; public function generateLoginRequests(string $type): array { $john = "john.doe@example.com"; $johnGood = [ - 'user' => $john, + 'user' => $john, 'password' => "secret", ]; $johnBad = [ - 'user' => $john, + 'user' => $john, 'password' => "superman", ]; $johnSess = ["PriestsOfSyrinx", "SolarFederation"]; $jane = "jane.doe@example.com"; $janeGood = [ - 'user' => $jane, + 'user' => $jane, 'password' => "superman", ]; $janeBad = [ - 'user' => $jane, + 'user' => $jane, 'password' => "secret", ]; $janeSess = ["ClockworkAngels", "SevenCitiesOfGold"]; @@ -305,29 +304,29 @@ LONG_STRING; $sidJane = "ClockworkAngels"; $sidBad = "TheWatchmaker"; $defaults = [ - 'userPreAuth' => false, + 'userPreAuth' => false, 'userHTTPAuthRequired' => false, - 'userSessionEnforced' => true, + 'userSessionEnforced' => true, ]; $preAuth = [ - 'userPreAuth' => true, + 'userPreAuth' => true, 'userHTTPAuthRequired' => false, // implied true by pre-auth - 'userSessionEnforced' => true, + 'userSessionEnforced' => true, ]; $httpReq = [ - 'userPreAuth' => false, + 'userPreAuth' => false, 'userHTTPAuthRequired' => true, - 'userSessionEnforced' => true, + 'userSessionEnforced' => true, ]; $noSess = [ - 'userPreAuth' => false, + 'userPreAuth' => false, 'userHTTPAuthRequired' => false, - 'userSessionEnforced' => false, + 'userSessionEnforced' => false, ]; $fullHttp = [ - 'userPreAuth' => false, + 'userPreAuth' => false, 'userHTTPAuthRequired' => true, - 'userSessionEnforced' => false, + 'userSessionEnforced' => false, ]; $http401 = new EmptyResponse(401); if ($type === "login") { @@ -573,7 +572,7 @@ LONG_STRING; 'sid' => "PriestsOfSyrinx", ]; $exp = $this->respGood([ - 'version' => \JKingWeb\Arsse\REST\TinyTinyRSS\API::VERSION, + 'version' => \JKingWeb\Arsse\REST\TinyTinyRSS\API::VERSION, 'arsse_version' => Arsse::VERSION, ]); $this->assertMessage($exp, $this->req($data)); @@ -984,7 +983,7 @@ LONG_STRING; public function testAddALabel(): void { $in = [ ['op' => "addLabel", 'sid' => "PriestsOfSyrinx", 'caption' => "Software"], - ['op' => "addLabel", 'sid' => "PriestsOfSyrinx", 'caption' => "Hardware",], + ['op' => "addLabel", 'sid' => "PriestsOfSyrinx", 'caption' => "Hardware"], ['op' => "addLabel", 'sid' => "PriestsOfSyrinx"], ['op' => "addLabel", 'sid' => "PriestsOfSyrinx", 'caption' => ""], ['op' => "addLabel", 'sid' => "PriestsOfSyrinx", 'caption' => " "], @@ -1301,9 +1300,9 @@ LONG_STRING; \Phake::when(Arsse::$db)->articleCount($this->anything(), $this->equalTo((new Context)->unread(true)->modifiedSince(Date::sub("PT24H")), 2))->thenReturn(7); \Phake::when(Arsse::$db)->articleStarred($this->anything())->thenReturn($this->v($this->starred)); // the expectations are packed tightly since they're very verbose; one can use var_export() (or convert to JSON) to pretty-print them - $exp = ['categories'=>['identifier'=>'id','label'=>'name','items'=>[['name'=>'Special','id'=>'CAT:-1','bare_id'=>-1,'type'=>'category','unread'=>0,'items'=>[['name'=>'All articles','id'=>'FEED:-4','bare_id'=>-4,'icon'=>'images/folder.png','unread'=>35,'type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'',],['name'=>'Fresh articles','id'=>'FEED:-3','bare_id'=>-3,'icon'=>'images/fresh.png','unread'=>7,'type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'',],['name'=>'Starred articles','id'=>'FEED:-1','bare_id'=>-1,'icon'=>'images/star.png','unread'=>4,'type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'',],['name'=>'Published articles','id'=>'FEED:-2','bare_id'=>-2,'icon'=>'images/feed.png','unread'=>0,'type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'',],['name'=>'Archived articles','id'=>'FEED:0','bare_id'=>0,'icon'=>'images/archive.png','unread'=>0,'type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'',],['name'=>'Recently read','id'=>'FEED:-6','bare_id'=>-6,'icon'=>'images/time.png','unread'=>0,'type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'',],],],['name'=>'Labels','id'=>'CAT:-2','bare_id'=>-2,'type'=>'category','unread'=>6,'items'=>[['name'=>'Fascinating','id'=>'FEED:-1027','bare_id'=>-1027,'unread'=>0,'icon'=>'images/label.png','type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'','fg_color'=>'','bg_color'=>'',],['name'=>'Interesting','id'=>'FEED:-1029','bare_id'=>-1029,'unread'=>0,'icon'=>'images/label.png','type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'','fg_color'=>'','bg_color'=>'',],['name'=>'Logical','id'=>'FEED:-1025','bare_id'=>-1025,'unread'=>0,'icon'=>'images/label.png','type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'','fg_color'=>'','bg_color'=>'',],],],['name'=>'Photography','id'=>'CAT:4','bare_id'=>4,'parent_id'=>null,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'param'=>'(0 feeds)','items'=>[],],['name'=>'Politics','id'=>'CAT:3','bare_id'=>3,'parent_id'=>null,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'param'=>'(3 feeds)','items'=>[['name'=>'Local','id'=>'CAT:5','bare_id'=>5,'parent_id'=>3,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'param'=>'(1 feed)','items'=>[['name'=>'Toronto Star','id'=>'FEED:2','bare_id'=>2,'icon'=>'feed-icons/2.ico','error'=>'oops','param'=>'2011-11-11T11:11:11Z','unread'=>0,'auxcounter'=>0,'checkbox'=>false,],],],['name'=>'National','id'=>'CAT:6','bare_id'=>6,'parent_id'=>3,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'param'=>'(2 feeds)','items'=>[['name'=>'CBC News','id'=>'FEED:4','bare_id'=>4,'icon'=>'feed-icons/4.ico','error'=>'','param'=>'2017-10-09T15:58:34Z','unread'=>0,'auxcounter'=>0,'checkbox'=>false,],['name'=>'Ottawa Citizen','id'=>'FEED:5','bare_id'=>5,'icon'=>false,'error'=>'','param'=>'2017-07-07T17:07:17Z','unread'=>0,'auxcounter'=>0,'checkbox'=>false,],],],],],['name'=>'Science','id'=>'CAT:1','bare_id'=>1,'parent_id'=>null,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'param'=>'(2 feeds)','items'=>[['name'=>'Rocketry','id'=>'CAT:2','bare_id'=>2,'parent_id'=>1,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'param'=>'(1 feed)','items'=>[['name'=>'NASA JPL','id'=>'FEED:1','bare_id'=>1,'icon'=>false,'error'=>'','param'=>'2017-09-15T22:54:16Z','unread'=>0,'auxcounter'=>0,'checkbox'=>false,],],],['name'=>'Ars Technica','id'=>'FEED:3','bare_id'=>3,'icon'=>'feed-icons/3.ico','error'=>'argh','param'=>'2016-05-23T06:40:02Z','unread'=>0,'auxcounter'=>0,'checkbox'=>false,],],],['name'=>'Uncategorized','id'=>'CAT:0','bare_id'=>0,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'parent_id'=>null,'param'=>'(1 feed)','items'=>[['name'=>'Eurogamer','id'=>'FEED:6','bare_id'=>6,'icon'=>'feed-icons/6.ico','error'=>'','param'=>'2010-02-12T20:08:47Z','unread'=>0,'auxcounter'=>0,'checkbox'=>false,],],],],],]; + $exp = ['categories' => ['identifier' => 'id','label' => 'name','items' => [['name' => 'Special','id' => 'CAT:-1','bare_id' => -1,'type' => 'category','unread' => 0,'items' => [['name' => 'All articles','id' => 'FEED:-4','bare_id' => -4,'icon' => 'images/folder.png','unread' => 35,'type' => 'feed','auxcounter' => 0,'error' => '','updated' => ''],['name' => 'Fresh articles','id' => 'FEED:-3','bare_id' => -3,'icon' => 'images/fresh.png','unread' => 7,'type' => 'feed','auxcounter' => 0,'error' => '','updated' => ''],['name' => 'Starred articles','id' => 'FEED:-1','bare_id' => -1,'icon' => 'images/star.png','unread' => 4,'type' => 'feed','auxcounter' => 0,'error' => '','updated' => ''],['name' => 'Published articles','id' => 'FEED:-2','bare_id' => -2,'icon' => 'images/feed.png','unread' => 0,'type' => 'feed','auxcounter' => 0,'error' => '','updated' => ''],['name' => 'Archived articles','id' => 'FEED:0','bare_id' => 0,'icon' => 'images/archive.png','unread' => 0,'type' => 'feed','auxcounter' => 0,'error' => '','updated' => ''],['name' => 'Recently read','id' => 'FEED:-6','bare_id' => -6,'icon' => 'images/time.png','unread' => 0,'type' => 'feed','auxcounter' => 0,'error' => '','updated' => '']]],['name' => 'Labels','id' => 'CAT:-2','bare_id' => -2,'type' => 'category','unread' => 6,'items' => [['name' => 'Fascinating','id' => 'FEED:-1027','bare_id' => -1027,'unread' => 0,'icon' => 'images/label.png','type' => 'feed','auxcounter' => 0,'error' => '','updated' => '','fg_color' => '','bg_color' => ''],['name' => 'Interesting','id' => 'FEED:-1029','bare_id' => -1029,'unread' => 0,'icon' => 'images/label.png','type' => 'feed','auxcounter' => 0,'error' => '','updated' => '','fg_color' => '','bg_color' => ''],['name' => 'Logical','id' => 'FEED:-1025','bare_id' => -1025,'unread' => 0,'icon' => 'images/label.png','type' => 'feed','auxcounter' => 0,'error' => '','updated' => '','fg_color' => '','bg_color' => '']]],['name' => 'Photography','id' => 'CAT:4','bare_id' => 4,'parent_id' => null,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'param' => '(0 feeds)','items' => []],['name' => 'Politics','id' => 'CAT:3','bare_id' => 3,'parent_id' => null,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'param' => '(3 feeds)','items' => [['name' => 'Local','id' => 'CAT:5','bare_id' => 5,'parent_id' => 3,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'param' => '(1 feed)','items' => [['name' => 'Toronto Star','id' => 'FEED:2','bare_id' => 2,'icon' => 'feed-icons/2.ico','error' => 'oops','param' => '2011-11-11T11:11:11Z','unread' => 0,'auxcounter' => 0,'checkbox' => false]]],['name' => 'National','id' => 'CAT:6','bare_id' => 6,'parent_id' => 3,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'param' => '(2 feeds)','items' => [['name' => 'CBC News','id' => 'FEED:4','bare_id' => 4,'icon' => 'feed-icons/4.ico','error' => '','param' => '2017-10-09T15:58:34Z','unread' => 0,'auxcounter' => 0,'checkbox' => false],['name' => 'Ottawa Citizen','id' => 'FEED:5','bare_id' => 5,'icon' => false,'error' => '','param' => '2017-07-07T17:07:17Z','unread' => 0,'auxcounter' => 0,'checkbox' => false]]]]],['name' => 'Science','id' => 'CAT:1','bare_id' => 1,'parent_id' => null,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'param' => '(2 feeds)','items' => [['name' => 'Rocketry','id' => 'CAT:2','bare_id' => 2,'parent_id' => 1,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'param' => '(1 feed)','items' => [['name' => 'NASA JPL','id' => 'FEED:1','bare_id' => 1,'icon' => false,'error' => '','param' => '2017-09-15T22:54:16Z','unread' => 0,'auxcounter' => 0,'checkbox' => false]]],['name' => 'Ars Technica','id' => 'FEED:3','bare_id' => 3,'icon' => 'feed-icons/3.ico','error' => 'argh','param' => '2016-05-23T06:40:02Z','unread' => 0,'auxcounter' => 0,'checkbox' => false]]],['name' => 'Uncategorized','id' => 'CAT:0','bare_id' => 0,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'parent_id' => null,'param' => '(1 feed)','items' => [['name' => 'Eurogamer','id' => 'FEED:6','bare_id' => 6,'icon' => 'feed-icons/6.ico','error' => '','param' => '2010-02-12T20:08:47Z','unread' => 0,'auxcounter' => 0,'checkbox' => false]]]]]]; $this->assertMessage($this->respGood($exp), $this->req($in[0])); - $exp = ['categories'=>['identifier'=>'id','label'=>'name','items'=>[['name'=>'Special','id'=>'CAT:-1','bare_id'=>-1,'type'=>'category','unread'=>0,'items'=>[['name'=>'All articles','id'=>'FEED:-4','bare_id'=>-4,'icon'=>'images/folder.png','unread'=>35,'type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'',],['name'=>'Fresh articles','id'=>'FEED:-3','bare_id'=>-3,'icon'=>'images/fresh.png','unread'=>7,'type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'',],['name'=>'Starred articles','id'=>'FEED:-1','bare_id'=>-1,'icon'=>'images/star.png','unread'=>4,'type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'',],['name'=>'Published articles','id'=>'FEED:-2','bare_id'=>-2,'icon'=>'images/feed.png','unread'=>0,'type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'',],['name'=>'Archived articles','id'=>'FEED:0','bare_id'=>0,'icon'=>'images/archive.png','unread'=>0,'type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'',],['name'=>'Recently read','id'=>'FEED:-6','bare_id'=>-6,'icon'=>'images/time.png','unread'=>0,'type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'',],],],['name'=>'Labels','id'=>'CAT:-2','bare_id'=>-2,'type'=>'category','unread'=>6,'items'=>[['name'=>'Fascinating','id'=>'FEED:-1027','bare_id'=>-1027,'unread'=>0,'icon'=>'images/label.png','type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'','fg_color'=>'','bg_color'=>'',],['name'=>'Interesting','id'=>'FEED:-1029','bare_id'=>-1029,'unread'=>0,'icon'=>'images/label.png','type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'','fg_color'=>'','bg_color'=>'',],['name'=>'Logical','id'=>'FEED:-1025','bare_id'=>-1025,'unread'=>0,'icon'=>'images/label.png','type'=>'feed','auxcounter'=>0,'error'=>'','updated'=>'','fg_color'=>'','bg_color'=>'',],],],['name'=>'Politics','id'=>'CAT:3','bare_id'=>3,'parent_id'=>null,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'param'=>'(3 feeds)','items'=>[['name'=>'Local','id'=>'CAT:5','bare_id'=>5,'parent_id'=>3,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'param'=>'(1 feed)','items'=>[['name'=>'Toronto Star','id'=>'FEED:2','bare_id'=>2,'icon'=>'feed-icons/2.ico','error'=>'oops','param'=>'2011-11-11T11:11:11Z','unread'=>0,'auxcounter'=>0,'checkbox'=>false,],],],['name'=>'National','id'=>'CAT:6','bare_id'=>6,'parent_id'=>3,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'param'=>'(2 feeds)','items'=>[['name'=>'CBC News','id'=>'FEED:4','bare_id'=>4,'icon'=>'feed-icons/4.ico','error'=>'','param'=>'2017-10-09T15:58:34Z','unread'=>0,'auxcounter'=>0,'checkbox'=>false,],['name'=>'Ottawa Citizen','id'=>'FEED:5','bare_id'=>5,'icon'=>false,'error'=>'','param'=>'2017-07-07T17:07:17Z','unread'=>0,'auxcounter'=>0,'checkbox'=>false,],],],],],['name'=>'Science','id'=>'CAT:1','bare_id'=>1,'parent_id'=>null,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'param'=>'(2 feeds)','items'=>[['name'=>'Rocketry','id'=>'CAT:2','bare_id'=>2,'parent_id'=>1,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'param'=>'(1 feed)','items'=>[['name'=>'NASA JPL','id'=>'FEED:1','bare_id'=>1,'icon'=>false,'error'=>'','param'=>'2017-09-15T22:54:16Z','unread'=>0,'auxcounter'=>0,'checkbox'=>false,],],],['name'=>'Ars Technica','id'=>'FEED:3','bare_id'=>3,'icon'=>'feed-icons/3.ico','error'=>'argh','param'=>'2016-05-23T06:40:02Z','unread'=>0,'auxcounter'=>0,'checkbox'=>false,],],],['name'=>'Uncategorized','id'=>'CAT:0','bare_id'=>0,'type'=>'category','auxcounter'=>0,'unread'=>0,'child_unread'=>0,'checkbox'=>false,'parent_id'=>null,'param'=>'(1 feed)','items'=>[['name'=>'Eurogamer','id'=>'FEED:6','bare_id'=>6,'icon'=>'feed-icons/6.ico','error'=>'','param'=>'2010-02-12T20:08:47Z','unread'=>0,'auxcounter'=>0,'checkbox'=>false,],],],],],]; + $exp = ['categories' => ['identifier' => 'id','label' => 'name','items' => [['name' => 'Special','id' => 'CAT:-1','bare_id' => -1,'type' => 'category','unread' => 0,'items' => [['name' => 'All articles','id' => 'FEED:-4','bare_id' => -4,'icon' => 'images/folder.png','unread' => 35,'type' => 'feed','auxcounter' => 0,'error' => '','updated' => ''],['name' => 'Fresh articles','id' => 'FEED:-3','bare_id' => -3,'icon' => 'images/fresh.png','unread' => 7,'type' => 'feed','auxcounter' => 0,'error' => '','updated' => ''],['name' => 'Starred articles','id' => 'FEED:-1','bare_id' => -1,'icon' => 'images/star.png','unread' => 4,'type' => 'feed','auxcounter' => 0,'error' => '','updated' => ''],['name' => 'Published articles','id' => 'FEED:-2','bare_id' => -2,'icon' => 'images/feed.png','unread' => 0,'type' => 'feed','auxcounter' => 0,'error' => '','updated' => ''],['name' => 'Archived articles','id' => 'FEED:0','bare_id' => 0,'icon' => 'images/archive.png','unread' => 0,'type' => 'feed','auxcounter' => 0,'error' => '','updated' => ''],['name' => 'Recently read','id' => 'FEED:-6','bare_id' => -6,'icon' => 'images/time.png','unread' => 0,'type' => 'feed','auxcounter' => 0,'error' => '','updated' => '']]],['name' => 'Labels','id' => 'CAT:-2','bare_id' => -2,'type' => 'category','unread' => 6,'items' => [['name' => 'Fascinating','id' => 'FEED:-1027','bare_id' => -1027,'unread' => 0,'icon' => 'images/label.png','type' => 'feed','auxcounter' => 0,'error' => '','updated' => '','fg_color' => '','bg_color' => ''],['name' => 'Interesting','id' => 'FEED:-1029','bare_id' => -1029,'unread' => 0,'icon' => 'images/label.png','type' => 'feed','auxcounter' => 0,'error' => '','updated' => '','fg_color' => '','bg_color' => ''],['name' => 'Logical','id' => 'FEED:-1025','bare_id' => -1025,'unread' => 0,'icon' => 'images/label.png','type' => 'feed','auxcounter' => 0,'error' => '','updated' => '','fg_color' => '','bg_color' => '']]],['name' => 'Politics','id' => 'CAT:3','bare_id' => 3,'parent_id' => null,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'param' => '(3 feeds)','items' => [['name' => 'Local','id' => 'CAT:5','bare_id' => 5,'parent_id' => 3,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'param' => '(1 feed)','items' => [['name' => 'Toronto Star','id' => 'FEED:2','bare_id' => 2,'icon' => 'feed-icons/2.ico','error' => 'oops','param' => '2011-11-11T11:11:11Z','unread' => 0,'auxcounter' => 0,'checkbox' => false]]],['name' => 'National','id' => 'CAT:6','bare_id' => 6,'parent_id' => 3,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'param' => '(2 feeds)','items' => [['name' => 'CBC News','id' => 'FEED:4','bare_id' => 4,'icon' => 'feed-icons/4.ico','error' => '','param' => '2017-10-09T15:58:34Z','unread' => 0,'auxcounter' => 0,'checkbox' => false],['name' => 'Ottawa Citizen','id' => 'FEED:5','bare_id' => 5,'icon' => false,'error' => '','param' => '2017-07-07T17:07:17Z','unread' => 0,'auxcounter' => 0,'checkbox' => false]]]]],['name' => 'Science','id' => 'CAT:1','bare_id' => 1,'parent_id' => null,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'param' => '(2 feeds)','items' => [['name' => 'Rocketry','id' => 'CAT:2','bare_id' => 2,'parent_id' => 1,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'param' => '(1 feed)','items' => [['name' => 'NASA JPL','id' => 'FEED:1','bare_id' => 1,'icon' => false,'error' => '','param' => '2017-09-15T22:54:16Z','unread' => 0,'auxcounter' => 0,'checkbox' => false]]],['name' => 'Ars Technica','id' => 'FEED:3','bare_id' => 3,'icon' => 'feed-icons/3.ico','error' => 'argh','param' => '2016-05-23T06:40:02Z','unread' => 0,'auxcounter' => 0,'checkbox' => false]]],['name' => 'Uncategorized','id' => 'CAT:0','bare_id' => 0,'type' => 'category','auxcounter' => 0,'unread' => 0,'child_unread' => 0,'checkbox' => false,'parent_id' => null,'param' => '(1 feed)','items' => [['name' => 'Eurogamer','id' => 'FEED:6','bare_id' => 6,'icon' => 'feed-icons/6.ico','error' => '','param' => '2010-02-12T20:08:47Z','unread' => 0,'auxcounter' => 0,'checkbox' => false]]]]]]; $this->assertMessage($this->respGood($exp), $this->req($in[1])); } @@ -1413,7 +1412,7 @@ LONG_STRING; ['id' => -3, 'title' => "Fresh articles", 'unread' => "7", 'cat_id' => -1], ['id' => -4, 'title' => "All articles", 'unread' => "35", 'cat_id' => -1], ['id' => -6, 'title' => "Recently read", 'unread' => 0, 'cat_id' => -1], - ['id' => 0, 'title' => "Archived articles", 'unread' => "0", 'cat_id' => -1], + ['id' => 0, 'title' => "Archived articles", 'unread' => "0", 'cat_id' => -1], ], [ ['id' => -1, 'title' => "Starred articles", 'unread' => "4", 'cat_id' => -1], @@ -1450,7 +1449,7 @@ LONG_STRING; ['id' => -3, 'title' => "Fresh articles", 'unread' => "7", 'cat_id' => -1], ['id' => -4, 'title' => "All articles", 'unread' => "35", 'cat_id' => -1], ['id' => -6, 'title' => "Recently read", 'unread' => 0, 'cat_id' => -1], - ['id' => 0, 'title' => "Archived articles", 'unread' => "0", 'cat_id' => -1], + ['id' => 0, 'title' => "Archived articles", 'unread' => "0", 'cat_id' => -1], ['id' => 3, 'title' => 'Ars Technica', 'unread' => 2, 'cat_id' => 1, 'feed_url' => " http://example.com/3", 'has_icon' => true, 'last_updated' => 1463985602, 'order_id' => 1], ['id' => 4, 'title' => 'CBC News', 'unread' => 6, 'cat_id' => 6, 'feed_url' => " http://example.com/4", 'has_icon' => true, 'last_updated' => 1507564714, 'order_id' => 2], ['id' => 6, 'title' => 'Eurogamer', 'unread' => 0, 'cat_id' => 0, 'feed_url' => " http://example.com/6", 'has_icon' => true, 'last_updated' => 1266005327, 'order_id' => 3], @@ -1507,7 +1506,7 @@ LONG_STRING; }); } - protected function reduceFolders(int $id = null) : int { + protected function reduceFolders(int $id = null): int { $out = 0; foreach ($this->filterFolders($id) as $f) { $out += $this->reduceFolders($f['id']); @@ -1631,42 +1630,42 @@ LONG_STRING; $this->assertMessage($exp, $this->req($in[3])); $exp = [ [ - 'id' => "101", - 'guid' => null, - 'title' => 'Article title 1', - 'link' => 'http://example.com/1', - 'labels' => [], - 'unread' => true, - 'marked' => false, - 'published' => false, - 'comments' => "", - 'author' => '', - 'updated' => strtotime('2000-01-01T00:00:01Z'), - 'feed_id' => "8", - 'feed_title' => "Feed 11", + 'id' => "101", + 'guid' => null, + 'title' => 'Article title 1', + 'link' => 'http://example.com/1', + 'labels' => [], + 'unread' => true, + 'marked' => false, + 'published' => false, + 'comments' => "", + 'author' => '', + 'updated' => strtotime('2000-01-01T00:00:01Z'), + 'feed_id' => "8", + 'feed_title' => "Feed 11", 'attachments' => [], - 'score' => 0, - 'note' => null, - 'lang' => "", - 'content' => '

Article content 1

', + 'score' => 0, + 'note' => null, + 'lang' => "", + 'content' => '

Article content 1

', ], [ - 'id' => "102", - 'guid' => "SHA256:5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7", - 'title' => 'Article title 2', - 'link' => 'http://example.com/2', + 'id' => "102", + 'guid' => "SHA256:5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7", + 'title' => 'Article title 2', + 'link' => 'http://example.com/2', 'labels' => [ [-1025, "Logical", "", ""], [-1027, "Fascinating", "", ""], ], - 'unread' => false, - 'marked' => false, - 'published' => false, - 'comments' => "", - 'author' => "J. King", - 'updated' => strtotime('2000-01-02T00:00:02Z'), - 'feed_id' => "8", - 'feed_title' => "Feed 11", + 'unread' => false, + 'marked' => false, + 'published' => false, + 'comments' => "", + 'author' => "J. King", + 'updated' => strtotime('2000-01-02T00:00:02Z'), + 'feed_id' => "8", + 'feed_title' => "Feed 11", 'attachments' => [ [ 'id' => "0", @@ -1679,9 +1678,9 @@ LONG_STRING; 'post_id' => "102", ], ], - 'score' => 0, - 'note' => "Note 2", - 'lang' => "", + 'score' => 0, + 'note' => "Note 2", + 'lang' => "", 'content' => '

Article content 2

', ], ]; @@ -2012,44 +2011,44 @@ LONG_STRING; protected function generateHeadlines(int $id): Result { return new Result($this->v([ [ - 'id' => $id, - 'url' => 'http://example.com/1', - 'title' => 'Article title 1', + 'id' => $id, + 'url' => 'http://example.com/1', + 'title' => 'Article title 1', 'subscription_title' => "Feed 2112", - 'author' => '', - 'content' => '

“This & that, you know‽”

', - 'guid' => null, - 'published_date' => '2000-01-01 00:00:00', - 'edited_date' => '2000-01-01 00:00:00', - 'modified_date' => '2000-01-01 01:00:00', - 'unread' => 0, - 'starred' => 0, - 'edition' => 101, - 'subscription' => 12, - 'fingerprint' => 'f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6:fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4:18fdd4fa93d693128c43b004399e5c9cea6c261ddfa002518d3669f55d8c2207', - 'media_url' => null, - 'media_type' => null, - 'note' => "", + 'author' => '', + 'content' => '

“This & that, you know‽”

', + 'guid' => null, + 'published_date' => '2000-01-01 00:00:00', + 'edited_date' => '2000-01-01 00:00:00', + 'modified_date' => '2000-01-01 01:00:00', + 'unread' => 0, + 'starred' => 0, + 'edition' => 101, + 'subscription' => 12, + 'fingerprint' => 'f5cb8bfc1c7396dc9816af212a3e2ac5221585c2a00bf7ccb6aabd95dcfcd6a6:fb0bc8f8cb08913dc5a497db700e327f1d34e4987402687d494a5891f24714d4:18fdd4fa93d693128c43b004399e5c9cea6c261ddfa002518d3669f55d8c2207', + 'media_url' => null, + 'media_type' => null, + 'note' => "", ], [ - 'id' => 2112, - 'url' => 'http://example.com/2', - 'title' => 'Article title 2', + 'id' => 2112, + 'url' => 'http://example.com/2', + 'title' => 'Article title 2', 'subscription_title' => "Feed 11", - 'author' => 'J. King', - 'content' => $this->richContent, - 'guid' => '5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7', - 'published_date' => '2000-01-02 00:00:00', - 'edited_date' => '2000-01-02 00:00:02', - 'modified_date' => '2000-01-02 02:00:00', - 'unread' => 1, - 'starred' => 1, - 'edition' => 202, - 'subscription' => 8, - 'fingerprint' => '0e86d2de822a174fe3c44a466953e63ca1f1a58a19cbf475fce0855d4e3d5153:13075894189c47ffcfafd1dfe7fbb539f7c74a69d35a399b3abf8518952714f9:2abd0a8cba83b8214a66c8f0293ba63e467d720540e29ff8ddcdab069d4f1c9e', - 'media_url' => "http://example.com/text", - 'media_type' => "text/plain", - 'note' => "Note 2", + 'author' => 'J. King', + 'content' => $this->richContent, + 'guid' => '5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7', + 'published_date' => '2000-01-02 00:00:00', + 'edited_date' => '2000-01-02 00:00:02', + 'modified_date' => '2000-01-02 02:00:00', + 'unread' => 1, + 'starred' => 1, + 'edition' => 202, + 'subscription' => 8, + 'fingerprint' => '0e86d2de822a174fe3c44a466953e63ca1f1a58a19cbf475fce0855d4e3d5153:13075894189c47ffcfafd1dfe7fbb539f7c74a69d35a399b3abf8518952714f9:2abd0a8cba83b8214a66c8f0293ba63e467d720540e29ff8ddcdab069d4f1c9e', + 'media_url' => "http://example.com/text", + 'media_type' => "text/plain", + 'note' => "Note 2", ], ])); } @@ -2057,50 +2056,50 @@ LONG_STRING; protected function outputHeadlines(int $id): Response { return $this->respGood([ [ - 'id' => $id, - 'guid' => '', - 'title' => 'Article title 1', - 'link' => 'http://example.com/1', - 'labels' => [], - 'unread' => false, - 'marked' => false, - 'published' => false, - 'author' => '', - 'updated' => strtotime('2000-01-01T00:00:00Z'), - 'is_updated' => false, - 'feed_id' => "12", - 'feed_title' => "Feed 2112", - 'score' => 0, - 'note' => null, - 'lang' => "", - 'tags' => [], - 'comments_count' => 0, - 'comments_link' => "", + 'id' => $id, + 'guid' => '', + 'title' => 'Article title 1', + 'link' => 'http://example.com/1', + 'labels' => [], + 'unread' => false, + 'marked' => false, + 'published' => false, + 'author' => '', + 'updated' => strtotime('2000-01-01T00:00:00Z'), + 'is_updated' => false, + 'feed_id' => "12", + 'feed_title' => "Feed 2112", + 'score' => 0, + 'note' => null, + 'lang' => "", + 'tags' => [], + 'comments_count' => 0, + 'comments_link' => "", 'always_display_attachments' => false, ], [ - 'id' => 2112, - 'guid' => "SHA256:5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7", - 'title' => 'Article title 2', - 'link' => 'http://example.com/2', + 'id' => 2112, + 'guid' => "SHA256:5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7", + 'title' => 'Article title 2', + 'link' => 'http://example.com/2', 'labels' => [ [-1025, "Logical", "", ""], [-1027, "Fascinating", "", ""], ], - 'unread' => true, - 'marked' => true, - 'published' => false, - 'author' => "J. King", - 'updated' => strtotime('2000-01-02T00:00:02Z'), - 'is_updated' => true, - 'feed_id' => "8", - 'feed_title' => "Feed 11", - 'score' => 0, - 'note' => "Note 2", - 'lang' => "", - 'tags' => ["Boring", "Illogical"], - 'comments_count' => 0, - 'comments_link' => "", + 'unread' => true, + 'marked' => true, + 'published' => false, + 'author' => "J. King", + 'updated' => strtotime('2000-01-02T00:00:02Z'), + 'is_updated' => true, + 'feed_id' => "8", + 'feed_title' => "Feed 11", + 'score' => 0, + 'note' => "Note 2", + 'lang' => "", + 'tags' => ["Boring", "Illogical"], + 'comments_count' => 0, + 'comments_link' => "", 'always_display_attachments' => false, ], ]); diff --git a/tests/cases/REST/TinyTinyRSS/TestIcon.php b/tests/cases/REST/TinyTinyRSS/TestIcon.php index 3877ab7e..38dbd8fe 100644 --- a/tests/cases/REST/TinyTinyRSS/TestIcon.php +++ b/tests/cases/REST/TinyTinyRSS/TestIcon.php @@ -11,7 +11,6 @@ use JKingWeb\Arsse\User; use JKingWeb\Arsse\Database; use JKingWeb\Arsse\REST\TinyTinyRSS\Icon; use Psr\Http\Message\ResponseInterface; -use Laminas\Diactoros\ServerRequest; use Laminas\Diactoros\Response\EmptyResponse as Response; /** @covers \JKingWeb\Arsse\REST\TinyTinyRSS\Icon */ diff --git a/tests/cases/REST/TinyTinyRSS/TestSearch.php b/tests/cases/REST/TinyTinyRSS/TestSearch.php index f99ce7e6..6999b0d6 100644 --- a/tests/cases/REST/TinyTinyRSS/TestSearch.php +++ b/tests/cases/REST/TinyTinyRSS/TestSearch.php @@ -13,107 +13,107 @@ use JKingWeb\Arsse\REST\TinyTinyRSS\Search; class TestSearch extends \JKingWeb\Arsse\Test\AbstractTest { public function provideSearchStrings(): iterable { return [ - 'Blank string' => ["", new Context], - 'Whitespace only' => [" \n \t", new Context], - 'Simple bare token' => ['OOK', (new Context)->searchTerms(["ook"])], - 'Simple negative bare token' => ['-OOK', (new Context)->not->searchTerms(["ook"])], - 'Simple quoted token' => ['"OOK eek"', (new Context)->searchTerms(["ook eek"])], - 'Simple negative quoted token' => ['"-OOK eek"', (new Context)->not->searchTerms(["ook eek"])], - 'Simple bare tokens' => ['OOK eek', (new Context)->searchTerms(["ook", "eek"])], - 'Simple mixed bare tokens' => ['-OOK eek', (new Context)->not->searchTerms(["ook"])->searchTerms(["eek"])], - 'Unclosed quoted token' => ['"OOK eek', (new Context)->searchTerms(["ook eek"])], - 'Unclosed quoted token 2' => ['"OOK eek" "', (new Context)->searchTerms(["ook eek"])], - 'Broken quoted token 1' => ['"-OOK"eek"', (new Context)->not->searchTerms(["ookeek\""])], - 'Broken quoted token 2' => ['""eek"', (new Context)->searchTerms(["eek\""])], - 'Broken quoted token 3' => ['"-"eek"', (new Context)->not->searchTerms(["eek\""])], - 'Empty quoted token' => ['""', new Context], - 'Simple quoted tokens' => ['"OOK eek" "eek ack"', (new Context)->searchTerms(["ook eek", "eek ack"])], - 'Bare blank tag' => [':ook', (new Context)->searchTerms([":ook"])], - 'Quoted blank tag' => ['":ook"', (new Context)->searchTerms([":ook"])], - 'Bare negative blank tag' => ['-:ook', (new Context)->not->searchTerms([":ook"])], - 'Quoted negative blank tag' => ['"-:ook"', (new Context)->not->searchTerms([":ook"])], - 'Bare valueless blank tag' => [':', (new Context)->searchTerms([":"])], - 'Quoted valueless blank tag' => ['":"', (new Context)->searchTerms([":"])], - 'Bare negative valueless blank tag' => ['-:', (new Context)->not->searchTerms([":"])], + 'Blank string' => ["", new Context], + 'Whitespace only' => [" \n \t", new Context], + 'Simple bare token' => ['OOK', (new Context)->searchTerms(["ook"])], + 'Simple negative bare token' => ['-OOK', (new Context)->not->searchTerms(["ook"])], + 'Simple quoted token' => ['"OOK eek"', (new Context)->searchTerms(["ook eek"])], + 'Simple negative quoted token' => ['"-OOK eek"', (new Context)->not->searchTerms(["ook eek"])], + 'Simple bare tokens' => ['OOK eek', (new Context)->searchTerms(["ook", "eek"])], + 'Simple mixed bare tokens' => ['-OOK eek', (new Context)->not->searchTerms(["ook"])->searchTerms(["eek"])], + 'Unclosed quoted token' => ['"OOK eek', (new Context)->searchTerms(["ook eek"])], + 'Unclosed quoted token 2' => ['"OOK eek" "', (new Context)->searchTerms(["ook eek"])], + 'Broken quoted token 1' => ['"-OOK"eek"', (new Context)->not->searchTerms(["ookeek\""])], + 'Broken quoted token 2' => ['""eek"', (new Context)->searchTerms(["eek\""])], + 'Broken quoted token 3' => ['"-"eek"', (new Context)->not->searchTerms(["eek\""])], + 'Empty quoted token' => ['""', new Context], + 'Simple quoted tokens' => ['"OOK eek" "eek ack"', (new Context)->searchTerms(["ook eek", "eek ack"])], + 'Bare blank tag' => [':ook', (new Context)->searchTerms([":ook"])], + 'Quoted blank tag' => ['":ook"', (new Context)->searchTerms([":ook"])], + 'Bare negative blank tag' => ['-:ook', (new Context)->not->searchTerms([":ook"])], + 'Quoted negative blank tag' => ['"-:ook"', (new Context)->not->searchTerms([":ook"])], + 'Bare valueless blank tag' => [':', (new Context)->searchTerms([":"])], + 'Quoted valueless blank tag' => ['":"', (new Context)->searchTerms([":"])], + 'Bare negative valueless blank tag' => ['-:', (new Context)->not->searchTerms([":"])], 'Quoted negative valueless blank tag' => ['"-:"', (new Context)->not->searchTerms([":"])], - 'Double negative' => ['--eek', (new Context)->not->searchTerms(["-eek"])], - 'Double negative 2' => ['--@eek', (new Context)->not->searchTerms(["-@eek"])], - 'Double negative 3' => ['"--@eek"', (new Context)->not->searchTerms(["-@eek"])], - 'Double negative 4' => ['"--eek"', (new Context)->not->searchTerms(["-eek"])], - 'Negative before quote' => ['-"ook"', (new Context)->not->searchTerms(["\"ook\""])], - 'Bare unread tag true' => ['UNREAD:true', (new Context)->unread(true)], - 'Bare unread tag false' => ['UNREAD:false', (new Context)->unread(false)], - 'Bare negative unread tag true' => ['-unread:true', (new Context)->unread(false)], - 'Bare negative unread tag false' => ['-unread:false', (new Context)->unread(true)], - 'Quoted unread tag true' => ['"UNREAD:true"', (new Context)->unread(true)], - 'Quoted unread tag false' => ['"UNREAD:false"', (new Context)->unread(false)], - 'Quoted negative unread tag true' => ['"-unread:true"', (new Context)->unread(false)], - 'Quoted negative unread tag false' => ['"-unread:false"', (new Context)->unread(true)], - 'Bare star tag true' => ['STAR:true', (new Context)->starred(true)], - 'Bare star tag false' => ['STAR:false', (new Context)->starred(false)], - 'Bare negative star tag true' => ['-star:true', (new Context)->starred(false)], - 'Bare negative star tag false' => ['-star:false', (new Context)->starred(true)], - 'Quoted star tag true' => ['"STAR:true"', (new Context)->starred(true)], - 'Quoted star tag false' => ['"STAR:false"', (new Context)->starred(false)], - 'Quoted negative star tag true' => ['"-star:true"', (new Context)->starred(false)], - 'Quoted negative star tag false' => ['"-star:false"', (new Context)->starred(true)], - 'Bare note tag true' => ['NOTE:true', (new Context)->annotated(true)], - 'Bare note tag false' => ['NOTE:false', (new Context)->annotated(false)], - 'Bare negative note tag true' => ['-note:true', (new Context)->annotated(false)], - 'Bare negative note tag false' => ['-note:false', (new Context)->annotated(true)], - 'Quoted note tag true' => ['"NOTE:true"', (new Context)->annotated(true)], - 'Quoted note tag false' => ['"NOTE:false"', (new Context)->annotated(false)], - 'Quoted negative note tag true' => ['"-note:true"', (new Context)->annotated(false)], - 'Quoted negative note tag false' => ['"-note:false"', (new Context)->annotated(true)], - 'Bare pub tag true' => ['PUB:true', null], - 'Bare pub tag false' => ['PUB:false', new Context], - 'Bare negative pub tag true' => ['-pub:true', new Context], - 'Bare negative pub tag false' => ['-pub:false', null], - 'Quoted pub tag true' => ['"PUB:true"', null], - 'Quoted pub tag false' => ['"PUB:false"', new Context], - 'Quoted negative pub tag true' => ['"-pub:true"', new Context], - 'Quoted negative pub tag false' => ['"-pub:false"', null], - 'Non-boolean unread tag' => ['unread:maybe', (new Context)->searchTerms(["unread:maybe"])], - 'Non-boolean star tag' => ['star:maybe', (new Context)->searchTerms(["star:maybe"])], - 'Non-boolean pub tag' => ['pub:maybe', (new Context)->searchTerms(["pub:maybe"])], - 'Non-boolean note tag' => ['note:maybe', (new Context)->annotationTerms(["maybe"])], - 'Valueless unread tag' => ['unread:', (new Context)->searchTerms(["unread:"])], - 'Valueless star tag' => ['star:', (new Context)->searchTerms(["star:"])], - 'Valueless pub tag' => ['pub:', (new Context)->searchTerms(["pub:"])], - 'Valueless note tag' => ['note:', (new Context)->searchTerms(["note:"])], - 'Valueless title tag' => ['title:', (new Context)->searchTerms(["title:"])], - 'Valueless author tag' => ['author:', (new Context)->searchTerms(["author:"])], - 'Escaped quote 1' => ['"""I say, Jeeves!"""', (new Context)->searchTerms(["\"i say, jeeves!\""])], - 'Escaped quote 2' => ['"\\"I say, Jeeves!\\""', (new Context)->searchTerms(["\"i say, jeeves!\""])], - 'Escaped quote 3' => ['\\"I say, Jeeves!\\"', (new Context)->searchTerms(["\\\"i", "say,", "jeeves!\\\""])], - 'Escaped quote 4' => ['"\\"\\I say, Jeeves!\\""', (new Context)->searchTerms(["\"\\i say, jeeves!\""])], - 'Escaped quote 5' => ['"\\I say, Jeeves!"', (new Context)->searchTerms(["\\i say, jeeves!"])], - 'Escaped quote 6' => ['"\\"I say, Jeeves!\\', (new Context)->searchTerms(["\"i say, jeeves!\\"])], - 'Escaped quote 7' => ['"\\', (new Context)->searchTerms(["\\"])], - 'Quoted author tag 1' => ['"author:Neal Stephenson"', (new Context)->authorTerms(["neal stephenson"])], - 'Quoted author tag 2' => ['"author:Jo ""Cap\'n Tripps"" Ashburn"', (new Context)->authorTerms(["jo \"cap'n tripps\" ashburn"])], - 'Quoted author tag 3' => ['"author:Jo \\"Cap\'n Tripps\\" Ashburn"', (new Context)->authorTerms(["jo \"cap'n tripps\" ashburn"])], - 'Quoted author tag 4' => ['"author:Jo ""Cap\'n Tripps"Ashburn"', (new Context)->authorTerms(["jo \"cap'n trippsashburn\""])], - 'Quoted author tag 5' => ['"author:Jo ""Cap\'n Tripps\ Ashburn"', (new Context)->authorTerms(["jo \"cap'n tripps\\ ashburn"])], - 'Quoted author tag 6' => ['"author:Neal Stephenson\\', (new Context)->authorTerms(["neal stephenson\\"])], - 'Quoted title tag' => ['"title:Generic title"', (new Context)->titleTerms(["generic title"])], - 'Contradictory booleans' => ['unread:true -unread:true', null], - 'Doubled boolean' => ['unread:true unread:true', (new Context)->unread(true)], - 'Bare blank date' => ['@', new Context], - 'Quoted blank date' => ['"@"', new Context], - 'Bare ISO date' => ['@2019-03-01', (new Context)->modifiedSince("2019-03-01T00:00:00Z")->notModifiedSince("2019-03-01T23:59:59Z")], - 'Quoted ISO date' => ['"@March 1st, 2019"', (new Context)->modifiedSince("2019-03-01T00:00:00Z")->notModifiedSince("2019-03-01T23:59:59Z")], - 'Bare negative ISO date' => ['-@2019-03-01', (new Context)->not->modifiedSince("2019-03-01T00:00:00Z")->not->notModifiedSince("2019-03-01T23:59:59Z")], - 'Quoted negative English date' => ['"-@March 1st, 2019"', (new Context)->not->modifiedSince("2019-03-01T00:00:00Z")->not->notModifiedSince("2019-03-01T23:59:59Z")], - 'Invalid date' => ['@Bugaboo', new Context], - 'Escaped quoted date 1' => ['"@""Yesterday" and today', (new Context)->searchTerms(["and", "today"])], - 'Escaped quoted date 2' => ['"@\\"Yesterday" and today', (new Context)->searchTerms(["and", "today"])], - 'Escaped quoted date 3' => ['"@Yesterday\\', new Context], - 'Escaped quoted date 4' => ['"@Yesterday\\and today', new Context], - 'Escaped quoted date 5' => ['"@Yesterday"and today', (new Context)->searchTerms(["today"])], - 'Contradictory dates' => ['@Yesterday @Today', null], - 'Doubled date' => ['"@March 1st, 2019" @2019-03-01', (new Context)->modifiedSince("2019-03-01T00:00:00Z")->notModifiedSince("2019-03-01T23:59:59Z")], - 'Doubled negative date' => ['"-@March 1st, 2019" -@2019-03-01', (new Context)->not->modifiedSince("2019-03-01T00:00:00Z")->not->notModifiedSince("2019-03-01T23:59:59Z")], + 'Double negative' => ['--eek', (new Context)->not->searchTerms(["-eek"])], + 'Double negative 2' => ['--@eek', (new Context)->not->searchTerms(["-@eek"])], + 'Double negative 3' => ['"--@eek"', (new Context)->not->searchTerms(["-@eek"])], + 'Double negative 4' => ['"--eek"', (new Context)->not->searchTerms(["-eek"])], + 'Negative before quote' => ['-"ook"', (new Context)->not->searchTerms(["\"ook\""])], + 'Bare unread tag true' => ['UNREAD:true', (new Context)->unread(true)], + 'Bare unread tag false' => ['UNREAD:false', (new Context)->unread(false)], + 'Bare negative unread tag true' => ['-unread:true', (new Context)->unread(false)], + 'Bare negative unread tag false' => ['-unread:false', (new Context)->unread(true)], + 'Quoted unread tag true' => ['"UNREAD:true"', (new Context)->unread(true)], + 'Quoted unread tag false' => ['"UNREAD:false"', (new Context)->unread(false)], + 'Quoted negative unread tag true' => ['"-unread:true"', (new Context)->unread(false)], + 'Quoted negative unread tag false' => ['"-unread:false"', (new Context)->unread(true)], + 'Bare star tag true' => ['STAR:true', (new Context)->starred(true)], + 'Bare star tag false' => ['STAR:false', (new Context)->starred(false)], + 'Bare negative star tag true' => ['-star:true', (new Context)->starred(false)], + 'Bare negative star tag false' => ['-star:false', (new Context)->starred(true)], + 'Quoted star tag true' => ['"STAR:true"', (new Context)->starred(true)], + 'Quoted star tag false' => ['"STAR:false"', (new Context)->starred(false)], + 'Quoted negative star tag true' => ['"-star:true"', (new Context)->starred(false)], + 'Quoted negative star tag false' => ['"-star:false"', (new Context)->starred(true)], + 'Bare note tag true' => ['NOTE:true', (new Context)->annotated(true)], + 'Bare note tag false' => ['NOTE:false', (new Context)->annotated(false)], + 'Bare negative note tag true' => ['-note:true', (new Context)->annotated(false)], + 'Bare negative note tag false' => ['-note:false', (new Context)->annotated(true)], + 'Quoted note tag true' => ['"NOTE:true"', (new Context)->annotated(true)], + 'Quoted note tag false' => ['"NOTE:false"', (new Context)->annotated(false)], + 'Quoted negative note tag true' => ['"-note:true"', (new Context)->annotated(false)], + 'Quoted negative note tag false' => ['"-note:false"', (new Context)->annotated(true)], + 'Bare pub tag true' => ['PUB:true', null], + 'Bare pub tag false' => ['PUB:false', new Context], + 'Bare negative pub tag true' => ['-pub:true', new Context], + 'Bare negative pub tag false' => ['-pub:false', null], + 'Quoted pub tag true' => ['"PUB:true"', null], + 'Quoted pub tag false' => ['"PUB:false"', new Context], + 'Quoted negative pub tag true' => ['"-pub:true"', new Context], + 'Quoted negative pub tag false' => ['"-pub:false"', null], + 'Non-boolean unread tag' => ['unread:maybe', (new Context)->searchTerms(["unread:maybe"])], + 'Non-boolean star tag' => ['star:maybe', (new Context)->searchTerms(["star:maybe"])], + 'Non-boolean pub tag' => ['pub:maybe', (new Context)->searchTerms(["pub:maybe"])], + 'Non-boolean note tag' => ['note:maybe', (new Context)->annotationTerms(["maybe"])], + 'Valueless unread tag' => ['unread:', (new Context)->searchTerms(["unread:"])], + 'Valueless star tag' => ['star:', (new Context)->searchTerms(["star:"])], + 'Valueless pub tag' => ['pub:', (new Context)->searchTerms(["pub:"])], + 'Valueless note tag' => ['note:', (new Context)->searchTerms(["note:"])], + 'Valueless title tag' => ['title:', (new Context)->searchTerms(["title:"])], + 'Valueless author tag' => ['author:', (new Context)->searchTerms(["author:"])], + 'Escaped quote 1' => ['"""I say, Jeeves!"""', (new Context)->searchTerms(["\"i say, jeeves!\""])], + 'Escaped quote 2' => ['"\\"I say, Jeeves!\\""', (new Context)->searchTerms(["\"i say, jeeves!\""])], + 'Escaped quote 3' => ['\\"I say, Jeeves!\\"', (new Context)->searchTerms(["\\\"i", "say,", "jeeves!\\\""])], + 'Escaped quote 4' => ['"\\"\\I say, Jeeves!\\""', (new Context)->searchTerms(["\"\\i say, jeeves!\""])], + 'Escaped quote 5' => ['"\\I say, Jeeves!"', (new Context)->searchTerms(["\\i say, jeeves!"])], + 'Escaped quote 6' => ['"\\"I say, Jeeves!\\', (new Context)->searchTerms(["\"i say, jeeves!\\"])], + 'Escaped quote 7' => ['"\\', (new Context)->searchTerms(["\\"])], + 'Quoted author tag 1' => ['"author:Neal Stephenson"', (new Context)->authorTerms(["neal stephenson"])], + 'Quoted author tag 2' => ['"author:Jo ""Cap\'n Tripps"" Ashburn"', (new Context)->authorTerms(["jo \"cap'n tripps\" ashburn"])], + 'Quoted author tag 3' => ['"author:Jo \\"Cap\'n Tripps\\" Ashburn"', (new Context)->authorTerms(["jo \"cap'n tripps\" ashburn"])], + 'Quoted author tag 4' => ['"author:Jo ""Cap\'n Tripps"Ashburn"', (new Context)->authorTerms(["jo \"cap'n trippsashburn\""])], + 'Quoted author tag 5' => ['"author:Jo ""Cap\'n Tripps\ Ashburn"', (new Context)->authorTerms(["jo \"cap'n tripps\\ ashburn"])], + 'Quoted author tag 6' => ['"author:Neal Stephenson\\', (new Context)->authorTerms(["neal stephenson\\"])], + 'Quoted title tag' => ['"title:Generic title"', (new Context)->titleTerms(["generic title"])], + 'Contradictory booleans' => ['unread:true -unread:true', null], + 'Doubled boolean' => ['unread:true unread:true', (new Context)->unread(true)], + 'Bare blank date' => ['@', new Context], + 'Quoted blank date' => ['"@"', new Context], + 'Bare ISO date' => ['@2019-03-01', (new Context)->modifiedSince("2019-03-01T00:00:00Z")->notModifiedSince("2019-03-01T23:59:59Z")], + 'Quoted ISO date' => ['"@March 1st, 2019"', (new Context)->modifiedSince("2019-03-01T00:00:00Z")->notModifiedSince("2019-03-01T23:59:59Z")], + 'Bare negative ISO date' => ['-@2019-03-01', (new Context)->not->modifiedSince("2019-03-01T00:00:00Z")->not->notModifiedSince("2019-03-01T23:59:59Z")], + 'Quoted negative English date' => ['"-@March 1st, 2019"', (new Context)->not->modifiedSince("2019-03-01T00:00:00Z")->not->notModifiedSince("2019-03-01T23:59:59Z")], + 'Invalid date' => ['@Bugaboo', new Context], + 'Escaped quoted date 1' => ['"@""Yesterday" and today', (new Context)->searchTerms(["and", "today"])], + 'Escaped quoted date 2' => ['"@\\"Yesterday" and today', (new Context)->searchTerms(["and", "today"])], + 'Escaped quoted date 3' => ['"@Yesterday\\', new Context], + 'Escaped quoted date 4' => ['"@Yesterday\\and today', new Context], + 'Escaped quoted date 5' => ['"@Yesterday"and today', (new Context)->searchTerms(["today"])], + 'Contradictory dates' => ['@Yesterday @Today', null], + 'Doubled date' => ['"@March 1st, 2019" @2019-03-01', (new Context)->modifiedSince("2019-03-01T00:00:00Z")->notModifiedSince("2019-03-01T23:59:59Z")], + 'Doubled negative date' => ['"-@March 1st, 2019" -@2019-03-01', (new Context)->not->modifiedSince("2019-03-01T00:00:00Z")->not->notModifiedSince("2019-03-01T23:59:59Z")], ]; } diff --git a/tests/cases/Service/TestSubprocess.php b/tests/cases/Service/TestSubprocess.php index f5c3a371..b6ca047d 100644 --- a/tests/cases/Service/TestSubprocess.php +++ b/tests/cases/Service/TestSubprocess.php @@ -7,7 +7,6 @@ declare(strict_types=1); namespace JKingWeb\Arsse\TestCase\Service; use JKingWeb\Arsse\Arsse; -use JKingWeb\Arsse\Database; use JKingWeb\Arsse\Service\Driver as DriverInterface; use JKingWeb\Arsse\Service\Subprocess\Driver; diff --git a/tests/cases/TestArsse.php b/tests/cases/TestArsse.php index edb7e121..a15a8009 100644 --- a/tests/cases/TestArsse.php +++ b/tests/cases/TestArsse.php @@ -11,7 +11,6 @@ use JKingWeb\Arsse\Conf; use JKingWeb\Arsse\Lang; use JKingWeb\Arsse\User; use JKingWeb\Arsse\Database; -use JKingWeb\Arsse\Service; /** @covers \JKingWeb\Arsse\Arsse */ class TestArsse extends \JKingWeb\Arsse\Test\AbstractTest { diff --git a/tests/cases/User/TestInternal.php b/tests/cases/User/TestInternal.php index 4b9cfb80..4333771d 100644 --- a/tests/cases/User/TestInternal.php +++ b/tests/cases/User/TestInternal.php @@ -32,7 +32,7 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest { /** * @dataProvider provideAuthentication * @group slow - */ + */ public function testAuthenticateAUser(bool $authorized, string $user, $password, bool $exp): void { if ($authorized) { \Phake::when(Arsse::$db)->userPasswordGet("john.doe@example.com")->thenReturn('$2y$10$1zbqRJhxM8uUjeSBPp4IhO90xrqK0XjEh9Z16iIYEFRV4U.zeAFom'); // hash of "secret" diff --git a/tests/cases/User/TestUser.php b/tests/cases/User/TestUser.php index df31c591..93b5ee72 100644 --- a/tests/cases/User/TestUser.php +++ b/tests/cases/User/TestUser.php @@ -147,7 +147,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { $calls = 2; } } else { - $calls = 4; + $calls = 4; } try { $pass1 = $u->add($user, null); @@ -255,7 +255,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { $calls = 2; } } else { - $calls = 4; + $calls = 4; } try { $pass1 = $u->passwordSet($user, null); diff --git a/tests/docroot/Feed/Caching/304Conditional.php b/tests/docroot/Feed/Caching/304Conditional.php index 6b2002f0..42b4a5a8 100644 --- a/tests/docroot/Feed/Caching/304Conditional.php +++ b/tests/docroot/Feed/Caching/304Conditional.php @@ -14,8 +14,8 @@ if ( } else { return [ 'code' => 304, - 'lastMod' => random_int(0, 2^31), - 'fields' => [ + 'lastMod' => random_int(0, 2 ^ 31), + 'fields' => [ "ETag: ".bin2hex(random_bytes(8)), ], ]; diff --git a/tests/docroot/Feed/Caching/304Random.php b/tests/docroot/Feed/Caching/304Random.php index f444eb8f..29b2bdde 100644 --- a/tests/docroot/Feed/Caching/304Random.php +++ b/tests/docroot/Feed/Caching/304Random.php @@ -1,7 +1,7 @@ 304, - 'lastMod' => random_int(0, 2^31), - 'fields' => [ + 'lastMod' => random_int(0, 2 ^ 31), + 'fields' => [ "ETag: ".bin2hex(random_bytes(8)), ], ]; diff --git a/tests/docroot/Feed/Fetching/EndlessLoop.php b/tests/docroot/Feed/Fetching/EndlessLoop.php index e13f504c..e9296f3f 100644 --- a/tests/docroot/Feed/Fetching/EndlessLoop.php +++ b/tests/docroot/Feed/Fetching/EndlessLoop.php @@ -3,5 +3,5 @@ 'cache' => false, 'fields' => [ 'Location: http://localhost:'.$_SERVER['SERVER_PORT'].$_SERVER['REQUEST_URI']."0", - ] + ], ]; diff --git a/tests/lib/AbstractTest.php b/tests/lib/AbstractTest.php index 1a032788..ed172430 100644 --- a/tests/lib/AbstractTest.php +++ b/tests/lib/AbstractTest.php @@ -70,7 +70,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { protected function serverRequest(string $method, string $url, string $urlPrefix, array $headers = [], array $vars = [], $body = null, string $type = "", $params = [], string $user = null): ServerRequestInterface { $server = [ 'REQUEST_METHOD' => $method, - 'REQUEST_URI' => $url, + 'REQUEST_URI' => $url, ]; if (strlen($type)) { $server['HTTP_CONTENT_TYPE'] = $type; @@ -109,7 +109,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { $req = $req->withAttribute("authenticationFailed", true); } } - if (strlen($type) &&strlen($body ?? "")) { + if (strlen($type) && strlen($body ?? "")) { $req = $req->withHeader("Content-Type", $type); } foreach ($headers as $key => $value) { @@ -135,8 +135,8 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { $this->expectException(get_class($msg)); $this->expectExceptionCode($msg->getCode()); } else { - $class = \JKingWeb\Arsse\NS_BASE . ($prefix !== "" ? str_replace("/", "\\", $prefix) . "\\" : "") . $type; - $msgID = ($prefix !== "" ? $prefix . "/" : "") . $type. ".$msg"; + $class = \JKingWeb\Arsse\NS_BASE.($prefix !== "" ? str_replace("/", "\\", $prefix)."\\" : "").$type; + $msgID = ($prefix !== "" ? $prefix."/" : "").$type.".$msg"; if (array_key_exists($msgID, Exception::CODES)) { $code = Exception::CODES[$msgID]; } else { @@ -177,7 +177,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { public function assertTime($exp, $test, string $msg = ''): void { $test = $this->approximateTime($exp, $test); - $exp = Date::transform($exp, "iso8601"); + $exp = Date::transform($exp, "iso8601"); $test = Date::transform($test, "iso8601"); $this->assertSame($exp, $test, $msg); } @@ -260,7 +260,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { break; } } - if ($row===$test) { + if ($row === $test) { $data[$index] = $test; break; } diff --git a/tests/lib/DatabaseDrivers/MySQL.php b/tests/lib/DatabaseDrivers/MySQL.php index c0863b7d..f1571a2b 100644 --- a/tests/lib/DatabaseDrivers/MySQL.php +++ b/tests/lib/DatabaseDrivers/MySQL.php @@ -16,7 +16,7 @@ trait MySQL { protected static $dbStatementClass = \JKingWeb\Arsse\Db\MySQL\Statement::class; protected static $dbDriverClass = \JKingWeb\Arsse\Db\MySQL\Driver::class; protected static $stringOutput = true; - + public static function dbInterface() { $d = @new \mysqli(Arsse::$conf->dbMySQLHost, Arsse::$conf->dbMySQLUser, Arsse::$conf->dbMySQLPass, Arsse::$conf->dbMySQLDb, Arsse::$conf->dbMySQLPort); if ($d->connect_errno) { @@ -28,7 +28,7 @@ trait MySQL { } return $d; } - + public static function dbTableList($db): array { $listTables = "SELECT table_name as name from information_schema.tables where table_schema = database() and table_name like 'arsse_%'"; if ($db instanceof Driver) { diff --git a/tests/lib/DatabaseDrivers/MySQLPDO.php b/tests/lib/DatabaseDrivers/MySQLPDO.php index 0b9ffef2..bbaf8abb 100644 --- a/tests/lib/DatabaseDrivers/MySQLPDO.php +++ b/tests/lib/DatabaseDrivers/MySQLPDO.php @@ -7,7 +7,6 @@ declare(strict_types=1); namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; -use JKingWeb\Arsse\Db\Driver; trait MySQLPDO { protected static $implementation = "PDO MySQL"; @@ -16,22 +15,22 @@ trait MySQLPDO { protected static $dbStatementClass = \JKingWeb\Arsse\Db\MySQL\PDOStatement::class; protected static $dbDriverClass = \JKingWeb\Arsse\Db\MySQL\PDODriver::class; protected static $stringOutput = true; - + public static function dbInterface() { try { $dsn = []; $params = [ 'charset' => "utf8mb4", - 'host' => Arsse::$conf->dbMySQLHost, - 'port' => Arsse::$conf->dbMySQLPort, - 'dbname' => Arsse::$conf->dbMySQLDb, + 'host' => Arsse::$conf->dbMySQLHost, + 'port' => Arsse::$conf->dbMySQLPort, + 'dbname' => Arsse::$conf->dbMySQLDb, ]; foreach ($params as $k => $v) { $dsn[] = "$k=$v"; } $dsn = "mysql:".implode(";", $dsn); $d = new \PDO($dsn, Arsse::$conf->dbMySQLUser, Arsse::$conf->dbMySQLPass, [ - \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, + \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, \PDO::MYSQL_ATTR_MULTI_STATEMENTS => false, ]); foreach (\JKingWeb\Arsse\Db\MySQL\PDODriver::makeSetupQueries() as $q) { @@ -42,7 +41,7 @@ trait MySQLPDO { return; } } - + public static function dbTableList($db): array { return MySQL::dbTableList($db); } diff --git a/tests/lib/DatabaseDrivers/PostgreSQL.php b/tests/lib/DatabaseDrivers/PostgreSQL.php index 3b59ee84..fb0038cb 100644 --- a/tests/lib/DatabaseDrivers/PostgreSQL.php +++ b/tests/lib/DatabaseDrivers/PostgreSQL.php @@ -16,7 +16,7 @@ trait PostgreSQL { protected static $dbStatementClass = \JKingWeb\Arsse\Db\PostgreSQL\Statement::class; protected static $dbDriverClass = \JKingWeb\Arsse\Db\PostgreSQL\Driver::class; protected static $stringOutput = true; - + public static function dbInterface() { $connString = \JKingWeb\Arsse\Db\PostgreSQL\Driver::makeConnectionString(false, Arsse::$conf->dbPostgreSQLUser, Arsse::$conf->dbPostgreSQLPass, Arsse::$conf->dbPostgreSQLDb, Arsse::$conf->dbPostgreSQLHost, Arsse::$conf->dbPostgreSQLPort, ""); if ($d = @pg_connect($connString, \PGSQL_CONNECT_FORCE_NEW)) { @@ -38,7 +38,7 @@ trait PostgreSQL { pg_query($db, $q); } } - + public static function dbTableList($db): array { $listObjects = "SELECT table_name as name, 'TABLE' as type from information_schema.tables where table_schema = current_schema() and table_name like 'arsse_%' union SELECT collation_name as name, 'COLLATION' as type from information_schema.collations where collation_schema = current_schema()"; if ($db instanceof Driver) { diff --git a/tests/lib/DatabaseDrivers/PostgreSQLPDO.php b/tests/lib/DatabaseDrivers/PostgreSQLPDO.php index b7f5f259..58001b6f 100644 --- a/tests/lib/DatabaseDrivers/PostgreSQLPDO.php +++ b/tests/lib/DatabaseDrivers/PostgreSQLPDO.php @@ -15,7 +15,7 @@ trait PostgreSQLPDO { protected static $dbStatementClass = \JKingWeb\Arsse\Db\PostgreSQL\PDOStatement::class; protected static $dbDriverClass = \JKingWeb\Arsse\Db\PostgreSQL\PDODriver::class; protected static $stringOutput = false; - + public static function dbInterface() { $connString = \JKingWeb\Arsse\Db\PostgreSQL\Driver::makeConnectionString(true, Arsse::$conf->dbPostgreSQLUser, Arsse::$conf->dbPostgreSQLPass, Arsse::$conf->dbPostgreSQLDb, Arsse::$conf->dbPostgreSQLHost, Arsse::$conf->dbPostgreSQLPort, ""); try { @@ -28,7 +28,7 @@ trait PostgreSQLPDO { } return $d; } - + public static function dbTableList($db): array { return PostgreSQL::dbTableList($db); } diff --git a/tests/lib/DatabaseDrivers/SQLite3.php b/tests/lib/DatabaseDrivers/SQLite3.php index 20f50cc1..70633722 100644 --- a/tests/lib/DatabaseDrivers/SQLite3.php +++ b/tests/lib/DatabaseDrivers/SQLite3.php @@ -16,7 +16,7 @@ trait SQLite3 { protected static $dbStatementClass = \JKingWeb\Arsse\Db\SQLite3\Statement::class; protected static $dbDriverClass = \JKingWeb\Arsse\Db\SQLite3\Driver::class; protected static $stringOutput = false; - + protected static function dbInterface() { try { $d = new \SQLite3(Arsse::$conf->dbSQLite3File); @@ -26,7 +26,7 @@ trait SQLite3 { $d->enableExceptions(true); return $d; } - + public static function dbTableList($db): array { $listTables = "SELECT name from sqlite_master where type = 'table' and name like 'arsse^_%' escape '^'"; if ($db instanceof Driver) { diff --git a/tests/lib/DatabaseDrivers/SQLite3PDO.php b/tests/lib/DatabaseDrivers/SQLite3PDO.php index c7af2074..0a81eb86 100644 --- a/tests/lib/DatabaseDrivers/SQLite3PDO.php +++ b/tests/lib/DatabaseDrivers/SQLite3PDO.php @@ -15,7 +15,7 @@ trait SQLite3PDO { protected static $dbStatementClass = \JKingWeb\Arsse\Db\SQLite3\PDOStatement::class; protected static $dbDriverClass = \JKingWeb\Arsse\Db\SQLite3\PDODriver::class; protected static $stringOutput = true; - + public static function dbInterface() { try { $d = new \PDO("sqlite:".Arsse::$conf->dbSQLite3File, "", "", [\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION]); @@ -25,7 +25,7 @@ trait SQLite3PDO { return; } } - + public static function dbTableList($db): array { return SQLite3::dbTableList($db); } diff --git a/tests/server.php b/tests/server.php index df9f28e1..2d738c95 100644 --- a/tests/server.php +++ b/tests/server.php @@ -29,7 +29,6 @@ which include the following data: */ - ignore_user_abort(false); ob_start(); $defaults = [ // default values for response From e60f7ea03f2c205dd44844eb6bfd9b72435ed312 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sun, 1 Mar 2020 18:32:01 -0500 Subject: [PATCH 26/50] Add class constant visibility --- .php_cs.dist | 14 ++++---- lib/AbstractException.php | 2 +- lib/Arsse.php | 2 +- lib/CLI.php | 2 +- lib/Conf.php | 4 +-- lib/Database.php | 18 +++++----- lib/Db/AbstractStatement.php | 2 +- lib/Db/Driver.php | 10 +++--- lib/Db/MySQL/Driver.php | 4 +-- lib/Db/MySQL/Statement.php | 2 +- lib/Db/PDOStatement.php | 2 +- lib/Db/PostgreSQL/Driver.php | 2 +- lib/Db/PostgreSQL/Statement.php | 2 +- lib/Db/SQLite3/Driver.php | 10 +++--- lib/Db/SQLite3/Statement.php | 8 ++--- lib/Db/Statement.php | 16 ++++----- lib/Feed/Exception.php | 4 +-- lib/Lang.php | 4 +-- lib/Misc/ValueInfo.php | 44 ++++++++++++------------ lib/REST.php | 4 +-- lib/REST/Fever/API.php | 14 ++++---- lib/REST/NextcloudNews/V1_2.php | 6 ++-- lib/REST/TinyTinyRSS/API.php | 38 ++++++++++---------- lib/REST/TinyTinyRSS/Search.php | 21 ++++++----- lib/Service.php | 2 +- lib/User.php | 2 +- lib/User/Driver.php | 6 ++-- tests/cases/Database/SeriesArticle.php | 9 +++-- tests/cases/Database/TestDatabase.php | 11 +++--- tests/cases/Lang/TestBasic.php | 3 +- tests/cases/Misc/TestValueInfo.php | 9 ++--- tests/cases/REST/Fever/TestAPI.php | 4 ++- tests/cases/REST/TinyTinyRSS/TestAPI.php | 9 ++--- 33 files changed, 150 insertions(+), 140 deletions(-) diff --git a/.php_cs.dist b/.php_cs.dist index 23a98afb..0649143e 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -25,11 +25,8 @@ $rules = [ ], 'cast_spaces' => ['space' => "single"], 'concat_space' => ['spacing' => "none"], - 'declare_equal_normalize' => ['space' => "none"], 'function_typehint_space' => true, 'list_syntax' => ['syntax' => "short"], - 'lowercase_cast' => true, - 'lowercase_static_reference' => true, 'magic_constant_casing' => true, 'magic_method_casing' => true, 'modernize_types_casting' => true, @@ -43,8 +40,6 @@ $rules = [ 'no_empty_phpdoc' => true, 'no_empty_statement' => true, 'no_extra_blank_lines' => true, // this could probably use more configuration - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, 'no_mixed_echo_print' => ['use' => "echo"], 'no_short_bool_cast' => true, 'no_trailing_comma_in_singleline_array' => true, @@ -58,13 +53,20 @@ $rules = [ 'pow_to_exponentiation' => true, 'return_type_declaration' => ['space_before' => "none"], 'set_type_to_cast' => true, - 'short_scalar_cast' => true, 'standardize_not_equals' => true, 'trailing_comma_in_multiline_array' => true, 'unary_operator_spaces' => true, 'yoda_style' => false, // PSR standard to apply '@PSR2' => true, + // PSR-12 rules; php-cs-fixer does not yet support PSR-12 natively + 'declare_equal_normalize' => ['space' => "none"], + 'lowercase_cast' => true, + 'lowercase_static_reference' => true, + 'no_leading_import_slash' => true, + 'no_leading_namespace_whitespace' => true, + 'short_scalar_cast' => true, + 'visibility_required' => ['elements' => ["const", "property", "method"]], // house exceptions to PSR rules 'braces' => ['position_after_functions_and_oop_constructs' => "same"], 'function_declaration' => ['closure_function_spacing' => "none"], diff --git a/lib/AbstractException.php b/lib/AbstractException.php index 31623458..706465e0 100644 --- a/lib/AbstractException.php +++ b/lib/AbstractException.php @@ -7,7 +7,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; abstract class AbstractException extends \Exception { - const CODES = [ + public const CODES = [ "Exception.uncoded" => -1, "Exception.unknown" => 10000, "Exception.constantUnknown" => 10001, diff --git a/lib/Arsse.php b/lib/Arsse.php index e6e451cb..6694722f 100644 --- a/lib/Arsse.php +++ b/lib/Arsse.php @@ -7,7 +7,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; class Arsse { - const VERSION = "0.8.3"; + public const VERSION = "0.8.3"; /** @var Lang */ public static $lang; diff --git a/lib/CLI.php b/lib/CLI.php index 6d08c292..c9a59673 100644 --- a/lib/CLI.php +++ b/lib/CLI.php @@ -10,7 +10,7 @@ use JKingWeb\Arsse\REST\Fever\User as Fever; use JKingWeb\Arsse\ImportExport\OPML; class CLI { - const USAGE = << "boolean", Value::T_STRING => "string", Value::T_FLOAT => "float", VALUE::T_INT => "integer", Value::T_INTERVAL => "interval", ]; - const EXPECTED_TYPES = [ + protected const EXPECTED_TYPES = [ 'dbTimeoutExec' => "double", 'dbTimeoutLock' => "double", 'dbTimeoutConnect' => "double", diff --git a/lib/Database.php b/lib/Database.php index 8bdd4378..677e4be6 100644 --- a/lib/Database.php +++ b/lib/Database.php @@ -39,23 +39,23 @@ use JKingWeb\Arsse\Misc\URL; */ class Database { /** The version number of the latest schema the interface is aware of */ - const SCHEMA_VERSION = 6; - /** The size of a set of values beyond which the set will be embedded into the query text */ - const LIMIT_SET_SIZE = 25; - /** The length of a string in an embedded set beyond which a parameter placeholder will be used for the string */ - const LIMIT_SET_STRING_LENGTH = 200; + public const SCHEMA_VERSION = 6; /** Makes tag/label association change operations remove members */ - const ASSOC_REMOVE = 0; + public const ASSOC_REMOVE = 0; /** Makes tag/label association change operations add members */ - const ASSOC_ADD = 1; + public const ASSOC_ADD = 1; /** Makes tag/label association change operations replace members */ - const ASSOC_REPLACE = 2; + public const ASSOC_REPLACE = 2; /** A map of database driver short-names and their associated class names */ - const DRIVER_NAMES = [ + public const DRIVER_NAMES = [ 'sqlite3' => \JKingWeb\Arsse\Db\SQLite3\Driver::class, 'postgresql' => \JKingWeb\Arsse\Db\PostgreSQL\Driver::class, 'mysql' => \JKingWeb\Arsse\Db\MySQL\Driver::class, ]; + /** The size of a set of values beyond which the set will be embedded into the query text */ + protected const LIMIT_SET_SIZE = 25; + /** The length of a string in an embedded set beyond which a parameter placeholder will be used for the string */ + protected const LIMIT_SET_STRING_LENGTH = 200; /** @var Db\Driver */ public $db; diff --git a/lib/Db/AbstractStatement.php b/lib/Db/AbstractStatement.php index 1aa7e20b..dab1e033 100644 --- a/lib/Db/AbstractStatement.php +++ b/lib/Db/AbstractStatement.php @@ -12,7 +12,7 @@ use JKingWeb\Arsse\Misc\ValueInfo; abstract class AbstractStatement implements Statement { use SQLState; - const TYPE_NORM_MAP = [ + public const TYPE_NORM_MAP = [ self::T_INTEGER => ValueInfo::M_NULL | ValueInfo::T_INT, self::T_STRING => ValueInfo::M_NULL | ValueInfo::T_STRING, self::T_BOOLEAN => ValueInfo::M_NULL | ValueInfo::T_BOOL, diff --git a/lib/Db/Driver.php b/lib/Db/Driver.php index 44a1e989..1488b1b1 100644 --- a/lib/Db/Driver.php +++ b/lib/Db/Driver.php @@ -7,11 +7,11 @@ declare(strict_types=1); namespace JKingWeb\Arsse\Db; interface Driver { - const TR_PEND = 0; - const TR_COMMIT = 1; - const TR_ROLLBACK = 2; - const TR_PEND_COMMIT = -1; - const TR_PEND_ROLLBACK = -2; + public const TR_PEND = 0; + public const TR_COMMIT = 1; + public const TR_ROLLBACK = 2; + public const TR_PEND_COMMIT = -1; + public const TR_PEND_ROLLBACK = -2; /** Creates and returns an instance of the class; this is so that either a native or PDO driver may be returned depending on what is available on the server */ public static function create(): Driver; diff --git a/lib/Db/MySQL/Driver.php b/lib/Db/MySQL/Driver.php index 49ed00df..023a2819 100644 --- a/lib/Db/MySQL/Driver.php +++ b/lib/Db/MySQL/Driver.php @@ -12,8 +12,8 @@ use JKingWeb\Arsse\Db\Exception; class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { use ExceptionBuilder; - const SQL_MODE = "ANSI_QUOTES,HIGH_NOT_PRECEDENCE,NO_BACKSLASH_ESCAPES,NO_ENGINE_SUBSTITUTION,PIPES_AS_CONCAT,STRICT_ALL_TABLES"; - const TRANSACTIONAL_LOCKS = false; + protected const SQL_MODE = "ANSI_QUOTES,HIGH_NOT_PRECEDENCE,NO_BACKSLASH_ESCAPES,NO_ENGINE_SUBSTITUTION,PIPES_AS_CONCAT,STRICT_ALL_TABLES"; + protected const TRANSACTIONAL_LOCKS = false; /** @var \mysqli */ protected $db; diff --git a/lib/Db/MySQL/Statement.php b/lib/Db/MySQL/Statement.php index 02b56bde..057225a6 100644 --- a/lib/Db/MySQL/Statement.php +++ b/lib/Db/MySQL/Statement.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\Db\MySQL; class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { use ExceptionBuilder; - const BINDINGS = [ + protected const BINDINGS = [ self::T_INTEGER => "i", self::T_FLOAT => "d", self::T_DATETIME => "s", diff --git a/lib/Db/PDOStatement.php b/lib/Db/PDOStatement.php index 132e1e7b..4425093c 100644 --- a/lib/Db/PDOStatement.php +++ b/lib/Db/PDOStatement.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\Db; abstract class PDOStatement extends AbstractStatement { use PDOError; - const BINDINGS = [ + protected const BINDINGS = [ self::T_INTEGER => \PDO::PARAM_INT, self::T_FLOAT => \PDO::PARAM_STR, self::T_DATETIME => \PDO::PARAM_STR, diff --git a/lib/Db/PostgreSQL/Driver.php b/lib/Db/PostgreSQL/Driver.php index a06b6a58..fccc0710 100644 --- a/lib/Db/PostgreSQL/Driver.php +++ b/lib/Db/PostgreSQL/Driver.php @@ -12,7 +12,7 @@ use JKingWeb\Arsse\Db\Exception; class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { use Dispatch; - const TRANSACTIONAL_LOCKS = true; + protected const TRANSACTIONAL_LOCKS = true; protected $db; protected $transStart = 0; diff --git a/lib/Db/PostgreSQL/Statement.php b/lib/Db/PostgreSQL/Statement.php index 058ca2ee..8c89053d 100644 --- a/lib/Db/PostgreSQL/Statement.php +++ b/lib/Db/PostgreSQL/Statement.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse\Db\PostgreSQL; class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { use Dispatch; - const BINDINGS = [ + protected const BINDINGS = [ self::T_INTEGER => "bigint", self::T_FLOAT => "decimal", self::T_DATETIME => "timestamp(0) without time zone", diff --git a/lib/Db/SQLite3/Driver.php b/lib/Db/SQLite3/Driver.php index cb23ac60..bef5ec65 100644 --- a/lib/Db/SQLite3/Driver.php +++ b/lib/Db/SQLite3/Driver.php @@ -12,12 +12,12 @@ use JKingWeb\Arsse\Db\Exception; class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { use ExceptionBuilder; - const TRANSACTIONAL_LOCKS = true; + protected const TRANSACTIONAL_LOCKS = true; - const SQLITE_BUSY = 5; - const SQLITE_SCHEMA = 17; - const SQLITE_CONSTRAINT = 19; - const SQLITE_MISMATCH = 20; + public const SQLITE_BUSY = 5; + public const SQLITE_SCHEMA = 17; + public const SQLITE_CONSTRAINT = 19; + public const SQLITE_MISMATCH = 20; protected $db; diff --git a/lib/Db/SQLite3/Statement.php b/lib/Db/SQLite3/Statement.php index 3374689b..c97b1d8e 100644 --- a/lib/Db/SQLite3/Statement.php +++ b/lib/Db/SQLite3/Statement.php @@ -9,10 +9,10 @@ namespace JKingWeb\Arsse\Db\SQLite3; class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { use ExceptionBuilder; - const SQLITE_BUSY = 5; - const SQLITE_CONSTRAINT = 19; - const SQLITE_MISMATCH = 20; - const BINDINGS = [ + public const SQLITE_BUSY = 5; + public const SQLITE_CONSTRAINT = 19; + public const SQLITE_MISMATCH = 20; + protected const BINDINGS = [ self::T_INTEGER => \SQLITE3_INTEGER, self::T_FLOAT => \SQLITE3_FLOAT, self::T_DATETIME => \SQLITE3_TEXT, diff --git a/lib/Db/Statement.php b/lib/Db/Statement.php index 0ed86856..44e9cd21 100644 --- a/lib/Db/Statement.php +++ b/lib/Db/Statement.php @@ -7,7 +7,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse\Db; interface Statement { - const TYPES = [ + public const TYPES = [ 'int' => self::T_INTEGER, 'integer' => self::T_INTEGER, 'float' => self::T_FLOAT, @@ -43,13 +43,13 @@ interface Statement { 'strict boolean' => self::T_NOT_NULL + self::T_BOOLEAN, 'strict bit' => self::T_NOT_NULL + self::T_BOOLEAN, ]; - const T_INTEGER = 1; - const T_STRING = 2; - const T_BOOLEAN = 3; - const T_DATETIME = 4; - const T_FLOAT = 5; - const T_BINARY = 6; - const T_NOT_NULL = 100; + public const T_INTEGER = 1; + public const T_STRING = 2; + public const T_BOOLEAN = 3; + public const T_DATETIME = 4; + public const T_FLOAT = 5; + public const T_BINARY = 6; + public const T_NOT_NULL = 100; public function run(...$values): Result; public function runArray(array $values = []): Result; diff --git a/lib/Feed/Exception.php b/lib/Feed/Exception.php index 39936b3a..2bf181e6 100644 --- a/lib/Feed/Exception.php +++ b/lib/Feed/Exception.php @@ -12,8 +12,8 @@ use GuzzleHttp\Exception\TooManyRedirectsException; use PicoFeed\PicoFeedException; class Exception extends \JKingWeb\Arsse\AbstractException { - const CURL_ERROR_MAP = [1 => "invalidUrl",3 => "invalidUrl",5 => "transmissionError","connectionFailed","connectionFailed","transmissionError","forbidden","unauthorized","transmissionError","transmissionError","transmissionError","transmissionError","connectionFailed","connectionFailed","transmissionError","transmissionError","transmissionError","transmissionError","transmissionError","invalidUrl","transmissionError","transmissionError","transmissionError","transmissionError",28 => "timeout","transmissionError","transmissionError","transmissionError","transmissionError","transmissionError",35 => "invalidCertificate","transmissionError","transmissionError","transmissionError","transmissionError",45 => "transmissionError","unauthorized","maxRedirect",52 => "transmissionError","invalidCertificate","invalidCertificate","transmissionError","transmissionError",58 => "invalidCertificate","invalidCertificate","invalidCertificate","transmissionError","invalidUrl","transmissionError","invalidCertificate","transmissionError","invalidCertificate","forbidden","invalidUrl","forbidden","transmissionError",73 => "transmissionError","transmissionError",77 => "invalidCertificate","invalidUrl",90 => "invalidCertificate","invalidCertificate","transmissionError",94 => "unauthorized","transmissionError","connectionFailed"]; - const HTTP_ERROR_MAP = [401 => "unauthorized",403 => "forbidden",404 => "invalidUrl",408 => "timeout",410 => "invalidUrl",414 => "invalidUrl",451 => "invalidUrl"]; + protected const CURL_ERROR_MAP = [1 => "invalidUrl",3 => "invalidUrl",5 => "transmissionError","connectionFailed","connectionFailed","transmissionError","forbidden","unauthorized","transmissionError","transmissionError","transmissionError","transmissionError","connectionFailed","connectionFailed","transmissionError","transmissionError","transmissionError","transmissionError","transmissionError","invalidUrl","transmissionError","transmissionError","transmissionError","transmissionError",28 => "timeout","transmissionError","transmissionError","transmissionError","transmissionError","transmissionError",35 => "invalidCertificate","transmissionError","transmissionError","transmissionError","transmissionError",45 => "transmissionError","unauthorized","maxRedirect",52 => "transmissionError","invalidCertificate","invalidCertificate","transmissionError","transmissionError",58 => "invalidCertificate","invalidCertificate","invalidCertificate","transmissionError","invalidUrl","transmissionError","invalidCertificate","transmissionError","invalidCertificate","forbidden","invalidUrl","forbidden","transmissionError",73 => "transmissionError","transmissionError",77 => "invalidCertificate","invalidUrl",90 => "invalidCertificate","invalidCertificate","transmissionError",94 => "unauthorized","transmissionError","connectionFailed"]; + protected const HTTP_ERROR_MAP = [401 => "unauthorized",403 => "forbidden",404 => "invalidUrl",408 => "timeout",410 => "invalidUrl",414 => "invalidUrl",451 => "invalidUrl"]; public function __construct($url, \Throwable $e) { if ($e instanceof BadResponseException) { diff --git a/lib/Lang.php b/lib/Lang.php index 920dddaf..fa8232b1 100644 --- a/lib/Lang.php +++ b/lib/Lang.php @@ -7,8 +7,8 @@ declare(strict_types=1); namespace JKingWeb\Arsse; class Lang { - const DEFAULT = "en"; // fallback locale - const REQUIRED = [ // collection of absolutely required strings to handle pathological errors + public const DEFAULT = "en"; // fallback locale + protected const REQUIRED = [ // collection of absolutely required strings to handle pathological errors 'Exception.JKingWeb/Arsse/Exception.uncoded' => 'The specified exception symbol {0} has no code specified in AbstractException.php', 'Exception.JKingWeb/Arsse/Exception.unknown' => 'An unknown error has occurred', 'Exception.JKingWeb/Arsse/Lang/Exception.defaultFileMissing' => 'Default language file "{0}" missing', diff --git a/lib/Misc/ValueInfo.php b/lib/Misc/ValueInfo.php index 806f6a34..e9af5272 100644 --- a/lib/Misc/ValueInfo.php +++ b/lib/Misc/ValueInfo.php @@ -10,33 +10,33 @@ use JKingWeb\Arsse\ExceptionType; class ValueInfo { // universal - const VALID = 1 << 0; - const NULL = 1 << 1; + public const VALID = 1 << 0; + public const NULL = 1 << 1; // integers - const ZERO = 1 << 2; - const NEG = 1 << 3; - const FLOAT = 1 << 4; + public const ZERO = 1 << 2; + public const NEG = 1 << 3; + public const FLOAT = 1 << 4; // strings - const EMPTY = 1 << 2; - const WHITE = 1 << 3; + public const EMPTY = 1 << 2; + public const WHITE = 1 << 3; // normalization types - const T_MIXED = 0; // pass through unchanged - const T_NULL = 1; // convert to null - const T_BOOL = 2; // convert to boolean - const T_INT = 3; // convert to integer - const T_FLOAT = 4; // convert to floating point - const T_DATE = 5; // convert to DateTimeInterface instance - const T_STRING = 6; // convert to string - const T_ARRAY = 7; // convert to array - const T_INTERVAL = 8; // convert to time interval + public const T_MIXED = 0; // pass through unchanged + public const T_NULL = 1; // convert to null + public const T_BOOL = 2; // convert to boolean + public const T_INT = 3; // convert to integer + public const T_FLOAT = 4; // convert to floating point + public const T_DATE = 5; // convert to DateTimeInterface instance + public const T_STRING = 6; // convert to string + public const T_ARRAY = 7; // convert to array + public const T_INTERVAL = 8; // convert to time interval // normalization modes - const M_LOOSE = 0; - const M_NULL = 1 << 28; // pass nulls through regardless of target type - const M_DROP = 1 << 29; // drop the value (return null) if the type doesn't match - const M_STRICT = 1 << 30; // throw an exception if the type doesn't match - const M_ARRAY = 1 << 31; // the value should be a flat array of values of the specified type; indexed and associative are both acceptable + public const M_LOOSE = 0; + public const M_NULL = 1 << 28; // pass nulls through regardless of target type + public const M_DROP = 1 << 29; // drop the value (return null) if the type doesn't match + public const M_STRICT = 1 << 30; // throw an exception if the type doesn't match + public const M_ARRAY = 1 << 31; // the value should be a flat array of values of the specified type; indexed and associative are both acceptable // symbolic date and time formats - const DATE_FORMATS = [ // in out + protected const DATE_FORMATS = [ // in out 'iso8601' => ["!Y-m-d\TH:i:s", "Y-m-d\TH:i:s\Z" ], // NOTE: ISO 8601 dates require special input processing because of varying formats for timezone offsets 'iso8601m' => ["!Y-m-d\TH:i:s.u", "Y-m-d\TH:i:s.u\Z" ], // NOTE: ISO 8601 dates require special input processing because of varying formats for timezone offsets 'microtime' => ["U.u", "0.u00 U" ], // NOTE: the actual input format at the user level matches the output format; pre-processing is required for PHP not to fail diff --git a/lib/REST.php b/lib/REST.php index 317a650d..41fdaa1f 100644 --- a/lib/REST.php +++ b/lib/REST.php @@ -14,7 +14,7 @@ use Laminas\Diactoros\ServerRequestFactory; use Laminas\Diactoros\Response\EmptyResponse; class REST { - const API_LIST = [ + public const API_LIST = [ 'ncn' => [ // Nextcloud News version enumerator 'match' => '/index.php/apps/news/api', 'strip' => '/index.php/apps/news/api', @@ -55,7 +55,7 @@ class REST { // Proprietary (centralized) entities: // Feedly https://developer.feedly.com/ ]; - const DEFAULT_PORTS = [ + protected const DEFAULT_PORTS = [ 'http' => 80, 'https' => 443, ]; diff --git a/lib/REST/Fever/API.php b/lib/REST/Fever/API.php index ac6bb679..9a5779b3 100644 --- a/lib/REST/Fever/API.php +++ b/lib/REST/Fever/API.php @@ -19,15 +19,15 @@ use Laminas\Diactoros\Response\XmlResponse; use Laminas\Diactoros\Response\EmptyResponse; class API extends \JKingWeb\Arsse\REST\AbstractHandler { - const LEVEL = 3; - const GENERIC_ICON_TYPE = "image/png;base64"; - const GENERIC_ICON_DATA = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMjHxIGmVAAAADUlEQVQYV2NgYGBgAAAABQABijPjAAAAAABJRU5ErkJggg=="; - const ACCEPTED_TYPE = "application/x-www-form-urlencoded"; + public const LEVEL = 3; + protected const GENERIC_ICON_TYPE = "image/png;base64"; + protected const GENERIC_ICON_DATA = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMjHxIGmVAAAADUlEQVQYV2NgYGBgAAAABQABijPjAAAAAABJRU5ErkJggg=="; + protected const ACCEPTED_TYPE = "application/x-www-form-urlencoded"; // GET parameters for which we only check presence: these will be converted to booleans - const PARAM_BOOL = ["groups", "feeds", "items", "favicons", "links", "unread_item_ids", "saved_item_ids"]; + protected const PARAM_BOOL = ["groups", "feeds", "items", "favicons", "links", "unread_item_ids", "saved_item_ids"]; // GET parameters which contain meaningful values - const PARAM_GET = [ + protected const PARAM_GET = [ 'api' => V::T_STRING, // this parameter requires special handling 'page' => V::T_INT, // parameter for hot links 'range' => V::T_INT, // parameter for hot links @@ -45,7 +45,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { 'unread_recently_read' => V::T_BOOL, ]; // POST parameters, all of which contain meaningful values - const PARAM_POST = [ + protected const PARAM_POST = [ 'api_key' => V::T_STRING, 'mark' => V::T_STRING, 'as' => V::T_STRING, diff --git a/lib/REST/NextcloudNews/V1_2.php b/lib/REST/NextcloudNews/V1_2.php index 6e1fb275..c7389df8 100644 --- a/lib/REST/NextcloudNews/V1_2.php +++ b/lib/REST/NextcloudNews/V1_2.php @@ -23,9 +23,9 @@ use Laminas\Diactoros\Response\JsonResponse as Response; use Laminas\Diactoros\Response\EmptyResponse; class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler { - const REALM = "Nextcloud News API v1-2"; - const VERSION = "11.0.5"; - const ACCEPTED_TYPE = "application/json"; + public const VERSION = "11.0.5"; + protected const REALM = "Nextcloud News API v1-2"; + protected const ACCEPTED_TYPE = "application/json"; protected $dateFormat = "unix"; diff --git a/lib/REST/TinyTinyRSS/API.php b/lib/REST/TinyTinyRSS/API.php index d0df548e..2df402a0 100644 --- a/lib/REST/TinyTinyRSS/API.php +++ b/lib/REST/TinyTinyRSS/API.php @@ -24,27 +24,27 @@ use Laminas\Diactoros\Response\JsonResponse as Response; use Laminas\Diactoros\Response\EmptyResponse; class API extends \JKingWeb\Arsse\REST\AbstractHandler { - const LEVEL = 14; // emulated API level - const VERSION = "17.4"; // emulated TT-RSS version - const LABEL_OFFSET = 1024; // offset below zero at which labels begin, counting down - const LIMIT_ARTICLES = 200; // maximum number of articles returned by getHeadlines - const LIMIT_EXCERPT = 100; // maximum length of excerpts in getHeadlines, counted in grapheme units + public const LEVEL = 14; // emulated API level + public const VERSION = "17.4"; // emulated TT-RSS version + protected const LABEL_OFFSET = 1024; // offset below zero at which labels begin, counting down + protected const LIMIT_ARTICLES = 200; // maximum number of articles returned by getHeadlines + protected const LIMIT_EXCERPT = 100; // maximum length of excerpts in getHeadlines, counted in grapheme units // special feeds - const FEED_ARCHIVED = 0; - const FEED_STARRED = -1; - const FEED_PUBLISHED = -2; - const FEED_FRESH = -3; - const FEED_ALL = -4; - const FEED_READ = -6; + protected const FEED_ARCHIVED = 0; + protected const FEED_STARRED = -1; + protected const FEED_PUBLISHED = -2; + protected const FEED_FRESH = -3; + protected const FEED_ALL = -4; + protected const FEED_READ = -6; // special categories - const CAT_UNCATEGORIZED = 0; - const CAT_SPECIAL = -1; - const CAT_LABELS = -2; - const CAT_NOT_SPECIAL = -3; - const CAT_ALL = -4; + protected const CAT_UNCATEGORIZED = 0; + protected const CAT_SPECIAL = -1; + protected const CAT_LABELS = -2; + protected const CAT_NOT_SPECIAL = -3; + protected const CAT_ALL = -4; // valid input - const ACCEPTED_TYPES = ["application/json", "text/json"]; - const VALID_INPUT = [ + protected const ACCEPTED_TYPES = ["application/json", "text/json"]; + protected const VALID_INPUT = [ 'op' => ValueInfo::T_STRING, // the function ("operation") to perform 'sid' => ValueInfo::T_STRING, // session ID 'seq' => ValueInfo::T_INT, // request number from client @@ -82,7 +82,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { 'data' => ValueInfo::T_STRING, // note text in `updateArticle` if setting a note ]; // generic error construct - const FATAL_ERR = [ + protected const FATAL_ERR = [ 'seq' => null, 'status' => 1, 'content' => ['error' => "MALFORMED_INPUT"], diff --git a/lib/REST/TinyTinyRSS/Search.php b/lib/REST/TinyTinyRSS/Search.php index 929ef4d8..ea3dbe65 100644 --- a/lib/REST/TinyTinyRSS/Search.php +++ b/lib/REST/TinyTinyRSS/Search.php @@ -10,22 +10,22 @@ use JKingWeb\Arsse\Context\Context; use JKingWeb\Arsse\Misc\Date; class Search { - const STATE_BEFORE_TOKEN = 0; - const STATE_BEFORE_TOKEN_QUOTED = 1; - const STATE_IN_DATE = 2; - const STATE_IN_DATE_QUOTED = 3; - const STATE_IN_TOKEN_OR_TAG = 4; - const STATE_IN_TOKEN_OR_TAG_QUOTED = 5; - const STATE_IN_TOKEN = 6; - const STATE_IN_TOKEN_QUOTED = 7; + protected const STATE_BEFORE_TOKEN = 0; + protected const STATE_BEFORE_TOKEN_QUOTED = 1; + protected const STATE_IN_DATE = 2; + protected const STATE_IN_DATE_QUOTED = 3; + protected const STATE_IN_TOKEN_OR_TAG = 4; + protected const STATE_IN_TOKEN_OR_TAG_QUOTED = 5; + protected const STATE_IN_TOKEN = 6; + protected const STATE_IN_TOKEN_QUOTED = 7; - const FIELDS_BOOLEAN = [ + protected const FIELDS_BOOLEAN = [ "unread" => "unread", "star" => "starred", "note" => "annotated", "pub" => "published", // TODO: not implemented ]; - const FIELDS_TEXT = [ + protected const FIELDS_TEXT = [ "title" => "titleTerms", "author" => "authorTerms", "note" => "annotationTerms", @@ -36,7 +36,6 @@ class Search { // normalize the input $search = strtolower(trim(preg_replace("<\s+>", " ", $search))); // set initial state - $tokens = []; $pos = -1; $stop = strlen($search); $state = self::STATE_BEFORE_TOKEN; diff --git a/lib/Service.php b/lib/Service.php index fc77e802..597421fd 100644 --- a/lib/Service.php +++ b/lib/Service.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse; use JKingWeb\Arsse\Misc\Date; class Service { - const DRIVER_NAMES = [ + public const DRIVER_NAMES = [ 'serial' => \JKingWeb\Arsse\Service\Serial\Driver::class, 'subprocess' => \JKingWeb\Arsse\Service\Subprocess\Driver::class, ]; diff --git a/lib/User.php b/lib/User.php index 15d902c1..f5299914 100644 --- a/lib/User.php +++ b/lib/User.php @@ -9,7 +9,7 @@ namespace JKingWeb\Arsse; use PasswordGenerator\Generator as PassGen; class User { - const DRIVER_NAMES = [ + public const DRIVER_NAMES = [ 'internal' => \JKingWeb\Arsse\User\Internal\Driver::class, ]; diff --git a/lib/User/Driver.php b/lib/User/Driver.php index b5657ac9..8faaec71 100644 --- a/lib/User/Driver.php +++ b/lib/User/Driver.php @@ -7,9 +7,9 @@ declare(strict_types=1); namespace JKingWeb\Arsse\User; interface Driver { - const FUNC_NOT_IMPLEMENTED = 0; - const FUNC_INTERNAL = 1; - const FUNC_EXTERNAL = 2; + public const FUNC_NOT_IMPLEMENTED = 0; + public const FUNC_INTERNAL = 1; + public const FUNC_EXTERNAL = 2; // returns an instance of a class implementing this interface. public function __construct(); diff --git a/tests/cases/Database/SeriesArticle.php b/tests/cases/Database/SeriesArticle.php index d268d2a8..2f78e9c1 100644 --- a/tests/cases/Database/SeriesArticle.php +++ b/tests/cases/Database/SeriesArticle.php @@ -421,6 +421,7 @@ trait SeriesArticle { } public function provideContextMatches(): iterable { + $setSize = (new \ReflectionClassConstant(Database::class, "LIMIT_SET_SIZE"))->getValue(); return [ 'Blank context' => [new Context, [1,2,3,4,5,6,7,8,19,20]], 'Folder tree' => [(new Context)->folder(1), [5,6,7,8]], @@ -473,7 +474,7 @@ trait SeriesArticle { 'Multiple unstarred articles' => [(new Context)->articles([1,2,3])->starred(false), [2,3]], 'Multiple articles' => [(new Context)->articles([1,20,50]), [1,20]], 'Multiple editions' => [(new Context)->editions([1,1001,50]), [1,20]], - '150 articles' => [(new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)), [1,2,3,4,5,6,7,8,19,20]], + '150 articles' => [(new Context)->articles(range(1, $setSize * 3)), [1,2,3,4,5,6,7,8,19,20]], 'Search title or content 1' => [(new Context)->searchTerms(["Article"]), [1,2,3]], 'Search title or content 2' => [(new Context)->searchTerms(["one", "first"]), [1]], 'Search title or content 3' => [(new Context)->searchTerms(["one first"]), []], @@ -816,7 +817,8 @@ trait SeriesArticle { } public function testMarkTooManyMultipleArticles(): void { - $this->assertSame(7, Arsse::$db->articleMark($this->user, ['read' => false,'starred' => true], (new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)))); + $setSize = (new \ReflectionClassConstant(Database::class, "LIMIT_SET_SIZE"))->getValue(); + $this->assertSame(7, Arsse::$db->articleMark($this->user, ['read' => false,'starred' => true], (new Context)->articles(range(1, $setSize * 3)))); } public function testMarkAMissingArticle(): void { @@ -971,10 +973,11 @@ trait SeriesArticle { } public function testCountArticles(): void { + $setSize = (new \ReflectionClassConstant(Database::class, "LIMIT_SET_SIZE"))->getValue(); $this->assertSame(2, Arsse::$db->articleCount("john.doe@example.com", (new Context)->starred(true))); $this->assertSame(4, Arsse::$db->articleCount("john.doe@example.com", (new Context)->folder(1))); $this->assertSame(0, Arsse::$db->articleCount("jane.doe@example.com", (new Context)->starred(true))); - $this->assertSame(10, Arsse::$db->articleCount("john.doe@example.com", (new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)))); + $this->assertSame(10, Arsse::$db->articleCount("john.doe@example.com", (new Context)->articles(range(1, $setSize * 3)))); } public function testCountArticlesWithoutAuthority(): void { diff --git a/tests/cases/Database/TestDatabase.php b/tests/cases/Database/TestDatabase.php index 581bc23f..cfaed762 100644 --- a/tests/cases/Database/TestDatabase.php +++ b/tests/cases/Database/TestDatabase.php @@ -35,10 +35,10 @@ class TestDatabase extends \JKingWeb\Arsse\Test\AbstractTest { } public function provideInClauses(): iterable { - $l = Database::LIMIT_SET_SIZE + 1; + $l = (new \ReflectionClassConstant(Database::class, "LIMIT_SET_SIZE"))->getValue() + 1; $strings = array_fill(0, $l, ""); $ints = range(1, $l); - $longString = str_repeat("0", Database::LIMIT_SET_STRING_LENGTH + 1); + $longString = str_repeat("0", (new \ReflectionClassConstant(Database::class, "LIMIT_SET_STRING_LENGTH"))->getValue() + 1); $params = implode(",", array_fill(0, $l, "?")); $intList = implode(",", $ints); $stringList = implode(",", array_fill(0, $l, "''")); @@ -70,9 +70,10 @@ class TestDatabase extends \JKingWeb\Arsse\Test\AbstractTest { } public function provideSearchClauses(): iterable { - $terms = array_fill(0, Database::LIMIT_SET_SIZE + 1, "a"); - $clause = array_fill(0, Database::LIMIT_SET_SIZE + 1, "test like '%a%' escape '^'"); - $longString = str_repeat("0", Database::LIMIT_SET_STRING_LENGTH + 1); + $setSize = (new \ReflectionClassConstant(Database::class, "LIMIT_SET_SIZE"))->getValue(); + $terms = array_fill(0, $setSize + 1, "a"); + $clause = array_fill(0, $setSize + 1, "test like '%a%' escape '^'"); + $longString = str_repeat("0", (new \ReflectionClassConstant(Database::class, "LIMIT_SET_STRING_LENGTH"))->getValue() + 1); return [ ["test like ? escape '^'", ["%a%"], ["a"], ["test"], true], ["(col1 like ? escape '^' or col2 like ? escape '^')", ["%a%", "%a%"], ["a"], ["col1", "col2"], true], diff --git a/tests/cases/Lang/TestBasic.php b/tests/cases/Lang/TestBasic.php index ff55b538..f94b4f35 100644 --- a/tests/cases/Lang/TestBasic.php +++ b/tests/cases/Lang/TestBasic.php @@ -37,8 +37,9 @@ class TestBasic extends \JKingWeb\Arsse\Test\AbstractTest { * @depends testSetLanguage */ public function testLoadInternalStrings(): void { + $exp = (new \ReflectionClassConstant(TestClass::class, "REQUIRED"))->getValue(); $this->assertEquals("", $this->l->set("", true)); - $this->assertCount(sizeof(TestClass::REQUIRED), $this->l->dump()); + $this->assertCount(sizeof($exp), $this->l->dump()); } /** diff --git a/tests/cases/Misc/TestValueInfo.php b/tests/cases/Misc/TestValueInfo.php index 6a4c6ba0..efa1becf 100644 --- a/tests/cases/Misc/TestValueInfo.php +++ b/tests/cases/Misc/TestValueInfo.php @@ -400,9 +400,9 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { public function testNormalizeComplexValues(): void { // Array-mode tests $tests = [ - [I::T_INT | I::M_DROP, [1, 2, 2.2, 3], [1,2,null,3] ], + [I::T_INT | I::M_DROP, [1, 2, 2.2, 3], [1,2,null,3] ], [I::T_INT, [1, 2, 2.2, 3], [1,2,2,3] ], - [I::T_INT | I::M_DROP, new Result([1, 2, 2.2, 3]), [1,2,null,3] ], + [I::T_INT | I::M_DROP, new Result([1, 2, 2.2, 3]), [1,2,null,3] ], [I::T_INT, new Result([1, 2, 2.2, 3]), [1,2,2,3] ], [I::T_STRING | I::M_STRICT, "Bare string", ["Bare string"]], ]; @@ -411,10 +411,11 @@ class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertEquals($exp, I::normalize($value, $type | I::M_ARRAY, "iso8601"), "Failed test #$index"); } // Date-to-string format tests + $dateFormats = (new \ReflectionClassConstant(I::class, "DATE_FORMATS"))->getValue(); $test = new \DateTimeImmutable("now", new \DateTimezone("UTC")); - $exp = $test->format(I::DATE_FORMATS['iso8601'][1]); + $exp = $test->format($dateFormats['iso8601'][1]); $this->assertSame($exp, I::normalize($test, I::T_STRING, null), "Failed test for null output date format"); - foreach (I::DATE_FORMATS as $name => $formats) { + foreach ($dateFormats as $name => $formats) { $exp = $test->format($formats[1]); $this->assertSame($exp, I::normalize($test, I::T_STRING, null, $name), "Failed test for output date format '$name'"); } diff --git a/tests/cases/REST/Fever/TestAPI.php b/tests/cases/REST/Fever/TestAPI.php index f65de41a..d89a17f1 100644 --- a/tests/cases/REST/Fever/TestAPI.php +++ b/tests/cases/REST/Fever/TestAPI.php @@ -488,8 +488,10 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { } public function testListFeedIcons(): void { + $iconType = (new \ReflectionClassConstant(API::class, "GENERIC_ICON_TYPE"))->getValue(); + $iconData = (new \ReflectionClassConstant(API::class, "GENERIC_ICON_DATA"))->getValue(); $act = $this->h->dispatch($this->req("api&favicons")); - $exp = new JsonResponse(['favicons' => [['id' => 0, 'data' => API::GENERIC_ICON_TYPE.",".API::GENERIC_ICON_DATA]]]); + $exp = new JsonResponse(['favicons' => [['id' => 0, 'data' => $iconType.",".$iconData]]]); $this->assertMessage($exp, $act); } diff --git a/tests/cases/REST/TinyTinyRSS/TestAPI.php b/tests/cases/REST/TinyTinyRSS/TestAPI.php index cfd671af..d5ca279f 100644 --- a/tests/cases/REST/TinyTinyRSS/TestAPI.php +++ b/tests/cases/REST/TinyTinyRSS/TestAPI.php @@ -997,6 +997,7 @@ LONG_STRING; ['id' => 3, 'name' => "Hardware"], ['id' => 1, 'name' => "Politics"], ]; + $labelOffset = (new \ReflectionClassConstant(API::class, "LABEL_OFFSET"))->getValue(); // set of various mocks for testing \Phake::when(Arsse::$db)->labelAdd(Arsse::$user->id, $db[0])->thenReturn(2)->thenThrow(new ExceptionInput("constraintViolation")); // error on the second call \Phake::when(Arsse::$db)->labelAdd(Arsse::$user->id, $db[1])->thenReturn(3)->thenThrow(new ExceptionInput("constraintViolation")); // error on the second call @@ -1007,14 +1008,14 @@ LONG_STRING; \Phake::when(Arsse::$db)->labelAdd(Arsse::$user->id, ['name' => ""])->thenThrow(new ExceptionInput("missing")); \Phake::when(Arsse::$db)->labelAdd(Arsse::$user->id, ['name' => " "])->thenThrow(new ExceptionInput("whitespace")); // correctly add two labels - $exp = $this->respGood((-1 * API::LABEL_OFFSET) - 2); + $exp = $this->respGood((-1 * $labelOffset) - 2); $this->assertMessage($exp, $this->req($in[0])); - $exp = $this->respGood((-1 * API::LABEL_OFFSET) - 3); + $exp = $this->respGood((-1 * $labelOffset) - 3); $this->assertMessage($exp, $this->req($in[1])); // attempt to add the two labels again - $exp = $this->respGood((-1 * API::LABEL_OFFSET) - 2); + $exp = $this->respGood((-1 * $labelOffset) - 2); $this->assertMessage($exp, $this->req($in[0])); - $exp = $this->respGood((-1 * API::LABEL_OFFSET) - 3); + $exp = $this->respGood((-1 * $labelOffset) - 3); $this->assertMessage($exp, $this->req($in[1])); \Phake::verify(Arsse::$db)->labelPropertiesGet(Arsse::$user->id, "Software", true); \Phake::verify(Arsse::$db)->labelPropertiesGet(Arsse::$user->id, "Hardware", true); From 7777ff962f0846cfef67988864e3ba66ad2bd756 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sun, 1 Mar 2020 21:07:36 -0500 Subject: [PATCH 27/50] Group more style rules under PSR-12 --- .php_cs.dist | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.php_cs.dist b/.php_cs.dist index 0649143e..c2761677 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -17,28 +17,24 @@ $paths = [ ]; $rules = [ // house rules where PSR series is silent - 'align_multiline_comment' => ['comment_type' => "phpdocs_only"], - 'array_syntax' => ['syntax' => "short"], - 'binary_operator_spaces' => [ + 'align_multiline_comment' => ['comment_type' => "phpdocs_only"], + 'array_syntax' => ['syntax' => "short"], + 'binary_operator_spaces' => [ 'default' => "single_space", 'operators' => ['=>' => "align_single_space"], ], 'cast_spaces' => ['space' => "single"], 'concat_space' => ['spacing' => "none"], - 'function_typehint_space' => true, 'list_syntax' => ['syntax' => "short"], 'magic_constant_casing' => true, 'magic_method_casing' => true, 'modernize_types_casting' => true, 'native_function_casing' => true, 'native_function_type_declaration_casing' => true, - 'new_with_braces' => false, // no option to specify absence of braces - 'no_alternative_syntax' => true, 'no_binary_string' => true, 'no_blank_lines_after_phpdoc' => true, 'no_empty_comment' => true, 'no_empty_phpdoc' => true, - 'no_empty_statement' => true, 'no_extra_blank_lines' => true, // this could probably use more configuration 'no_mixed_echo_print' => ['use' => "echo"], 'no_short_bool_cast' => true, @@ -47,11 +43,9 @@ $rules = [ 'no_unneeded_curly_braces' => true, 'no_unused_imports' => true, 'no_whitespace_before_comma_in_array' => true, - 'no_whitespace_in_blank_line' => true, 'normalize_index_brace' => true, 'object_operator_without_whitespace' => true, 'pow_to_exponentiation' => true, - 'return_type_declaration' => ['space_before' => "none"], 'set_type_to_cast' => true, 'standardize_not_equals' => true, 'trailing_comma_in_multiline_array' => true, @@ -60,17 +54,25 @@ $rules = [ // PSR standard to apply '@PSR2' => true, // PSR-12 rules; php-cs-fixer does not yet support PSR-12 natively + 'compact_nullable_typehint' => true, 'declare_equal_normalize' => ['space' => "none"], + 'function_typehint_space' => true, 'lowercase_cast' => true, 'lowercase_static_reference' => true, + 'no_alternative_syntax' => true, + 'no_empty_statement' => true, 'no_leading_import_slash' => true, 'no_leading_namespace_whitespace' => true, + 'no_whitespace_in_blank_line' => true, + 'return_type_declaration' => ['space_before' => "none"], + 'single_trait_insert_per_statement' => true, 'short_scalar_cast' => true, 'visibility_required' => ['elements' => ["const", "property", "method"]], // house exceptions to PSR rules - 'braces' => ['position_after_functions_and_oop_constructs' => "same"], - 'function_declaration' => ['closure_function_spacing' => "none"], -]; + 'braces' => ['position_after_functions_and_oop_constructs' => "same"], + 'function_declaration' => ['closure_function_spacing' => "none"], + 'new_with_braces' => false, // no option to specify absence of braces + ]; $finder = \PhpCsFixer\Finder::create(); foreach ($paths as $path) { From 1268e5fd733cd30d8d236416842a7ac6ea126622 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 11 Mar 2020 16:21:42 -0400 Subject: [PATCH 28/50] Finally fix DST error in tests --- tests/cases/Database/SeriesCleanup.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/cases/Database/SeriesCleanup.php b/tests/cases/Database/SeriesCleanup.php index 4746ed86..6176ab2d 100644 --- a/tests/cases/Database/SeriesCleanup.php +++ b/tests/cases/Database/SeriesCleanup.php @@ -7,6 +7,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; +use \DateTimeImmutable as Date; trait SeriesCleanup { protected function setUpSeriesCleanup(): void { @@ -16,13 +17,14 @@ trait SeriesCleanup { 'userSessionLifetime' => "PT24H", ]); // set up the test data - $nowish = gmdate("Y-m-d H:i:s", strtotime("now - 1 minute")); - $yesterday = gmdate("Y-m-d H:i:s", strtotime("now - 1 day")); - $daybefore = gmdate("Y-m-d H:i:s", strtotime("now - 2 days")); - $daysago = gmdate("Y-m-d H:i:s", strtotime("now - 7 days")); - $weeksago = gmdate("Y-m-d H:i:s", strtotime("now - 21 days")); - $soon = gmdate("Y-m-d H:i:s", strtotime("now + 1 minute")); - $faroff = gmdate("Y-m-d H:i:s", strtotime("now + 1 hour")); + $tz = new \DateTimeZone("UTC"); + $nowish = gmdate("Y-m-d H:i:s", (new Date("now - 1 minute", $tz))->getTimestamp()); + $yesterday = gmdate("Y-m-d H:i:s", (new Date("now - 1 day", $tz))->getTimestamp()); + $daybefore = gmdate("Y-m-d H:i:s", (new Date("now - 2 days", $tz))->getTimestamp()); + $daysago = gmdate("Y-m-d H:i:s", (new Date("now - 7 days", $tz))->getTimestamp()); + $weeksago = gmdate("Y-m-d H:i:s", (new Date("now - 21 days", $tz))->getTimestamp()); + $soon = gmdate("Y-m-d H:i:s", (new Date("now + 1 minute", $tz))->getTimestamp()); + $faroff = gmdate("Y-m-d H:i:s", (new Date("now + 1 hour", $tz))->getTimestamp()); $this->data = [ 'arsse_users' => [ 'columns' => [ From c1e27684d46befe5b1c53e9f0036f536506e9d9f Mon Sep 17 00:00:00 2001 From: "J. King" Date: Fri, 20 Mar 2020 16:51:47 -0400 Subject: [PATCH 29/50] Appease GitHub --- yarn.lock | 364 +++++++++++++++++++++++++++++------------------------- 1 file changed, 196 insertions(+), 168 deletions(-) diff --git a/yarn.lock b/yarn.lock index 70c36872..50f0f638 100644 --- a/yarn.lock +++ b/yarn.lock @@ -35,9 +35,9 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/node@*": - version "12.6.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.9.tgz#ffeee23afdc19ab16e979338e7b536fdebbbaeaf" - integrity sha512-+YB9FtyxXGyD54p8rXwWaN1EWEyar5L58GlGWgtH2I9rGmLGBQcw63+0jw+ujqVavNuO47S1ByAjm9zdHMnskw== + version "13.9.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.9.2.tgz#ace1880c03594cc3e80206d96847157d8e7fa349" + integrity sha512-bnoqK579sAYrQbp73wwglccjJ4sfRdKU7WNEZ5FW4K2U6Kc0/eZ5kvXG0JKsEKFB50zrFmfFt52/cvBbZa7eXg== abbrev@1: version "1.1.1" @@ -136,23 +136,23 @@ async-each@^1.0.1: resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== -atob@^2.1.1: +atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== autoprefixer@^9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.1.tgz#51967a02d2d2300bb01866c1611ec8348d355a47" - integrity sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw== + version "9.7.4" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.4.tgz#f8bf3e06707d047f0641d87aee8cfb174b2a5378" + integrity sha512-g0Ya30YrMBAEZk60lp+qfX5YQllG+S5W3GYCFvyHTvhOki0AEQJLPEcIuGRsqVwLi8FvXPVtwTGhfr38hVpm0g== dependencies: - browserslist "^4.6.3" - caniuse-lite "^1.0.30000980" + browserslist "^4.8.3" + caniuse-lite "^1.0.30001020" chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.17" - postcss-value-parser "^4.0.0" + postcss "^7.0.26" + postcss-value-parser "^4.0.2" balanced-match@0.1.0: version "0.1.0" @@ -182,6 +182,13 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -206,14 +213,15 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" -browserslist@^4.6.3: - version "4.6.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.6.tgz#6e4bf467cde520bc9dbdf3747dafa03531cec453" - integrity sha512-D2Nk3W9JL9Fp/gIcWei8LrERCS+eXu9AM5cfXA8WEZ84lFks+ARnZ0q/R69m2SV3Wjma83QDDPxsNKXUwdIsyA== +browserslist@^4.8.3: + version "4.10.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.10.0.tgz#f179737913eaf0d2b98e4926ac1ca6a15cbcc6a9" + integrity sha512-TpfK0TDgv71dzuTsEAlQiHeWQ/tiPqgNZVdv046fvNtBZrjbv2O3TsWCDU0AWGJJKCF/KsjNdLzR9hXOsh/CfA== dependencies: - caniuse-lite "^1.0.30000984" - electron-to-chromium "^1.3.191" - node-releases "^1.1.25" + caniuse-lite "^1.0.30001035" + electron-to-chromium "^1.3.378" + node-releases "^1.1.52" + pkg-up "^3.1.0" cache-base@^1.0.1: version "1.0.1" @@ -259,10 +267,10 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000984: - version "1.0.30000988" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000988.tgz#742f35ec1b8b75b9628d705d7652eea1fef983db" - integrity sha512-lPj3T8poYrRc/bniW5SQPND3GRtSrQdUM/R4mCYTbZxyi3jQiggLvZH4+BYUuX0t4TXjU+vMM7KFDQg+rSzZUQ== +caniuse-lite@^1.0.30001020, caniuse-lite@^1.0.30001035: + version "1.0.30001035" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001035.tgz#2bb53b8aa4716b2ed08e088d4dc816a5fe089a1e" + integrity sha512-C1ZxgkuA4/bUEdMbU5WrGY4+UhMFFiXrgNAfxiMIqWgFTWfv/xsZCS2xEHT2LMq7xAZfuAnu6mcqyDl0ZR6wLQ== chalk@^1.1.3: version "1.1.3" @@ -285,9 +293,9 @@ chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: supports-color "^5.3.0" chokidar@^2.0.0: - version "2.1.6" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.6.tgz#b6cad653a929e244ce8a834244164d241fa954c5" - integrity sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g== + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== dependencies: anymatch "^2.0.0" async-each "^1.0.1" @@ -304,9 +312,9 @@ chokidar@^2.0.0: fsevents "^1.2.7" chownr@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.2.tgz#a18f1e0b269c8a6a5d3c86eb298beb14c3dd7bf6" - integrity sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A== + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== class-utils@^0.3.5: version "0.3.6" @@ -442,10 +450,10 @@ css-tree@1.0.0-alpha25: mdn-data "^1.0.0" source-map "^0.5.3" -cssesc@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-2.0.0.tgz#3b13bd1bb1cb36e1bcb5a4dcd27f54c5dcb35703" - integrity sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg== +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== csso@~3.3.0: version "3.3.1" @@ -511,9 +519,9 @@ delegates@^1.0.0: integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= dependency-graph@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.8.0.tgz#2da2d35ed852ecc24a5d6c17788ba57c3708755b" - integrity sha512-DCvzSq2UiMsuLnj/9AL484ummEgLtZIcRS7YvtO38QnpX3vqh9nJ8P+zhu8Ja+SmLrBHO2iDbva20jq38qvBkQ== + version "0.8.1" + resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.8.1.tgz#9b8cae3aa2c7bd95ccb3347a09a2d1047a6c3c5a" + integrity sha512-g213uqF8fyk40W8SBjm079n3CZB4qSpCrA2ye1fLGzH/4HEgB6tzuW2CbLE7leb4t45/6h44Ud59Su1/ROTfqw== detect-libc@^1.0.2: version "1.0.3" @@ -527,15 +535,15 @@ dir-glob@^2.2.2: dependencies: path-type "^3.0.0" -electron-to-chromium@^1.3.191: - version "1.3.211" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.211.tgz#0c39d17316bf342d1971fed68e754fa1775918f7" - integrity sha512-GZAiK3oHrs0K+LwH+HD+bdjZ17v40oQQdXbbd3dgrwgbENvazrGpcuIADSAREWnxzo9gADB1evuizrbXsnoU2Q== +electron-to-chromium@^1.3.378: + version "1.3.379" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.379.tgz#81dc5e82a3e72bbb830d93e15bc35eda2bbc910e" + integrity sha512-NK9DBBYEBb5f9D7zXI0hiE941gq3wkBeQmXs1ingigA/jnTg5mhwY2Z5egwA+ZI8OLGKCx0h1Cl8/xeuIBuLlg== end-of-stream@^1.1.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" @@ -623,6 +631,11 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -662,11 +675,11 @@ fs-extra@^7.0.0: universalify "^0.1.0" fs-minipass@^1.2.5: - version "1.2.6" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07" - integrity sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ== + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== dependencies: - minipass "^2.2.1" + minipass "^2.6.0" fs.realpath@^1.0.0: version "1.0.0" @@ -674,12 +687,12 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.2.7: - version "1.2.9" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" - integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== + version "1.2.12" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c" + integrity sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q== dependencies: + bindings "^1.5.0" nan "^2.12.1" - node-pre-gyp "^0.12.0" gauge@~2.7.3: version "2.7.4" @@ -742,9 +755,9 @@ glob@^6.0.4: path-is-absolute "^1.0.0" glob@^7.1.3: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -768,9 +781,9 @@ globby@^9.0.0: slash "^2.0.0" graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: - version "4.2.0" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" - integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== has-ansi@^2.0.0: version "2.0.0" @@ -833,9 +846,9 @@ iconv-lite@^0.4.4: safer-buffer ">= 2.1.2 < 3" ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== + version "3.0.3" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" + integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== dependencies: minimatch "^3.0.4" @@ -1069,9 +1082,9 @@ isobject@^3.0.0, isobject@^3.0.1: integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= js-base64@^2.1.9: - version "2.5.1" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121" - integrity sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw== + version "2.5.2" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.2.tgz#313b6274dda718f714d00b3330bbae6e38e90209" + integrity sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ== js-yaml@^3.13.1: version "3.13.1" @@ -1113,9 +1126,9 @@ kind-of@^5.0.0: integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== lcid@^2.0.0: version "2.0.0" @@ -1178,9 +1191,9 @@ mem@^4.0.0: p-is-promise "^2.0.0" merge2@^1.2.3: - version "1.2.4" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.4.tgz#c9269589e6885a60cf80605d9522d4b67ca646e3" - integrity sha512-FYE8xI+6pjFOhokZu0We3S5NKCirLbCzSh2Usf3qEyr4X8U+0jNg9P8RZ4qz+V2UoECLVwSyzU3LxXBaLGtD3A== + version "1.3.0" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" + integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" @@ -1213,30 +1226,25 @@ mimic-fn@^2.0.0: dependencies: brace-expansion "^1.1.7" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minipass@^2.2.1, minipass@^2.3.5: - version "2.3.5" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" - integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" minizlib@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" - integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== dependencies: - minipass "^2.2.1" + minipass "^2.9.0" mixin-deep@^1.2.0: version "1.3.2" @@ -1247,11 +1255,11 @@ mixin-deep@^1.2.0: is-extendable "^1.0.1" mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.3.tgz#5a514b7179259287952881e94410ec5465659f8c" + integrity sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg== dependencies: - minimist "0.0.8" + minimist "^1.2.5" ms@2.0.0: version "2.0.0" @@ -1286,9 +1294,9 @@ nanomatch@^1.2.9: to-regex "^3.0.1" needle@^2.2.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" - integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg== + version "2.3.3" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.3.tgz#a041ad1d04a871b0ebb666f40baaf1fb47867117" + integrity sha512-EkY0GeSq87rWp1hoq/sH/wnTWgFVhYlnIkbJ0YJFfRgEFlz2RraCjBpFQ+vrEgEdp0ThfyHADmkChEhcb7PKyw== dependencies: debug "^3.2.6" iconv-lite "^0.4.4" @@ -1299,10 +1307,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-pre-gyp@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" - integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== +node-pre-gyp@*: + version "0.14.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83" + integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA== dependencies: detect-libc "^1.0.2" mkdirp "^0.5.1" @@ -1313,19 +1321,19 @@ node-pre-gyp@^0.12.0: rc "^1.2.7" rimraf "^2.6.1" semver "^5.3.0" - tar "^4" + tar "^4.4.2" -node-releases@^1.1.25: - version "1.1.26" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.26.tgz#f30563edc5c7dc20cf524cc8652ffa7be0762937" - integrity sha512-fZPsuhhUHMTlfkhDLGtfY80DSJTjOcx+qD1j5pqPkuhUHVS7xHZIg9EE4DHK8O3f0zTxXHX5VIkDG8pu98/wfQ== +node-releases@^1.1.52: + version "1.1.52" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.52.tgz#bcffee3e0a758e92e44ecfaecd0a47554b0bcba9" + integrity sha512-snSiT1UypkgGt2wxPqS6ImEUICbNCMb31yaxWrOLXjhlt2z2/IBpaOxzONExqSm4y5oLnAqjjRWu+wsDzK5yNQ== dependencies: - semver "^5.3.0" + semver "^6.3.0" nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= + version "4.0.3" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" + integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== dependencies: abbrev "1" osenv "^0.1.4" @@ -1348,17 +1356,25 @@ normalize-range@^0.1.2: integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= npm-bundled@^1.0.1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" - integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== + version "1.1.1" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" + integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== + dependencies: + npm-normalize-package-bin "^1.0.1" + +npm-normalize-package-bin@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" + integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== npm-packlist@^1.1.6: - version "1.4.4" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.4.tgz#866224233850ac534b63d1a6e76050092b5d2f44" - integrity sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw== + version "1.4.8" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" + integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" + npm-normalize-package-bin "^1.0.1" npm-run-path@^2.0.0: version "2.0.2" @@ -1465,9 +1481,9 @@ p-is-promise@^2.0.0: integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== p-limit@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2" - integrity sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ== + version "2.2.2" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" + integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== dependencies: p-try "^2.0.0" @@ -1543,6 +1559,13 @@ pify@^4.0.1: resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== +pkg-up@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" + integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== + dependencies: + find-up "^3.0.0" + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -1592,9 +1615,9 @@ postcss-custom-media@^7.0.8: postcss "^7.0.14" postcss-custom-properties@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-9.0.2.tgz#091aefaa309826302d53ec6d780fbe1df8f40fd4" - integrity sha512-WHaQrEp3gJ6mgxBA4mGJKW6DSVfy2IFnKPFAb2IEulgxGUW8nWp1NkOD/rWR6e2uIuAdnTa0LXSupST7daniAw== + version "9.1.1" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-9.1.1.tgz#55822d70ff48004f6d307a338ba64a7fb0a4bfff" + integrity sha512-GVu+j7vwMTKUGhGXckYAFAAG5tTJUkSt8LuSyimtZdVVmdAEZYYqserkAgX8vwMhgGDPA4vJtWt7VgFxgiooDA== dependencies: postcss "^7.0.17" postcss-values-parser "^3.0.5" @@ -1637,12 +1660,12 @@ postcss-message-helpers@^2.0.0: integrity sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4= postcss-nested@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-4.1.2.tgz#8e0570f736bfb4be5136e31901bf2380b819a561" - integrity sha512-9bQFr2TezohU3KRSu9f6sfecXmf/x6RXDedl8CHF6fyuyVW7UqgNMRdWMHZQWuFY6Xqs2NYk+Fj4Z4vSOf7PQg== + version "4.2.1" + resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-4.2.1.tgz#4bc2e5b35e3b1e481ff81e23b700da7f82a8b248" + integrity sha512-AMayXX8tS0HCp4O4lolp4ygj9wBn32DJWXvG6gCv+ZvJrEa00GUxJcJEEzMh87BIe6FrWdYkpR2cuyqHKrxmXw== dependencies: - postcss "^7.0.14" - postcss-selector-parser "^5.0.0" + postcss "^7.0.21" + postcss-selector-parser "^6.0.2" postcss-reporter@^6.0.0: version "6.0.1" @@ -1670,12 +1693,12 @@ postcss-scss@^2.0.0: dependencies: postcss "^7.0.0" -postcss-selector-parser@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz#249044356697b33b64f1a8f7c80922dddee7195c" - integrity sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ== +postcss-selector-parser@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" + integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg== dependencies: - cssesc "^2.0.0" + cssesc "^3.0.0" indexes-of "^1.0.1" uniq "^1.0.1" @@ -1691,15 +1714,15 @@ postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.1: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss-value-parser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.0.tgz#99a983d365f7b2ad8d0f9b8c3094926eab4b936d" - integrity sha512-ESPktioptiSUchCKgggAkzdmkgzKfmp0EU8jXH+5kbIUB+unr0Y4CY9SRMvibuvYUBjNh1ACLbxqYNpdTQOteQ== +postcss-value-parser@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d" + integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg== postcss-values-parser@^3.0.5: - version "3.0.5" - resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-3.0.5.tgz#9f83849fb89eaac74c2d5bf75e8e9715508a8c8d" - integrity sha512-0N6EUBx2Vzl0c9LQipuus90EkVh7saBQFRhgAYpHHcDCIvxRt+K/q0zwcIYtDQVNs5Y9NGqei4AuCEvAOsePfQ== + version "3.1.1" + resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-3.1.1.tgz#487111a0446117d3463d2d429a380788f1365f69" + integrity sha512-p56/Cu9wb8+lck/iOTeuFeSHKEUH1bbWQ03T6N3jDkw+15pV65rMY5pK+OWhVpRn5TIrByS6UVpO3mSqvlhZYA== dependencies: color-name "^1.1.4" is-number "^7.0.0" @@ -1726,10 +1749,10 @@ postcss@^6.0.0, postcss@^6.0.23: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.5, postcss@^7.0.7: - version "7.0.17" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.17.tgz#4da1bdff5322d4a0acaab4d87f3e782436bad31f" - integrity sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ== +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.26, postcss@^7.0.5, postcss@^7.0.7: + version "7.0.27" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.27.tgz#cc67cdc6b0daa375105b7c424a85567345fc54d9" + integrity sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ== dependencies: chalk "^2.4.2" source-map "^0.6.1" @@ -1771,9 +1794,9 @@ read-cache@^1.0.0: pify "^2.3.0" readable-stream@^2.0.2, readable-stream@^2.0.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -1836,9 +1859,9 @@ resolve-url@^0.2.1: integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= resolve@^1.1.7: - version "1.12.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" - integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== + version "1.15.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" + integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== dependencies: path-parse "^1.0.6" @@ -1853,9 +1876,9 @@ rgb@~0.1.0: integrity sha1-vieykej+/+rBvZlylyG/pA/AN7U= rimraf@^2.6.1: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== dependencies: glob "^7.1.3" @@ -1887,9 +1910,14 @@ sax@^1.2.4: integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== semver@^5.3.0, semver@^5.5.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" - integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" @@ -1959,11 +1987,11 @@ snapdragon@^0.8.1: use "^3.1.0" source-map-resolve@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" - integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== dependencies: - atob "^2.1.1" + atob "^2.1.2" decode-uri-component "^0.2.0" resolve-url "^0.2.1" source-map-url "^0.4.0" @@ -2078,23 +2106,23 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" -tar@^4: - version "4.4.10" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.10.tgz#946b2810b9a5e0b26140cf78bea6b0b0d689eba1" - integrity sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA== +tar@^4.4.2: + version "4.4.13" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== dependencies: chownr "^1.1.1" fs-minipass "^1.2.5" - minipass "^2.3.5" + minipass "^2.8.6" minizlib "^1.2.1" mkdirp "^0.5.0" safe-buffer "^5.1.2" yallist "^3.0.3" tlds@^1.203.0: - version "1.203.1" - resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.203.1.tgz#4dc9b02f53de3315bc98b80665e13de3edfc1dfc" - integrity sha512-7MUlYyGJ6rSitEZ3r1Q1QNV8uSIzapS8SmmhSusBuIc7uIxPPwsKllEP0GRp1NS6Ik6F+fRZvnjDWm3ecv2hDw== + version "1.207.0" + resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.207.0.tgz#459264e644cf63ddc0965fece3898913286b1afd" + integrity sha512-k7d7Q1LqjtAvhtEOs3yN14EabsNO8ZCoY6RESSJDB9lst3bTx3as/m1UuAeCKzYxiyhR1qq72ZPhpSf+qlqiwg== to-object-path@^0.3.0: version "0.3.0" @@ -2150,9 +2178,9 @@ unset-value@^1.0.0: isobject "^3.0.0" upath@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" - integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== urix@^0.1.0: version "0.1.0" @@ -2215,9 +2243,9 @@ wrappy@1: integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== yallist@^3.0.0, yallist@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" - integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== yargs-parser@^11.1.1: version "11.1.1" From 5f35a680e389828bb8e91f2cb516994b912d123a Mon Sep 17 00:00:00 2001 From: "J. King" Date: Tue, 31 Mar 2020 12:53:11 -0400 Subject: [PATCH 30/50] Appease GitHub (again) --- vendor-bin/daux/composer.lock | 320 ++++++++++++++++++++++++++-------- 1 file changed, 248 insertions(+), 72 deletions(-) diff --git a/vendor-bin/daux/composer.lock b/vendor-bin/daux/composer.lock index 83b0143f..7c46ef7e 100644 --- a/vendor-bin/daux/composer.lock +++ b/vendor-bin/daux/composer.lock @@ -580,16 +580,16 @@ }, { "name": "scrivo/highlight.php", - "version": "v9.18.1.0", + "version": "v9.18.1.1", "source": { "type": "git", "url": "https://github.com/scrivo/highlight.php.git", - "reference": "a57c858cb753f543965a1e17af386a648012ed8f" + "reference": "52fc21c99fd888e33aed4879e55a3646f8d40558" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/a57c858cb753f543965a1e17af386a648012ed8f", - "reference": "a57c858cb753f543965a1e17af386a648012ed8f", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/52fc21c99fd888e33aed4879e55a3646f8d40558", + "reference": "52fc21c99fd888e33aed4879e55a3646f8d40558", "shasum": "" }, "require": { @@ -599,6 +599,7 @@ }, "require-dev": { "phpunit/phpunit": "^4.8|^5.7", + "sabberworm/php-css-parser": "^8.3", "symfony/finder": "^2.8|^3.4", "symfony/var-dumper": "^2.8|^3.4" }, @@ -644,20 +645,26 @@ "highlight.php", "syntax" ], - "time": "2020-02-03T02:19:36+00:00" + "funding": [ + { + "url": "https://github.com/allejo", + "type": "github" + } + ], + "time": "2020-03-02T05:59:21+00:00" }, { "name": "symfony/console", - "version": "v4.4.4", + "version": "v4.4.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f512001679f37e6a042b51897ed24a2f05eba656" + "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f512001679f37e6a042b51897ed24a2f05eba656", - "reference": "f512001679f37e6a042b51897ed24a2f05eba656", + "url": "https://api.github.com/repos/symfony/console/zipball/10bb3ee3c97308869d53b3e3d03f6ac23ff985f7", + "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7", "shasum": "" }, "require": { @@ -720,20 +727,34 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-01-25T12:44:29+00:00" + "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": "2020-03-30T11:41:10+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.4", + "version": "v4.4.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "491a20dfa87e0b3990170593bc2de0bb34d828a5" + "reference": "62f92509c9abfd1f73e17b8cf1b72c0bdac6611b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/491a20dfa87e0b3990170593bc2de0bb34d828a5", - "reference": "491a20dfa87e0b3990170593bc2de0bb34d828a5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/62f92509c9abfd1f73e17b8cf1b72c0bdac6611b", + "reference": "62f92509c9abfd1f73e17b8cf1b72c0bdac6611b", "shasum": "" }, "require": { @@ -775,20 +796,34 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2020-01-31T09:11:17+00:00" + "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": "2020-03-30T14:07:33+00:00" }, { "name": "symfony/intl", - "version": "v5.0.4", + "version": "v5.0.7", "source": { "type": "git", "url": "https://github.com/symfony/intl.git", - "reference": "519bcb27ea53835c1e8e7f7c8a799c867d570156" + "reference": "a02d65b026413150223c010db3000028bf9770eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/intl/zipball/519bcb27ea53835c1e8e7f7c8a799c867d570156", - "reference": "519bcb27ea53835c1e8e7f7c8a799c867d570156", + "url": "https://api.github.com/repos/symfony/intl/zipball/a02d65b026413150223c010db3000028bf9770eb", + "reference": "a02d65b026413150223c010db3000028bf9770eb", "shasum": "" }, "require": { @@ -850,20 +885,34 @@ "l10n", "localization" ], - "time": "2020-01-31T09:13:47+00:00" + "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": "2020-03-27T16:56:45+00:00" }, { "name": "symfony/mime", - "version": "v5.0.4", + "version": "v5.0.7", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "2a3c7fee1f1a0961fa9cf360d5da553d05095e59" + "reference": "481b7d6da88922fb1e0d86a943987722b08f3955" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/2a3c7fee1f1a0961fa9cf360d5da553d05095e59", - "reference": "2a3c7fee1f1a0961fa9cf360d5da553d05095e59", + "url": "https://api.github.com/repos/symfony/mime/zipball/481b7d6da88922fb1e0d86a943987722b08f3955", + "reference": "481b7d6da88922fb1e0d86a943987722b08f3955", "shasum": "" }, "require": { @@ -912,20 +961,34 @@ "mime", "mime-type" ], - "time": "2020-01-04T14:08:26+00:00" + "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": "2020-03-27T16:56:45+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", "shasum": "" }, "require": { @@ -937,7 +1000,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -970,20 +1033,34 @@ "polyfill", "portable" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-02-27T09:26:54+00:00" }, { "name": "symfony/polyfill-intl-icu", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "727b3bb5bfa7ca9eeb86416784cf1c08a6289b86" + "reference": "9c281272735eb66476e0fa7381e03fb0d4b60197" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/727b3bb5bfa7ca9eeb86416784cf1c08a6289b86", - "reference": "727b3bb5bfa7ca9eeb86416784cf1c08a6289b86", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/9c281272735eb66476e0fa7381e03fb0d4b60197", + "reference": "9c281272735eb66476e0fa7381e03fb0d4b60197", "shasum": "" }, "require": { @@ -996,7 +1073,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -1028,20 +1105,34 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-02-27T09:26:54+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a" + "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6842f1a39cf7d580655688069a03dd7cd83d244a", - "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", + "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", "shasum": "" }, "require": { @@ -1055,7 +1146,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -1090,20 +1181,34 @@ "portable", "shim" ], - "time": "2020-01-17T12:01:36+00:00" + "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": "2020-03-09T19:04:49+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", "shasum": "" }, "require": { @@ -1115,7 +1220,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -1149,20 +1254,34 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-03-09T19:04:49+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" + "reference": "37b0976c78b94856543260ce09b460a7bc852747" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", - "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", + "reference": "37b0976c78b94856543260ce09b460a7bc852747", "shasum": "" }, "require": { @@ -1171,7 +1290,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -1204,20 +1323,34 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-02-27T09:26:54+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" + "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", - "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", "shasum": "" }, "require": { @@ -1226,7 +1359,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -1262,20 +1395,34 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-02-27T09:26:54+00:00" }, { "name": "symfony/process", - "version": "v4.4.4", + "version": "v4.4.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "f5697ab4cb14a5deed7473819e63141bf5352c36" + "reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/f5697ab4cb14a5deed7473819e63141bf5352c36", - "reference": "f5697ab4cb14a5deed7473819e63141bf5352c36", + "url": "https://api.github.com/repos/symfony/process/zipball/3e40e87a20eaf83a1db825e1fa5097ae89042db3", + "reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3", "shasum": "" }, "require": { @@ -1311,7 +1458,21 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2020-01-09T09:50:08+00:00" + "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": "2020-03-27T16:54:36+00:00" }, { "name": "symfony/service-contracts", @@ -1373,16 +1534,16 @@ }, { "name": "symfony/yaml", - "version": "v4.4.4", + "version": "v4.4.7", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "cd014e425b3668220adb865f53bff64b3ad21767" + "reference": "ef166890d821518106da3560086bfcbeb4fadfec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/cd014e425b3668220adb865f53bff64b3ad21767", - "reference": "cd014e425b3668220adb865f53bff64b3ad21767", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ef166890d821518106da3560086bfcbeb4fadfec", + "reference": "ef166890d821518106da3560086bfcbeb4fadfec", "shasum": "" }, "require": { @@ -1428,7 +1589,21 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2020-01-21T11:12:16+00:00" + "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": "2020-03-30T11:41:10+00:00" }, { "name": "webuni/commonmark-table-extension", @@ -1564,5 +1739,6 @@ "prefer-stable": false, "prefer-lowest": false, "platform": [], - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } From 66a4f71ef3c83390e25d095cbbbb5f7bbe48aebe Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 25 Apr 2020 11:42:23 -0400 Subject: [PATCH 31/50] Minor simplification --- tests/cases/Database/SeriesCleanup.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/cases/Database/SeriesCleanup.php b/tests/cases/Database/SeriesCleanup.php index 6176ab2d..ad40dcb3 100644 --- a/tests/cases/Database/SeriesCleanup.php +++ b/tests/cases/Database/SeriesCleanup.php @@ -7,7 +7,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; -use \DateTimeImmutable as Date; +use DateTimeImmutable as Date; trait SeriesCleanup { protected function setUpSeriesCleanup(): void { @@ -18,13 +18,13 @@ trait SeriesCleanup { ]); // set up the test data $tz = new \DateTimeZone("UTC"); - $nowish = gmdate("Y-m-d H:i:s", (new Date("now - 1 minute", $tz))->getTimestamp()); - $yesterday = gmdate("Y-m-d H:i:s", (new Date("now - 1 day", $tz))->getTimestamp()); - $daybefore = gmdate("Y-m-d H:i:s", (new Date("now - 2 days", $tz))->getTimestamp()); - $daysago = gmdate("Y-m-d H:i:s", (new Date("now - 7 days", $tz))->getTimestamp()); - $weeksago = gmdate("Y-m-d H:i:s", (new Date("now - 21 days", $tz))->getTimestamp()); - $soon = gmdate("Y-m-d H:i:s", (new Date("now + 1 minute", $tz))->getTimestamp()); - $faroff = gmdate("Y-m-d H:i:s", (new Date("now + 1 hour", $tz))->getTimestamp()); + $nowish = (new Date("now - 1 minute", $tz))->format("Y-m-d H:i:s"); + $yesterday = (new Date("now - 1 day", $tz))->format("Y-m-d H:i:s"); + $daybefore = (new Date("now - 2 days", $tz))->format("Y-m-d H:i:s"); + $daysago = (new Date("now - 7 days", $tz))->format("Y-m-d H:i:s"); + $weeksago = (new Date("now - 21 days", $tz))->format("Y-m-d H:i:s"); + $soon = (new Date("now + 1 minute", $tz))->format("Y-m-d H:i:s"); + $faroff = (new Date("now + 1 hour", $tz))->format("Y-m-d H:i:s"); $this->data = [ 'arsse_users' => [ 'columns' => [ From 20fe65b67eaff4ba0ae0e07d5df3e3171fbc5482 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 25 Apr 2020 11:43:36 -0400 Subject: [PATCH 32/50] Make changelog point to manual instead of readme --- CHANGELOG | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index cc821fb1..9b7b8cd3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -31,7 +31,7 @@ Version 0.8.0 (2019-07-26) ========================== New features: -- Support for the Fever protocol (see README.md for details) +- Support for the Fever protocol (see manual for details) - Command line functionality for clearing a password, disabling the account - Command line options for dealing with Fever passwords - Command line functionality for importing and exporting OPML @@ -123,7 +123,7 @@ Version 0.4.0 (2018-10-26) ========================== New features: -- Support for HTTP authentication in Tiny Tiny RSS (see README.md for details) +- Support for HTTP authentication in Tiny Tiny RSS (see manual for details) - New userHTTPAuthRequired and userSessionEnforced settings Version 0.3.1 (2018-07-22) @@ -169,7 +169,7 @@ Version 0.2.0 (2017-11-30) ========================== New features: -- Support for the Tiny Tiny RSS protocol (see README.md for details) +- Support for the Tiny Tiny RSS protocol (see manual for details) - Support for HTTP OPTIONS requests in all protocols Bug fixes: From 2620314583135139d19a94cb8f203ad97e1b2b0a Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 25 Apr 2020 11:49:45 -0400 Subject: [PATCH 33/50] GitHub should now be kept in sync at all times --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6932abe..74831aa4 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Information on how to install and use the software can be found in [the manual]( # Installing from source -The main repository for The Arsse can be found at [code.mensbeam.com](https://code.mensbeam.com/MensBeam/arsse/), with a mirror also available [at GitHub](https://github.com/mensbeam/arsse/). The main repository is preferred, as the GitHub mirror can sometimes be out of date. +The main repository for The Arsse can be found at [code.mensbeam.com](https://code.mensbeam.com/MensBeam/arsse/), with a mirror also available [at GitHub](https://github.com/mensbeam/arsse/). The GitHub mirror does not accept bug reports, but the two should otherwise be equivalent. [Composer](https://getcomposer.org/) is required to manage PHP dependencies. After cloning the repository or downloading a source code tarball, running `composer install` will download all the required dependencies, and will advise if any PHP extensions need to be installed. If not installing as a programming environment, running `composer install --no-dev` is recommended. From ee549cdee7c92e230ab2cd1b992aaffa8268e258 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 22 Jun 2020 11:32:17 -0400 Subject: [PATCH 34/50] Appease GitHub (yet again) --- docs/theme/arsse/arsse.css | 2 +- package.json | 4 +- yarn.lock | 1955 ++++++++---------------------------- 3 files changed, 435 insertions(+), 1526 deletions(-) diff --git a/docs/theme/arsse/arsse.css b/docs/theme/arsse/arsse.css index bc6a19cb..94b17ab9 100644 --- a/docs/theme/arsse/arsse.css +++ b/docs/theme/arsse/arsse.css @@ -1,2 +1,2 @@ /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */ -html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-size:14px}body{margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress,sub,sup{vertical-align:baseline}.s-content pre code:after,.s-content pre code:before,[hidden],template{display:none}a{background-color:transparent;-webkit-text-decoration-skip:objects;text-decoration:none;color:#e63c2f}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}.s-content blockquote cite,dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;clear:both;margin:1em 0;border:0;border-top:1px solid #ddd}button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:700}button,hr,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{color:inherit;display:table;max-width:100%;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}*,:after,:before{box-sizing:border-box}@media (min-width:850px){html{font-size:16px}}body,html{height:100%;background-color:#fff;color:#15284b}.Columns__left{background-color:#e8d5d3}.Columns__right__content{padding:10px;background-color:#fff}@media (max-width:768px){html:not(.no-js) .Collapsible__content{height:0;overflow:hidden;transition:height 400ms ease-in-out}}.Collapsible__trigger{margin:12px;padding:7px 10px;background-color:transparent;border:0;float:right;background-image:none;-webkit-filter:none;filter:none;box-shadow:none}.Collapsible__trigger__bar{display:block;width:18px;height:2px;margin-top:2px;margin-bottom:3px;background-color:#e8d5d3}.Collapsible__trigger:hover{background-color:#93b7bb;box-shadow:none}.Collapsible__trigger:hover .Collapsible__trigger__bar{background-color:#15284b}@media screen and (min-width:769px){body{background-color:#15284b}.Navbar{position:fixed;z-index:1030;width:100%}.Collapsible__trigger{display:none!important}.Collapsible__content{display:block!important}.Columns{height:100%}.Columns:after,.Columns:before{content:" ";display:table}.Columns:after{clear:both}.Columns__left,.Columns__right{position:relative;min-height:1px;float:left;overflow:auto;height:100%}.Columns__left{width:25%;border-right:1px solid #e7e7e9;overflow-x:hidden}.Columns__right{width:75%}.Columns__right__content{padding:0 20px 20px;min-height:100%}}.Page{max-width:860px}body{font-family:"Cabin","Trebuchet MS",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-feature-settings:"kern" 1;-webkit-font-kerning:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.618}h1,h2,h3,h4,h5,h6{font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif}.s-content h1,.s-content h2,.s-content h3,.s-content h4,.s-content h5,.s-content h6{cursor:text;line-height:1.4em;margin:2em 0 .5em}.s-content h1 code,.s-content h1 tt,.s-content h2 code,.s-content h2 tt,.s-content h3 code,.s-content h3 tt,.s-content h4 code,.s-content h4 tt,.s-content h5 code,.s-content h5 tt,.s-content h6 code,.s-content h6 tt{font-size:inherit}.s-content h1 i,.s-content h2 i,.s-content h3 i,.s-content h4 i,.s-content h5 i,.s-content h6 i{font-size:.7em}.s-content h1 p,.s-content h2 p,.s-content h3 p,.s-content h4 p,.s-content h5 p,.s-content h6 p{margin-top:0}.s-content h1{margin-top:0;font-size:2.618rem}.s-content h2{font-size:2rem}.s-content h3{font-size:1.618rem}.s-content h4,.s-content h5,.s-content h6,.s-content small{font-size:1.309rem}.s-content a{text-decoration:underline}.s-content p{margin-bottom:1.3em}.s-content ol,.s-content ul{padding-left:2em}.s-content ul p,.s-content ul ul{margin:0}.s-content dl{padding:0}.s-content dl dt{font-weight:700;font-style:italic;padding:0;margin:15px 0 5px}.s-content dl dt:first-child{padding:0}.s-content dl dd{margin:0 0 15px;padding:0 15px}.s-content blockquote{margin:.75em 2em;padding:.5em 1em;font-style:italic;border-left:.25em solid #15284b}.s-content blockquote cite:before{content:"\2014";padding-right:.5em}.s-content table{width:100%;padding:0;margin-bottom:1em;border-collapse:separate;border-spacing:2px;border:2px solid #b3aab1}.s-content table+table{margin-top:1em}.s-content table tr{background-color:#fff;margin:0;padding:0;border-top:0}.s-content table tr:nth-child(2n){background-color:transparent}.s-content table th{font-weight:700;background:#e8d5d3}.s-content table td,.s-content table th{margin:0;padding:.5em}.s-content blockquote>:first-child,.s-content dl dd>:first-child,.s-content dl dt>:first-child,.s-content ol>:first-child,.s-content table td>:first-child,.s-content table th>:first-child,.s-content ul>:first-child{margin-top:0}.s-content blockquote>:last-child,.s-content dl dd>:last-child,.s-content dl dt>:last-child,.s-content ol>:last-child,.s-content table td>:last-child,.s-content table th>:last-child,.s-content ul>:last-child{margin-bottom:0}.s-content img{max-width:100%;display:block;margin:0 auto}.s-content code{font-family:Monaco,Menlo,Consolas,"Lucida Console","Courier New",monospace;padding-top:.1rem;padding-bottom:.1rem;background:#f9f5f4;border-radius:0;box-shadow:none;display:inline-block;padding:.5ch;border:0}.s-content code:after,.s-content code:before{letter-spacing:-.2em;content:"\00a0"}.s-content pre{background:#f5f2f0;line-height:1.5em;overflow:auto;border:0;border-radius:0;padding:.75em 20px;margin:0 -20px 20px}.s-content pre code{margin:0;padding:0;white-space:pre;box-shadow:none}.s-content pre code,.s-content pre tt{background-color:transparent;border:0}.s-content ins,.s-content u{text-decoration:none;border-bottom:1px solid #15284b}.s-content del a,.s-content ins a,.s-content u a{color:inherit}a.Link--external:after{content:" " url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAVklEQVR4Xn3PgQkAMQhDUXfqTu7kTtkpd5RA8AInfArtQ2iRXFWT2QedAfttj2FsPIOE1eCOlEuoWWjgzYaB/IkeGOrxXhqB+uA9Bfcm0lAZuh+YIeAD+cAqSz4kCMUAAAAASUVORK5CYII=)}a.Link--broken{color:red}p{margin:0 0 1em}.Button{display:inline-block;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;margin-bottom:0}.Button--small{font-size:12px;line-height:1.5;border-radius:3px}.Button--default{color:#333;background-color:#fff;border-color:#ccc}.Button--default.Button--active{color:#333;background-color:#e6e6e6;border-color:#adadad}.Brand,.Navbar{background-color:#e63c2f}.Brand{display:block;padding:.75em .6em;font-size:2rem;text-shadow:none;font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;color:#15284b}.Navbar{box-shadow:0 1px 5px rgba(0,0,0,.25);margin-bottom:0}.CodeToggler{padding:0 20px}.CodeToggler__text{font-size:12px;line-height:1.5;padding:6px 10px 6px 0;display:inline-block;vertical-align:middle}.no-js .CodeToggler{display:none}.Nav{margin:0;padding:0}.Nav__arrow{display:inline-block;position:relative;width:16px;margin-left:-16px}.Nav__arrow:before{position:absolute;display:block;content:"";margin:-.25em 0 0 -.4em;left:50%;top:50%;border-right:.15em solid #15284b;border-top:.15em solid #15284b;transform:rotate(45deg);transition-duration:.3s}.Nav__item,.Nav__item a{display:block}.Nav__item a{margin:0;padding:6px 15px 6px 20px;font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-weight:400;color:#15284b;text-shadow:none}.Nav__item a:hover{color:#15284b;text-shadow:none;background-color:#93b7bb}.Nav .Nav{margin-left:15px}html:not(.no-js) .Nav .Nav{height:0;transition:height 400ms ease-in-out;overflow:hidden}.Nav .Nav .Nav__item a{margin:0 0 0 -15px;padding:3px 30px;font-family:"Cabin","Trebuchet MS",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;color:#15284b;opacity:.7}.HomepageButtons .Button--hero:hover,.Nav .Nav .Nav__item a:hover{opacity:1}.Nav .Nav .Nav__item--active a{color:#15284b}.Nav__item--active>a,.Nav__item--open>a{background-color:#93b7bb}.Nav__item--open>a>.Nav__arrow:before{margin-left:-.25em;transform:rotate(135deg)}.Page__header{margin:0 0 10px;padding:0}.Page__header:after,.Page__header:before{content:" ";display:table}.Page__header:after{clear:both}.Page__header h1{margin:0;padding:0;line-height:57px}.Page__header--separator{height:.6em}.Page__header a{text-decoration:none}.Page__header .EditOn,.Page__header .ModifiedDate{float:left;font-size:10px;color:gray}.Page__header .EditOn{float:right}.Links,.Twitter{padding:0 20px}.Links a{font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-weight:400;color:#15284b;line-height:2em}.Twitter{font:11px/18px "Helvetica Neue",Arial,sans-serif}.Twitter__button{text-decoration:none;display:inline-block;vertical-align:top;zoom:1;position:relative;height:20px;box-sizing:border-box;padding:1px 8px 1px 6px;background-color:#1b95e0;color:#fff;border-radius:3px;font-weight:500;cursor:pointer}.Twitter__button .Twitter__button__label{display:inline-block;vertical-align:top;zoom:1;margin-left:3px;white-space:nowrap}.Twitter__button svg{position:relative;top:2px;display:inline-block;width:14px;height:14px}.PoweredBy{padding:0 20px 1rem;font-size:1.309rem}.Search{position:relative}.Search__field{display:block;width:100%;height:34px;padding:6px 30px 6px 20px;color:#555;border-width:0 0 1px;border-bottom:1px solid #ccc;background:#fff;transition:border-color ease-in-out .15s}.Search__field:focus{border-color:#93b7bb;outline:0}.Search__icon{position:absolute;right:9px;top:9px;width:16px;height:16px}.Navbar .Search{float:right;margin:8px 20px}.Navbar .Search__field{box-shadow:inset 0 1px 1px rgba(0,0,0,.075);border-width:0;border-radius:4px;padding-left:10px}.TableOfContentsContainer{float:right;min-width:300px;max-width:25%;padding-left:1em}.TableOfContentsContainer__title{margin-bottom:0!important}.TableOfContentsContainer__content{border:1px solid #efefef;border-width:4px 2px 2px 6px}.TableOfContentsContainer__content>.TableOfContents>li+li{border-top:1px solid #ddd}ul.TableOfContents{font-size:1rem;padding-left:0;margin:0;list-style-type:none;border-left:6px solid #e8d5d3}ul.TableOfContents p{margin-bottom:0}ul.TableOfContents a{text-decoration:none;display:block;padding:.2em 0 .2em .75em}ul.TableOfContents .TableOfContents{padding-left:.75em}.Pager{padding-left:0;margin:1em 0;list-style:none;text-align:center}.Pager:after,.Pager:before{content:" ";display:table}.Pager,.Pager:after{clear:both}.Pager li{display:inline}.Pager li>a{display:inline-block;padding:5px 14px;background-color:#fff}.Pager li>a:focus,.Pager li>a:hover{text-decoration:none}.Pager--next>a{float:right}.Pager--prev>a{float:left}.Checkbox{position:relative;display:block;padding-left:30px;cursor:pointer}.Checkbox input{position:absolute;z-index:-1;opacity:0}.Checkbox__indicator{position:absolute;top:50%;left:0;width:20px;height:20px;margin-top:-10px;background:#e6e6e6}.Checkbox__indicator:after{position:absolute;display:none;content:""}.Checkbox input:focus~.Checkbox__indicator,.Checkbox:hover input~.Checkbox__indicator{background:#ccc}.Checkbox input:checked~.Checkbox__indicator{background:#15284b}.Checkbox input:checked~.Checkbox__indicator:after{display:block}.Checkbox input:checked:focus~.Checkbox__indicator,.Checkbox:hover input:not([disabled]):checked~.Checkbox__indicator{background:#93b7bb}.Checkbox input:disabled~.Checkbox__indicator{pointer-events:none;opacity:.6;background:#e6e6e6}.Checkbox .Checkbox__indicator:after{top:4px;left:8px;width:5px;height:10px;transform:rotate(45deg);border:solid #fff;border-width:0 2px 2px 0}.Checkbox input:disabled~.Checkbox__indicator:after{border-color:#7b7b7b}.Hidden{display:none}.Container{margin-right:auto;margin-left:auto}.Container--inner{width:80%;margin:0 auto}@media (min-width:1200px){.Container{width:1170px}}@media (min-width:992px){.Container{width:970px}}@media (min-width:769px){.Container{width:750px}}.Homepage{background-color:#fff;border-radius:0;border:0;color:#15284b;overflow:hidden;padding-bottom:0;margin-bottom:0;box-shadow:none}.HomepageTitle h2{width:80%;font-size:30px;margin:20px auto;text-align:center}.HomepageImage img{display:block;max-width:80%;margin:0 auto;height:auto}.HomepageButtons{padding:20px 0;background-color:#e8d5d3;text-align:center}.HomepageButtons:after,.HomepageButtons:before{content:" ";display:table}.HomepageButtons:after{clear:both}.HomepageButtons .Button--hero{padding:20px 30px;border-radius:0;text-shadow:none;opacity:.8;margin:0 10px;text-transform:uppercase;border:5px solid #15284b;font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;background-image:none;-webkit-filter:none;filter:none;box-shadow:none}@media (max-width:768px){.HomepageButtons .Button--hero{display:block;margin-bottom:10px}}.HomepageButtons .Button--hero.Button--secondary{background-color:#93b7bb;color:#15284b}.HomepageButtons .Button--hero.Button--primary{background-color:#15284b;color:#e8d5d3}.HomepageContent{background-color:#fff;padding:40px 0}.HomepageContent ol li,.HomepageContent ul li{list-style:none;margin-bottom:.5em;position:relative}.HomepageContent ol li:before,.HomepageContent ul li:before{position:absolute;top:50%;left:-1.5em;content:"";width:0;height:0;border:.5em solid transparent;border-left:.5em solid #93b7bb;float:left;display:block;margin-top:-.5em}.HomepageContent .HeroText,.HomepageFooter__links li a{font-size:16px;font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif}.HomepageContent .HeroText{margin-bottom:20px;font-weight:300;line-height:1.4}@media (min-width:769px){.HomepageContent{padding:40px 20px}.HomepageContent .HeroText{font-size:21px}.HomepageContent .Row{margin:0 -15px}.HomepageContent .Row__half,.HomepageContent .Row__quarter,.HomepageContent .Row__third{float:left;position:relative;min-height:1px;padding-left:15px;padding-right:15px}.HomepageContent .Row__third{width:33.333333%}.HomepageContent .Row__half{width:50%}.HomepageContent .Row__quarter{width:25%}}.HomepageFooter{background-color:#15284b;color:#93b7bb;border:0;box-shadow:none}.HomepageFooter:after,.HomepageFooter:before{content:" ";display:table}.HomepageFooter:after{clear:both}@media (max-width:768px){.HomepageFooter{padding:0 20px;text-align:center}.HomepageFooter .HomepageFooter__links{padding-left:0;list-style-type:none}}@media (min-width:769px){.HomepageFooter .HomepageFooter__links{float:left}.HomepageFooter .HomepageFooter__twitter{float:right}}.HomepageFooter__links,.HomepageFooter__twitter{margin:40px 0}.HomepageFooter__links li a{line-height:32px;font-weight:700}.HomepageFooter__links li a:hover{text-decoration:underline}.HomepageFooter .Twitter__button{margin-bottom:20px}@media print{*{text-shadow:none!important;color:#000!important;background:0 0!important;box-shadow:none!important}h1,h2,h3,h4,h5,h6{page-break-after:avoid;page-break-before:auto}blockquote,img,pre{page-break-inside:avoid}blockquote,pre{font-style:italic;border:1px solid #999}img{border:0}a,a:visited{text-decoration:underline}abbr[title]:after{content:" (" attr(title) ")"}q{quotes:none}.s-content a[href^="#"]:after,q:before{content:""}q:after{content:" (" attr(cite) ")"}.PageBreak{display:block;page-break-before:always}.NoPrint,.Pager,aside{display:none}.Columns__right{width:100%!important}.s-content a:after{content:" (" attr(href) ")";font-size:80%;word-wrap:break-word}h1 a[href]:after{font-size:50%}}@font-face{font-family:'League Gothic';src:url(fonts/leaguegothic.woff2) format('woff2'),url(fonts/leaguegothic.woff) format('woff');font-style:normal;font-display:swap}@font-face{font-family:'Cabin';src:url(fonts/cabin-regular.woff2) format('woff2'),url(fonts/cabin-regular.woff) format('woff');font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:'Cabin';src:url(fonts/cabin-italic.woff2) format('woff2'),url(fonts/cabin-italic.woff) format('woff');font-style:italic;font-display:swap}@font-face{font-family:'Cabin';src:url(fonts/cabin-bold.woff2) format('woff2'),url(fonts/cabin-bold.woff) format('woff');font-weight:700;font-style:normal;font-display:swap}.s-content code::after,.s-content code::before,a.Link--external::after{content:''}pre .s-content code{display:inline}.s-content table tbody,.s-content table thead{background-color:#fff}.s-content table tr:nth-child(2n) td{background-color:#f9f5f4}.s-content table td,.s-content table th{border:0}.Nav__item .Nav__item,.s-content table{font-size:1rem}.Brand,h1,h2,h3,h4,h5,h6{font-weight:400}.Button,.Pager li>a{border-radius:0}.HomepageButtons .Button--hero{font-weight:400;font-size:1.309rem}.Page__header{border-bottom:2px solid #e8d5d3}.Pager li>a{border:2px solid #e8d5d3}.Pager li>a:focus,.Pager li>a:hover{background-color:#e8d5d3}.Pager--prev a::before{content:"\2190\00a0"}.Pager--next a::after{content:"\00a0\2192"}.Navbar{height:auto;box-shadow:none}.Navbar .Brand{float:none;line-height:inherit;height:auto}.Homepage{padding-top:10px!important}.Nav__item{font-size:1.309rem}.Nav .Nav .Nav__item a .Nav__arrow:before,.Nav__arrow:before{font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;width:1ch;height:1ch}.TableOfContentsContainer__title{border-bottom:4px solid #e8d5d3}.Columns__right--full .TableOfContentsContainer .TableOfContentsContainer__content>.TableOfContents{border-right:2px solid #e8d5d3}.Columns__right--full .TableOfContentsContainer a{border-bottom:1px solid #e8d5d3}.clients thead tr:first-child th{text-align:left}.clients thead tr:first-child th:first-child{width:15%}.clients thead tr:first-child th:nth-child(3){width:50%;text-align:center}.clients thead tr+tr th{width:16.66%;text-align:center}.clients tbody td:nth-child(3),.clients tbody td:nth-child(4),.clients tbody td:nth-child(5){text-align:center}.clients tbody td.Y{color:#2c9a42}.clients tbody td.N{color:#e63c2f}.hljs,.s-content pre{background:#15284b;color:#e8d5d3}.hljs{display:block;overflow-x:auto;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-comment,.hljs-quote{color:#978e9c}.hljs-addition,.hljs-keyword,.hljs-selector-tag{color:#acb39a}.hljs-doctag,.hljs-literal,.hljs-meta .hljs-meta-string,.hljs-number,.hljs-regexp,.hljs-string{color:#93b7bb}.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-title{color:#82b7e5}.hljs-attr,.hljs-attribute,.hljs-class .hljs-title,.hljs-template-variable,.hljs-type,.hljs-variable{color:#c5b031}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-meta .hljs-keyword,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-subst,.hljs-symbol{color:#ea8031}.hljs-built_in,.hljs-deletion{color:#e63c2f}.hljs-formula{background:#686986}@media (min-width:850px){.Columns__left{border:0}} \ No newline at end of file +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-size:14px}body{margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress,sub,sup{vertical-align:baseline}.s-content pre code:after,.s-content pre code:before,[hidden],template{display:none}a{background-color:transparent;-webkit-text-decoration-skip:objects;text-decoration:none;color:#e63c2f}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}.s-content blockquote cite,dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;clear:both;margin:1em 0;border:0;border-top:1px solid #ddd}button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:700}button,hr,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{color:inherit;display:table;max-width:100%;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}*,:after,:before{box-sizing:border-box}@media (min-width:850px){html{font-size:16px}}body,html{height:100%;background-color:#fff;color:#15284b}.Columns__left{background-color:#e8d5d3}.Columns__right__content{padding:10px;background-color:#fff}@media (max-width:768px){html:not(.no-js) .Collapsible__content{height:0;overflow:hidden;transition:height 400ms ease-in-out}}.Collapsible__trigger{margin:12px;padding:7px 10px;background-color:transparent;border:0;float:right;background-image:none;-webkit-filter:none;filter:none;box-shadow:none}.Collapsible__trigger__bar{display:block;width:18px;height:2px;margin-top:2px;margin-bottom:3px;background-color:#e8d5d3}.Collapsible__trigger:hover{background-color:#93b7bb;box-shadow:none}.Collapsible__trigger:hover .Collapsible__trigger__bar{background-color:#15284b}@media screen and (min-width:769px){body{background-color:#15284b}.Navbar{position:fixed;z-index:1030;width:100%}.Collapsible__trigger{display:none!important}.Collapsible__content{display:block!important}.Columns{height:100%}.Columns:after,.Columns:before{content:" ";display:table}.Columns:after{clear:both}.Columns__left,.Columns__right{position:relative;min-height:1px;float:left;overflow:auto;height:100%}.Columns__left{width:25%;border-right:1px solid #e7e7e9;overflow-x:hidden}.Columns__right{width:75%}.Columns__right__content{padding:0 20px 20px;min-height:100%}}.Page{max-width:860px}body{font-family:"Cabin","Trebuchet MS",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-feature-settings:"kern" 1;-webkit-font-kerning:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.618}h1,h2,h3,h4,h5,h6{font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif}.s-content h1,.s-content h2,.s-content h3,.s-content h4,.s-content h5,.s-content h6{cursor:text;line-height:1.4em;margin:2em 0 .5em}.s-content h1 code,.s-content h1 tt,.s-content h2 code,.s-content h2 tt,.s-content h3 code,.s-content h3 tt,.s-content h4 code,.s-content h4 tt,.s-content h5 code,.s-content h5 tt,.s-content h6 code,.s-content h6 tt{font-size:inherit}.s-content h1 i,.s-content h2 i,.s-content h3 i,.s-content h4 i,.s-content h5 i,.s-content h6 i{font-size:.7em}.s-content h1 p,.s-content h2 p,.s-content h3 p,.s-content h4 p,.s-content h5 p,.s-content h6 p{margin-top:0}.s-content h1{margin-top:0;font-size:2.618rem}.s-content h2{font-size:2rem}.s-content h3{font-size:1.618rem}.s-content h4,.s-content h5,.s-content h6,.s-content small{font-size:1.309rem}.s-content a{text-decoration:underline}.s-content p{margin-bottom:1.3em}.s-content ol,.s-content ul{padding-left:2em}.s-content ul p,.s-content ul ul{margin:0}.s-content dl{padding:0}.s-content dl dt{font-weight:700;font-style:italic;padding:0;margin:15px 0 5px}.s-content dl dt:first-child{padding:0}.s-content dl dd{margin:0 0 15px;padding:0 15px}.s-content blockquote{margin:.75em 2em;padding:.5em 1em;font-style:italic;border-left:.25em solid #15284b}.s-content blockquote cite:before{content:"\2014";padding-right:.5em}.s-content table{width:100%;padding:0;margin-bottom:1em;border-collapse:separate;border-spacing:2px;border:2px solid #b3aab1}.s-content table+table{margin-top:1em}.s-content table tr{background-color:#fff;margin:0;padding:0;border-top:0}.s-content table tr:nth-child(2n){background-color:transparent}.s-content table th{font-weight:700;background:#e8d5d3}.s-content table td,.s-content table th{margin:0;padding:.5em}.s-content blockquote>:first-child,.s-content dl dd>:first-child,.s-content dl dt>:first-child,.s-content ol>:first-child,.s-content table td>:first-child,.s-content table th>:first-child,.s-content ul>:first-child{margin-top:0}.s-content blockquote>:last-child,.s-content dl dd>:last-child,.s-content dl dt>:last-child,.s-content ol>:last-child,.s-content table td>:last-child,.s-content table th>:last-child,.s-content ul>:last-child{margin-bottom:0}.s-content img{max-width:100%;display:block;margin:0 auto}.s-content code{font-family:Monaco,Menlo,Consolas,"Lucida Console","Courier New",monospace;padding-top:.1rem;padding-bottom:.1rem;background:#f9f5f4;border-radius:0;box-shadow:none;display:inline-block;padding:.5ch;border:0}.s-content code:after,.s-content code:before{letter-spacing:-.2em;content:"\00a0"}.s-content pre{background:#f5f2f0;line-height:1.5em;overflow:auto;border:0;border-radius:0;padding:.75em 20px;margin:0 -20px 20px}.s-content pre code{margin:0;padding:0;white-space:pre;box-shadow:none}.s-content pre code,.s-content pre tt{background-color:transparent;border:0}.s-content ins,.s-content u{text-decoration:none;border-bottom:1px solid #15284b}.s-content del a,.s-content ins a,.s-content u a{color:inherit}a.Link--external:after{content:" " url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAVklEQVR4Xn3PgQkAMQhDUXfqTu7kTtkpd5RA8AInfArtQ2iRXFWT2QedAfttj2FsPIOE1eCOlEuoWWjgzYaB/IkeGOrxXhqB+uA9Bfcm0lAZuh+YIeAD+cAqSz4kCMUAAAAASUVORK5CYII=)}a.Link--broken{color:red}p{margin:0 0 1em}.Button{display:inline-block;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;margin-bottom:0}.Button--small{font-size:12px;line-height:1.5;border-radius:3px}.Button--default{color:#333;background-color:#fff;border-color:#ccc}.Button--default.Button--active{color:#333;background-color:#e6e6e6;border-color:#adadad}.Brand,.Nav__item a:hover{color:#15284b;text-shadow:none}.Brand,.Navbar{background-color:#e63c2f}.Brand{display:block;padding:.75em .6em;font-size:2rem;font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif}.Navbar{box-shadow:0 1px 5px rgba(0,0,0,.25);margin-bottom:0}.CodeToggler{padding:0 20px}.CodeToggler__text{font-size:12px;line-height:1.5;padding:6px 10px 6px 0;display:inline-block;vertical-align:middle}.no-js .CodeToggler{display:none}.Nav{margin:0;padding:0}.Nav__arrow{display:inline-block;position:relative;width:16px;margin-left:-16px}.Nav__arrow:before{position:absolute;display:block;content:"";margin:-.25em 0 0 -.4em;left:50%;top:50%;border-right:.15em solid #15284b;border-top:.15em solid #15284b;transform:rotate(45deg);transition-duration:.3s}.Nav__item,.Nav__item a{display:block}.Nav__item a{margin:0;padding:6px 15px 6px 20px;font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-weight:400;color:#15284b;text-shadow:none}.Nav__item a:hover{background-color:#93b7bb}.Nav .Nav{margin-left:15px}html:not(.no-js) .Nav .Nav{height:0;transition:height 400ms ease-in-out;overflow:hidden}.Nav .Nav .Nav__item a{margin:0 0 0 -15px;padding:3px 30px;font-family:"Cabin","Trebuchet MS",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;color:#15284b;opacity:.7}.HomepageButtons .Button--hero:hover,.Nav .Nav .Nav__item a:hover{opacity:1}.Nav .Nav .Nav__item--active a{color:#15284b}.Nav__item--active>a,.Nav__item--open>a{background-color:#93b7bb}.Nav__item--open>a>.Nav__arrow:before{margin-left:-.25em;transform:rotate(135deg)}.Page__header{margin:0 0 10px;padding:0}.Page__header:after,.Page__header:before{content:" ";display:table}.Page__header:after{clear:both}.Page__header h1{margin:0;padding:0;line-height:57px}.Page__header--separator{height:.6em}.Page__header a{text-decoration:none}.Page__header .EditOn,.Page__header .ModifiedDate{float:left;font-size:10px;color:gray}.Page__header .EditOn{float:right}.Links,.Twitter{padding:0 20px}.Links a{font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-weight:400;color:#15284b;line-height:2em}.Twitter{font:11px/18px "Helvetica Neue",Arial,sans-serif}.Twitter__button{text-decoration:none;display:inline-block;vertical-align:top;zoom:1;position:relative;height:20px;box-sizing:border-box;padding:1px 8px 1px 6px;background-color:#1b95e0;color:#fff;border-radius:3px;font-weight:500;cursor:pointer}.Twitter__button .Twitter__button__label{display:inline-block;vertical-align:top;zoom:1;margin-left:3px;white-space:nowrap}.Twitter__button svg{position:relative;top:2px;display:inline-block;width:14px;height:14px}.PoweredBy{padding:0 20px 1rem;font-size:1.309rem}.Search{position:relative}.Search__field{display:block;width:100%;height:34px;padding:6px 30px 6px 20px;color:#555;border-width:0 0 1px;border-bottom:1px solid #ccc;background:#fff;transition:border-color ease-in-out .15s}.Search__field:focus{border-color:#93b7bb;outline:0}.Search__icon{position:absolute;right:9px;top:9px;width:16px;height:16px}.Navbar .Search{float:right;margin:8px 20px}.Navbar .Search__field{box-shadow:inset 0 1px 1px rgba(0,0,0,.075);border-width:0;border-radius:4px;padding-left:10px}.TableOfContentsContainer{float:right;min-width:300px;max-width:25%;padding-left:1em}.TableOfContentsContainer__title{margin-bottom:0!important}.TableOfContentsContainer__content{border:1px solid #efefef;border-width:4px 2px 2px 6px}.TableOfContentsContainer__content>.TableOfContents>li+li{border-top:1px solid #ddd}ul.TableOfContents{font-size:1rem;padding-left:0;margin:0;list-style-type:none;border-left:6px solid #e8d5d3}ul.TableOfContents p{margin-bottom:0}ul.TableOfContents a{text-decoration:none;display:block;padding:.2em 0 .2em .75em}ul.TableOfContents .TableOfContents{padding-left:.75em}.Pager{padding-left:0;margin:1em 0;list-style:none;text-align:center}.Pager:after,.Pager:before{content:" ";display:table}.Pager,.Pager:after{clear:both}.Pager li{display:inline}.Pager li>a{display:inline-block;padding:5px 14px;background-color:#fff}.Pager li>a:focus,.Pager li>a:hover{text-decoration:none}.Pager--next>a{float:right}.Pager--prev>a{float:left}.Checkbox{position:relative;display:block;padding-left:30px;cursor:pointer}.Checkbox input{position:absolute;z-index:-1;opacity:0}.Checkbox__indicator{position:absolute;top:50%;left:0;width:20px;height:20px;margin-top:-10px;background:#e6e6e6}.Checkbox__indicator:after{position:absolute;display:none;content:""}.Checkbox input:focus~.Checkbox__indicator,.Checkbox:hover input~.Checkbox__indicator{background:#ccc}.Checkbox input:checked~.Checkbox__indicator{background:#15284b}.Checkbox input:checked~.Checkbox__indicator:after{display:block}.Checkbox input:checked:focus~.Checkbox__indicator,.Checkbox:hover input:not([disabled]):checked~.Checkbox__indicator{background:#93b7bb}.Checkbox input:disabled~.Checkbox__indicator{pointer-events:none;opacity:.6;background:#e6e6e6}.Checkbox .Checkbox__indicator:after{top:4px;left:8px;width:5px;height:10px;transform:rotate(45deg);border:solid #fff;border-width:0 2px 2px 0}.Checkbox input:disabled~.Checkbox__indicator:after{border-color:#7b7b7b}.Hidden{display:none}.Container{margin-right:auto;margin-left:auto}.Container--inner{width:80%;margin:0 auto}@media (min-width:1200px){.Container{width:1170px}}@media (min-width:992px){.Container{width:970px}}@media (min-width:769px){.Container{width:750px}}.Homepage{background-color:#fff;border-radius:0;border:0;color:#15284b;overflow:hidden;padding-bottom:0;margin-bottom:0;box-shadow:none}.HomepageTitle h2{width:80%;font-size:30px;margin:20px auto;text-align:center}.HomepageImage img{display:block;max-width:80%;margin:0 auto;height:auto}.HomepageButtons{padding:20px 0;background-color:#e8d5d3;text-align:center}.HomepageButtons:after,.HomepageButtons:before{content:" ";display:table}.HomepageButtons:after{clear:both}.HomepageButtons .Button--hero{padding:20px 30px;border-radius:0;text-shadow:none;opacity:.8;margin:0 10px;text-transform:uppercase;border:5px solid #15284b;font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;background-image:none;-webkit-filter:none;filter:none;box-shadow:none}@media (max-width:768px){.HomepageButtons .Button--hero{display:block;margin-bottom:10px}}.HomepageButtons .Button--hero.Button--secondary{background-color:#93b7bb;color:#15284b}.HomepageButtons .Button--hero.Button--primary{background-color:#15284b;color:#e8d5d3}.HomepageContent{background-color:#fff;padding:40px 0}.HomepageContent ol li,.HomepageContent ul li{list-style:none;margin-bottom:.5em;position:relative}.HomepageContent ol li:before,.HomepageContent ul li:before{position:absolute;top:50%;left:-1.5em;content:"";width:0;height:0;border:.5em solid transparent;border-left:.5em solid #93b7bb;float:left;display:block;margin-top:-.5em}.HomepageContent .HeroText,.HomepageFooter__links li a{font-size:16px;font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif}.HomepageContent .HeroText{font-weight:300;margin-bottom:20px;line-height:1.4}@media (min-width:769px){.HomepageContent{padding:40px 20px}.HomepageContent .HeroText{font-size:21px}.HomepageContent .Row{margin:0 -15px}.HomepageContent .Row__half,.HomepageContent .Row__quarter,.HomepageContent .Row__third{float:left;position:relative;min-height:1px;padding-left:15px;padding-right:15px}.HomepageContent .Row__third{width:33.333333%}.HomepageContent .Row__half{width:50%}.HomepageContent .Row__quarter{width:25%}}.HomepageFooter{background-color:#15284b;color:#93b7bb;border:0;box-shadow:none}.HomepageFooter:after,.HomepageFooter:before{content:" ";display:table}.HomepageFooter:after{clear:both}@media (max-width:768px){.HomepageFooter{padding:0 20px;text-align:center}.HomepageFooter .HomepageFooter__links{padding-left:0;list-style-type:none}}@media (min-width:769px){.HomepageFooter .HomepageFooter__links{float:left}.HomepageFooter .HomepageFooter__twitter{float:right}}.HomepageFooter__links,.HomepageFooter__twitter{margin:40px 0}.HomepageFooter__links li a{line-height:32px;font-weight:700}.HomepageFooter__links li a:hover{text-decoration:underline}.HomepageFooter .Twitter__button{margin-bottom:20px}@media print{*{text-shadow:none!important;color:#000!important;background:0 0!important;box-shadow:none!important}h1,h2,h3,h4,h5,h6{page-break-after:avoid;page-break-before:auto}blockquote,img,pre{page-break-inside:avoid}blockquote,pre{border:1px solid #999;font-style:italic}img{border:0}a,a:visited{text-decoration:underline}abbr[title]:after{content:" (" attr(title) ")"}q{quotes:none}.s-content a[href^="#"]:after,q:before{content:""}q:after{content:" (" attr(cite) ")"}.PageBreak{display:block;page-break-before:always}.NoPrint,.Pager,aside{display:none}.Columns__right{width:100%!important}.s-content a:after{content:" (" attr(href) ")";font-size:80%;word-wrap:break-word}h1 a[href]:after{font-size:50%}}@font-face{font-family:'League Gothic';src:url(fonts/leaguegothic.woff2) format('woff2'),url(fonts/leaguegothic.woff) format('woff');font-style:normal;font-display:swap}@font-face{font-family:'Cabin';src:url(fonts/cabin-regular.woff2) format('woff2'),url(fonts/cabin-regular.woff) format('woff');font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:'Cabin';src:url(fonts/cabin-italic.woff2) format('woff2'),url(fonts/cabin-italic.woff) format('woff');font-style:italic;font-display:swap}@font-face{font-family:'Cabin';src:url(fonts/cabin-bold.woff2) format('woff2'),url(fonts/cabin-bold.woff) format('woff');font-weight:700;font-style:normal;font-display:swap}.s-content code::after,.s-content code::before,a.Link--external::after{content:''}pre .s-content code{display:inline}.s-content table tbody,.s-content table thead{background-color:#fff}.s-content table tr:nth-child(2n) td{background-color:#f9f5f4}.s-content table td,.s-content table th{border:0}.Nav__item .Nav__item,.s-content table{font-size:1rem}.Brand,h1,h2,h3,h4,h5,h6{font-weight:400}.Button,.Pager li>a{border-radius:0}.HomepageButtons .Button--hero{font-weight:400;font-size:1.309rem}.Page__header{border-bottom:2px solid #e8d5d3}.Pager li>a{border:2px solid #e8d5d3}.Pager li>a:focus,.Pager li>a:hover{background-color:#e8d5d3}.Pager--prev a::before{content:"\2190\00a0"}.Pager--next a::after{content:"\00a0\2192"}.Navbar{height:auto;box-shadow:none}.Navbar .Brand{float:none;line-height:inherit;height:auto}.Homepage{padding-top:10px!important}.Nav__item{font-size:1.309rem}.Nav .Nav .Nav__item a .Nav__arrow:before,.Nav__arrow:before{font-family:"League Gothic",-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;width:1ch;height:1ch}.TableOfContentsContainer__title{border-bottom:4px solid #e8d5d3}.Columns__right--full .TableOfContentsContainer .TableOfContentsContainer__content>.TableOfContents{border-right:2px solid #e8d5d3}.Columns__right--full .TableOfContentsContainer a{border-bottom:1px solid #e8d5d3}.clients thead tr:first-child th{text-align:left}.clients thead tr:first-child th:first-child{width:15%}.clients thead tr:first-child th:nth-child(3){width:50%;text-align:center}.clients thead tr+tr th{width:16.66%;text-align:center}.clients tbody td:nth-child(3),.clients tbody td:nth-child(4),.clients tbody td:nth-child(5){text-align:center}.clients tbody td.Y{color:#2c9a42}.clients tbody td.N{color:#e63c2f}.hljs,.s-content pre{background:#15284b;color:#e8d5d3}.hljs{display:block;overflow-x:auto;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-comment,.hljs-quote{color:#978e9c}.hljs-addition,.hljs-keyword,.hljs-selector-tag{color:#acb39a}.hljs-doctag,.hljs-literal,.hljs-meta .hljs-meta-string,.hljs-number,.hljs-regexp,.hljs-string{color:#93b7bb}.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-title{color:#82b7e5}.hljs-attr,.hljs-attribute,.hljs-class .hljs-title,.hljs-template-variable,.hljs-type,.hljs-variable{color:#c5b031}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-meta .hljs-keyword,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-subst,.hljs-symbol{color:#ea8031}.hljs-built_in,.hljs-deletion{color:#e63c2f}.hljs-formula{background:#686986}@media (min-width:850px){.Columns__left{border:0}} \ No newline at end of file diff --git a/package.json b/package.json index 7f2e07ed..937c010a 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "devDependencies": { "autoprefixer": "^9.6.1", - "postcss-cli": "^6.1.3", + "postcss-cli": "^7.1.1", "postcss-color-function": "^4.1.0", - "postcss-csso": "^3.0.0", + "postcss-csso": "^4.0.0", "postcss-custom-media": "^7.0.8", "postcss-custom-properties": "^9.0.2", "postcss-discard-comments": "^4.0.2", diff --git a/yarn.lock b/yarn.lock index 50f0f638..ab92128e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,57 +2,41 @@ # yarn lockfile v1 -"@mrmlnc/readdir-enhanced@^2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" - integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== +"@nodelib/fs.scandir@2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" + integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== dependencies: - call-me-maybe "^1.0.1" - glob-to-regexp "^0.3.0" + "@nodelib/fs.stat" "2.0.3" + run-parallel "^1.1.9" -"@nodelib/fs.stat@^1.1.2": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" - integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== +"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" + integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== -"@types/events@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" - integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== - -"@types/glob@^7.1.1": - version "7.1.1" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" - integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== +"@nodelib/fs.walk@^1.2.3": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" + integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== dependencies: - "@types/events" "*" - "@types/minimatch" "*" - "@types/node" "*" + "@nodelib/fs.scandir" "2.1.3" + fastq "^1.6.0" -"@types/minimatch@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - -"@types/node@*": - version "13.9.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.9.2.tgz#ace1880c03594cc3e80206d96847157d8e7fa349" - integrity sha512-bnoqK579sAYrQbp73wwglccjJ4sfRdKU7WNEZ5FW4K2U6Kc0/eZ5kvXG0JKsEKFB50zrFmfFt52/cvBbZa7eXg== - -abbrev@1: +"@types/color-name@^1.1.1": version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== ansi-styles@^2.2.1: version "2.2.1" @@ -66,26 +50,21 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" + normalize-path "^3.0.0" + picomatch "^2.0.4" argparse@^1.0.7: version "1.0.10" @@ -94,65 +73,28 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-union@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= - dependencies: - array-uniq "^1.0.1" - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -assign-symbols@^1.0.0: +at-least-node@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -async-each@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== autoprefixer@^9.6.1: - version "9.7.4" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.4.tgz#f8bf3e06707d047f0641d87aee8cfb174b2a5378" - integrity sha512-g0Ya30YrMBAEZk60lp+qfX5YQllG+S5W3GYCFvyHTvhOki0AEQJLPEcIuGRsqVwLi8FvXPVtwTGhfr38hVpm0g== + version "9.8.2" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.2.tgz#7347396ee576b18687041bfbacd76d78e27baa56" + integrity sha512-9UwMMU8Rg7Fj0c55mbOpXrr/2WrRqoOwOlLNTyyYt+nhiyQdIBWipp5XWzt+Lge8r3DK5y+EHMc1OBf8VpZA6Q== dependencies: - browserslist "^4.8.3" - caniuse-lite "^1.0.30001020" - chalk "^2.4.2" + browserslist "^4.12.0" + caniuse-lite "^1.0.30001084" + kleur "^4.0.1" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.26" - postcss-value-parser "^4.0.2" + postcss "^7.0.32" + postcss-value-parser "^4.1.0" balanced-match@0.1.0: version "0.1.0" @@ -164,30 +106,10 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - -bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" +binary-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" + integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== brace-expansion@^1.1.7: version "1.1.11" @@ -197,51 +119,22 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^2.3.1, braces@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== +braces@^3.0.1, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" + fill-range "^7.0.1" -browserslist@^4.8.3: - version "4.10.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.10.0.tgz#f179737913eaf0d2b98e4926ac1ca6a15cbcc6a9" - integrity sha512-TpfK0TDgv71dzuTsEAlQiHeWQ/tiPqgNZVdv046fvNtBZrjbv2O3TsWCDU0AWGJJKCF/KsjNdLzR9hXOsh/CfA== +browserslist@^4.12.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.12.0.tgz#06c6d5715a1ede6c51fc39ff67fd647f740b656d" + integrity sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg== dependencies: - caniuse-lite "^1.0.30001035" - electron-to-chromium "^1.3.378" - node-releases "^1.1.52" - pkg-up "^3.1.0" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -call-me-maybe@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" - integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= + caniuse-lite "^1.0.30001043" + electron-to-chromium "^1.3.413" + node-releases "^1.1.53" + pkg-up "^2.0.0" caller-callsite@^2.0.0: version "2.0.0" @@ -267,10 +160,10 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@^1.0.30001020, caniuse-lite@^1.0.30001035: - version "1.0.30001035" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001035.tgz#2bb53b8aa4716b2ed08e088d4dc816a5fe089a1e" - integrity sha512-C1ZxgkuA4/bUEdMbU5WrGY4+UhMFFiXrgNAfxiMIqWgFTWfv/xsZCS2xEHT2LMq7xAZfuAnu6mcqyDl0ZR6wLQ== +caniuse-lite@^1.0.30001043, caniuse-lite@^1.0.30001084: + version "1.0.30001085" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001085.tgz#bed28bd51ff7425d33ee23e730c7f3b703711db6" + integrity sha512-x0YRFRE0pmOD90z+9Xk7jwO58p4feVNXP+U8kWV+Uo/HADyrgESlepzIkUqPgaXkpyceZU6siM1gsK7sHgplqA== chalk@^1.1.3: version "1.1.3" @@ -283,7 +176,7 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -292,67 +185,43 @@ chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chokidar@^2.0.0: - version "2.1.8" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" - integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" - optionalDependencies: - fsevents "^1.2.7" - -chownr@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -cliui@^4.0.0: +chalk@^4.0.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" - integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chokidar@^3.3.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.0.tgz#b30611423ce376357c765b9b8f904b9fba3c0be8" + integrity sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.4.0" + optionalDependencies: + fsevents "~2.1.2" + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - color-convert@^1.3.0, color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -360,12 +229,19 @@ color-convert@^1.3.0, color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-name@^1.0.0, color-name@^1.1.4: +color-name@^1.0.0, color-name@^1.1.4, color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== @@ -386,31 +262,11 @@ color@^0.11.0: color-convert "^1.3.0" color-string "^0.3.0" -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - cosmiconfig@^5.0.0: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" @@ -421,17 +277,6 @@ cosmiconfig@^5.0.0: js-yaml "^3.13.1" parse-json "^4.0.0" -cross-spawn@^6.0.0: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - css-color-function@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/css-color-function/-/css-color-function-1.3.3.tgz#8ed24c2c0205073339fafa004bc8c141fccb282e" @@ -442,34 +287,27 @@ css-color-function@~1.3.3: debug "^3.1.0" rgb "~0.1.0" -css-tree@1.0.0-alpha25: - version "1.0.0-alpha25" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha25.tgz#1bbfabfbf6eeef4f01d9108ff2edd0be2fe35597" - integrity sha512-XC6xLW/JqIGirnZuUWHXCHRaAjje2b3OIB0Vj5RIJo6mIi/AdJo30quQl5LxUl0gkXDIrTrFGbMlcZjyFplz1A== +css-tree@1.0.0-alpha.39: + version "1.0.0-alpha.39" + resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.39.tgz#2bff3ffe1bb3f776cf7eefd91ee5cba77a149eeb" + integrity sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA== dependencies: - mdn-data "^1.0.0" - source-map "^0.5.3" + mdn-data "2.0.6" + source-map "^0.6.1" cssesc@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -csso@~3.3.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/csso/-/csso-3.3.1.tgz#e069a8f52adcf53685a8a7374256ccbc22c6ce3e" - integrity sha512-OjETffCFB/OzwxVL3eF0+5tXOXCMukVO6rEUxlkIhscE1KRObyg+zMrLUbkPn9kxgBrFWicc37Gv5/22dOh5EA== +csso@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/csso/-/csso-4.0.3.tgz#0d9985dc852c7cc2b2cacfbbe1079014d1a8e903" + integrity sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ== dependencies: - css-tree "1.0.0-alpha25" + css-tree "1.0.0-alpha.39" -debug@^2.2.0, debug@^2.3.3: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^3.1.0, debug@^3.2.6: +debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -481,71 +319,27 @@ decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= +dependency-graph@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.9.0.tgz#11aed7e203bc8b00f48356d92db27b265c445318" + integrity sha512-9YLIBURXj4DJMFALxXw9K3Y3rwb5Fk0X5/8ipCzaN84+gKxoHK43tVKRNakCQbiEx07E8Uwhuq21BpUagFhZ8w== -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== dependencies: - is-descriptor "^0.1.0" + path-type "^4.0.0" -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" +electron-to-chromium@^1.3.413: + version "1.3.480" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.480.tgz#190ae45074578349a4c4f336fba29e76b20e9ef5" + integrity sha512-wnuUfQCBMAdzu5Xe+F4FjaRK+6ToG6WvwG72s8k/3E6b+hoGVYGiQE7JD1NhiCMcqF3+wV+c2vAnaLGRSSWVqA== -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -dependency-graph@^0.8.0: - version "0.8.1" - resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.8.1.tgz#9b8cae3aa2c7bd95ccb3347a09a2d1047a6c3c5a" - integrity sha512-g213uqF8fyk40W8SBjm079n3CZB4qSpCrA2ye1fLGzH/4HEgB6tzuW2CbLE7leb4t45/6h44Ud59Su1/ROTfqw== - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - -dir-glob@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" - integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw== - dependencies: - path-type "^3.0.0" - -electron-to-chromium@^1.3.378: - version "1.3.379" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.379.tgz#81dc5e82a3e72bbb830d93e15bc35eda2bbc910e" - integrity sha512-NK9DBBYEBb5f9D7zXI0hiE941gq3wkBeQmXs1ingigA/jnTg5mhwY2Z5egwA+ZI8OLGKCx0h1Cl8/xeuIBuLlg== - -end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== error-ex@^1.3.1: version "1.3.2" @@ -564,184 +358,78 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== +fast-glob@^3.1.1: + version "3.2.4" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" + integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + picomatch "^2.2.1" -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= +fastq@^1.6.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481" + integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q== dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" + reusify "^1.0.4" -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -fast-glob@^2.2.6: - version "2.2.7" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" - integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw== - dependencies: - "@mrmlnc/readdir-enhanced" "^2.2.1" - "@nodelib/fs.stat" "^1.1.2" - glob-parent "^3.1.0" - is-glob "^4.0.0" - merge2 "^1.2.3" - micromatch "^3.1.10" - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fs-extra@^7.0.0: +fill-range@^7.0.1: version "7.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" - integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" + to-regex-range "^5.0.1" -fs-minipass@^1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= dependencies: - minipass "^2.6.0" + locate-path "^2.0.0" -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@^1.2.7: - version "1.2.12" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c" - integrity sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - -get-stdin@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" - integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - -get-stream@^4.0.0: +find-up@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== dependencies: - pump "^3.0.0" + locate-path "^5.0.0" + path-exists "^4.0.0" -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= +fs-extra@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" + integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^1.0.0" -glob-to-regexp@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" - integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= +fsevents@~2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-stdin@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6" + integrity sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ== + +glob-parent@^5.1.0, glob-parent@~5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" glob@^6.0.4: version "6.0.4" @@ -754,36 +442,22 @@ glob@^6.0.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.3: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== +globby@^11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" + integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" -globby@^9.0.0: - version "9.2.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d" - integrity sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg== - dependencies: - "@types/glob" "^7.1.1" - array-union "^1.0.2" - dir-glob "^2.2.2" - fast-glob "^2.2.6" - glob "^7.1.3" - ignore "^4.0.3" - pify "^4.0.1" - slash "^2.0.0" - -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: - version "4.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== has-ansi@^2.0.0: version "2.0.0" @@ -802,60 +476,15 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -iconv-lite@^0.4.4: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ignore-walk@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" - integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== - dependencies: - minimatch "^3.0.4" - -ignore@^4.0.3: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== +ignore@^5.1.4: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== import-cwd@^2.0.0: version "2.1.0" @@ -892,161 +521,55 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3, inherits@~2.0.3: +inherits@2: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -invert-kv@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" - integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== - ip-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.1.0.tgz#5ad62f685a14edb421abebc2fff8db94df67b455" integrity sha512-pKnZpbgCTfH/1NLIlOduP/V+WRXzC2MOz3Qo8xmxk8C5GudJLgK5QyLVXOSWy3ParAH7Eemurl3xjv/WXYFvMA== -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" + binary-extensions "^2.0.0" is-directory@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.0, is-extglob@^2.1.1: +is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0: +is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== dependencies: is-extglob "^2.1.1" -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - is-url-superb@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-url-superb/-/is-url-superb-3.0.0.tgz#b9a1da878a1ac73659047d1e6f4ef22c209d3e25" @@ -1054,42 +577,15 @@ is-url-superb@^3.0.0: dependencies: url-regex "^5.0.0" -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - js-base64@^2.1.9: - version "2.5.2" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.2.tgz#313b6274dda718f714d00b3330bbae6e38e90209" - integrity sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ== + version "2.6.1" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.1.tgz#c328374225d2e65569791ded73c258e2c59334c7" + integrity sha512-G5x2saUTupU9D/xBY9snJs3TxvwX8EkpLFiYlPpDt/VmMHOXprnSU1nxiTmFbijCX4BLF/cMRIfAcC5BiMYgFQ== js-yaml@^3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + version "3.14.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -1099,52 +595,35 @@ json-parse-better-errors@^1.0.1: resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= +jsonfile@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" + integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== + dependencies: + universalify "^1.0.0" optionalDependencies: graceful-fs "^4.1.6" -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" +kleur@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.0.1.tgz#3d4948534b666e2578f93b6fafb62108e64f05ef" + integrity sha512-Qs6SqCLm63rd0kNVh+wO4XsWLU6kgfwwaPYsLiClWf0Tewkzsa6MvB21bespb8cz+ANS+2t3So1ge3gintzhlw== -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -lcid@^2.0.0: +locate-path@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" - integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= dependencies: - invert-kv "^2.0.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" + p-locate "^2.0.0" path-exists "^3.0.0" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + lodash@^4.17.11: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" @@ -1157,195 +636,42 @@ log-symbols@^2.2.0: dependencies: chalk "^2.0.1" -map-age-cleaner@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" - integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== +mdn-data@2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.6.tgz#852dc60fcaa5daa2e8cf6c9189c440ed3e042978" + integrity sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA== + +merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== dependencies: - p-defer "^1.0.0" + braces "^3.0.1" + picomatch "^2.0.5" -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -mdn-data@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-1.2.0.tgz#eadd28b0f2d307cf27e71524609bfb749ebfc0b6" - integrity sha512-esDqNvsJB2q5V28+u7NdtdMg6Rmg4khQmAVSjUiX7BY/7haIv0K2yWM43hYp0or+3nvG7+UaTF1JHz31hgU1TA== - -mem@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" - integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== - dependencies: - map-age-cleaner "^0.1.1" - mimic-fn "^2.0.0" - p-is-promise "^2.0.0" - -merge2@^1.2.3: - version "1.3.0" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" - integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== - -micromatch@^3.1.10, micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -mimic-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -"minimatch@2 || 3", minimatch@^3.0.4: +"minimatch@2 || 3": version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" -minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.3.tgz#5a514b7179259287952881e94410ec5465659f8c" - integrity sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg== - dependencies: - minimist "^1.2.5" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - ms@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -nan@^2.12.1: - version "2.14.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" - integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== +node-releases@^1.1.53: + version "1.1.58" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.58.tgz#8ee20eef30fa60e52755fcc0942def5a734fe935" + integrity sha512-NxBudgVKiRh/2aPWMgPR7bPTX0VPmGx5QBwCtdHitnqFE5/O8DeBXuIMH1nwNnw/aMo6AjOrpsHzfY3UbUJ7yg== -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -needle@^2.2.1: - version "2.3.3" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.3.tgz#a041ad1d04a871b0ebb666f40baaf1fb47867117" - integrity sha512-EkY0GeSq87rWp1hoq/sH/wnTWgFVhYlnIkbJ0YJFfRgEFlz2RraCjBpFQ+vrEgEdp0ThfyHADmkChEhcb7PKyw== - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -node-pre-gyp@*: - version "0.14.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83" - integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4.4.2" - -node-releases@^1.1.52: - version "1.1.52" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.52.tgz#bcffee3e0a758e92e44ecfaecd0a47554b0bcba9" - integrity sha512-snSiT1UypkgGt2wxPqS6ImEUICbNCMb31yaxWrOLXjhlt2z2/IBpaOxzONExqSm4y5oLnAqjjRWu+wsDzK5yNQ== - dependencies: - semver "^6.3.0" - -nopt@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" - integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-path@^3.0.0: +normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== @@ -1355,144 +681,50 @@ normalize-range@^0.1.2: resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= -npm-bundled@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" - integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== - dependencies: - npm-normalize-package-bin "^1.0.1" - -npm-normalize-package-bin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" - integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== - -npm-packlist@^1.1.6: - version "1.4.8" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" - integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - npm-normalize-package-bin "^1.0.1" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - num2fraction@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4= -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -once@^1.3.0, once@^1.3.1, once@^1.4.0: +once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-locale@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" - integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== dependencies: - execa "^1.0.0" - lcid "^2.0.0" - mem "^4.0.0" + p-try "^1.0.0" -os-tmpdir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -p-defer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" - integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-is-promise@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" - integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== - -p-limit@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" - integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= dependencies: - p-limit "^2.0.0" + p-limit "^1.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= p-try@^2.0.0: version "2.2.0" @@ -1507,87 +739,65 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pkg-up@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" - integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== +pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" + integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= dependencies: - find-up "^3.0.0" + find-up "^2.1.0" -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -postcss-cli@^6.1.3: - version "6.1.3" - resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-6.1.3.tgz#a9eec3e9cde4aaa90170546baf706f8af6f8ecec" - integrity sha512-eieqJU+OR1OFc/lQqMsDmROTJpoMZFvoAQ+82utBQ8/8qGMTfH9bBSPsTdsagYA8uvNzxHw2I2cNSSJkLAGhvw== +postcss-cli@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-7.1.1.tgz#260f9546be260b2149bf32e28d785a0d79c9aab8" + integrity sha512-bYQy5ydAQJKCMSpvaMg0ThPBeGYqhQXumjbFOmWnL4u65CYXQ16RfS6afGQpit0dGv/fNzxbdDtx8dkqOhhIbg== dependencies: - chalk "^2.1.0" - chokidar "^2.0.0" - dependency-graph "^0.8.0" - fs-extra "^7.0.0" - get-stdin "^6.0.0" - globby "^9.0.0" + chalk "^4.0.0" + chokidar "^3.3.0" + dependency-graph "^0.9.0" + fs-extra "^9.0.0" + get-stdin "^7.0.0" + globby "^11.0.0" postcss "^7.0.0" postcss-load-config "^2.0.0" postcss-reporter "^6.0.0" pretty-hrtime "^1.0.3" read-cache "^1.0.0" - yargs "^12.0.1" + yargs "^15.0.2" postcss-color-function@^4.1.0: version "4.1.0" @@ -1599,13 +809,12 @@ postcss-color-function@^4.1.0: postcss-message-helpers "^2.0.0" postcss-value-parser "^3.3.1" -postcss-csso@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-csso/-/postcss-csso-3.0.0.tgz#7473e72f1ec9a098545e36cc93658153704d6881" - integrity sha512-5yvI9IMIJOofYqmYfn65ZTxxlYZ86jXzDMXwYqltx/kqGsSvHRw4gYkn5e/tCPPIgUeFP5MIhIkA02uoUEZsXA== +postcss-csso@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/postcss-csso/-/postcss-csso-4.0.0.tgz#30fef9303ecbeb0424dab1228275416fc7186a50" + integrity sha512-Yh9Ug0w3+T/LZIh1vGJQY8+hE13yFRHpINoAmgOhvu9lBmG1jyHkAprGHEHlGjWODJzB4DCNBVBb6Cs0QEoglQ== dependencies: - csso "~3.3.0" - postcss "^6.0.0" + csso "^4.0.2" postcss-custom-media@^7.0.8: version "7.0.8" @@ -1687,11 +896,11 @@ postcss-sassy-mixins@^2.1.0: postcss-simple-vars "^1.2.0" postcss-scss@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-2.0.0.tgz#248b0a28af77ea7b32b1011aba0f738bda27dea1" - integrity sha512-um9zdGKaDZirMm+kZFKKVsnKPF7zF7qBAtIfTSnZXD1jZ0JNZIxdB6TxQOjCnlSzLRInVl2v3YdBh/M881C4ug== + version "2.1.1" + resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-2.1.1.tgz#ec3a75fa29a55e016b90bf3269026c53c1d2b383" + integrity sha512-jQmGnj0hSGLd9RscFw9LyuSVAa5Bl1/KBPqG1NQw9w8ND55nY4ZEsdlVuYJvLPpV+y0nwTV5v/4rHPzZRihQbA== dependencies: - postcss "^7.0.0" + postcss "^7.0.6" postcss-selector-parser@^6.0.2: version "6.0.2" @@ -1714,18 +923,17 @@ postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.1: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss-value-parser@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d" - integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg== +postcss-value-parser@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" + integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== postcss-values-parser@^3.0.5: - version "3.1.1" - resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-3.1.1.tgz#487111a0446117d3463d2d429a380788f1365f69" - integrity sha512-p56/Cu9wb8+lck/iOTeuFeSHKEUH1bbWQ03T6N3jDkw+15pV65rMY5pK+OWhVpRn5TIrByS6UVpO3mSqvlhZYA== + version "3.2.1" + resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-3.2.1.tgz#55114607de6631338ba8728d3e9c15785adcc027" + integrity sha512-SQ7/88VE9LhJh9gc27/hqnSU/aZaREVJcRVccXBmajgP2RkjdJzNyH/a9GCVMI5nsRhT0jC5HpUMwfkz81DVVg== dependencies: color-name "^1.1.4" - is-number "^7.0.0" is-url-superb "^3.0.0" postcss "^7.0.5" url-regex "^5.0.0" @@ -1740,7 +948,7 @@ postcss@^5.0.13, postcss@^5.0.14: source-map "^0.5.6" supports-color "^3.2.3" -postcss@^6.0.0, postcss@^6.0.23: +postcss@^6.0.23: version "6.0.23" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" integrity sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag== @@ -1749,10 +957,10 @@ postcss@^6.0.0, postcss@^6.0.23: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.26, postcss@^7.0.5, postcss@^7.0.7: - version "7.0.27" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.27.tgz#cc67cdc6b0daa375105b7c424a85567345fc54d9" - integrity sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ== +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7: + version "7.0.32" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" + integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== dependencies: chalk "^2.4.2" source-map "^0.6.1" @@ -1763,29 +971,6 @@ pretty-hrtime@^1.0.3: resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - read-cache@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" @@ -1793,216 +978,61 @@ read-cache@^1.0.0: dependencies: pify "^2.3.0" -readable-stream@^2.0.2, readable-stream@^2.0.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== +readdirp@~3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" + integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + picomatch "^2.2.1" require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" integrity sha1-six699nWiBvItuZTM17rywoYh0g= -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - resolve@^1.1.7: - version "1.15.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" - integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rgb@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/rgb/-/rgb-0.1.0.tgz#be27b291e8feffeac1bd99729721bfa40fc037b5" integrity sha1-vieykej+/+rBvZlylyG/pA/AN7U= -rimraf@^2.6.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" +run-parallel@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" + integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== -safe-buffer@^5.1.2: - version "5.2.0" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" - integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -semver@^5.3.0, semver@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -set-blocking@^2.0.0, set-blocking@~2.0.0: +set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= - -slash@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.5.3, source-map@^0.5.6: +source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= @@ -2012,73 +1042,33 @@ source-map@^0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: +strip-ansi@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= dependencies: ansi-regex "^2.0.0" -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== dependencies: - ansi-regex "^3.0.0" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + ansi-regex "^5.0.0" supports-color@^2.0.0: version "2.0.0" @@ -2106,86 +1096,34 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" -tar@^4.4.2: - version "4.4.13" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" - integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== +supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" + has-flag "^4.0.0" tlds@^1.203.0: version "1.207.0" resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.207.0.tgz#459264e644cf63ddc0965fece3898913286b1afd" integrity sha512-k7d7Q1LqjtAvhtEOs3yN14EabsNO8ZCoY6RESSJDB9lst3bTx3as/m1UuAeCKzYxiyhR1qq72ZPhpSf+qlqiwg== -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" + is-number "^7.0.0" uniq@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -unset-value@^1.0.0: +universalify@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -upath@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" - integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" + integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== url-regex@^5.0.0: version "5.0.0" @@ -2195,80 +1133,51 @@ url-regex@^5.0.0: ip-regex "^4.1.0" tlds "^1.203.0" -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@^1.2.9: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -"y18n@^3.2.1 || ^4.0.0": +y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== -yallist@^3.0.0, yallist@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yargs-parser@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" - integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== +yargs-parser@^18.1.1: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== dependencies: camelcase "^5.0.0" decamelize "^1.2.0" -yargs@^12.0.1: - version "12.0.5" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" - integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== +yargs@^15.0.2: + version "15.3.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" + integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== dependencies: - cliui "^4.0.0" + cliui "^6.0.0" decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^1.0.1" - os-locale "^3.0.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" require-directory "^2.1.1" - require-main-filename "^1.0.1" + require-main-filename "^2.0.0" set-blocking "^2.0.0" - string-width "^2.0.0" + string-width "^4.2.0" which-module "^2.0.0" - y18n "^3.2.1 || ^4.0.0" - yargs-parser "^11.1.1" + y18n "^4.0.0" + yargs-parser "^18.1.1" From 77aef9c99526b509eec20b0a047009aa6c5c036f Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sun, 19 Jul 2020 09:08:43 -0400 Subject: [PATCH 35/50] Yarn update --- package.json | 29 +++++----- yarn.lock | 153 +++++++++++++++++++-------------------------------- 2 files changed, 71 insertions(+), 111 deletions(-) diff --git a/package.json b/package.json index 937c010a..e7a3b351 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,17 @@ { - "devDependencies": { - "autoprefixer": "^9.6.1", - "postcss-cli": "^7.1.1", - "postcss-color-function": "^4.1.0", - "postcss-csso": "^4.0.0", - "postcss-custom-media": "^7.0.8", - "postcss-custom-properties": "^9.0.2", - "postcss-discard-comments": "^4.0.2", - "postcss-import": "^12.0.1", - "postcss-media-minmax": "^4.0.0", - "postcss-nested": "^4.1.2", - "postcss-sassy-mixins": "^2.1.0", - "postcss-scss": "^2.0.0" - } + "devDependencies": { + "autoprefixer": "^9.6.1", + "postcss": "^7.0.0", + "postcss-cli": "^7.1.1", + "postcss-color-function": "^4.1.0", + "postcss-csso": "^4.0.0", + "postcss-custom-media": "^7.0.8", + "postcss-custom-properties": "^9.0.2", + "postcss-discard-comments": "^4.0.2", + "postcss-import": "^12.0.1", + "postcss-media-minmax": "^4.0.0", + "postcss-nested": "^4.1.2", + "postcss-sassy-mixins": "^2.1.0", + "postcss-scss": "^2.0.0" + } } diff --git a/yarn.lock b/yarn.lock index ab92128e..3b5ebc20 100644 --- a/yarn.lock +++ b/yarn.lock @@ -84,13 +84,13 @@ at-least-node@^1.0.0: integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== autoprefixer@^9.6.1: - version "9.8.2" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.2.tgz#7347396ee576b18687041bfbacd76d78e27baa56" - integrity sha512-9UwMMU8Rg7Fj0c55mbOpXrr/2WrRqoOwOlLNTyyYt+nhiyQdIBWipp5XWzt+Lge8r3DK5y+EHMc1OBf8VpZA6Q== + version "9.8.5" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.5.tgz#2c225de229ddafe1d1424c02791d0c3e10ccccaa" + integrity sha512-C2p5KkumJlsTHoNv9w31NrBRgXhf6eCMteJuHZi2xhkgC+5Vm40MEtCKPhc0qdgAOhox0YPy1SQHTAky05UoKg== dependencies: browserslist "^4.12.0" - caniuse-lite "^1.0.30001084" - kleur "^4.0.1" + caniuse-lite "^1.0.30001097" + colorette "^1.2.0" normalize-range "^0.1.2" num2fraction "^1.2.2" postcss "^7.0.32" @@ -107,9 +107,9 @@ balanced-match@^1.0.0: integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= binary-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" - integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== + version "2.1.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" + integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== brace-expansion@^1.1.7: version "1.1.11" @@ -127,14 +127,14 @@ braces@^3.0.1, braces@~3.0.2: fill-range "^7.0.1" browserslist@^4.12.0: - version "4.12.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.12.0.tgz#06c6d5715a1ede6c51fc39ff67fd647f740b656d" - integrity sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg== + version "4.13.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.13.0.tgz#42556cba011e1b0a2775b611cba6a8eca18e940d" + integrity sha512-MINatJ5ZNrLnQ6blGvePd/QOz9Xtu+Ne+x29iQSCHfkU5BugKVJwZKn/iiL8UbpIpa3JhviKjz+XxMo0m2caFQ== dependencies: - caniuse-lite "^1.0.30001043" - electron-to-chromium "^1.3.413" - node-releases "^1.1.53" - pkg-up "^2.0.0" + caniuse-lite "^1.0.30001093" + electron-to-chromium "^1.3.488" + escalade "^3.0.1" + node-releases "^1.1.58" caller-callsite@^2.0.0: version "2.0.0" @@ -160,10 +160,10 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@^1.0.30001043, caniuse-lite@^1.0.30001084: - version "1.0.30001085" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001085.tgz#bed28bd51ff7425d33ee23e730c7f3b703711db6" - integrity sha512-x0YRFRE0pmOD90z+9Xk7jwO58p4feVNXP+U8kWV+Uo/HADyrgESlepzIkUqPgaXkpyceZU6siM1gsK7sHgplqA== +caniuse-lite@^1.0.30001093, caniuse-lite@^1.0.30001097: + version "1.0.30001103" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001103.tgz#fe81536d075b97cd013d4988c9212418faa289a8" + integrity sha512-EJkTPrZrgy712tjZ7GQDye5A67SQOyNS6X9b6GS/e5QFu5Renv5qfkx3GHq1S+vObxKzbWWYuPO/7nt4kYW/gA== chalk@^1.1.3: version "1.1.3" @@ -194,9 +194,9 @@ chalk@^4.0.0: supports-color "^7.1.0" chokidar@^3.3.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.0.tgz#b30611423ce376357c765b9b8f904b9fba3c0be8" - integrity sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ== + version "3.4.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.1.tgz#e905bdecf10eaa0a0b1db0c664481cc4cbc22ba1" + integrity sha512-TQTJyr2stihpC4Sya9hs2Xh+O2wf+igjL36Y75xx2WdHuiICcn/XJza46Jwt0eT5hVpQOzo3FpY3cj3RVYLX0g== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -262,6 +262,11 @@ color@^0.11.0: color-convert "^1.3.0" color-string "^0.3.0" +colorette@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" + integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -331,10 +336,10 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -electron-to-chromium@^1.3.413: - version "1.3.480" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.480.tgz#190ae45074578349a4c4f336fba29e76b20e9ef5" - integrity sha512-wnuUfQCBMAdzu5Xe+F4FjaRK+6ToG6WvwG72s8k/3E6b+hoGVYGiQE7JD1NhiCMcqF3+wV+c2vAnaLGRSSWVqA== +electron-to-chromium@^1.3.488: + version "1.3.501" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.501.tgz#faa17a2cb0105ee30d5e1ca87eae7d8e85dd3175" + integrity sha512-tyzuKaV2POw2mtqBBzQGNBojMZzH0MRu8bT8T/50x+hWeucyG/9pkgAATy+PcM2ySNM9+8eG2VllY9c6j4i+bg== emoji-regex@^8.0.0: version "8.0.0" @@ -348,6 +353,11 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +escalade@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.0.2.tgz#6a580d70edb87880f22b4c91d0d56078df6962c4" + integrity sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ== + escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -384,13 +394,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -578,9 +581,9 @@ is-url-superb@^3.0.0: url-regex "^5.0.0" js-base64@^2.1.9: - version "2.6.1" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.1.tgz#c328374225d2e65569791ded73c258e2c59334c7" - integrity sha512-G5x2saUTupU9D/xBY9snJs3TxvwX8EkpLFiYlPpDt/VmMHOXprnSU1nxiTmFbijCX4BLF/cMRIfAcC5BiMYgFQ== + version "2.6.3" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.3.tgz#7afdb9b57aa7717e15d370b66e8f36a9cb835dc3" + integrity sha512-fiUvdfCaAXoQTHdKMgTvg6IkecXDcVz6V5rlftUTclF9IKBjMizvSdQaCl/z/6TApDeby5NL+axYou3i0mu1Pg== js-yaml@^3.13.1: version "3.14.0" @@ -604,19 +607,6 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -kleur@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.0.1.tgz#3d4948534b666e2578f93b6fafb62108e64f05ef" - integrity sha512-Qs6SqCLm63rd0kNVh+wO4XsWLU6kgfwwaPYsLiClWf0Tewkzsa6MvB21bespb8cz+ANS+2t3So1ge3gintzhlw== - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -625,9 +615,9 @@ locate-path@^5.0.0: p-locate "^4.1.0" lodash@^4.17.11: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + version "4.17.19" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" + integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== log-symbols@^2.2.0: version "2.2.0" @@ -666,10 +656,10 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -node-releases@^1.1.53: - version "1.1.58" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.58.tgz#8ee20eef30fa60e52755fcc0942def5a734fe935" - integrity sha512-NxBudgVKiRh/2aPWMgPR7bPTX0VPmGx5QBwCtdHitnqFE5/O8DeBXuIMH1nwNnw/aMo6AjOrpsHzfY3UbUJ7yg== +node-releases@^1.1.58: + version "1.1.59" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.59.tgz#4d648330641cec704bff10f8e4fe28e453ab8e8e" + integrity sha512-H3JrdUczbdiwxN5FuJPyCHnGHIFqQ0wWxo+9j1kAXAzqNMAHlo+4I/sYYxpyK0irQ73HgdiyzD32oqQDcU2Osw== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" @@ -693,13 +683,6 @@ once@^1.3.0: dependencies: wrappy "1" -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -707,13 +690,6 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -721,11 +697,6 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -739,11 +710,6 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -774,13 +740,6 @@ pify@^2.3.0: resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= -pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" - integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= - dependencies: - find-up "^2.1.0" - postcss-cli@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-7.1.1.tgz#260f9546be260b2149bf32e28d785a0d79c9aab8" @@ -869,11 +828,11 @@ postcss-message-helpers@^2.0.0: integrity sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4= postcss-nested@^4.1.2: - version "4.2.1" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-4.2.1.tgz#4bc2e5b35e3b1e481ff81e23b700da7f82a8b248" - integrity sha512-AMayXX8tS0HCp4O4lolp4ygj9wBn32DJWXvG6gCv+ZvJrEa00GUxJcJEEzMh87BIe6FrWdYkpR2cuyqHKrxmXw== + version "4.2.3" + resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-4.2.3.tgz#c6f255b0a720549776d220d00c4b70cd244136f6" + integrity sha512-rOv0W1HquRCamWy2kFl3QazJMMe1ku6rCFoAAH+9AcxdbpDeBr6k968MLWuLjvjMcGEip01ak09hKOEgpK9hvw== dependencies: - postcss "^7.0.21" + postcss "^7.0.32" postcss-selector-parser "^6.0.2" postcss-reporter@^6.0.0: @@ -957,7 +916,7 @@ postcss@^6.0.23: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7: +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7: version "7.0.32" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== @@ -1157,7 +1116,7 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== -yargs-parser@^18.1.1: +yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== @@ -1166,9 +1125,9 @@ yargs-parser@^18.1.1: decamelize "^1.2.0" yargs@^15.0.2: - version "15.3.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" - integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== dependencies: cliui "^6.0.0" decamelize "^1.2.0" @@ -1180,4 +1139,4 @@ yargs@^15.0.2: string-width "^4.2.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^18.1.1" + yargs-parser "^18.1.2" From e75d15e5529b82bce5cf767cee90362a1848e9a5 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 9 Sep 2020 10:59:28 -0400 Subject: [PATCH 36/50] Update dependencies --- composer.lock | 488 ++++++++++++++-- vendor-bin/csfixer/composer.lock | 949 ++++++++++++++++++++++++++----- vendor-bin/daux/composer.lock | 557 ++++++++++++++---- vendor-bin/phpunit/composer.lock | 238 +++++--- vendor-bin/robo/composer.lock | 645 +++++++++++++-------- 5 files changed, 2242 insertions(+), 635 deletions(-) diff --git a/composer.lock b/composer.lock index b56c64bf..d92b2c7e 100644 --- a/composer.lock +++ b/composer.lock @@ -54,23 +54,24 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.2", + "version": "6.5.5", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "43ece0e75098b7ecd8d13918293029e555a50f82" + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82", - "reference": "43ece0e75098b7ecd8d13918293029e555a50f82", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.0", "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5" + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17.0" }, "require-dev": { "ext-curl": "*", @@ -78,7 +79,6 @@ "psr/log": "^1.1" }, "suggest": { - "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", @@ -117,7 +117,7 @@ "rest", "web service" ], - "time": "2019-12-23T11:57:10+00:00" + "time": "2020-06-16T21:01:06+00:00" }, { "name": "guzzlehttp/promises", @@ -403,16 +403,16 @@ }, { "name": "laminas/laminas-diactoros", - "version": "2.2.2", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "95178c4751d737cdf9ab0a9f70a42754ac860e7b" + "reference": "36ef09b73e884135d2059cc498c938e90821bb57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/95178c4751d737cdf9ab0a9f70a42754ac860e7b", - "reference": "95178c4751d737cdf9ab0a9f70a42754ac860e7b", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/36ef09b73e884135d2059cc498c938e90821bb57", + "reference": "36ef09b73e884135d2059cc498c938e90821bb57", "shasum": "" }, "require": { @@ -429,23 +429,23 @@ "psr/http-message-implementation": "1.0" }, "replace": { - "zendframework/zend-diactoros": "self.version" + "zendframework/zend-diactoros": "^2.2.1" }, "require-dev": { "ext-curl": "*", "ext-dom": "*", + "ext-gd": "*", "ext-libxml": "*", "http-interop/http-factory-tests": "^0.5.0", "laminas/laminas-coding-standard": "~1.0.0", - "php-http/psr7-integration-tests": "dev-master", + "php-http/psr7-integration-tests": "^1.0", "phpunit/phpunit": "^7.5.18" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev", - "dev-develop": "2.2.x-dev", - "dev-release-1.8": "1.8.x-dev" + "laminas": { + "config-provider": "Laminas\\Diactoros\\ConfigProvider", + "module": "Laminas\\Diactoros" } }, "autoload": { @@ -481,22 +481,29 @@ "http", "laminas", "psr", + "psr-17", "psr-7" ], - "time": "2020-01-07T19:39:26+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-09-03T14:29:41+00:00" }, { "name": "laminas/laminas-httphandlerrunner", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-httphandlerrunner.git", - "reference": "296f5ff35074dd981d1570a66b95596c81808087" + "reference": "e1a5dad040e0043135e8095ee27d1fbf6fb640e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/296f5ff35074dd981d1570a66b95596c81808087", - "reference": "296f5ff35074dd981d1570a66b95596c81808087", + "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/e1a5dad040e0043135e8095ee27d1fbf6fb640e1", + "reference": "e1a5dad040e0043135e8095ee27d1fbf6fb640e1", "shasum": "" }, "require": { @@ -507,7 +514,7 @@ "psr/http-server-handler": "^1.0" }, "replace": { - "zendframework/zend-httphandlerrunner": "self.version" + "zendframework/zend-httphandlerrunner": "^1.1.0" }, "require-dev": { "laminas/laminas-coding-standard": "~1.0.0", @@ -517,8 +524,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev", - "dev-develop": "1.2.x-dev" + "dev-master": "1.2.x-dev", + "dev-develop": "1.3.x-dev" }, "laminas": { "config-provider": "Laminas\\HttpHandlerRunner\\ConfigProvider" @@ -542,7 +549,13 @@ "psr-15", "psr-7" ], - "time": "2019-12-31T17:06:16+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-06-03T15:52:17+00:00" }, { "name": "laminas/laminas-xml", @@ -596,23 +609,23 @@ }, { "name": "laminas/laminas-zendframework-bridge", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "0fb9675b84a1666ab45182b6c5b29956921e818d" + "reference": "4939c81f63a8a4968c108c440275c94955753b19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/0fb9675b84a1666ab45182b6c5b29956921e818d", - "reference": "0fb9675b84a1666ab45182b6c5b29956921e818d", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/4939c81f63a8a4968c108c440275c94955753b19", + "reference": "4939c81f63a8a4968c108c440275c94955753b19", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^5.6 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1", + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", @@ -644,7 +657,13 @@ "laminas", "zf" ], - "time": "2020-01-07T22:58:31+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-08-18T16:34:51+00:00" }, { "name": "nicolus/picofeed", @@ -708,6 +727,51 @@ "homepage": "https://github.com/nicolus/picoFeed", "time": "2020-02-13T06:43:47+00:00" }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-07-02T15:55:56+00:00" + }, { "name": "psr/http-factory", "version": "1.0.1", @@ -865,16 +929,16 @@ }, { "name": "psr/log", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { @@ -908,7 +972,7 @@ "psr", "psr-3" ], - "time": "2019-11-01T11:05:21+00:00" + "time": "2020-03-23T09:12:05+00:00" }, { "name": "ralouphie/getallheaders", @@ -949,36 +1013,350 @@ ], "description": "A polyfill for getallheaders.", "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251", + "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php70": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "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": "2020-08-04T06:02:08+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "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": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "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": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "639447d008615574653fb3bc60d1986d7172eaae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", + "reference": "639447d008615574653fb3bc60d1986d7172eaae", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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" + ], + "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": "2020-07-14T12:35:20+00:00" } ], "packages-dev": [ { "name": "bamarni/composer-bin-plugin", - "version": "v1.3.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/bamarni/composer-bin-plugin.git", - "reference": "67f9d314dc7ecf7245b8637906e151ccc62b8d24" + "reference": "9329fb0fbe29e0e1b2db8f4639a193e4f5406225" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/67f9d314dc7ecf7245b8637906e151ccc62b8d24", - "reference": "67f9d314dc7ecf7245b8637906e151ccc62b8d24", + "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/9329fb0fbe29e0e1b2db8f4639a193e4f5406225", + "reference": "9329fb0fbe29e0e1b2db8f4639a193e4f5406225", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0" + "composer-plugin-api": "^1.0 || ^2.0", + "php": "^5.5.9 || ^7.0 || ^8.0" }, "require-dev": { - "composer/composer": "dev-master", + "composer/composer": "^1.0 || ^2.0", "symfony/console": "^2.5 || ^3.0 || ^4.0" }, "type": "composer-plugin", "extra": { - "class": "Bamarni\\Composer\\Bin\\Plugin", - "branch-alias": { - "dev-master": "1.1-dev" - } + "class": "Bamarni\\Composer\\Bin\\Plugin" }, "autoload": { "psr-4": { @@ -989,7 +1367,16 @@ "license": [ "MIT" ], - "time": "2019-03-17T12:38:04+00:00" + "description": "No conflicts for your bin dependencies", + "keywords": [ + "composer", + "conflict", + "dependency", + "executable", + "isolation", + "tool" + ], + "time": "2020-05-03T08:27:20+00:00" } ], "aliases": [], @@ -1009,5 +1396,6 @@ "platform-dev": [], "platform-overrides": { "php": "7.1.33" - } + }, + "plugin-api-version": "1.1.0" } diff --git a/vendor-bin/csfixer/composer.lock b/vendor-bin/csfixer/composer.lock index eb68d097..bb72f1b5 100644 --- a/vendor-bin/csfixer/composer.lock +++ b/vendor-bin/csfixer/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "composer/semver", - "version": "1.5.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de" + "reference": "114f819054a2ea7db03287f5efb757e2af6e4079" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de", - "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de", + "url": "https://api.github.com/repos/composer/semver/zipball/114f819054a2ea7db03287f5efb757e2af6e4079", + "reference": "114f819054a2ea7db03287f5efb757e2af6e4079", "shasum": "" }, "require": { @@ -66,20 +66,34 @@ "validation", "versioning" ], - "time": "2020-01-13T12:06:48+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-09-09T09:34:06+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.4.0", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "cbe23383749496fe0f373345208b79568e4bc248" + "reference": "ebd27a9866ae8254e873866f795491f02418c5a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/cbe23383749496fe0f373345208b79568e4bc248", - "reference": "cbe23383749496fe0f373345208b79568e4bc248", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ebd27a9866ae8254e873866f795491f02418c5a5", + "reference": "ebd27a9866ae8254e873866f795491f02418c5a5", "shasum": "" }, "require": { @@ -110,34 +124,50 @@ "Xdebug", "performance" ], - "time": "2019-11-06T16:40:04+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-08-19T10:27:58+00:00" }, { "name": "doctrine/annotations", - "version": "v1.8.0", + "version": "1.10.4", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc" + "reference": "bfe91e31984e2ba76df1c1339681770401ec262f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/904dca4eb10715b92569fbcd79e201d5c349b6bc", - "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/bfe91e31984e2ba76df1c1339681770401ec262f", + "reference": "bfe91e31984e2ba76df1c1339681770401ec262f", "shasum": "" }, "require": { "doctrine/lexer": "1.*", - "php": "^7.1" + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "^7.5" + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^9.1.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.9.x-dev" } }, "autoload": { @@ -178,24 +208,24 @@ "docblock", "parser" ], - "time": "2019-10-01T18:55:10+00:00" + "time": "2020-08-10T19:35:50+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -240,20 +270,34 @@ "parser", "php" ], - "time": "2019-10-30T14:39:59+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.16.1", + "version": "v2.16.4", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "c8afb599858876e95e8ebfcd97812d383fa23f02" + "reference": "1023c3458137ab052f6ff1e09621a721bfdeca13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/c8afb599858876e95e8ebfcd97812d383fa23f02", - "reference": "c8afb599858876e95e8ebfcd97812d383fa23f02", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/1023c3458137ab052f6ff1e09621a721bfdeca13", + "reference": "1023c3458137ab052f6ff1e09621a721bfdeca13", "shasum": "" }, "require": { @@ -285,11 +329,12 @@ "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1", "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1", "phpunitgoodpractices/traits": "^1.8", - "symfony/phpunit-bridge": "^4.3 || ^5.0", + "symfony/phpunit-bridge": "^5.1", "symfony/yaml": "^3.0 || ^4.0 || ^5.0" }, "suggest": { - "ext-mbstring": "For handling non-UTF8 characters in cache signature.", + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters.", "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." @@ -311,6 +356,7 @@ "tests/Test/IntegrationCaseFactory.php", "tests/Test/IntegrationCaseFactoryInterface.php", "tests/Test/InternalIntegrationCaseFactory.php", + "tests/Test/IsIdenticalConstraint.php", "tests/TestCase.php" ] }, @@ -329,7 +375,13 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2019-11-25T22:10:32+00:00" + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2020-06-27T23:57:46+00:00" }, { "name": "paragonie/random_compat", @@ -524,16 +576,16 @@ }, { "name": "psr/log", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { @@ -567,30 +619,33 @@ "psr", "psr-3" ], - "time": "2019-11-01T11:05:21+00:00" + "time": "2020-03-23T09:12:05+00:00" }, { "name": "symfony/console", - "version": "v5.0.4", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "91c294166c38d8c0858a86fad76d8c14dc1144c8" + "reference": "186f395b256065ba9b890c0a4e48a91d598fa2cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/91c294166c38d8c0858a86fad76d8c14dc1144c8", - "reference": "91c294166c38d8c0858a86fad76d8c14dc1144c8", + "url": "https://api.github.com/repos/symfony/console/zipball/186f395b256065ba9b890c0a4e48a91d598fa2cf", + "reference": "186f395b256065ba9b890c0a4e48a91d598fa2cf", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1|^2" + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" }, "conflict": { "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", "symfony/event-dispatcher": "<4.4", "symfony/lock": "<4.4", "symfony/process": "<4.4" @@ -616,7 +671,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -643,25 +698,105 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-01-25T15:56:29+00:00" + "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": "2020-09-02T07:07:40+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v5.0.4", + "name": "symfony/deprecation-contracts", + "version": "v2.2.0", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "4a7a8cdca1120c091b4797f0e5bba69c1e783224" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4a7a8cdca1120c091b4797f0e5bba69c1e783224", - "reference": "4a7a8cdca1120c091b4797f0e5bba69c1e783224", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665", + "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665", "shasum": "" }, "require": { - "php": "^7.2.5", - "symfony/event-dispatcher-contracts": "^2" + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "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": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "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": "2020-09-07T11:33:47+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v5.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "94871fc0a69c3c5da57764187724cdce0755899c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/94871fc0a69c3c5da57764187724cdce0755899c", + "reference": "94871fc0a69c3c5da57764187724cdce0755899c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/event-dispatcher-contracts": "^2", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "symfony/dependency-injection": "<4.4" @@ -686,7 +821,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -713,24 +848,38 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2020-01-10T21:57:37+00:00" + "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": "2020-08-13T14:19:42+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.0.1", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "af23c2584d4577d54661c434446fb8fbed6025dd" + "reference": "0ba7d54483095a198fa51781bc608d17e84dffa2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/af23c2584d4577d54661c434446fb8fbed6025dd", - "reference": "af23c2584d4577d54661c434446fb8fbed6025dd", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ba7d54483095a198fa51781bc608d17e84dffa2", + "reference": "0ba7d54483095a198fa51781bc608d17e84dffa2", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/event-dispatcher": "^1" }, "suggest": { @@ -739,7 +888,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -771,30 +924,44 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "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": "2020-09-07T11:33:47+00:00" }, { "name": "symfony/filesystem", - "version": "v5.0.4", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "3afadc0f57cd74f86379d073e694b0f2cda2a88c" + "reference": "f7b9ed6142a34252d219801d9767dedbd711da1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3afadc0f57cd74f86379d073e694b0f2cda2a88c", - "reference": "3afadc0f57cd74f86379d073e694b0f2cda2a88c", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/f7b9ed6142a34252d219801d9767dedbd711da1a", + "reference": "f7b9ed6142a34252d219801d9767dedbd711da1a", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -821,29 +988,43 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2020-01-21T08:40:24+00:00" + "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": "2020-08-21T17:19:47+00:00" }, { "name": "symfony/finder", - "version": "v5.0.4", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "4176e7cb846fe08f32518b7e0ed8462e2db8d9bb" + "reference": "2b765f0cf6612b3636e738c0689b29aa63088d5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/4176e7cb846fe08f32518b7e0ed8462e2db8d9bb", - "reference": "4176e7cb846fe08f32518b7e0ed8462e2db8d9bb", + "url": "https://api.github.com/repos/symfony/finder/zipball/2b765f0cf6612b3636e738c0689b29aa63088d5d", + "reference": "2b765f0cf6612b3636e738c0689b29aa63088d5d", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -870,29 +1051,45 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2020-01-04T14:08:26+00:00" + "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": "2020-08-17T10:01:29+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.0.4", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "b1ab86ce52b0c0abe031367a173005a025e30e04" + "reference": "9ff59517938f88d90b6e65311fef08faa640f681" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b1ab86ce52b0c0abe031367a173005a025e30e04", - "reference": "b1ab86ce52b0c0abe031367a173005a025e30e04", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/9ff59517938f88d90b6e65311fef08faa640f681", + "reference": "9ff59517938f88d90b6e65311fef08faa640f681", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -924,20 +1121,34 @@ "configuration", "options" ], - "time": "2020-01-04T14:08:26+00:00" + "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": "2020-07-12T12:58:00+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.14.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", "shasum": "" }, "require": { @@ -949,7 +1160,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -982,20 +1197,193 @@ "polyfill", "portable" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-07-14T12:35:20+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.14.0", + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.18.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b740103edbdcc39602239ee8860f0f45a8eb9aa5", + "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "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": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "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": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", "shasum": "" }, "require": { @@ -1007,7 +1395,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1041,20 +1433,34 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.14.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "419c4940024c30ccc033650373a1fe13890d3255" + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/419c4940024c30ccc033650373a1fe13890d3255", - "reference": "419c4940024c30ccc033650373a1fe13890d3255", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", "shasum": "" }, "require": { @@ -1064,7 +1470,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1100,20 +1510,34 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.14.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" + "reference": "639447d008615574653fb3bc60d1986d7172eaae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", - "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", + "reference": "639447d008615574653fb3bc60d1986d7172eaae", "shasum": "" }, "require": { @@ -1122,7 +1546,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1155,20 +1583,34 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.14.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", - "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", "shasum": "" }, "require": { @@ -1177,7 +1619,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1213,29 +1659,124 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-07-14T12:35:20+00:00" }, { - "name": "symfony/process", - "version": "v5.0.4", + "name": "symfony/polyfill-php80", + "version": "v1.18.1", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "f9ffd870f5ac01abec7b2b5e15f904ca9400ecd1" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/f9ffd870f5ac01abec7b2b5e15f904ca9400ecd1", - "reference": "f9ffd870f5ac01abec7b2b5e15f904ca9400ecd1", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "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": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/process", + "version": "v5.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "1864216226af21eb76d9477f691e7cbf198e0402" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/1864216226af21eb76d9477f691e7cbf198e0402", + "reference": "1864216226af21eb76d9477f691e7cbf198e0402", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" } }, "autoload": { @@ -1262,24 +1803,38 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2020-01-09T09:53:06+00:00" + "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": "2020-07-23T08:36:24+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.0.1", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/container": "^1.0" }, "suggest": { @@ -1288,7 +1843,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -1320,30 +1879,44 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "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": "2020-09-07T11:33:47+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.0.4", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "5d9add8034135b9a5f7b101d1e42c797e7f053e4" + "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5d9add8034135b9a5f7b101d1e42c797e7f053e4", - "reference": "5d9add8034135b9a5f7b101d1e42c797e7f053e4", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/0f7c58cf81dbb5dd67d423a89d577524a2ec0323", + "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/service-contracts": "^1.0|^2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1370,7 +1943,106 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2020-01-04T14:08:26+00:00" + "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": "2020-05-20T17:43:50+00:00" + }, + { + "name": "symfony/string", + "version": "v5.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "0de4cc1e18bb596226c06a82e2e7e9bc6001a63a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/0de4cc1e18bb596226c06a82e2e7e9bc6001a63a", + "reference": "0de4cc1e18bb596226c06a82e2e7e9bc6001a63a", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 String component", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "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": "2020-08-17T07:48:54+00:00" } ], "aliases": [], @@ -1379,5 +2051,6 @@ "prefer-stable": false, "prefer-lowest": false, "platform": [], - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } diff --git a/vendor-bin/daux/composer.lock b/vendor-bin/daux/composer.lock index 7c46ef7e..3bf9d62c 100644 --- a/vendor-bin/daux/composer.lock +++ b/vendor-bin/daux/composer.lock @@ -80,23 +80,24 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.2", + "version": "6.5.5", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "43ece0e75098b7ecd8d13918293029e555a50f82" + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82", - "reference": "43ece0e75098b7ecd8d13918293029e555a50f82", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.0", "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5" + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17.0" }, "require-dev": { "ext-curl": "*", @@ -104,7 +105,6 @@ "psr/log": "^1.1" }, "suggest": { - "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", @@ -143,7 +143,7 @@ "rest", "web service" ], - "time": "2019-12-23T11:57:10+00:00" + "time": "2020-06-16T21:01:06+00:00" }, { "name": "guzzlehttp/promises", @@ -393,20 +393,20 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.5", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "replace": { "myclabs/deep-copy": "self.version" @@ -437,7 +437,58 @@ "object", "object graph" ], - "time": "2020-01-17T21:11:47+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-06-29T13:22:24+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-07-02T15:55:56+00:00" }, { "name": "psr/container", @@ -580,16 +631,16 @@ }, { "name": "scrivo/highlight.php", - "version": "v9.18.1.1", + "version": "v9.18.1.2", "source": { "type": "git", "url": "https://github.com/scrivo/highlight.php.git", - "reference": "52fc21c99fd888e33aed4879e55a3646f8d40558" + "reference": "efb6e445494a9458aa59b0af5edfa4bdcc6809d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/52fc21c99fd888e33aed4879e55a3646f8d40558", - "reference": "52fc21c99fd888e33aed4879e55a3646f8d40558", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/efb6e445494a9458aa59b0af5edfa4bdcc6809d9", + "reference": "efb6e445494a9458aa59b0af5edfa4bdcc6809d9", "shasum": "" }, "require": { @@ -651,26 +702,27 @@ "type": "github" } ], - "time": "2020-03-02T05:59:21+00:00" + "time": "2020-08-27T03:24:44+00:00" }, { "name": "symfony/console", - "version": "v4.4.7", + "version": "v4.4.13", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7" + "reference": "b39fd99b9297b67fb7633b7d8083957a97e1e727" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/10bb3ee3c97308869d53b3e3d03f6ac23ff985f7", - "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7", + "url": "https://api.github.com/repos/symfony/console/zipball/b39fd99b9297b67fb7633b7d8083957a97e1e727", + "reference": "b39fd99b9297b67fb7633b7d8083957a97e1e727", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", "symfony/service-contracts": "^1.1|^2" }, "conflict": { @@ -741,24 +793,24 @@ "type": "tidelift" } ], - "time": "2020-03-30T11:41:10+00:00" + "time": "2020-09-02T07:07:21+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.7", + "version": "v4.4.13", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "62f92509c9abfd1f73e17b8cf1b72c0bdac6611b" + "reference": "e3e5a62a6631a461954d471e7206e3750dbe8ee1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/62f92509c9abfd1f73e17b8cf1b72c0bdac6611b", - "reference": "62f92509c9abfd1f73e17b8cf1b72c0bdac6611b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e3e5a62a6631a461954d471e7206e3750dbe8ee1", + "reference": "e3e5a62a6631a461954d471e7206e3750dbe8ee1", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/mime": "^4.3|^5.0", "symfony/polyfill-mbstring": "~1.1" }, @@ -810,25 +862,26 @@ "type": "tidelift" } ], - "time": "2020-03-30T14:07:33+00:00" + "time": "2020-08-17T07:39:58+00:00" }, { "name": "symfony/intl", - "version": "v5.0.7", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/intl.git", - "reference": "a02d65b026413150223c010db3000028bf9770eb" + "reference": "b6886c43cc1ae3367c569c5a8d4182555dd694fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/intl/zipball/a02d65b026413150223c010db3000028bf9770eb", - "reference": "a02d65b026413150223c010db3000028bf9770eb", + "url": "https://api.github.com/repos/symfony/intl/zipball/b6886c43cc1ae3367c569c5a8d4182555dd694fb", + "reference": "b6886c43cc1ae3367c569c5a8d4182555dd694fb", "shasum": "" }, "require": { - "php": "^7.2.5", - "symfony/polyfill-intl-icu": "~1.0" + "php": ">=7.2.5", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/polyfill-php80": "^1.15" }, "require-dev": { "symfony/filesystem": "^4.4|^5.0" @@ -839,7 +892,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -899,26 +952,27 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-08-17T07:42:30+00:00" }, { "name": "symfony/mime", - "version": "v5.0.7", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "481b7d6da88922fb1e0d86a943987722b08f3955" + "reference": "89a2c9b4cb7b5aa516cf55f5194c384f444c81dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/481b7d6da88922fb1e0d86a943987722b08f3955", - "reference": "481b7d6da88922fb1e0d86a943987722b08f3955", + "url": "https://api.github.com/repos/symfony/mime/zipball/89a2c9b4cb7b5aa516cf55f5194c384f444c81dc", + "reference": "89a2c9b4cb7b5aa516cf55f5194c384f444c81dc", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "symfony/mailer": "<4.4" @@ -930,7 +984,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -975,20 +1029,20 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-08-17T10:01:29+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.15.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", "shasum": "" }, "require": { @@ -1000,7 +1054,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1047,20 +1105,20 @@ "type": "tidelift" } ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-intl-icu", - "version": "v1.15.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "9c281272735eb66476e0fa7381e03fb0d4b60197" + "reference": "4e45a6e39041a9cc78835b11abc47874ae302a55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/9c281272735eb66476e0fa7381e03fb0d4b60197", - "reference": "9c281272735eb66476e0fa7381e03fb0d4b60197", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/4e45a6e39041a9cc78835b11abc47874ae302a55", + "reference": "4e45a6e39041a9cc78835b11abc47874ae302a55", "shasum": "" }, "require": { @@ -1073,7 +1131,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1119,25 +1181,26 @@ "type": "tidelift" } ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.15.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf" + "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251", + "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251", "shasum": "" }, "require": { "php": ">=5.3.3", - "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php70": "^1.10", "symfony/polyfill-php72": "^1.10" }, "suggest": { @@ -1146,7 +1209,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1166,6 +1233,10 @@ "name": "Laurent Bassin", "email": "laurent@bassin.info" }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" @@ -1195,20 +1266,101 @@ "type": "tidelift" } ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-08-04T06:02:08+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.15.0", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.18.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "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": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", "shasum": "" }, "require": { @@ -1220,7 +1372,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1268,20 +1424,97 @@ "type": "tidelift" } ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.15.0", + "name": "symfony/polyfill-php70", + "version": "v1.18.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "37b0976c78b94856543260ce09b460a7bc852747" + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", - "reference": "37b0976c78b94856543260ce09b460a7bc852747", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "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": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "639447d008615574653fb3bc60d1986d7172eaae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", + "reference": "639447d008615574653fb3bc60d1986d7172eaae", "shasum": "" }, "require": { @@ -1290,7 +1523,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1337,20 +1574,20 @@ "type": "tidelift" } ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.15.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", "shasum": "" }, "require": { @@ -1359,7 +1596,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1409,24 +1650,104 @@ "type": "tidelift" } ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { - "name": "symfony/process", - "version": "v4.4.7", + "name": "symfony/polyfill-php80", + "version": "v1.18.1", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/3e40e87a20eaf83a1db825e1fa5097ae89042db3", - "reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "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": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/process", + "version": "v4.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "65e70bab62f3da7089a8d4591fb23fbacacb3479" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/65e70bab62f3da7089a8d4591fb23fbacacb3479", + "reference": "65e70bab62f3da7089a8d4591fb23fbacacb3479", + "shasum": "" + }, + "require": { + "php": ">=7.1.3" }, "type": "library", "extra": { @@ -1472,24 +1793,24 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-07-23T08:31:43+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.0.1", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/container": "^1.0" }, "suggest": { @@ -1498,7 +1819,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -1530,24 +1855,38 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "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": "2020-09-07T11:33:47+00:00" }, { "name": "symfony/yaml", - "version": "v4.4.7", + "version": "v4.4.13", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "ef166890d821518106da3560086bfcbeb4fadfec" + "reference": "e2a69525b11a33be51cb00b8d6d13a9258a296b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ef166890d821518106da3560086bfcbeb4fadfec", - "reference": "ef166890d821518106da3560086bfcbeb4fadfec", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e2a69525b11a33be51cb00b8d6d13a9258a296b1", + "reference": "e2a69525b11a33be51cb00b8d6d13a9258a296b1", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/polyfill-ctype": "~1.8" }, "conflict": { @@ -1603,7 +1942,7 @@ "type": "tidelift" } ], - "time": "2020-03-30T11:41:10+00:00" + "time": "2020-08-26T08:30:46+00:00" }, { "name": "webuni/commonmark-table-extension", @@ -1661,7 +2000,7 @@ "markdown", "table" ], - "abandoned": "league/commonmark-ext-table", + "abandoned": "league/commonmark", "time": "2018-11-28T11:29:11+00:00" }, { diff --git a/vendor-bin/phpunit/composer.lock b/vendor-bin/phpunit/composer.lock index 7dd90d31..f3f2c6b0 100644 --- a/vendor-bin/phpunit/composer.lock +++ b/vendor-bin/phpunit/composer.lock @@ -59,21 +59,21 @@ }, { "name": "dms/phpunit-arraysubset-asserts", - "version": "v0.1.0", + "version": "v0.1.1", "source": { "type": "git", "url": "https://github.com/rdohms/phpunit-arraysubset-asserts.git", - "reference": "d618ece5d53e05be87eba835b079377eaafbd7c8" + "reference": "1fc5a0f3db1d0c440a7c6b8834917888247f8f42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rdohms/phpunit-arraysubset-asserts/zipball/d618ece5d53e05be87eba835b079377eaafbd7c8", - "reference": "d618ece5d53e05be87eba835b079377eaafbd7c8", + "url": "https://api.github.com/repos/rdohms/phpunit-arraysubset-asserts/zipball/1fc5a0f3db1d0c440a7c6b8834917888247f8f42", + "reference": "1fc5a0f3db1d0c440a7c6b8834917888247f8f42", "shasum": "" }, "require": { "php": "^7.2", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^8.4" }, "require-dev": { "dms/coding-standard": "^1.0", @@ -96,24 +96,24 @@ } ], "description": "This package provides Array Subset and related asserts once depracated in PHPunit 8", - "time": "2019-02-17T14:29:58+00:00" + "time": "2020-02-18T21:20:04+00:00" }, { "name": "doctrine/instantiator", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -152,7 +152,21 @@ "constructor", "instantiate" ], - "time": "2019-10-21T16:45:58+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-05-29T17:27:14+00:00" }, { "name": "mikey179/vfsstream", @@ -202,20 +216,20 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.5", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "replace": { "myclabs/deep-copy": "self.version" @@ -246,25 +260,31 @@ "object", "object graph" ], - "time": "2020-01-17T21:11:47+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-06-29T13:22:24+00:00" }, { "name": "phake/phake", - "version": "v3.1.7", + "version": "v3.1.8", "source": { "type": "git", "url": "https://github.com/mlively/Phake.git", - "reference": "3b7a6db62dfe7015a480fa966967df28b3cb239d" + "reference": "9f9dfb12c9ce6e38c73de9631ea2ab0f0ea36a65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mlively/Phake/zipball/3b7a6db62dfe7015a480fa966967df28b3cb239d", - "reference": "3b7a6db62dfe7015a480fa966967df28b3cb239d", + "url": "https://api.github.com/repos/mlively/Phake/zipball/9f9dfb12c9ce6e38c73de9631ea2ab0f0ea36a65", + "reference": "9f9dfb12c9ce6e38c73de9631ea2ab0f0ea36a65", "shasum": "" }, "require": { "php": ">=7", - "sebastian/comparator": "^1.1|^2.0|^3.0" + "sebastian/comparator": "^1.1|^2.0|^3.0|^4.0" }, "require-dev": { "codeclimate/php-test-reporter": "dev-master", @@ -304,7 +324,7 @@ "mock", "testing" ], - "time": "2019-12-06T04:16:00+00:00" + "time": "2020-05-11T18:43:26+00:00" }, { "name": "phar-io/manifest", @@ -410,28 +430,25 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~6" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -458,32 +475,31 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.0.0", + "version": "5.2.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "a48807183a4b819072f26e347bbd0b5199a9d15f" + "reference": "d870572532cd70bc3fab58f2e23ad423c8404c44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/a48807183a4b819072f26e347bbd0b5199a9d15f", - "reference": "a48807183a4b819072f26e347bbd0b5199a9d15f", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d870572532cd70bc3fab58f2e23ad423c8404c44", + "reference": "d870572532cd70bc3fab58f2e23ad423c8404c44", "shasum": "" }, "require": { - "ext-filter": "^7.1", - "php": "^7.2", - "phpdocumentor/reflection-common": "^2.0", - "phpdocumentor/type-resolver": "^1.0", - "webmozart/assert": "^1" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "^1", - "mockery/mockery": "^1" + "mockery/mockery": "~1.3.2" }, "type": "library", "extra": { @@ -511,35 +527,33 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-02-09T09:16:15+00:00" + "time": "2020-08-15T11:14:08+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "e878a14a65245fbe78f8080eba03b47c3b705651" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651", + "reference": "e878a14a65245fbe78f8080eba03b47c3b705651", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.2 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -558,37 +572,37 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "time": "2020-06-27T10:12:23+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.10.2", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9" + "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9", - "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b20034be5efcdab4fb60ca3a29cba2949aead160", + "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + "doctrine/instantiator": "^1.2", + "php": "^7.2", + "phpdocumentor/reflection-docblock": "^5.0", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { @@ -621,7 +635,7 @@ "spy", "stub" ], - "time": "2020-01-20T15:57:02+00:00" + "time": "2020-07-08T12:44:21+00:00" }, { "name": "phpunit/php-code-coverage", @@ -877,16 +891,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.2", + "version": "8.5.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0" + "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/018b6ac3c8ab20916db85fa91bf6465acb64d1e0", - "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34c18baa6a44f1d1fbf0338907139e9dce95b997", + "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997", "shasum": "" }, "require": { @@ -956,7 +970,17 @@ "testing", "xunit" ], - "time": "2020-01-08T08:49:49+00:00" + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-22T07:06:58+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1575,16 +1599,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.14.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", "shasum": "" }, "require": { @@ -1596,7 +1620,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1629,27 +1657,41 @@ "polyfill", "portable" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-07-14T12:35:20+00:00" }, { "name": "theseer/tokenizer", - "version": "1.1.3", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "reference": "75a63c33a8577608444246075ea0af0d052e452a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -1669,28 +1711,35 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2020-07-12T23:59:07+00:00" }, { "name": "webmozart/assert", - "version": "1.7.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", + "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0", + "php": "^5.3.3 || ^7.0 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "vimeo/psalm": "<3.6.0" + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<3.9.1" }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" @@ -1717,7 +1766,7 @@ "check", "validate" ], - "time": "2020-02-14T12:15:55+00:00" + "time": "2020-07-08T17:02:28+00:00" }, { "name": "webmozart/glob", @@ -1819,5 +1868,6 @@ "prefer-stable": false, "prefer-lowest": false, "platform": [], - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } diff --git a/vendor-bin/robo/composer.lock b/vendor-bin/robo/composer.lock index 84e95e1f..7f317234 100644 --- a/vendor-bin/robo/composer.lock +++ b/vendor-bin/robo/composer.lock @@ -9,31 +9,31 @@ "packages-dev": [ { "name": "consolidation/annotated-command", - "version": "2.12.0", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "512a2e54c98f3af377589de76c43b24652bcb789" + "reference": "ef6b7e662ce2d8b0af9004307bdf26350aad4df1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/512a2e54c98f3af377589de76c43b24652bcb789", - "reference": "512a2e54c98f3af377589de76c43b24652bcb789", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/ef6b7e662ce2d8b0af9004307bdf26350aad4df1", + "reference": "ef6b7e662ce2d8b0af9004307bdf26350aad4df1", "shasum": "" }, "require": { - "consolidation/output-formatters": "^3.4", - "php": ">=5.4.5", - "psr/log": "^1", - "symfony/console": "^2.8|^3|^4", - "symfony/event-dispatcher": "^2.5|^3|^4", - "symfony/finder": "^2.5|^3|^4" + "consolidation/output-formatters": "^4.1.1", + "php": ">=7.1.3", + "psr/log": "^1|^2", + "symfony/console": "^4.4.8|^5", + "symfony/event-dispatcher": "^4.4.8|^5", + "symfony/finder": "^4.4.8|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", - "php-coveralls/php-coveralls": "^1", + "php-coveralls/php-coveralls": "^2.2", "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^2.7" + "squizlabs/php_codesniffer": "^3" }, "type": "library", "extra": { @@ -47,42 +47,10 @@ "php": "7.1.3" } } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - }, - "scenario-options": { - "create-lockfile": "false" - } - }, - "phpunit4": { - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } } }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-main": "4.x-dev" } }, "autoload": { @@ -101,7 +69,7 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2019-03-08T16:55:03+00:00" + "time": "2020-08-30T17:37:39+00:00" }, { "name": "consolidation/config", @@ -186,74 +154,45 @@ }, { "name": "consolidation/log", - "version": "1.1.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/consolidation/log.git", - "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a" + "reference": "ba0bf6af1fbd09ed4dc18fc2f27b12ceff487cbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/log/zipball/b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", - "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", + "url": "https://api.github.com/repos/consolidation/log/zipball/ba0bf6af1fbd09ed4dc18fc2f27b12ceff487cbf", + "reference": "ba0bf6af1fbd09ed4dc18fc2f27b12ceff487cbf", "shasum": "" }, "require": { - "php": ">=5.4.5", + "php": ">=7.1.3", "psr/log": "^1.0", - "symfony/console": "^2.8|^3|^4" + "symfony/console": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", - "php-coveralls/php-coveralls": "^1", + "php-coveralls/php-coveralls": "^2.2", "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^2" + "squizlabs/php_codesniffer": "^3" }, "type": "library", "extra": { "scenarios": { "symfony4": { - "require": { - "symfony/console": "^4.0" + "require-dev": { + "symfony/console": "^4" }, "config": { "platform": { "php": "7.1.3" } } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } - }, - "phpunit4": { - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } } }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -272,35 +211,35 @@ } ], "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", - "time": "2019-01-01T17:30:51+00:00" + "time": "2020-05-27T17:06:13+00:00" }, { "name": "consolidation/output-formatters", - "version": "3.5.0", + "version": "4.1.1", "source": { "type": "git", "url": "https://github.com/consolidation/output-formatters.git", - "reference": "99ec998ffb697e0eada5aacf81feebfb13023605" + "reference": "9deeddd6a916d0a756b216a8b40ce1016e17c0b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/99ec998ffb697e0eada5aacf81feebfb13023605", - "reference": "99ec998ffb697e0eada5aacf81feebfb13023605", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/9deeddd6a916d0a756b216a8b40ce1016e17c0b9", + "reference": "9deeddd6a916d0a756b216a8b40ce1016e17c0b9", "shasum": "" }, "require": { "dflydev/dot-access-data": "^1.1.0", - "php": ">=5.4.0", - "symfony/console": "^2.8|^3|^4", - "symfony/finder": "^2.5|^3|^4" + "php": ">=7.1.3", + "symfony/console": "^4|^5", + "symfony/finder": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", - "php-coveralls/php-coveralls": "^1", - "phpunit/phpunit": "^5.7.27", - "squizlabs/php_codesniffer": "^2.7", - "symfony/var-dumper": "^2.8|^3|^4", - "victorjonsson/markdowndocs": "^1.3" + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^3", + "symfony/var-dumper": "^4", + "symfony/yaml": "^4" }, "suggest": { "symfony/var-dumper": "For using the var_dump formatter" @@ -312,49 +251,15 @@ "require": { "symfony/console": "^4.0" }, - "require-dev": { - "phpunit/phpunit": "^6" - }, "config": { "platform": { "php": "7.1.3" } } - }, - "symfony3": { - "require": { - "symfony/console": "^3.4", - "symfony/finder": "^3.4", - "symfony/var-dumper": "^3.4" - }, - "config": { - "platform": { - "php": "5.6.32" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - }, - "scenario-options": { - "create-lockfile": "false" - } } }, "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -373,30 +278,30 @@ } ], "description": "Format text by applying transformations provided by plug-in formatters.", - "time": "2019-05-30T23:16:01+00:00" + "time": "2020-05-27T20:51:17+00:00" }, { "name": "consolidation/robo", - "version": "1.4.11", + "version": "1.4.12", "source": { "type": "git", "url": "https://github.com/consolidation/Robo.git", - "reference": "5fa1d901776a628167a325baa9db95d8edf13a80" + "reference": "eb45606f498b3426b9a98b7c85e300666a968e51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/Robo/zipball/5fa1d901776a628167a325baa9db95d8edf13a80", - "reference": "5fa1d901776a628167a325baa9db95d8edf13a80", + "url": "https://api.github.com/repos/consolidation/Robo/zipball/eb45606f498b3426b9a98b7c85e300666a968e51", + "reference": "eb45606f498b3426b9a98b7c85e300666a968e51", "shasum": "" }, "require": { - "consolidation/annotated-command": "^2.11.0", - "consolidation/config": "^1.2", - "consolidation/log": "~1", - "consolidation/output-formatters": "^3.1.13", - "consolidation/self-update": "^1", - "grasmash/yaml-expander": "^1.3", - "league/container": "^2.2", + "consolidation/annotated-command": "^2.11.0|^4.1", + "consolidation/config": "^1.2.1", + "consolidation/log": "^1.1.1|^2", + "consolidation/output-formatters": "^3.1.13|^4.1", + "consolidation/self-update": "^1.1.5", + "grasmash/yaml-expander": "^1.4", + "league/container": "^2.4.1", "php": ">=5.5.0", "symfony/console": "^2.8|^3|^4", "symfony/event-dispatcher": "^2.5|^3|^4", @@ -408,20 +313,13 @@ "codegyre/robo": "< 1.0" }, "require-dev": { - "codeception/aspect-mock": "^1|^2.1.1", - "codeception/base": "^2.3.7", - "codeception/verify": "^0.3.2", "g1a/composer-test-scenarios": "^3", - "goaop/framework": "~2.1.2", - "goaop/parser-reflection": "^1.1.0", "natxet/cssmin": "3.0.4", - "nikic/php-parser": "^3.1.5", - "patchwork/jsqueeze": "~2", + "patchwork/jsqueeze": "^2", "pear/archive_tar": "^1.4.4", "php-coveralls/php-coveralls": "^1", - "phpunit/php-code-coverage": "~2|~4", - "sebastian/comparator": "^1.2.4", - "squizlabs/php_codesniffer": "^2.8" + "phpunit/phpunit": "^5.7.27", + "squizlabs/php_codesniffer": "^3" }, "suggest": { "henrikbjorn/lurker": "For monitoring filesystem changes in taskWatch", @@ -449,8 +347,11 @@ "require": { "symfony/console": "^2.8" }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, "remove": [ - "goaop/framework" + "php-coveralls/php-coveralls" ], "config": { "platform": { @@ -463,7 +364,7 @@ } }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -482,26 +383,26 @@ } ], "description": "Modern task runner", - "time": "2019-10-29T15:50:02+00:00" + "time": "2020-02-18T17:31:26+00:00" }, { "name": "consolidation/self-update", - "version": "1.1.5", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/consolidation/self-update.git", - "reference": "a1c273b14ce334789825a09d06d4c87c0a02ad54" + "reference": "dba6b2c0708f20fa3ba8008a2353b637578849b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/self-update/zipball/a1c273b14ce334789825a09d06d4c87c0a02ad54", - "reference": "a1c273b14ce334789825a09d06d4c87c0a02ad54", + "url": "https://api.github.com/repos/consolidation/self-update/zipball/dba6b2c0708f20fa3ba8008a2353b637578849b4", + "reference": "dba6b2c0708f20fa3ba8008a2353b637578849b4", "shasum": "" }, "require": { "php": ">=5.5.0", - "symfony/console": "^2.8|^3|^4", - "symfony/filesystem": "^2.5|^3|^4" + "symfony/console": "^2.8|^3|^4|^5", + "symfony/filesystem": "^2.5|^3|^4|^5" }, "bin": [ "scripts/release" @@ -522,17 +423,17 @@ "MIT" ], "authors": [ - { - "name": "Greg Anderson", - "email": "greg.1.anderson@greenknowe.org" - }, { "name": "Alexander Menk", "email": "menk@mestrona.net" + }, + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" } ], "description": "Provides a self:update command for Symfony Console applications.", - "time": "2018-10-28T01:52:03+00:00" + "time": "2020-04-13T02:49:20+00:00" }, { "name": "container-interop/container-interop", @@ -1048,16 +949,16 @@ }, { "name": "psr/log", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { @@ -1091,26 +992,27 @@ "psr", "psr-3" ], - "time": "2019-11-01T11:05:21+00:00" + "time": "2020-03-23T09:12:05+00:00" }, { "name": "symfony/console", - "version": "v4.4.4", + "version": "v4.4.13", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f512001679f37e6a042b51897ed24a2f05eba656" + "reference": "b39fd99b9297b67fb7633b7d8083957a97e1e727" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f512001679f37e6a042b51897ed24a2f05eba656", - "reference": "f512001679f37e6a042b51897ed24a2f05eba656", + "url": "https://api.github.com/repos/symfony/console/zipball/b39fd99b9297b67fb7633b7d8083957a97e1e727", + "reference": "b39fd99b9297b67fb7633b7d8083957a97e1e727", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", "symfony/service-contracts": "^1.1|^2" }, "conflict": { @@ -1167,24 +1069,38 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-01-25T12:44:29+00:00" + "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": "2020-09-02T07:07:21+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.4", + "version": "v4.4.13", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "9e3de195e5bc301704dd6915df55892f6dfc208b" + "reference": "3e8ea5ccddd00556b86d69d42f99f1061a704030" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9e3de195e5bc301704dd6915df55892f6dfc208b", - "reference": "9e3de195e5bc301704dd6915df55892f6dfc208b", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3e8ea5ccddd00556b86d69d42f99f1061a704030", + "reference": "3e8ea5ccddd00556b86d69d42f99f1061a704030", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/event-dispatcher-contracts": "^1.1" }, "conflict": { @@ -1237,24 +1153,38 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2020-01-10T21:54:01+00:00" + "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": "2020-08-13T14:18:44+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.7", + "version": "v1.1.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18" + "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c43ab685673fb6c8d84220c77897b1d6cdbe1d18", - "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/84e23fdcd2517bf37aecbd16967e83f0caee25a7", + "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "suggest": { "psr/event-dispatcher": "", @@ -1264,6 +1194,10 @@ "extra": { "branch-alias": { "dev-master": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -1295,24 +1229,38 @@ "interoperability", "standards" ], - "time": "2019-09-17T09:54:03+00:00" + "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": "2020-07-06T13:19:58+00:00" }, { "name": "symfony/filesystem", - "version": "v4.4.4", + "version": "v4.4.13", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "266c9540b475f26122b61ef8b23dd9198f5d1cfd" + "reference": "27575bcbc68db1f6d06218891296572c9b845704" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/266c9540b475f26122b61ef8b23dd9198f5d1cfd", - "reference": "266c9540b475f26122b61ef8b23dd9198f5d1cfd", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/27575bcbc68db1f6d06218891296572c9b845704", + "reference": "27575bcbc68db1f6d06218891296572c9b845704", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/polyfill-ctype": "~1.8" }, "type": "library", @@ -1345,24 +1293,38 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2020-01-21T08:20:44+00:00" + "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": "2020-08-21T17:19:37+00:00" }, { "name": "symfony/finder", - "version": "v4.4.4", + "version": "v4.4.13", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "3a50be43515590faf812fbd7708200aabc327ec3" + "reference": "2a78590b2c7e3de5c429628457c47541c58db9c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/3a50be43515590faf812fbd7708200aabc327ec3", - "reference": "3a50be43515590faf812fbd7708200aabc327ec3", + "url": "https://api.github.com/repos/symfony/finder/zipball/2a78590b2c7e3de5c429628457c47541c58db9c7", + "reference": "2a78590b2c7e3de5c429628457c47541c58db9c7", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "type": "library", "extra": { @@ -1394,20 +1356,34 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2020-01-04T13:00:46+00:00" + "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": "2020-08-17T09:56:45+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.14.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", "shasum": "" }, "require": { @@ -1419,7 +1395,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1452,20 +1432,34 @@ "polyfill", "portable" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.14.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", "shasum": "" }, "require": { @@ -1477,7 +1471,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1511,20 +1509,34 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.14.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", - "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", "shasum": "" }, "require": { @@ -1533,7 +1545,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1569,20 +1585,114 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "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": "2020-07-14T12:35:20+00:00" }, { - "name": "symfony/process", - "version": "v3.4.37", + "name": "symfony/polyfill-php80", + "version": "v1.18.1", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "5b9d2bcffe4678911a4c941c00b7c161252cf09a" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5b9d2bcffe4678911a4c941c00b7c161252cf09a", - "reference": "5b9d2bcffe4678911a4c941c00b7c161252cf09a", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "shasum": "" + }, + "require": { + "php": ">=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "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": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/process", + "version": "v3.4.44", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "af8d812d75fcdf2eae30928b42396fe17df137e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/af8d812d75fcdf2eae30928b42396fe17df137e4", + "reference": "af8d812d75fcdf2eae30928b42396fe17df137e4", "shasum": "" }, "require": { @@ -1618,24 +1728,38 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2020-01-01T11:03:25+00:00" + "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": "2020-07-16T09:41:49+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.0.1", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/container": "^1.0" }, "suggest": { @@ -1644,7 +1768,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -1676,24 +1804,38 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "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": "2020-09-07T11:33:47+00:00" }, { "name": "symfony/yaml", - "version": "v4.4.4", + "version": "v4.4.13", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "cd014e425b3668220adb865f53bff64b3ad21767" + "reference": "e2a69525b11a33be51cb00b8d6d13a9258a296b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/cd014e425b3668220adb865f53bff64b3ad21767", - "reference": "cd014e425b3668220adb865f53bff64b3ad21767", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e2a69525b11a33be51cb00b8d6d13a9258a296b1", + "reference": "e2a69525b11a33be51cb00b8d6d13a9258a296b1", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/polyfill-ctype": "~1.8" }, "conflict": { @@ -1735,7 +1877,21 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2020-01-21T11:12:16+00:00" + "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": "2020-08-26T08:30:46+00:00" } ], "aliases": [], @@ -1744,5 +1900,6 @@ "prefer-stable": false, "prefer-lowest": false, "platform": [], - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } From d29917caf832c2c7eb46ca557f964bea6c641340 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 9 Sep 2020 14:33:14 -0400 Subject: [PATCH 37/50] Update Yarn again --- yarn.lock | 98 +++++++++++++++++++++++++++---------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3b5ebc20..63946c05 100644 --- a/yarn.lock +++ b/yarn.lock @@ -84,13 +84,13 @@ at-least-node@^1.0.0: integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== autoprefixer@^9.6.1: - version "9.8.5" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.5.tgz#2c225de229ddafe1d1424c02791d0c3e10ccccaa" - integrity sha512-C2p5KkumJlsTHoNv9w31NrBRgXhf6eCMteJuHZi2xhkgC+5Vm40MEtCKPhc0qdgAOhox0YPy1SQHTAky05UoKg== + version "9.8.6" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.6.tgz#3b73594ca1bf9266320c5acf1588d74dea74210f" + integrity sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg== dependencies: browserslist "^4.12.0" - caniuse-lite "^1.0.30001097" - colorette "^1.2.0" + caniuse-lite "^1.0.30001109" + colorette "^1.2.1" normalize-range "^0.1.2" num2fraction "^1.2.2" postcss "^7.0.32" @@ -127,14 +127,14 @@ braces@^3.0.1, braces@~3.0.2: fill-range "^7.0.1" browserslist@^4.12.0: - version "4.13.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.13.0.tgz#42556cba011e1b0a2775b611cba6a8eca18e940d" - integrity sha512-MINatJ5ZNrLnQ6blGvePd/QOz9Xtu+Ne+x29iQSCHfkU5BugKVJwZKn/iiL8UbpIpa3JhviKjz+XxMo0m2caFQ== + version "4.14.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.14.1.tgz#cb2b490ba881d45dc3039078c7ed04411eaf3fa3" + integrity sha512-zyBTIHydW37pnb63c7fHFXUG6EcqWOqoMdDx6cdyaDFriZ20EoVxcE95S54N+heRqY8m8IUgB5zYta/gCwSaaA== dependencies: - caniuse-lite "^1.0.30001093" - electron-to-chromium "^1.3.488" - escalade "^3.0.1" - node-releases "^1.1.58" + caniuse-lite "^1.0.30001124" + electron-to-chromium "^1.3.562" + escalade "^3.0.2" + node-releases "^1.1.60" caller-callsite@^2.0.0: version "2.0.0" @@ -160,10 +160,10 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@^1.0.30001093, caniuse-lite@^1.0.30001097: - version "1.0.30001103" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001103.tgz#fe81536d075b97cd013d4988c9212418faa289a8" - integrity sha512-EJkTPrZrgy712tjZ7GQDye5A67SQOyNS6X9b6GS/e5QFu5Renv5qfkx3GHq1S+vObxKzbWWYuPO/7nt4kYW/gA== +caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001124: + version "1.0.30001125" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001125.tgz#2a1a51ee045a0a2207474b086f628c34725e997b" + integrity sha512-9f+r7BW8Qli917mU3j0fUaTweT3f3vnX/Lcs+1C73V+RADmFme+Ih0Br8vONQi3X0lseOe6ZHfsZLCA8MSjxUA== chalk@^1.1.3: version "1.1.3" @@ -194,9 +194,9 @@ chalk@^4.0.0: supports-color "^7.1.0" chokidar@^3.3.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.1.tgz#e905bdecf10eaa0a0b1db0c664481cc4cbc22ba1" - integrity sha512-TQTJyr2stihpC4Sya9hs2Xh+O2wf+igjL36Y75xx2WdHuiICcn/XJza46Jwt0eT5hVpQOzo3FpY3cj3RVYLX0g== + version "3.4.2" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.2.tgz#38dc8e658dec3809741eb3ef7bb0a47fe424232d" + integrity sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -262,7 +262,7 @@ color@^0.11.0: color-convert "^1.3.0" color-string "^0.3.0" -colorette@^1.2.0: +colorette@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== @@ -336,10 +336,10 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -electron-to-chromium@^1.3.488: - version "1.3.501" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.501.tgz#faa17a2cb0105ee30d5e1ca87eae7d8e85dd3175" - integrity sha512-tyzuKaV2POw2mtqBBzQGNBojMZzH0MRu8bT8T/50x+hWeucyG/9pkgAATy+PcM2ySNM9+8eG2VllY9c6j4i+bg== +electron-to-chromium@^1.3.562: + version "1.3.564" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.564.tgz#e9c319ae437b3eb8bbf3e3bae4bead5a21945961" + integrity sha512-fNaYN3EtKQWLQsrKXui8mzcryJXuA0LbCLoizeX6oayG2emBaS5MauKjCPAvc29NEY4FpLHIUWiP+Y0Bfrs5dg== emoji-regex@^8.0.0: version "8.0.0" @@ -353,7 +353,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -escalade@^3.0.1: +escalade@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.0.2.tgz#6a580d70edb87880f22b4c91d0d56078df6962c4" integrity sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ== @@ -422,10 +422,10 @@ get-caller-file@^2.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-stdin@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6" - integrity sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ== +get-stdin@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" + integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== glob-parent@^5.1.0, glob-parent@~5.1.0: version "5.1.1" @@ -581,9 +581,9 @@ is-url-superb@^3.0.0: url-regex "^5.0.0" js-base64@^2.1.9: - version "2.6.3" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.3.tgz#7afdb9b57aa7717e15d370b66e8f36a9cb835dc3" - integrity sha512-fiUvdfCaAXoQTHdKMgTvg6IkecXDcVz6V5rlftUTclF9IKBjMizvSdQaCl/z/6TApDeby5NL+axYou3i0mu1Pg== + version "2.6.4" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.4.tgz#f4e686c5de1ea1f867dbcad3d46d969428df98c4" + integrity sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ== js-yaml@^3.13.1: version "3.14.0" @@ -615,9 +615,9 @@ locate-path@^5.0.0: p-locate "^4.1.0" lodash@^4.17.11: - version "4.17.19" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" - integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== + version "4.17.20" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" + integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== log-symbols@^2.2.0: version "2.2.0" @@ -656,10 +656,10 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -node-releases@^1.1.58: - version "1.1.59" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.59.tgz#4d648330641cec704bff10f8e4fe28e453ab8e8e" - integrity sha512-H3JrdUczbdiwxN5FuJPyCHnGHIFqQ0wWxo+9j1kAXAzqNMAHlo+4I/sYYxpyK0irQ73HgdiyzD32oqQDcU2Osw== +node-releases@^1.1.60: + version "1.1.61" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.61.tgz#707b0fca9ce4e11783612ba4a2fcba09047af16e" + integrity sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" @@ -741,15 +741,15 @@ pify@^2.3.0: integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= postcss-cli@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-7.1.1.tgz#260f9546be260b2149bf32e28d785a0d79c9aab8" - integrity sha512-bYQy5ydAQJKCMSpvaMg0ThPBeGYqhQXumjbFOmWnL4u65CYXQ16RfS6afGQpit0dGv/fNzxbdDtx8dkqOhhIbg== + version "7.1.2" + resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-7.1.2.tgz#ba8d5d918b644bd18e80ad2c698064d4c0da51cd" + integrity sha512-3mlEmN1v2NVuosMWZM2tP8bgZn7rO5PYxRRrXtdSyL5KipcgBDjJ9ct8/LKxImMCJJi3x5nYhCGFJOkGyEqXBQ== dependencies: chalk "^4.0.0" chokidar "^3.3.0" dependency-graph "^0.9.0" fs-extra "^9.0.0" - get-stdin "^7.0.0" + get-stdin "^8.0.0" globby "^11.0.0" postcss "^7.0.0" postcss-load-config "^2.0.0" @@ -1056,16 +1056,16 @@ supports-color@^6.1.0: has-flag "^3.0.0" supports-color@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" - integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" tlds@^1.203.0: - version "1.207.0" - resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.207.0.tgz#459264e644cf63ddc0965fece3898913286b1afd" - integrity sha512-k7d7Q1LqjtAvhtEOs3yN14EabsNO8ZCoY6RESSJDB9lst3bTx3as/m1UuAeCKzYxiyhR1qq72ZPhpSf+qlqiwg== + version "1.209.0" + resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.209.0.tgz#13cfdc039331d49730ca7bfa9526fc9b319e2cec" + integrity sha512-KVsZ1NSpBodpo42/JIwTyau7SqUxV/qQMp2epSDPa99885LpHWLaVCCt8CWzGe4X5YIVNr+b6bUys9e9eEb5OA== to-regex-range@^5.0.1: version "5.0.1" From 0f3ada598edd978dce55102af907ea9e705eeca4 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 9 Sep 2020 14:52:35 -0400 Subject: [PATCH 38/50] Work around Picofeed bug A fix is pending merging upstream --- lib/Database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Database.php b/lib/Database.php index 677e4be6..42bda471 100644 --- a/lib/Database.php +++ b/lib/Database.php @@ -1144,7 +1144,7 @@ class Database { 'str', 'str', 'datetime', - 'str', + 'strict str', 'datetime', 'int', 'int' From 9bc137399853cf406557fea3404f0c34a370b41c Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 9 Sep 2020 18:24:42 -0400 Subject: [PATCH 39/50] Version bump --- CHANGELOG | 6 ++++++ lib/Arsse.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 9b7b8cd3..fe76e0b5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +Version 0.8.4 (2020-09-09) +========================== + +Bug fixes: +- Don't crash updating feeds cached without ETag (regression since 0.8.3) + Version 0.8.3 (2020-02-16) ========================== diff --git a/lib/Arsse.php b/lib/Arsse.php index 6694722f..ef352c58 100644 --- a/lib/Arsse.php +++ b/lib/Arsse.php @@ -7,7 +7,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; class Arsse { - public const VERSION = "0.8.3"; + public const VERSION = "0.8.4"; /** @var Lang */ public static $lang; From 6ee7ca4aa4980d8f497d85c47f65b510425aa0c4 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Tue, 15 Sep 2020 08:45:49 -0400 Subject: [PATCH 40/50] Update PicoFeed to latest release version --- composer.json | 2 +- composer.lock | 30 ++++++++++++------------------ 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index eb42d847..26bab1c8 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "ext-json": "*", "ext-hash": "*", "ext-dom": "*", - "nicolus/picofeed": "dev-master#0ebdf92852a4725f4807c200dd49bf9fff3905b7", + "nicolus/picofeed": "^0.1.43", "hosteurope/password-generator": "1.*", "docopt/docopt": "1.*", "jkingweb/druuid": "3.*", diff --git a/composer.lock b/composer.lock index d92b2c7e..aea69e8b 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": "1d03b34d159fbf69097aa783994f9cfa", + "content-hash": "9880398f241b2e782876bb510207cde7", "packages": [ { "name": "docopt/docopt", @@ -609,16 +609,16 @@ }, { "name": "laminas/laminas-zendframework-bridge", - "version": "1.1.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "4939c81f63a8a4968c108c440275c94955753b19" + "reference": "6ede70583e101030bcace4dcddd648f760ddf642" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/4939c81f63a8a4968c108c440275c94955753b19", - "reference": "4939c81f63a8a4968c108c440275c94955753b19", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642", + "reference": "6ede70583e101030bcace4dcddd648f760ddf642", "shasum": "" }, "require": { @@ -630,10 +630,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev", - "dev-develop": "1.1.x-dev" - }, "laminas": { "module": "Laminas\\ZendFrameworkBridge" } @@ -663,20 +659,20 @@ "type": "community_bridge" } ], - "time": "2020-08-18T16:34:51+00:00" + "time": "2020-09-14T14:23:00+00:00" }, { "name": "nicolus/picofeed", - "version": "dev-master", + "version": "0.1.43", "source": { "type": "git", "url": "https://github.com/nicolus/picoFeed.git", - "reference": "0ebdf92852a4725f4807c200dd49bf9fff3905b7" + "reference": "e6bfe8d30009603702d1bff46a7abf8bfb25f8a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nicolus/picoFeed/zipball/0ebdf92852a4725f4807c200dd49bf9fff3905b7", - "reference": "0ebdf92852a4725f4807c200dd49bf9fff3905b7", + "url": "https://api.github.com/repos/nicolus/picoFeed/zipball/e6bfe8d30009603702d1bff46a7abf8bfb25f8a8", + "reference": "e6bfe8d30009603702d1bff46a7abf8bfb25f8a8", "shasum": "" }, "require": { @@ -725,7 +721,7 @@ ], "description": "RSS/Atom parsing library", "homepage": "https://github.com/nicolus/picoFeed", - "time": "2020-02-13T06:43:47+00:00" + "time": "2020-09-15T07:28:23+00:00" }, { "name": "paragonie/random_compat", @@ -1381,9 +1377,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "nicolus/picofeed": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From afbf3be031331015d26422c68e451b8fe9442d6f Mon Sep 17 00:00:00 2001 From: "J. King" Date: Tue, 22 Sep 2020 11:34:52 -0400 Subject: [PATCH 41/50] Use 'union all' instead of 'union' in queries --- lib/Database.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Database.php b/lib/Database.php index 42bda471..6efda1b4 100644 --- a/lib/Database.php +++ b/lib/Database.php @@ -499,7 +499,7 @@ class Database { $q->setWhere("owner = ?", "str", $user); $q->setWhere("coalesce(arsse_folders.parent,0) = ?", "strict int", $parent); } else { - $q->setCTE("folders", "SELECT id from arsse_folders where owner = ? and coalesce(parent,0) = ? union select arsse_folders.id from arsse_folders join folders on arsse_folders.parent=folders.id", ["str", "strict int"], [$user, $parent]); + $q->setCTE("folders", "SELECT id from arsse_folders where owner = ? and coalesce(parent,0) = ? union all select arsse_folders.id from arsse_folders join folders on arsse_folders.parent=folders.id", ["str", "strict int"], [$user, $parent]); $q->setWhere("id in (SELECT id from folders)"); } $q->setOrder("name"); @@ -644,7 +644,7 @@ class Database { $p = $this->db->prepare( "WITH RECURSIVE target as (select ? as userid, ? as source, ? as dest, ? as new_name), - folders as (SELECT id from arsse_folders join target on owner = userid and coalesce(parent,0) = source union select arsse_folders.id as id from arsse_folders join folders on arsse_folders.parent=folders.id) + folders as (SELECT id from arsse_folders join target on owner = userid and coalesce(parent,0) = source union all select arsse_folders.id as id from arsse_folders join folders on arsse_folders.parent=folders.id) ". "SELECT case when ((select dest from target) is null or exists(select id from arsse_folders join target on owner = userid and coalesce(id,0) = coalesce(dest,0))) then 1 else 0 end as extant, @@ -749,14 +749,14 @@ class Database { $nocase = $this->db->sqlToken("nocase"); $q->setOrder("pinned desc, coalesce(arsse_subscriptions.title, arsse_feeds.title) collate $nocase"); // topmost folders belonging to the user - $q->setCTE("topmost(f_id,top)", "SELECT id,id from arsse_folders where owner = ? and parent is null union select id,top from arsse_folders join topmost on parent=f_id", ["str"], [$user]); + $q->setCTE("topmost(f_id,top)", "SELECT id,id from arsse_folders where owner = ? and parent is null union all select id,top from arsse_folders join topmost on parent=f_id", ["str"], [$user]); if ($id) { // this condition facilitates the implementation of subscriptionPropertiesGet, which would otherwise have to duplicate the complex query; it takes precedence over a specified folder // if an ID is specified, add a suitable WHERE condition and bindings $q->setWhere("arsse_subscriptions.id = ?", "int", $id); } elseif ($folder && $recursive) { // if a folder is specified and we're listing recursively, add a common table expression to list it and its children so that we select from the entire subtree - $q->setCTE("folders(folder)", "SELECT ? union select id from arsse_folders join folders on parent = folder", "int", $folder); + $q->setCTE("folders(folder)", "SELECT ? union all select id from arsse_folders join folders on parent = folder", "int", $folder); // add a suitable WHERE condition $q->setWhere("folder in (select folder from folders)"); } elseif (!$recursive) { @@ -778,7 +778,7 @@ class Database { $q->setWhere("owner = ?", "str", $user); if ($folder) { // if the specified folder exists, add a common table expression to list it and its children so that we select from the entire subtree - $q->setCTE("folders(folder)", "SELECT ? union select id from arsse_folders join folders on parent = folder", "int", $folder); + $q->setCTE("folders(folder)", "SELECT ? union all select id from arsse_folders join folders on parent = folder", "int", $folder); // add a suitable WHERE condition $q->setWhere("folder in (select folder from folders)"); } @@ -1491,27 +1491,27 @@ class Database { } if ($context->folder()) { // add a common table expression to list the folder and its children so that we select from the entire subtree - $q->setCTE("folders(folder)", "SELECT ? union select id from arsse_folders join folders on coalesce(parent,0) = folder", "int", $context->folder); + $q->setCTE("folders(folder)", "SELECT ? union all select id from arsse_folders join folders on coalesce(parent,0) = folder", "int", $context->folder); // limit subscriptions to the listed folders $q->setWhere("coalesce(arsse_subscriptions.folder,0) in (select folder from folders)"); } if ($context->folders()) { [$inClause, $inTypes, $inValues] = $this->generateIn($context->folders, "int"); // add a common table expression to list the folders and their children so that we select from the entire subtree - $q->setCTE("folders_multi(folder)", "SELECT id as folder from (select id from (select 0 as id union select id from arsse_folders where owner = ?) as f where id in ($inClause)) as folders_multi union select id from arsse_folders join folders_multi on coalesce(parent,0) = folder", ["str", $inTypes], [$user, $inValues]); + $q->setCTE("folders_multi(folder)", "SELECT id as folder from (select id from (select 0 as id union all select id from arsse_folders where owner = ?) as f where id in ($inClause)) as folders_multi union select id from arsse_folders join folders_multi on coalesce(parent,0) = folder", ["str", $inTypes], [$user, $inValues]); // limit subscriptions to the listed folders $q->setWhere("coalesce(arsse_subscriptions.folder,0) in (select folder from folders_multi)"); } if ($context->not->folder()) { // add a common table expression to list the folder and its children so that we exclude from the entire subtree - $q->setCTE("folders_excluded(folder)", "SELECT ? union select id from arsse_folders join folders_excluded on coalesce(parent,0) = folder", "int", $context->not->folder); + $q->setCTE("folders_excluded(folder)", "SELECT ? union all select id from arsse_folders join folders_excluded on coalesce(parent,0) = folder", "int", $context->not->folder); // excluded any subscriptions in the listed folders $q->setWhereNot("coalesce(arsse_subscriptions.folder,0) in (select folder from folders_excluded)"); } if ($context->not->folders()) { [$inClause, $inTypes, $inValues] = $this->generateIn($context->not->folders, "int"); // add a common table expression to list the folders and their children so that we select from the entire subtree - $q->setCTE("folders_multi_excluded(folder)", "SELECT id as folder from (select id from (select 0 as id union select id from arsse_folders where owner = ?) as f where id in ($inClause)) as folders_multi_excluded union select id from arsse_folders join folders_multi_excluded on coalesce(parent,0) = folder", ["str", $inTypes], [$user, $inValues]); + $q->setCTE("folders_multi_excluded(folder)", "SELECT id as folder from (select id from (select 0 as id union all select id from arsse_folders where owner = ?) as f where id in ($inClause)) as folders_multi_excluded union select id from arsse_folders join folders_multi_excluded on coalesce(parent,0) = folder", ["str", $inTypes], [$user, $inValues]); // limit subscriptions to the listed folders $q->setWhereNot("coalesce(arsse_subscriptions.folder,0) in (select folder from folders_multi_excluded)"); } From 2e0ed5e9238a790b9493727274a08656a7202779 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Thu, 24 Sep 2020 09:46:55 -0400 Subject: [PATCH 42/50] Add reference to MariaDB missing features --- docs/en/020_Getting_Started/040_Database_Setup/020_MySQL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/020_Getting_Started/040_Database_Setup/020_MySQL.md b/docs/en/020_Getting_Started/040_Database_Setup/020_MySQL.md index d0ec1b31..4676e346 100644 --- a/docs/en/020_Getting_Started/040_Database_Setup/020_MySQL.md +++ b/docs/en/020_Getting_Started/040_Database_Setup/020_MySQL.md @@ -15,7 +15,7 @@ While MySQL can be used as a database for The Arsse, this is **not recommended** You are therefore strongly advised not to use MySQL. Though our MySQL test suite ensures functionally identical behaviour to SQLite and PostgreSQL for the supplied test data in a default MySQL configuration, there are [many other subtle ways in which it can fail](https://web.archive.org/web/20190929090114/https://grimoire.ca/mysql/choose-something-else), and we do not have the manpower to account for most of these with certainty. -Also please note that as of this writing MariaDB cannot be used in place of MySQL as it lacks features of MySQL 8 which The Arsse requires. The awkwardly-named [_Percona Server for MySQL_](https://www.percona.com/software/mysql-database/percona-server), on the other hand, will work. +Also please note that as of this writing MariaDB cannot be used in place of MySQL as it lacks features of MySQL 8 which The Arsse requires (see the [relevant MariaDB issue](https://jira.mariadb.org/browse/MDEV-18511) for details). The awkwardly-named [_Percona Server for MySQL_](https://www.percona.com/software/mysql-database/percona-server), on the other hand, will work. # Set-up From 9b11001402e57e0cc9b0ef11909c926289c165d1 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 26 Oct 2020 12:57:16 -0400 Subject: [PATCH 43/50] Fix sample Nginx configuration --- CHANGELOG | 6 ++++++ UPGRADING | 11 +++++++++++ dist/nginx.conf | 1 + .../030_Web_Server_Configuration.md | 1 + lib/Arsse.php | 2 +- 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index fe76e0b5..da50cebe 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +Version 0.8.5 (2020-??-??) +========================== + +Bug fixes: +- Added the QUERY_STRING FastCGI paramater to the sample Nginx configuration + Version 0.8.4 (2020-09-09) ========================== diff --git a/UPGRADING b/UPGRADING index 42687d74..086a1a5f 100644 --- a/UPGRADING +++ b/UPGRADING @@ -11,6 +11,17 @@ usually prudent: `composer install -o --no-dev` +Upgrading from 0.8.4 to 0.8.5 +============================= + +- The sample configuration for Nginx has changed, to correct the omission of + the QUERY_STRING FastCGI parameter in those passed to PHP. The omission + affects the Fever protocol in particular (the parameter is required for + Fever to function at all), though it could potentially affect some + Nextcloud News clients as well. +- No significant code changes have been made in this version + + Upgrading from 0.8.2 to 0.8.3 ============================= diff --git a/dist/nginx.conf b/dist/nginx.conf index 6b488d74..c9c7845b 100644 --- a/dist/nginx.conf +++ b/dist/nginx.conf @@ -19,6 +19,7 @@ server { fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param REQUEST_URI $uri; + fastcgi_param QUERY_STRING $query_string; fastcgi_param HTTPS $https if_not_empty; fastcgi_param REMOTE_USER $remote_user; } diff --git a/docs/en/020_Getting_Started/030_Web_Server_Configuration.md b/docs/en/020_Getting_Started/030_Web_Server_Configuration.md index 361624ac..679b0395 100644 --- a/docs/en/020_Getting_Started/030_Web_Server_Configuration.md +++ b/docs/en/020_Getting_Started/030_Web_Server_Configuration.md @@ -30,6 +30,7 @@ server { fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param REQUEST_URI $uri; + fastcgi_param QUERY_STRING $query_string; fastcgi_param HTTPS $https if_not_empty; fastcgi_param REMOTE_USER $remote_user; } diff --git a/lib/Arsse.php b/lib/Arsse.php index ef352c58..7d53a427 100644 --- a/lib/Arsse.php +++ b/lib/Arsse.php @@ -7,7 +7,7 @@ declare(strict_types=1); namespace JKingWeb\Arsse; class Arsse { - public const VERSION = "0.8.4"; + public const VERSION = "0.8.5"; /** @var Lang */ public static $lang; From 6520ed38fb895ed96ff0810c4938d79abd5e0361 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 26 Oct 2020 14:44:54 -0400 Subject: [PATCH 44/50] Update dependencies --- composer.lock | 195 ++++-------------- vendor-bin/csfixer/composer.lock | 301 ++++++++++++--------------- vendor-bin/daux/composer.lock | 335 ++++++++++--------------------- vendor-bin/phpunit/composer.lock | 51 ++--- vendor-bin/robo/composer.lock | 167 ++++++++------- yarn.lock | 142 +++++++------ 6 files changed, 461 insertions(+), 730 deletions(-) diff --git a/composer.lock b/composer.lock index aea69e8b..77d43df5 100644 --- a/composer.lock +++ b/composer.lock @@ -121,23 +121,23 @@ }, { "name": "guzzlehttp/promises", - "version": "v1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + "reference": "60d379c243457e073cff02bc323a2a86cb355631" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631", + "reference": "60d379c243457e073cff02bc323a2a86cb355631", "shasum": "" }, "require": { - "php": ">=5.5.0" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", "extra": { @@ -168,20 +168,20 @@ "keywords": [ "promise" ], - "time": "2016-12-20T10:07:11+00:00" + "time": "2020-09-30T07:37:28+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.6.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", "shasum": "" }, "require": { @@ -194,15 +194,15 @@ }, "require-dev": { "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" }, "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -239,7 +239,7 @@ "uri", "url" ], - "time": "2019-07-01T23:21:34+00:00" + "time": "2020-09-30T07:37:11+00:00" }, { "name": "hosteurope/password-generator", @@ -723,51 +723,6 @@ "homepage": "https://github.com/nicolus/picoFeed", "time": "2020-09-15T07:28:23+00:00" }, - { - "name": "paragonie/random_compat", - "version": "v9.99.99", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "shasum": "" - }, - "require": { - "php": "^7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2018-07-02T15:55:56+00:00" - }, { "name": "psr/http-factory", "version": "1.0.1", @@ -1012,22 +967,21 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251" + "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251", - "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3b75acd829741c768bc8b1f84eb33265e7cc5117", + "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=7.1", "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php70": "^1.10", "symfony/polyfill-php72": "^1.10" }, "suggest": { @@ -1036,7 +990,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1093,24 +1047,24 @@ "type": "tidelift" } ], - "time": "2020-08-04T06:02:08+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" + "reference": "727d1096295d807c309fb01a851577302394c897" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897", + "reference": "727d1096295d807c309fb01a851577302394c897", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-intl": "For best performance" @@ -1118,7 +1072,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1174,106 +1128,29 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.18.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", - "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", - "shasum": "" - }, - "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "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.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "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": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "639447d008615574653fb3bc60d1986d7172eaae" + "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", - "reference": "639447d008615574653fb3bc60d1986d7172eaae", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930", + "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1324,7 +1201,7 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" } ], "packages-dev": [ diff --git a/vendor-bin/csfixer/composer.lock b/vendor-bin/csfixer/composer.lock index bb72f1b5..dc5ddc50 100644 --- a/vendor-bin/csfixer/composer.lock +++ b/vendor-bin/csfixer/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "composer/semver", - "version": "1.7.0", + "version": "1.7.1", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "114f819054a2ea7db03287f5efb757e2af6e4079" + "reference": "38276325bd896f90dfcfe30029aa5db40df387a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/114f819054a2ea7db03287f5efb757e2af6e4079", - "reference": "114f819054a2ea7db03287f5efb757e2af6e4079", + "url": "https://api.github.com/repos/composer/semver/zipball/38276325bd896f90dfcfe30029aa5db40df387a7", + "reference": "38276325bd896f90dfcfe30029aa5db40df387a7", "shasum": "" }, "require": { @@ -80,20 +80,20 @@ "type": "tidelift" } ], - "time": "2020-09-09T09:34:06+00:00" + "time": "2020-09-27T13:13:07+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.4.3", + "version": "1.4.4", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ebd27a9866ae8254e873866f795491f02418c5a5" + "reference": "6e076a124f7ee146f2487554a94b6a19a74887ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ebd27a9866ae8254e873866f795491f02418c5a5", - "reference": "ebd27a9866ae8254e873866f795491f02418c5a5", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6e076a124f7ee146f2487554a94b6a19a74887ba", + "reference": "6e076a124f7ee146f2487554a94b6a19a74887ba", "shasum": "" }, "require": { @@ -138,20 +138,20 @@ "type": "tidelift" } ], - "time": "2020-08-19T10:27:58+00:00" + "time": "2020-10-24T12:39:10+00:00" }, { "name": "doctrine/annotations", - "version": "1.10.4", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "bfe91e31984e2ba76df1c1339681770401ec262f" + "reference": "88fb6fb1dae011de24dd6b632811c1ff5c2928f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/bfe91e31984e2ba76df1c1339681770401ec262f", - "reference": "bfe91e31984e2ba76df1c1339681770401ec262f", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/88fb6fb1dae011de24dd6b632811c1ff5c2928f5", + "reference": "88fb6fb1dae011de24dd6b632811c1ff5c2928f5", "shasum": "" }, "require": { @@ -161,13 +161,14 @@ }, "require-dev": { "doctrine/cache": "1.*", + "doctrine/coding-standard": "^6.0 || ^8.1", "phpstan/phpstan": "^0.12.20", "phpunit/phpunit": "^7.5 || ^9.1.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9.x-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { @@ -202,13 +203,13 @@ } ], "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", "keywords": [ "annotations", "docblock", "parser" ], - "time": "2020-08-10T19:35:50+00:00" + "time": "2020-10-17T22:05:33+00:00" }, { "name": "doctrine/lexer", @@ -383,70 +384,25 @@ ], "time": "2020-06-27T23:57:46+00:00" }, - { - "name": "paragonie/random_compat", - "version": "v9.99.99", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "shasum": "" - }, - "require": { - "php": "^7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2018-07-02T15:55:56+00:00" - }, { "name": "php-cs-fixer/diff", - "version": "v1.3.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^5.6 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", "symfony/process": "^3.3" }, "type": "library", @@ -460,14 +416,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, { "name": "SpacePossum" } @@ -477,7 +433,7 @@ "keywords": [ "diff" ], - "time": "2018-02-15T16:58:55+00:00" + "time": "2020-10-14T08:39:05+00:00" }, { "name": "psr/container", @@ -623,16 +579,16 @@ }, { "name": "symfony/console", - "version": "v5.1.5", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "186f395b256065ba9b890c0a4e48a91d598fa2cf" + "reference": "ae789a8a2ad189ce7e8216942cdb9b77319f5eb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/186f395b256065ba9b890c0a4e48a91d598fa2cf", - "reference": "186f395b256065ba9b890c0a4e48a91d598fa2cf", + "url": "https://api.github.com/repos/symfony/console/zipball/ae789a8a2ad189ce7e8216942cdb9b77319f5eb8", + "reference": "ae789a8a2ad189ce7e8216942cdb9b77319f5eb8", "shasum": "" }, "require": { @@ -712,7 +668,7 @@ "type": "tidelift" } ], - "time": "2020-09-02T07:07:40+00:00" + "time": "2020-10-07T15:23:00+00:00" }, { "name": "symfony/deprecation-contracts", @@ -780,16 +736,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.1.5", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "94871fc0a69c3c5da57764187724cdce0755899c" + "reference": "d5de97d6af175a9e8131c546db054ca32842dd0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/94871fc0a69c3c5da57764187724cdce0755899c", - "reference": "94871fc0a69c3c5da57764187724cdce0755899c", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d5de97d6af175a9e8131c546db054ca32842dd0f", + "reference": "d5de97d6af175a9e8131c546db054ca32842dd0f", "shasum": "" }, "require": { @@ -809,6 +765,7 @@ "psr/log": "~1.0", "symfony/config": "^4.4|^5.0", "symfony/dependency-injection": "^4.4|^5.0", + "symfony/error-handler": "^4.4|^5.0", "symfony/expression-language": "^4.4|^5.0", "symfony/http-foundation": "^4.4|^5.0", "symfony/service-contracts": "^1.1|^2", @@ -862,7 +819,7 @@ "type": "tidelift" } ], - "time": "2020-08-13T14:19:42+00:00" + "time": "2020-09-18T14:27:32+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -942,16 +899,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.1.5", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "f7b9ed6142a34252d219801d9767dedbd711da1a" + "reference": "1a8697545a8d87b9f2f6b1d32414199cc5e20aae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/f7b9ed6142a34252d219801d9767dedbd711da1a", - "reference": "f7b9ed6142a34252d219801d9767dedbd711da1a", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/1a8697545a8d87b9f2f6b1d32414199cc5e20aae", + "reference": "1a8697545a8d87b9f2f6b1d32414199cc5e20aae", "shasum": "" }, "require": { @@ -1002,20 +959,20 @@ "type": "tidelift" } ], - "time": "2020-08-21T17:19:47+00:00" + "time": "2020-09-27T14:02:37+00:00" }, { "name": "symfony/finder", - "version": "v5.1.5", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2b765f0cf6612b3636e738c0689b29aa63088d5d" + "reference": "2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2b765f0cf6612b3636e738c0689b29aa63088d5d", - "reference": "2b765f0cf6612b3636e738c0689b29aa63088d5d", + "url": "https://api.github.com/repos/symfony/finder/zipball/2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8", + "reference": "2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8", "shasum": "" }, "require": { @@ -1065,20 +1022,20 @@ "type": "tidelift" } ], - "time": "2020-08-17T10:01:29+00:00" + "time": "2020-09-02T16:23:27+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.1.5", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "9ff59517938f88d90b6e65311fef08faa640f681" + "reference": "4c7e155bf7d93ea4ba3824d5a14476694a5278dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/9ff59517938f88d90b6e65311fef08faa640f681", - "reference": "9ff59517938f88d90b6e65311fef08faa640f681", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4c7e155bf7d93ea4ba3824d5a14476694a5278dd", + "reference": "4c7e155bf7d93ea4ba3824d5a14476694a5278dd", "shasum": "" }, "require": { @@ -1135,24 +1092,24 @@ "type": "tidelift" } ], - "time": "2020-07-12T12:58:00+00:00" + "time": "2020-09-27T03:44:28+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -1160,7 +1117,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1211,24 +1168,24 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5" + "reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b740103edbdcc39602239ee8860f0f45a8eb9aa5", - "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c", + "reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-intl": "For best performance" @@ -1236,7 +1193,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1289,24 +1246,24 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" + "reference": "727d1096295d807c309fb01a851577302394c897" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897", + "reference": "727d1096295d807c309fb01a851577302394c897", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-intl": "For best performance" @@ -1314,7 +1271,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1370,24 +1327,24 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -1395,7 +1352,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1447,47 +1404,35 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", - "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", "shasum": "" }, "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" + "php": ">=7.1" }, - "type": "library", + "type": "metapackage", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -1524,29 +1469,29 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "639447d008615574653fb3bc60d1986d7172eaae" + "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", - "reference": "639447d008615574653fb3bc60d1986d7172eaae", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930", + "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1597,29 +1542,29 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" + "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8ff431c517be11c78c48a39a66d37431e26a6bed", + "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1673,29 +1618,29 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" + "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de", + "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de", "shasum": "" }, "require": { - "php": ">=7.0.8" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1753,20 +1698,20 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/process", - "version": "v5.1.5", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "1864216226af21eb76d9477f691e7cbf198e0402" + "reference": "d3a2e64866169586502f0cd9cab69135ad12cee9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1864216226af21eb76d9477f691e7cbf198e0402", - "reference": "1864216226af21eb76d9477f691e7cbf198e0402", + "url": "https://api.github.com/repos/symfony/process/zipball/d3a2e64866169586502f0cd9cab69135ad12cee9", + "reference": "d3a2e64866169586502f0cd9cab69135ad12cee9", "shasum": "" }, "require": { @@ -1817,7 +1762,7 @@ "type": "tidelift" } ], - "time": "2020-07-23T08:36:24+00:00" + "time": "2020-09-02T16:23:27+00:00" }, { "name": "symfony/service-contracts", @@ -1897,7 +1842,7 @@ }, { "name": "symfony/stopwatch", - "version": "v5.1.5", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -1961,16 +1906,16 @@ }, { "name": "symfony/string", - "version": "v5.1.5", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "0de4cc1e18bb596226c06a82e2e7e9bc6001a63a" + "reference": "4a9afe9d07bac506f75bcee8ed3ce76da5a9343e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/0de4cc1e18bb596226c06a82e2e7e9bc6001a63a", - "reference": "0de4cc1e18bb596226c06a82e2e7e9bc6001a63a", + "url": "https://api.github.com/repos/symfony/string/zipball/4a9afe9d07bac506f75bcee8ed3ce76da5a9343e", + "reference": "4a9afe9d07bac506f75bcee8ed3ce76da5a9343e", "shasum": "" }, "require": { @@ -2042,7 +1987,7 @@ "type": "tidelift" } ], - "time": "2020-08-17T07:48:54+00:00" + "time": "2020-09-15T12:23:47+00:00" } ], "aliases": [], diff --git a/vendor-bin/daux/composer.lock b/vendor-bin/daux/composer.lock index 3bf9d62c..14ef3c4f 100644 --- a/vendor-bin/daux/composer.lock +++ b/vendor-bin/daux/composer.lock @@ -147,23 +147,23 @@ }, { "name": "guzzlehttp/promises", - "version": "v1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + "reference": "60d379c243457e073cff02bc323a2a86cb355631" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631", + "reference": "60d379c243457e073cff02bc323a2a86cb355631", "shasum": "" }, "require": { - "php": ">=5.5.0" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", "extra": { @@ -194,20 +194,20 @@ "keywords": [ "promise" ], - "time": "2016-12-20T10:07:11+00:00" + "time": "2020-09-30T07:37:28+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.6.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", "shasum": "" }, "require": { @@ -220,15 +220,15 @@ }, "require-dev": { "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" }, "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -265,7 +265,7 @@ "uri", "url" ], - "time": "2019-07-01T23:21:34+00:00" + "time": "2020-09-30T07:37:11+00:00" }, { "name": "league/commonmark", @@ -445,51 +445,6 @@ ], "time": "2020-06-29T13:22:24+00:00" }, - { - "name": "paragonie/random_compat", - "version": "v9.99.99", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "shasum": "" - }, - "require": { - "php": "^7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2018-07-02T15:55:56+00:00" - }, { "name": "psr/container", "version": "1.0.0", @@ -631,16 +586,16 @@ }, { "name": "scrivo/highlight.php", - "version": "v9.18.1.2", + "version": "v9.18.1.3", "source": { "type": "git", "url": "https://github.com/scrivo/highlight.php.git", - "reference": "efb6e445494a9458aa59b0af5edfa4bdcc6809d9" + "reference": "6a1699707b099081f20a488ac1f92d682181018c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/efb6e445494a9458aa59b0af5edfa4bdcc6809d9", - "reference": "efb6e445494a9458aa59b0af5edfa4bdcc6809d9", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/6a1699707b099081f20a488ac1f92d682181018c", + "reference": "6a1699707b099081f20a488ac1f92d682181018c", "shasum": "" }, "require": { @@ -702,20 +657,20 @@ "type": "github" } ], - "time": "2020-08-27T03:24:44+00:00" + "time": "2020-10-16T07:43:22+00:00" }, { "name": "symfony/console", - "version": "v4.4.13", + "version": "v4.4.15", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "b39fd99b9297b67fb7633b7d8083957a97e1e727" + "reference": "90933b39c7b312fc3ceaa1ddeac7eb48cb953124" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/b39fd99b9297b67fb7633b7d8083957a97e1e727", - "reference": "b39fd99b9297b67fb7633b7d8083957a97e1e727", + "url": "https://api.github.com/repos/symfony/console/zipball/90933b39c7b312fc3ceaa1ddeac7eb48cb953124", + "reference": "90933b39c7b312fc3ceaa1ddeac7eb48cb953124", "shasum": "" }, "require": { @@ -793,20 +748,20 @@ "type": "tidelift" } ], - "time": "2020-09-02T07:07:21+00:00" + "time": "2020-09-15T07:58:55+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.13", + "version": "v4.4.15", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e3e5a62a6631a461954d471e7206e3750dbe8ee1" + "reference": "10683b407c3b6087c64619ebc97a87e36ea62c92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e3e5a62a6631a461954d471e7206e3750dbe8ee1", - "reference": "e3e5a62a6631a461954d471e7206e3750dbe8ee1", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/10683b407c3b6087c64619ebc97a87e36ea62c92", + "reference": "10683b407c3b6087c64619ebc97a87e36ea62c92", "shasum": "" }, "require": { @@ -862,20 +817,20 @@ "type": "tidelift" } ], - "time": "2020-08-17T07:39:58+00:00" + "time": "2020-09-27T14:14:06+00:00" }, { "name": "symfony/intl", - "version": "v5.1.5", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/intl.git", - "reference": "b6886c43cc1ae3367c569c5a8d4182555dd694fb" + "reference": "9381fd69ce6407041185aa6f1bafbf7d65f0e66a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/intl/zipball/b6886c43cc1ae3367c569c5a8d4182555dd694fb", - "reference": "b6886c43cc1ae3367c569c5a8d4182555dd694fb", + "url": "https://api.github.com/repos/symfony/intl/zipball/9381fd69ce6407041185aa6f1bafbf7d65f0e66a", + "reference": "9381fd69ce6407041185aa6f1bafbf7d65f0e66a", "shasum": "" }, "require": { @@ -952,20 +907,20 @@ "type": "tidelift" } ], - "time": "2020-08-17T07:42:30+00:00" + "time": "2020-09-27T03:44:28+00:00" }, { "name": "symfony/mime", - "version": "v5.1.5", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "89a2c9b4cb7b5aa516cf55f5194c384f444c81dc" + "reference": "4404d6545125863561721514ad9388db2661eec5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/89a2c9b4cb7b5aa516cf55f5194c384f444c81dc", - "reference": "89a2c9b4cb7b5aa516cf55f5194c384f444c81dc", + "url": "https://api.github.com/repos/symfony/mime/zipball/4404d6545125863561721514ad9388db2661eec5", + "reference": "4404d6545125863561721514ad9388db2661eec5", "shasum": "" }, "require": { @@ -1029,24 +984,24 @@ "type": "tidelift" } ], - "time": "2020-08-17T10:01:29+00:00" + "time": "2020-09-02T16:23:27+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -1054,7 +1009,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1105,24 +1060,24 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-intl-icu", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "4e45a6e39041a9cc78835b11abc47874ae302a55" + "reference": "c44d5bf6a75eed79555c6bf37505c6d39559353e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/4e45a6e39041a9cc78835b11abc47874ae302a55", - "reference": "4e45a6e39041a9cc78835b11abc47874ae302a55", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/c44d5bf6a75eed79555c6bf37505c6d39559353e", + "reference": "c44d5bf6a75eed79555c6bf37505c6d39559353e", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=7.1", "symfony/intl": "~2.3|~3.0|~4.0|~5.0" }, "suggest": { @@ -1131,7 +1086,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1181,26 +1136,25 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251" + "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251", - "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3b75acd829741c768bc8b1f84eb33265e7cc5117", + "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=7.1", "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php70": "^1.10", "symfony/polyfill-php72": "^1.10" }, "suggest": { @@ -1209,7 +1163,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1266,24 +1220,24 @@ "type": "tidelift" } ], - "time": "2020-08-04T06:02:08+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" + "reference": "727d1096295d807c309fb01a851577302394c897" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897", + "reference": "727d1096295d807c309fb01a851577302394c897", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-intl": "For best performance" @@ -1291,7 +1245,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1347,24 +1301,24 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -1372,7 +1326,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1424,106 +1378,29 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.18.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", - "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", - "shasum": "" - }, - "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "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.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "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": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "639447d008615574653fb3bc60d1986d7172eaae" + "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", - "reference": "639447d008615574653fb3bc60d1986d7172eaae", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930", + "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1574,29 +1451,29 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" + "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8ff431c517be11c78c48a39a66d37431e26a6bed", + "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1650,29 +1527,29 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" + "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de", + "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de", "shasum": "" }, "require": { - "php": ">=7.0.8" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1730,20 +1607,20 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/process", - "version": "v4.4.13", + "version": "v4.4.15", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "65e70bab62f3da7089a8d4591fb23fbacacb3479" + "reference": "9b887acc522935f77555ae8813495958c7771ba7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/65e70bab62f3da7089a8d4591fb23fbacacb3479", - "reference": "65e70bab62f3da7089a8d4591fb23fbacacb3479", + "url": "https://api.github.com/repos/symfony/process/zipball/9b887acc522935f77555ae8813495958c7771ba7", + "reference": "9b887acc522935f77555ae8813495958c7771ba7", "shasum": "" }, "require": { @@ -1793,7 +1670,7 @@ "type": "tidelift" } ], - "time": "2020-07-23T08:31:43+00:00" + "time": "2020-09-02T16:08:58+00:00" }, { "name": "symfony/service-contracts", @@ -1873,16 +1750,16 @@ }, { "name": "symfony/yaml", - "version": "v4.4.13", + "version": "v4.4.15", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e2a69525b11a33be51cb00b8d6d13a9258a296b1" + "reference": "c7885964b1eceb70b0981556d0a9b01d2d97c8d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e2a69525b11a33be51cb00b8d6d13a9258a296b1", - "reference": "e2a69525b11a33be51cb00b8d6d13a9258a296b1", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c7885964b1eceb70b0981556d0a9b01d2d97c8d1", + "reference": "c7885964b1eceb70b0981556d0a9b01d2d97c8d1", "shasum": "" }, "require": { @@ -1942,7 +1819,7 @@ "type": "tidelift" } ], - "time": "2020-08-26T08:30:46+00:00" + "time": "2020-09-27T03:36:23+00:00" }, { "name": "webuni/commonmark-table-extension", diff --git a/vendor-bin/phpunit/composer.lock b/vendor-bin/phpunit/composer.lock index f3f2c6b0..938fc8f3 100644 --- a/vendor-bin/phpunit/composer.lock +++ b/vendor-bin/phpunit/composer.lock @@ -479,16 +479,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.1", + "version": "5.2.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d870572532cd70bc3fab58f2e23ad423c8404c44" + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d870572532cd70bc3fab58f2e23ad423c8404c44", - "reference": "d870572532cd70bc3fab58f2e23ad423c8404c44", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", "shasum": "" }, "require": { @@ -527,20 +527,20 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-08-15T11:14:08+00:00" + "time": "2020-09-03T19:13:55+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e878a14a65245fbe78f8080eba03b47c3b705651" + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651", - "reference": "e878a14a65245fbe78f8080eba03b47c3b705651", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", "shasum": "" }, "require": { @@ -572,32 +572,32 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-06-27T10:12:23+00:00" + "time": "2020-09-17T18:55:26+00:00" }, { "name": "phpspec/prophecy", - "version": "1.11.1", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160" + "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b20034be5efcdab4fb60ca3a29cba2949aead160", - "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", + "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2", - "phpdocumentor/reflection-docblock": "^5.0", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^8.0 || ^9.0 <9.3" }, "type": "library", "extra": { @@ -635,7 +635,7 @@ "spy", "stub" ], - "time": "2020-07-08T12:44:21+00:00" + "time": "2020-09-29T09:10:42+00:00" }, { "name": "phpunit/php-code-coverage", @@ -887,6 +887,7 @@ "keywords": [ "tokenizer" ], + "abandoned": true, "time": "2019-09-17T06:23:10+00:00" }, { @@ -1599,20 +1600,20 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -1620,7 +1621,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1671,7 +1672,7 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "theseer/tokenizer", diff --git a/vendor-bin/robo/composer.lock b/vendor-bin/robo/composer.lock index 7f317234..5fbe6804 100644 --- a/vendor-bin/robo/composer.lock +++ b/vendor-bin/robo/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "consolidation/annotated-command", - "version": "4.2.1", + "version": "4.2.3", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "ef6b7e662ce2d8b0af9004307bdf26350aad4df1" + "reference": "4b596872f24c39d9c04d7b3adb6bc51baa1f2fd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/ef6b7e662ce2d8b0af9004307bdf26350aad4df1", - "reference": "ef6b7e662ce2d8b0af9004307bdf26350aad4df1", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/4b596872f24c39d9c04d7b3adb6bc51baa1f2fd5", + "reference": "4b596872f24c39d9c04d7b3adb6bc51baa1f2fd5", "shasum": "" }, "require": { @@ -69,7 +69,7 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2020-08-30T17:37:39+00:00" + "time": "2020-10-03T14:28:42+00:00" }, { "name": "consolidation/config", @@ -282,23 +282,23 @@ }, { "name": "consolidation/robo", - "version": "1.4.12", + "version": "1.4.13", "source": { "type": "git", "url": "https://github.com/consolidation/Robo.git", - "reference": "eb45606f498b3426b9a98b7c85e300666a968e51" + "reference": "fd28dcca1b935950ece26e63541fbdeeb09f7343" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/Robo/zipball/eb45606f498b3426b9a98b7c85e300666a968e51", - "reference": "eb45606f498b3426b9a98b7c85e300666a968e51", + "url": "https://api.github.com/repos/consolidation/Robo/zipball/fd28dcca1b935950ece26e63541fbdeeb09f7343", + "reference": "fd28dcca1b935950ece26e63541fbdeeb09f7343", "shasum": "" }, "require": { - "consolidation/annotated-command": "^2.11.0|^4.1", + "consolidation/annotated-command": "^2.12.1|^4.1", "consolidation/config": "^1.2.1", "consolidation/log": "^1.1.1|^2", - "consolidation/output-formatters": "^3.1.13|^4.1", + "consolidation/output-formatters": "^3.5.1|^4.1", "consolidation/self-update": "^1.1.5", "grasmash/yaml-expander": "^1.4", "league/container": "^2.4.1", @@ -306,7 +306,7 @@ "symfony/console": "^2.8|^3|^4", "symfony/event-dispatcher": "^2.5|^3|^4", "symfony/filesystem": "^2.5|^3|^4", - "symfony/finder": "^2.5|^3|^4", + "symfony/finder": "^2.5|^3|^4|^5", "symfony/process": "^2.5|^3|^4" }, "replace": { @@ -333,6 +333,16 @@ "type": "library", "extra": { "scenarios": { + "finder5": { + "require": { + "symfony/finder": "^5" + }, + "config": { + "platform": { + "php": "7.2.5" + } + } + }, "symfony4": { "require": { "symfony/console": "^4" @@ -383,7 +393,7 @@ } ], "description": "Modern task runner", - "time": "2020-02-18T17:31:26+00:00" + "time": "2020-10-11T04:51:34+00:00" }, { "name": "consolidation/self-update", @@ -688,16 +698,16 @@ }, { "name": "pear/archive_tar", - "version": "1.4.9", + "version": "1.4.10", "source": { "type": "git", "url": "https://github.com/pear/Archive_Tar.git", - "reference": "c5b00053770e1d72128252c62c2c1a12c26639f0" + "reference": "bbb4f10f71a1da2715ec6d9a683f4f23c507a49b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/c5b00053770e1d72128252c62c2c1a12c26639f0", - "reference": "c5b00053770e1d72128252c62c2c1a12c26639f0", + "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/bbb4f10f71a1da2715ec6d9a683f4f23c507a49b", + "reference": "bbb4f10f71a1da2715ec6d9a683f4f23c507a49b", "shasum": "" }, "require": { @@ -750,7 +760,7 @@ "archive", "tar" ], - "time": "2019-12-04T10:17:28+00:00" + "time": "2020-09-15T14:13:23+00:00" }, { "name": "pear/console_getopt", @@ -996,16 +1006,16 @@ }, { "name": "symfony/console", - "version": "v4.4.13", + "version": "v4.4.15", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "b39fd99b9297b67fb7633b7d8083957a97e1e727" + "reference": "90933b39c7b312fc3ceaa1ddeac7eb48cb953124" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/b39fd99b9297b67fb7633b7d8083957a97e1e727", - "reference": "b39fd99b9297b67fb7633b7d8083957a97e1e727", + "url": "https://api.github.com/repos/symfony/console/zipball/90933b39c7b312fc3ceaa1ddeac7eb48cb953124", + "reference": "90933b39c7b312fc3ceaa1ddeac7eb48cb953124", "shasum": "" }, "require": { @@ -1083,20 +1093,20 @@ "type": "tidelift" } ], - "time": "2020-09-02T07:07:21+00:00" + "time": "2020-09-15T07:58:55+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.13", + "version": "v4.4.15", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "3e8ea5ccddd00556b86d69d42f99f1061a704030" + "reference": "e17bb5e0663dc725f7cdcafc932132735b4725cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3e8ea5ccddd00556b86d69d42f99f1061a704030", - "reference": "3e8ea5ccddd00556b86d69d42f99f1061a704030", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/e17bb5e0663dc725f7cdcafc932132735b4725cd", + "reference": "e17bb5e0663dc725f7cdcafc932132735b4725cd", "shasum": "" }, "require": { @@ -1114,6 +1124,7 @@ "psr/log": "~1.0", "symfony/config": "^3.4|^4.0|^5.0", "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/error-handler": "~3.4|~4.4", "symfony/expression-language": "^3.4|^4.0|^5.0", "symfony/http-foundation": "^3.4|^4.0|^5.0", "symfony/service-contracts": "^1.1|^2", @@ -1167,7 +1178,7 @@ "type": "tidelift" } ], - "time": "2020-08-13T14:18:44+00:00" + "time": "2020-09-18T14:07:46+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -1247,16 +1258,16 @@ }, { "name": "symfony/filesystem", - "version": "v4.4.13", + "version": "v4.4.15", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "27575bcbc68db1f6d06218891296572c9b845704" + "reference": "ebc51494739d3b081ea543ed7c462fa73a4f74db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/27575bcbc68db1f6d06218891296572c9b845704", - "reference": "27575bcbc68db1f6d06218891296572c9b845704", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/ebc51494739d3b081ea543ed7c462fa73a4f74db", + "reference": "ebc51494739d3b081ea543ed7c462fa73a4f74db", "shasum": "" }, "require": { @@ -1307,29 +1318,29 @@ "type": "tidelift" } ], - "time": "2020-08-21T17:19:37+00:00" + "time": "2020-09-27T13:54:16+00:00" }, { "name": "symfony/finder", - "version": "v4.4.13", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2a78590b2c7e3de5c429628457c47541c58db9c7" + "reference": "2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2a78590b2c7e3de5c429628457c47541c58db9c7", - "reference": "2a78590b2c7e3de5c429628457c47541c58db9c7", + "url": "https://api.github.com/repos/symfony/finder/zipball/2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8", + "reference": "2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8", "shasum": "" }, "require": { - "php": ">=7.1.3" + "php": ">=7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1370,24 +1381,24 @@ "type": "tidelift" } ], - "time": "2020-08-17T09:56:45+00:00" + "time": "2020-09-02T16:23:27+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -1395,7 +1406,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1446,24 +1457,24 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -1471,7 +1482,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1523,29 +1534,29 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" + "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8ff431c517be11c78c48a39a66d37431e26a6bed", + "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1599,29 +1610,29 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.18.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" + "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de", + "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de", "shasum": "" }, "require": { - "php": ">=7.0.8" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1679,20 +1690,20 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/process", - "version": "v3.4.44", + "version": "v3.4.45", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "af8d812d75fcdf2eae30928b42396fe17df137e4" + "reference": "46a862d0f334e51c1ed831b49cbe12863ffd5475" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/af8d812d75fcdf2eae30928b42396fe17df137e4", - "reference": "af8d812d75fcdf2eae30928b42396fe17df137e4", + "url": "https://api.github.com/repos/symfony/process/zipball/46a862d0f334e51c1ed831b49cbe12863ffd5475", + "reference": "46a862d0f334e51c1ed831b49cbe12863ffd5475", "shasum": "" }, "require": { @@ -1742,7 +1753,7 @@ "type": "tidelift" } ], - "time": "2020-07-16T09:41:49+00:00" + "time": "2020-09-02T16:06:40+00:00" }, { "name": "symfony/service-contracts", @@ -1822,16 +1833,16 @@ }, { "name": "symfony/yaml", - "version": "v4.4.13", + "version": "v4.4.15", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e2a69525b11a33be51cb00b8d6d13a9258a296b1" + "reference": "c7885964b1eceb70b0981556d0a9b01d2d97c8d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e2a69525b11a33be51cb00b8d6d13a9258a296b1", - "reference": "e2a69525b11a33be51cb00b8d6d13a9258a296b1", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c7885964b1eceb70b0981556d0a9b01d2d97c8d1", + "reference": "c7885964b1eceb70b0981556d0a9b01d2d97c8d1", "shasum": "" }, "require": { @@ -1891,7 +1902,7 @@ "type": "tidelift" } ], - "time": "2020-08-26T08:30:46+00:00" + "time": "2020-09-27T03:36:23+00:00" } ], "aliases": [], diff --git a/yarn.lock b/yarn.lock index 63946c05..635cd097 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,11 +23,6 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== - ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" @@ -51,11 +46,10 @@ ansi-styles@^3.2.1: color-convert "^1.9.0" ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: - "@types/color-name" "^1.1.1" color-convert "^2.0.1" anymatch@~3.1.1: @@ -127,14 +121,14 @@ braces@^3.0.1, braces@~3.0.2: fill-range "^7.0.1" browserslist@^4.12.0: - version "4.14.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.14.1.tgz#cb2b490ba881d45dc3039078c7ed04411eaf3fa3" - integrity sha512-zyBTIHydW37pnb63c7fHFXUG6EcqWOqoMdDx6cdyaDFriZ20EoVxcE95S54N+heRqY8m8IUgB5zYta/gCwSaaA== + version "4.14.5" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.14.5.tgz#1c751461a102ddc60e40993639b709be7f2c4015" + integrity sha512-Z+vsCZIvCBvqLoYkBFTwEYH3v5MCQbsAjp50ERycpOjnPmolg1Gjy4+KaWWpm8QOJt9GHkhdqAl14NpCX73CWA== dependencies: - caniuse-lite "^1.0.30001124" - electron-to-chromium "^1.3.562" - escalade "^3.0.2" - node-releases "^1.1.60" + caniuse-lite "^1.0.30001135" + electron-to-chromium "^1.3.571" + escalade "^3.1.0" + node-releases "^1.1.61" caller-callsite@^2.0.0: version "2.0.0" @@ -160,10 +154,10 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001124: - version "1.0.30001125" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001125.tgz#2a1a51ee045a0a2207474b086f628c34725e997b" - integrity sha512-9f+r7BW8Qli917mU3j0fUaTweT3f3vnX/Lcs+1C73V+RADmFme+Ih0Br8vONQi3X0lseOe6ZHfsZLCA8MSjxUA== +caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001135: + version "1.0.30001151" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001151.tgz#1ddfde5e6fff02aad7940b4edb7d3ac76b0cb00b" + integrity sha512-Zh3sHqskX6mHNrqUerh+fkf0N72cMxrmflzje/JyVImfpknscMnkeJrlFGJcqTmaa0iszdYptGpWMJCRQDkBVw== chalk@^1.1.3: version "1.1.3" @@ -194,9 +188,9 @@ chalk@^4.0.0: supports-color "^7.1.0" chokidar@^3.3.0: - version "3.4.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.2.tgz#38dc8e658dec3809741eb3ef7bb0a47fe424232d" - integrity sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A== + version "3.4.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" + integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -204,7 +198,7 @@ chokidar@^3.3.0: is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.4.0" + readdirp "~3.5.0" optionalDependencies: fsevents "~2.1.2" @@ -336,10 +330,10 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -electron-to-chromium@^1.3.562: - version "1.3.564" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.564.tgz#e9c319ae437b3eb8bbf3e3bae4bead5a21945961" - integrity sha512-fNaYN3EtKQWLQsrKXui8mzcryJXuA0LbCLoizeX6oayG2emBaS5MauKjCPAvc29NEY4FpLHIUWiP+Y0Bfrs5dg== +electron-to-chromium@^1.3.571: + version "1.3.583" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.583.tgz#47a9fde74740b1205dba96db2e433132964ba3ee" + integrity sha512-L9BwLwJohjZW9mQESI79HRzhicPk1DFgM+8hOCfGgGCFEcA3Otpv7QK6SGtYoZvfQfE3wKLh0Hd5ptqUFv3gvQ== emoji-regex@^8.0.0: version "8.0.0" @@ -353,10 +347,10 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -escalade@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.0.2.tgz#6a580d70edb87880f22b4c91d0d56078df6962c4" - integrity sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ== +escalade@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" @@ -417,6 +411,11 @@ fsevents@~2.1.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -484,6 +483,13 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + ignore@^5.1.4: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" @@ -530,9 +536,9 @@ inherits@2: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ip-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.1.0.tgz#5ad62f685a14edb421abebc2fff8db94df67b455" - integrity sha512-pKnZpbgCTfH/1NLIlOduP/V+WRXzC2MOz3Qo8xmxk8C5GudJLgK5QyLVXOSWy3ParAH7Eemurl3xjv/WXYFvMA== + version "4.2.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.2.0.tgz#a03f5eb661d9a154e3973a03de8b23dd0ad6892e" + integrity sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A== is-arrayish@^0.2.1: version "0.2.1" @@ -546,6 +552,13 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" +is-core-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.0.0.tgz#58531b70aed1db7c0e8d4eb1a0a2d1ddd64bd12d" + integrity sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw== + dependencies: + has "^1.0.3" + is-directory@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" @@ -656,10 +669,10 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -node-releases@^1.1.60: - version "1.1.61" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.61.tgz#707b0fca9ce4e11783612ba4a2fcba09047af16e" - integrity sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g== +node-releases@^1.1.61: + version "1.1.64" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.64.tgz#71b4ae988e9b1dd7c1ffce58dd9e561752dfebc5" + integrity sha512-Iec8O9166/x2HRMJyLLLWkd0sFFLrFNy+Xf+JQfSQsdBJzPcHpNl3JQ9gD4j+aJxmCa25jNsIbM4bmACtSbkSg== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" @@ -783,9 +796,9 @@ postcss-custom-media@^7.0.8: postcss "^7.0.14" postcss-custom-properties@^9.0.2: - version "9.1.1" - resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-9.1.1.tgz#55822d70ff48004f6d307a338ba64a7fb0a4bfff" - integrity sha512-GVu+j7vwMTKUGhGXckYAFAAG5tTJUkSt8LuSyimtZdVVmdAEZYYqserkAgX8vwMhgGDPA4vJtWt7VgFxgiooDA== + version "9.2.0" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-9.2.0.tgz#80bae0d6e0c510245ace7ede95ac527712ea24e7" + integrity sha512-IFRV7LwapFkNa3MtvFpw+MEhgyUpaVZ62VlR5EM0AbmnGbNhU9qIE8u02vgUbl1gLkHK6sterEavamVPOwdE8g== dependencies: postcss "^7.0.17" postcss-values-parser "^3.0.5" @@ -808,9 +821,9 @@ postcss-import@^12.0.1: resolve "^1.1.7" postcss-load-config@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003" - integrity sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q== + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.2.tgz#c5ea504f2c4aef33c7359a34de3573772ad7502a" + integrity sha512-/rDeGV6vMUo3mwJZmeHfEDvwnTKKqQ0S7OHUi/kJvvtx3aWtyWG2/0ZWnzCt2keEclwN6Tf0DST2v9kITdOKYw== dependencies: cosmiconfig "^5.0.0" import-cwd "^2.0.0" @@ -862,13 +875,14 @@ postcss-scss@^2.0.0: postcss "^7.0.6" postcss-selector-parser@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" - integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg== + version "6.0.4" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz#56075a1380a04604c38b063ea7767a129af5c2b3" + integrity sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw== dependencies: cssesc "^3.0.0" indexes-of "^1.0.1" uniq "^1.0.1" + util-deprecate "^1.0.2" postcss-simple-vars@^1.2.0: version "1.2.0" @@ -917,9 +931,9 @@ postcss@^6.0.23: supports-color "^5.4.0" postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7: - version "7.0.32" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" - integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== + version "7.0.35" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24" + integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== dependencies: chalk "^2.4.2" source-map "^0.6.1" @@ -937,10 +951,10 @@ read-cache@^1.0.0: dependencies: pify "^2.3.0" -readdirp@~3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" - integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== +readdirp@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" + integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== dependencies: picomatch "^2.2.1" @@ -960,10 +974,11 @@ resolve-from@^3.0.0: integrity sha1-six699nWiBvItuZTM17rywoYh0g= resolve@^1.1.7: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + version "1.18.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" + integrity sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA== dependencies: + is-core-module "^2.0.0" path-parse "^1.0.6" reusify@^1.0.4: @@ -1063,9 +1078,9 @@ supports-color@^7.1.0: has-flag "^4.0.0" tlds@^1.203.0: - version "1.209.0" - resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.209.0.tgz#13cfdc039331d49730ca7bfa9526fc9b319e2cec" - integrity sha512-KVsZ1NSpBodpo42/JIwTyau7SqUxV/qQMp2epSDPa99885LpHWLaVCCt8CWzGe4X5YIVNr+b6bUys9e9eEb5OA== + version "1.212.0" + resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.212.0.tgz#f3f29bd5d10d0fd9a6f171a5f9d57d58b71eccf7" + integrity sha512-03rYYO1rGhOYpdYB+wlLY2d0xza6hdN/S67ol2ZpaH+CtFedMVAVhj8ft0rwxEkr90zatou8opBv7Xp6X4cK6g== to-regex-range@^5.0.1: version "5.0.1" @@ -1092,6 +1107,11 @@ url-regex@^5.0.0: ip-regex "^4.1.0" tlds "^1.203.0" +util-deprecate@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" From 3d909da1e569f03eede729da0e6c274490a709b3 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 26 Oct 2020 16:09:42 -0400 Subject: [PATCH 45/50] Update iOS/macOS client URLs --- docs/en/040_Compatible_Clients.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/040_Compatible_Clients.md b/docs/en/040_Compatible_Clients.md index b61e8211..586b4366 100644 --- a/docs/en/040_Compatible_Clients.md +++ b/docs/en/040_Compatible_Clients.md @@ -50,7 +50,7 @@ The Arsse does not at this time have any first party clients. However, because T - Reeder + Reeder macOS ✘ ✘ @@ -155,7 +155,7 @@ The Arsse does not at this time have any first party clients. However, because T - Reeder + Reeder iOS ✘ ✘ @@ -185,7 +185,7 @@ The Arsse does not at this time have any first party clients. However, because T - Unread + Unread iOS ✘ ✘ @@ -235,7 +235,7 @@ The Arsse does not at this time have any first party clients. However, because T - ReadKit + ReadKit macOS ✘ ✘ From 7ef02e1d65bc34f5ef1ecf15adefec7e4b36bf0e Mon Sep 17 00:00:00 2001 From: "J. King" Date: Tue, 27 Oct 2020 09:48:47 -0400 Subject: [PATCH 46/50] Revert wishful thinking --- UPGRADING | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/UPGRADING b/UPGRADING index 086a1a5f..f18bf760 100644 --- a/UPGRADING +++ b/UPGRADING @@ -18,8 +18,7 @@ Upgrading from 0.8.4 to 0.8.5 the QUERY_STRING FastCGI parameter in those passed to PHP. The omission affects the Fever protocol in particular (the parameter is required for Fever to function at all), though it could potentially affect some - Nextcloud News clients as well. -- No significant code changes have been made in this version + Nextcloud News clients as well Upgrading from 0.8.2 to 0.8.3 From 0117e7f9bfd55db1ca4f6a5616aaaa37375d38de Mon Sep 17 00:00:00 2001 From: "J. King" Date: Tue, 27 Oct 2020 10:49:54 -0400 Subject: [PATCH 47/50] Relax Fever's HTTP correctness for client compat - Unread on iOS appears to send all API requests as GETs - Newsflash on Linux sends multipart/form-data input --- lib/REST/Fever/API.php | 9 +++++---- tests/cases/REST/Fever/TestAPI.php | 10 ++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/REST/Fever/API.php b/lib/REST/Fever/API.php index 9a5779b3..1901397f 100644 --- a/lib/REST/Fever/API.php +++ b/lib/REST/Fever/API.php @@ -22,7 +22,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { public const LEVEL = 3; protected const GENERIC_ICON_TYPE = "image/png;base64"; protected const GENERIC_ICON_DATA = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMjHxIGmVAAAADUlEQVQYV2NgYGBgAAAABQABijPjAAAAAABJRU5ErkJggg=="; - protected const ACCEPTED_TYPE = "application/x-www-form-urlencoded"; + protected const ACCEPTED_TYPES = ["application/x-www-form-urlencoded", "multipart/form-data"]; // GET parameters for which we only check presence: these will be converted to booleans protected const PARAM_BOOL = ["groups", "feeds", "items", "favicons", "links", "unread_item_ids", "saved_item_ids"]; @@ -68,11 +68,12 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { case "OPTIONS": return new EmptyResponse(204, [ 'Allow' => "POST", - 'Accept' => self::ACCEPTED_TYPE, + 'Accept' => implode(", ", self::ACCEPTED_TYPES), ]); + case "GET": // HTTP violation required for client "Unread" on iOS case "POST": - if (!HTTP::matchType($req, self::ACCEPTED_TYPE, "")) { - return new EmptyResponse(415, ['Accept' => self::ACCEPTED_TYPE]); + if (!HTTP::matchType($req, "", ...self::ACCEPTED_TYPES)) { + return new EmptyResponse(415, ['Accept' => implode(", ", self::ACCEPTED_TYPES)]); } $out = [ 'api_version' => self::LEVEL, diff --git a/tests/cases/REST/Fever/TestAPI.php b/tests/cases/REST/Fever/TestAPI.php index d89a17f1..d0632c97 100644 --- a/tests/cases/REST/Fever/TestAPI.php +++ b/tests/cases/REST/Fever/TestAPI.php @@ -427,9 +427,11 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { public function provideInvalidRequests(): iterable { return [ - 'Not an API request' => [$this->req(""), new EmptyResponse(404)], - 'Wrong method' => [$this->req("api", "", "GET"), new EmptyResponse(405, ['Allow' => "OPTIONS,POST"])], - 'Wrong content type' => [$this->req("api", '{"api_key":"validToken"}', "POST", "application/json"), new EmptyResponse(415, ['Accept' => "application/x-www-form-urlencoded"])], + 'Not an API request' => [$this->req(""), new EmptyResponse(404)], + 'Wrong method' => [$this->req("api", "", "PUT"), new EmptyResponse(405, ['Allow' => "OPTIONS,POST"])], + 'Non-standard method' => [$this->req("api", "", "GET"), new JsonResponse([])], + 'Wrong content type' => [$this->req("api", '{"api_key":"validToken"}', "POST", "application/json"), new EmptyResponse(415, ['Accept' => "application/x-www-form-urlencoded, multipart/form-data"])], + 'Non-standard content type' => [$this->req("api", '{"api_key":"validToken"}', "POST", "multipart/form-data; boundary=33b68964f0de4c1f-5144aa6caaa6e4a8-18bfaf416a1786c8-5c5053a45f221bc1"), new JsonResponse([])], ]; } @@ -499,7 +501,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest { $act = $this->h->dispatch($this->req("api", "", "OPTIONS")); $exp = new EmptyResponse(204, [ 'Allow' => "POST", - 'Accept' => "application/x-www-form-urlencoded", + 'Accept' => "application/x-www-form-urlencoded, multipart/form-data", ]); $this->assertMessage($exp, $act); } From e3ebd89aa829e3e48bf8c425f1db521eeffffc2e Mon Sep 17 00:00:00 2001 From: "J. King" Date: Tue, 27 Oct 2020 10:54:35 -0400 Subject: [PATCH 48/50] Add NewsFlash to supported clients --- docs/en/040_Compatible_Clients.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/en/040_Compatible_Clients.md b/docs/en/040_Compatible_Clients.md index 586b4366..9122387f 100644 --- a/docs/en/040_Compatible_Clients.md +++ b/docs/en/040_Compatible_Clients.md @@ -49,6 +49,16 @@ The Arsse does not at this time have any first party clients. However, because T

Terminal-based client.

+ + NewsFlash + Linux + ✘ + ✘ + ✔ + +

Successor to FeedReader.

+ + Reeder macOS From 5a09dcb3ed5f54ce984a8c985534d6d10c13036d Mon Sep 17 00:00:00 2001 From: "J. King" Date: Tue, 27 Oct 2020 10:58:54 -0400 Subject: [PATCH 49/50] Update changelog --- CHANGELOG | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index da50cebe..852497a0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,8 @@ -Version 0.8.5 (2020-??-??) +Version 0.8.5 (2020-10-27) ========================== Bug fixes: +- Relax Fever HTTP correctness, to fix some clients - Added the QUERY_STRING FastCGI paramater to the sample Nginx configuration Version 0.8.4 (2020-09-09) From e9682bc6015369d42c26895f3086cff048c5c215 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Tue, 27 Oct 2020 14:39:02 -0400 Subject: [PATCH 50/50] Correct typos --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 852497a0..f679cfa1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,7 +3,7 @@ Version 0.8.5 (2020-10-27) Bug fixes: - Relax Fever HTTP correctness, to fix some clients -- Added the QUERY_STRING FastCGI paramater to the sample Nginx configuration +- Add the QUERY_STRING FastCGI parameter to the sample Nginx configuration Version 0.8.4 (2020-09-09) ==========================