diff --git a/.php_cs.dist b/.php_cs.dist
index 49435d77..c2761677 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,10 +16,63 @@ $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"],
+ '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,
+ 'no_binary_string' => true,
+ 'no_blank_lines_after_phpdoc' => true,
+ 'no_empty_comment' => true,
+ 'no_empty_phpdoc' => true,
+ 'no_extra_blank_lines' => true, // this could probably use more configuration
+ '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,
+ 'normalize_index_brace' => true,
+ 'object_operator_without_whitespace' => true,
+ 'pow_to_exponentiation' => true,
+ 'set_type_to_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"],
- 'function_declaration' => ['closure_function_spacing' => "none"],
-];
+ // 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"],
+ 'new_with_braces' => false, // no option to specify absence of braces
+ ];
$finder = \PhpCsFixer\Finder::create();
foreach ($paths as $path) {
@@ -28,4 +82,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);
diff --git a/CHANGELOG b/CHANGELOG
index 7aac0189..f679cfa1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,23 @@
+Version 0.8.5 (2020-10-27)
+==========================
+
+Bug fixes:
+- Relax Fever HTTP correctness, to fix some clients
+- Add the QUERY_STRING FastCGI parameter to the sample Nginx configuration
+
+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)
+==========================
+
+Changes:
+- 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)
==========================
@@ -24,7 +44,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
@@ -116,7 +136,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)
@@ -162,7 +182,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:
diff --git a/README.md b/README.md
index 0658d785..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.
@@ -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..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);
}
@@ -53,10 +53,10 @@ 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
$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();
@@ -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;
+ }
}
}
@@ -108,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"];
@@ -140,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/UPGRADING b/UPGRADING
index a78867b1..f18bf760 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -11,6 +11,30 @@ 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
+
+
+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/arsse.php b/arsse.php
index 0cfa0ae4..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;
@@ -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/composer.json b/composer.json
index 3fdd1c71..26bab1c8 100644
--- a/composer.json
+++ b/composer.json
@@ -18,21 +18,26 @@
],
"require": {
- "php": "7.*",
+ "php": "^7.1",
"ext-intl": "*",
"ext-json": "*",
"ext-hash": "*",
"ext-dom": "*",
- "p3k/picofeed": "0.1.*",
+ "nicolus/picofeed": "^0.1.43",
"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..77d43df5 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": "9880398f241b2e782876bb510207cde7",
"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,202 @@
"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": "guzzlehttp/guzzle",
+ "version": "6.5.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
+ },
+ "dist": {
+ "type": "zip",
+ "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",
+ "symfony/polyfill-intl-idn": "^1.17.0"
+ },
+ "require-dev": {
+ "ext-curl": "*",
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
+ "psr/log": "^1.1"
+ },
+ "suggest": {
+ "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": "2020-06-16T21:01:06+00:00"
+ },
+ {
+ "name": "guzzlehttp/promises",
+ "version": "1.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/promises.git",
+ "reference": "60d379c243457e073cff02bc323a2a86cb355631"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631",
+ "reference": "60d379c243457e073cff02bc323a2a86cb355631",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "^4.4 || ^5.1"
+ },
+ "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": "2020-09-30T07:37:28+00:00"
+ },
+ {
+ "name": "guzzlehttp/psr7",
+ "version": "1.7.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
+ "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
+ "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.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
+ },
+ "suggest": {
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.7-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": "2020-09-30T07:37:11+00:00"
},
{
"name": "hosteurope/password-generator",
@@ -138,17 +327,352 @@
"time": "2017-02-09T14:17:01+00:00"
},
{
- "name": "p3k/picofeed",
- "version": "v0.1.38",
+ "name": "kevinrob/guzzle-cache-middleware",
+ "version": "v2.1.1",
"source": {
"type": "git",
- "url": "https://github.com/aaronpk/picoFeed.git",
- "reference": "989c0bcf2eac016a4104abce1aadff791fc287ab"
+ "url": "https://github.com/Kevinrob/guzzle-cache-middleware.git",
+ "reference": "6952064f7747756b0be7b4c234c0fd7535ea4c8c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/aaronpk/picoFeed/zipball/989c0bcf2eac016a4104abce1aadff791fc287ab",
- "reference": "989c0bcf2eac016a4104abce1aadff791fc287ab",
+ "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.4.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/laminas/laminas-diactoros.git",
+ "reference": "36ef09b73e884135d2059cc498c938e90821bb57"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/36ef09b73e884135d2059cc498c938e90821bb57",
+ "reference": "36ef09b73e884135d2059cc498c938e90821bb57",
+ "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": "^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": "^1.0",
+ "phpunit/phpunit": "^7.5.18"
+ },
+ "type": "library",
+ "extra": {
+ "laminas": {
+ "config-provider": "Laminas\\Diactoros\\ConfigProvider",
+ "module": "Laminas\\Diactoros"
+ }
+ },
+ "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-17",
+ "psr-7"
+ ],
+ "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.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/laminas/laminas-httphandlerrunner.git",
+ "reference": "e1a5dad040e0043135e8095ee27d1fbf6fb640e1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/e1a5dad040e0043135e8095ee27d1fbf6fb640e1",
+ "reference": "e1a5dad040e0043135e8095ee27d1fbf6fb640e1",
+ "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": "^1.1.0"
+ },
+ "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.2.x-dev",
+ "dev-develop": "1.3.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"
+ ],
+ "funding": [
+ {
+ "url": "https://funding.communitybridge.org/projects/laminas-project",
+ "type": "community_bridge"
+ }
+ ],
+ "time": "2020-06-03T15:52:17+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.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/laminas/laminas-zendframework-bridge.git",
+ "reference": "6ede70583e101030bcace4dcddd648f760ddf642"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642",
+ "reference": "6ede70583e101030bcace4dcddd648f760ddf642",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3",
+ "squizlabs/php_codesniffer": "^3.5"
+ },
+ "type": "library",
+ "extra": {
+ "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"
+ ],
+ "funding": [
+ {
+ "url": "https://funding.communitybridge.org/projects/laminas-project",
+ "type": "community_bridge"
+ }
+ ],
+ "time": "2020-09-14T14:23:00+00:00"
+ },
+ {
+ "name": "nicolus/picofeed",
+ "version": "0.1.43",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nicolus/picoFeed.git",
+ "reference": "e6bfe8d30009603702d1bff46a7abf8bfb25f8a8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nicolus/picoFeed/zipball/e6bfe8d30009603702d1bff46a7abf8bfb25f8a8",
+ "reference": "e6bfe8d30009603702d1bff46a7abf8bfb25f8a8",
"shasum": ""
},
"require": {
@@ -157,16 +681,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"
@@ -184,11 +714,14 @@
"authors": [
{
"name": "Frédéric Guillot"
+ },
+ {
+ "name": "Nicolas Bailly"
}
],
- "description": "Modern library to handle RSS/Atom feeds",
- "homepage": "https://github.com/miniflux/picoFeed",
- "time": "2017-11-30T00:16:58+00:00"
+ "description": "RSS/Atom parsing library",
+ "homepage": "https://github.com/nicolus/picoFeed",
+ "time": "2020-09-15T07:28:23+00:00"
},
{
"name": "psr/http-factory",
@@ -346,202 +879,357 @@
"time": "2018-10-30T16:46:14+00:00"
},
{
- "name": "zendframework/zend-diactoros",
- "version": "2.1.5",
+ "name": "psr/log",
+ "version": "1.1.3",
"source": {
"type": "git",
- "url": "https://github.com/zendframework/zend-diactoros.git",
- "reference": "6dcf9e760a6b476f3e9d80abbc9ce9c4aa921f9c"
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/6dcf9e760a6b476f3e9d80abbc9ce9c4aa921f9c",
- "reference": "6dcf9e760a6b476f3e9d80abbc9ce9c4aa921f9c",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
+ "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"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"
+ "php": ">=5.3.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"
+ "dev-master": "1.1.x-dev"
}
},
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "time": "2020-03-23T09:12:05+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/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/"
- }
+ "src/getallheaders.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "BSD-3-Clause"
+ "MIT"
],
- "description": "PSR HTTP Message implementations",
- "keywords": [
- "http",
- "psr",
- "psr-7"
+ "authors": [
+ {
+ "name": "Ralph Khattar",
+ "email": "ralph.khattar@gmail.com"
+ }
],
- "time": "2019-10-10T17:38:20+00:00"
+ "description": "A polyfill for getallheaders.",
+ "time": "2019-03-08T08:55:37+00:00"
},
{
- "name": "zendframework/zend-httphandlerrunner",
- "version": "1.1.0",
+ "name": "symfony/polyfill-intl-idn",
+ "version": "v1.20.0",
"source": {
"type": "git",
- "url": "https://github.com/zendframework/zend-httphandlerrunner.git",
- "reference": "75fb12751fe9d6e392cce1ee0d687dacae2db787"
+ "url": "https://github.com/symfony/polyfill-intl-idn.git",
+ "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/zendframework/zend-httphandlerrunner/zipball/75fb12751fe9d6e392cce1ee0d687dacae2db787",
- "reference": "75fb12751fe9d6e392cce1ee0d687dacae2db787",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3b75acd829741c768bc8b1f84eb33265e7cc5117",
+ "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117",
"shasum": ""
},
"require": {
- "php": "^7.1",
- "psr/http-message": "^1.0",
- "psr/http-message-implementation": "^1.0",
- "psr/http-server-handler": "^1.0"
+ "php": ">=7.1",
+ "symfony/polyfill-intl-normalizer": "^1.10",
+ "symfony/polyfill-php72": "^1.10"
},
- "require-dev": {
- "phpunit/phpunit": "^7.0.2",
- "zendframework/zend-coding-standard": "~1.0.0",
- "zendframework/zend-diactoros": "^1.7 || ^2.1.1"
+ "suggest": {
+ "ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev",
- "dev-develop": "1.2.x-dev"
+ "dev-main": "1.20-dev"
},
- "zf": {
- "config-provider": "Zend\\HttpHandlerRunner\\ConfigProvider"
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
- "Zend\\HttpHandlerRunner\\": "src/"
- }
+ "Symfony\\Polyfill\\Intl\\Idn\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "BSD-3-Clause"
+ "MIT"
],
- "description": "Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.",
+ "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": [
- "ZendFramework",
- "components",
- "expressive",
- "psr-15",
- "psr-7",
- "zf"
+ "compatibility",
+ "idn",
+ "intl",
+ "polyfill",
+ "portable",
+ "shim"
],
- "time": "2019-02-19T18:20:34+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-10-23T14:02:19+00:00"
},
{
- "name": "zendframework/zendxml",
- "version": "1.2.0",
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "v1.20.0",
"source": {
"type": "git",
- "url": "https://github.com/zendframework/ZendXml.git",
- "reference": "eceab37a591c9e140772a1470338258857339e00"
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "727d1096295d807c309fb01a851577302394c897"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/zendframework/ZendXml/zipball/eceab37a591c9e140772a1470338258857339e00",
- "reference": "eceab37a591c9e140772a1470338258857339e00",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897",
+ "reference": "727d1096295d807c309fb01a851577302394c897",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": ">=7.1"
},
- "require-dev": {
- "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4",
- "zendframework/zend-coding-standard": "~1.0.0"
+ "suggest": {
+ "ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev",
- "dev-develop": "1.3.x-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
- "ZendXml\\": "src/"
- }
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
+ ]
},
"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": "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": [
- "ZendFramework",
- "security",
- "xml",
- "zf"
+ "compatibility",
+ "intl",
+ "normalizer",
+ "polyfill",
+ "portable",
+ "shim"
],
- "time": "2019-01-22T19:42:14+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-10-23T14:02:19+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php72",
+ "version": "v1.20.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php72.git",
+ "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930",
+ "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.20-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-10-23T14:02:19+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": {
@@ -552,7 +1240,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": [],
@@ -561,11 +1258,15 @@
"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"
+ },
+ "plugin-api-version": "1.1.0"
}
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/010_Requirements.md b/docs/en/020_Getting_Started/010_Requirements.md
index ba1b06d5..7b3b6ef1 100644
--- a/docs/en/020_Getting_Started/010_Requirements.md
+++ b/docs/en/020_Getting_Started/010_Requirements.md
@@ -1,13 +1,14 @@
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:
- [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.
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/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..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
@@ -13,9 +13,9 @@
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.
+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
diff --git a/docs/en/040_Compatible_Clients.md b/docs/en/040_Compatible_Clients.md
index 279c25f5..9122387f 100644
--- a/docs/en/040_Compatible_Clients.md
+++ b/docs/en/040_Compatible_Clients.md
@@ -50,7 +50,17 @@ The Arsse does not at this time have any first party clients. However, because T
- Reeder |
+ NewsFlash |
+ Linux |
+ ✘ |
+ ✘ |
+ ✔ |
+
+ Successor to FeedReader.
+ |
+
+
+ Reeder |
macOS |
✘ |
✘ |
@@ -155,7 +165,7 @@ The Arsse does not at this time have any first party clients. However, because T
- Reeder |
+ Reeder |
iOS |
✘ |
✘ |
@@ -185,7 +195,7 @@ The Arsse does not at this time have any first party clients. However, because T
- Unread |
+ Unread |
iOS |
✘ |
✘ |
@@ -225,7 +235,17 @@ The Arsse does not at this time have any first party clients. However, because T
- ReadKit |
+ Newsie |
+ Ubuntu Touch |
+ ✔ |
+ ✘ |
+ ✘ |
+
+ Does not support HTTP authentication.
+ |
+
+
+ ReadKit |
macOS |
✘ |
✘ |
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/lib/AbstractException.php b/lib/AbstractException.php
index 0165d464..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,
@@ -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,
@@ -82,6 +83,8 @@ abstract class AbstractException extends \Exception {
"Feed/Exception.timeout" => 10505,
"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/Arsse.php b/lib/Arsse.php
index c122e897..7d53a427 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";
+ public const VERSION = "0.8.5";
/** @var Lang */
public static $lang;
@@ -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 702b9f52..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 = <<usage($argv0), [
@@ -209,7 +210,7 @@ USAGE_TEXT;
} // @codeCoverageIgnore
/** @codeCoverageIgnore */
- protected function logError(string $msg) {
+ protected function logError(string $msg): void {
fwrite(STDERR, $msg.\PHP_EOL);
}
@@ -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));
@@ -267,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..2de8addb 100644
--- a/lib/Conf.php
+++ b/lib/Conf.php
@@ -15,113 +15,113 @@ 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 = [
+ protected const TYPE_NAMES = [
Value::T_BOOL => "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",
@@ -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 62434a53..48d29863 100644
--- a/lib/Database.php
+++ b/lib/Database.php
@@ -40,22 +40,22 @@ use JKingWeb\Arsse\Misc\URL;
class Database {
/** The version number of the latest schema the interface is aware of */
const SCHEMA_VERSION = 7;
- /** 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;
/** 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;
@@ -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)) {
@@ -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
@@ -500,7 +500,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");
@@ -585,10 +585,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();
}
@@ -618,7 +618,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
@@ -645,7 +645,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,
@@ -750,14 +750,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) {
@@ -779,7 +779,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)");
}
@@ -882,7 +882,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;
@@ -933,7 +933,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): ?\DateTimeImmutable {
if (!Arsse::$user->authorize($user, __FUNCTION__)) {
throw new User\ExceptionAuthz("notAuthorized", ["action" => __FUNCTION__, "user" => $user]);
}
@@ -1145,7 +1145,7 @@ class Database {
'str',
'str',
'datetime',
- 'str',
+ 'strict str',
'datetime',
'int',
'int'
@@ -1221,10 +1221,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))",
@@ -1243,27 +1243,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",
];
}
@@ -1360,7 +1360,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;
@@ -1369,7 +1369,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
@@ -1384,7 +1384,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;
@@ -1393,7 +1393,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
@@ -1410,13 +1410,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],
@@ -1424,13 +1424,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],
@@ -1453,7 +1453,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 = "= ?";
@@ -1465,7 +1465,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 = "= ?";
@@ -1492,27 +1492,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()) {
- 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]);
+ $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()) {
- 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]);
+ $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)");
}
@@ -1624,9 +1624,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;
@@ -1665,7 +1665,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());
}
@@ -1689,7 +1689,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();
}
@@ -1861,7 +1861,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")) : [];
}
@@ -2019,7 +2019,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;
@@ -2087,7 +2087,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)";
@@ -2113,7 +2113,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();
@@ -2322,7 +2322,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;
@@ -2386,7 +2386,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)";
@@ -2412,7 +2412,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/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/AbstractStatement.php b/lib/Db/AbstractStatement.php
index 45b6801e..dab1e033 100644
--- a/lib/Db/AbstractStatement.php
+++ b/lib/Db/AbstractStatement.php
@@ -12,13 +12,13 @@ use JKingWeb\Arsse\Misc\ValueInfo;
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,
+ 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,
+ 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/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 0f8712b5..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;
@@ -158,12 +158,12 @@ 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);
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 4439b33c..e669fca7 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",
@@ -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..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",
@@ -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..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,
@@ -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 94497ddf..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;
@@ -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 != "") {
@@ -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);
@@ -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 c754a38f..93daf667 100644
--- a/lib/Db/PostgreSQL/PDODriver.php
+++ b/lib/Db/PostgreSQL/PDODriver.php
@@ -18,11 +18,11 @@ 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, [
- \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..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",
@@ -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 d0866c02..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;
@@ -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");
}
@@ -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 12ffc973..506c46a2 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,
]);
@@ -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..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,
@@ -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/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.php b/lib/Feed.php
index 767063c1..e6a8ebcf 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();
@@ -100,6 +100,8 @@ class Feed {
$client->reader = $reader;
return $client;
} catch (PicoFeedException $e) {
+ throw new Feed\Exception($url, $e); // @codeCoverageIgnore
+ } catch (\GuzzleHttp\Exception\GuzzleException $e) {
throw new Feed\Exception($url, $e);
}
}
@@ -115,12 +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) { // @codeCoverageIgnore
+ throw new Feed\Exception($this->resource->getUrl(), $e); // @codeCoverageIgnore
}
// PicoFeed does not provide valid ids when there is no id element. Its solution
@@ -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]) {
@@ -390,7 +390,7 @@ class Feed {
return $offset;
}
- protected function computeLastModified() {
+ protected function computeLastModified(): ?\DateTimeImmutable {
if (!$this->modified) {
return $this->lastModified; // @codeCoverageIgnore
}
diff --git a/lib/Feed/Exception.php b/lib/Feed/Exception.php
index 91fe085c..2bf181e6 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\BadResponseException;
+use GuzzleHttp\Exception\GuzzleException;
+use GuzzleHttp\Exception\TooManyRedirectsException;
+use PicoFeed\PicoFeedException;
+
class Exception extends \JKingWeb\Arsse\AbstractException {
+ 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) {
- $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 BadResponseException) {
+ $msgID = self::HTTP_ERROR_MAP[$e->getCode()] ?? "transmissionError";
+ } elseif ($e instanceof TooManyRedirectsException) {
+ $msgID = "maxRedirect";
+ } elseif ($e instanceof GuzzleException) {
+ $msg = $e->getMessage();
+ if (preg_match("/^Error creating resource:/", $msg)) {
+ // PHP stream error; the class of error is ambiguous
+ $msgID = "transmissionError";
+ } elseif (preg_match("/^cURL error (\d+):/", $msg, $match)) {
+ $msgID = self::CURL_ERROR_MAP[(int) $match[1]] ?? "internalError";
+ } else {
+ $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) : "internalError";
+ } else {
+ $msgID = "internalError";
+ }
parent::__construct($msgID, ['url' => $url], $e);
}
}
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..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',
@@ -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/Date.php b/lib/Misc/Date.php
index f4b34850..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) {
+ public static function normalize($date, string $inFormat = null): ?\DateTimeImmutable {
return ValueInfo::normalize($date, ValueInfo::T_DATE, $inFormat);
}
- public static function add($interval, $date = "now") {
+ public static function add($interval, $date = "now"): ?\DateTimeImmutable {
return self::modify("add", $interval, $date);
}
- public static function sub($interval, $date = "now") {
+ public static function sub($interval, $date = "now"): ?\DateTimeImmutable {
return self::modify("sub", $interval, $date);
}
- protected static function modify(string $func, $interval, $date) {
+ 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/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 5e8d0eb1..42d60194 100644
--- a/lib/Misc/URL.php
+++ b/lib/Misc/URL.php
@@ -84,7 +84,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 1b3d2608..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
@@ -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;
@@ -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.php b/lib/REST.php
index b1fc354e..bf14369b 100644
--- a/lib/REST.php
+++ b/lib/REST.php
@@ -6,17 +6,16 @@
declare(strict_types=1);
namespace JKingWeb\Arsse;
-use JKingWeb\Arsse\Arsse;
use JKingWeb\Arsse\Misc\ValueInfo;
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 = [
+ public const API_LIST = [
'ncn' => [ // Nextcloud News version enumerator
'match' => '/index.php/apps/news/api',
'strip' => '/index.php/apps/news/api',
@@ -66,7 +65,7 @@ class REST {
// Proprietary (centralized) entities:
// Feedly https://developer.feedly.com/
];
- const DEFAULT_PORTS = [
+ protected const DEFAULT_PORTS = [
'http' => 80,
'https' => 443,
];
@@ -81,7 +80,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
@@ -118,7 +117,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)) {
@@ -213,7 +212,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 1569c928..1901397f 100644
--- a/lib/REST/Fever/API.php
+++ b/lib/REST/Fever/API.php
@@ -14,20 +14,20 @@ 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;
- 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_TYPES = ["application/x-www-form-urlencoded", "multipart/form-data"];
// 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,
@@ -67,16 +67,17 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler {
switch ($req->getMethod()) {
case "OPTIONS":
return new EmptyResponse(204, [
- 'Allow' => "POST",
- 'Accept' => self::ACCEPTED_TYPE,
+ 'Allow' => "POST",
+ '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,
- 'auth' => 0,
+ 'auth' => 0,
];
if ($req->getAttribute("authenticated", false)) {
// if HTTP authentication was successfully used, set the expected user ID
@@ -153,7 +154,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 +179,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
@@ -306,7 +307,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 +323,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");
}
@@ -346,7 +347,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 8e850d28..c7389df8 100644
--- a/lib/REST/NextcloudNews/V1_2.php
+++ b/lib/REST/NextcloudNews/V1_2.php
@@ -14,17 +14,18 @@ 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;
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";
- 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";
@@ -214,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",
@@ -615,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) {
@@ -628,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'] ?? []);
@@ -642,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"));
@@ -655,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,
]);
}
@@ -675,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 78d4ac7f..8337736b 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() {
@@ -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 56a24374..2df402a0 100644
--- a/lib/REST/TinyTinyRSS/API.php
+++ b/lib/REST/TinyTinyRSS/API.php
@@ -20,31 +20,31 @@ 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
- 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"],
@@ -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/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/lib/REST/TinyTinyRSS/Search.php b/lib/REST/TinyTinyRSS/Search.php
index f7913616..ea3dbe65 100644
--- a/lib/REST/TinyTinyRSS/Search.php
+++ b/lib/REST/TinyTinyRSS/Search.php
@@ -10,33 +10,32 @@ 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",
"" => "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
- $tokens = [];
$pos = -1;
$stop = strlen($search);
$state = self::STATE_BEFORE_TOKEN;
diff --git a/lib/Service.php b/lib/Service.php
index ed234d68..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,
];
@@ -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..f5299914 100644
--- a/lib/User.php
+++ b/lib/User.php
@@ -9,15 +9,13 @@ namespace JKingWeb\Arsse;
use PasswordGenerator\Generator as PassGen;
class User {
- const DRIVER_NAMES = [
+ public const DRIVER_NAMES = [
'internal' => \JKingWeb\Arsse\User\Internal\Driver::class,
];
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/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/lib/User/Internal/Driver.php b/lib/User/Internal/Driver.php
index d50777a1..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);
@@ -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/locale/en.php b/locale/en.php
index e095db8a..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',
@@ -151,6 +152,8 @@ return [
'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.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/package.json b/package.json
index 7f2e07ed..e7a3b351 100644
--- a/package.json
+++ b/package.json
@@ -1,16 +1,17 @@
{
- "devDependencies": {
- "autoprefixer": "^9.6.1",
- "postcss-cli": "^6.1.3",
- "postcss-color-function": "^4.1.0",
- "postcss-csso": "^3.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/tests/cases/CLI/TestCLI.php b/tests/cases/CLI/TestCLI.php
index 0009d405..e6c19e2d 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;
@@ -18,12 +19,13 @@ 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) {
+ 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) {
@@ -34,27 +36,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() {
+ public function testPrintVersion(): void {
$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) {
+ public function testPrintHelp(string $cmd, string $name): void {
$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 {
@@ -68,33 +58,33 @@ 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);
$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);
}
- 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);
$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);
}
/** @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));
+ \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);
- $this->assertLoaded(true);
+ \Phake::verify($this->cli)->loadConf;
\Phake::verify(Arsse::$db)->feedUpdate;
}
@@ -106,14 +96,14 @@ 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);
\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);
}
@@ -127,7 +117,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);
@@ -146,7 +136,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) {
@@ -169,14 +159,14 @@ 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) {
- 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);
@@ -203,7 +193,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) {
@@ -223,7 +213,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":
@@ -253,7 +243,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":
@@ -281,14 +271,14 @@ 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);
\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);
}
@@ -322,14 +312,14 @@ 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);
\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);
}
diff --git a/tests/cases/Conf/TestConf.php b/tests/cases/Conf/TestConf.php
index f52d3b35..e99eda3e 100644
--- a/tests/cases/Conf/TestConf.php
+++ b/tests/cases/Conf/TestConf.php
@@ -38,14 +38,14 @@ 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",
+ 'lang' => "xx",
'purgeFeeds' => "P2D",
];
$conf = new Conf;
@@ -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
@@ -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());
@@ -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
@@ -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);
@@ -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..2f78e9c1 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' => [
@@ -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,16 +404,16 @@ 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";
}
- 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);
@@ -421,149 +421,150 @@ 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]],
- '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, $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"]), []],
+ '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() {
+ 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)));
}
- 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 +578,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,18 +596,18 @@ 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() {
- Arsse::$db->articleMark($this->user, ['read'=>false]);
+ public function testMarkAllArticlesUnread(): void {
+ 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;
@@ -616,8 +617,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkAllArticlesRead() {
- Arsse::$db->articleMark($this->user, ['read'=>true]);
+ public function testMarkAllArticlesRead(): void {
+ 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;
@@ -631,8 +632,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkAllArticlesUnstarred() {
- Arsse::$db->articleMark($this->user, ['starred'=>false]);
+ public function testMarkAllArticlesUnstarred(): void {
+ 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;
@@ -642,8 +643,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkAllArticlesStarred() {
- Arsse::$db->articleMark($this->user, ['starred'=>true]);
+ public function testMarkAllArticlesStarred(): void {
+ 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;
@@ -657,8 +658,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkAllArticlesUnreadAndUnstarred() {
- Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>false]);
+ 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);
$state['arsse_marks']['rows'][9][2] = 0;
@@ -671,8 +672,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkAllArticlesReadAndStarred() {
- Arsse::$db->articleMark($this->user, ['read'=>true,'starred'=>true]);
+ 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);
$state['arsse_marks']['rows'][8][2] = 1;
@@ -689,8 +690,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkAllArticlesUnreadAndStarred() {
- Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true]);
+ 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);
$state['arsse_marks']['rows'][8][3] = 1;
@@ -707,8 +708,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkAllArticlesReadAndUnstarred() {
- Arsse::$db->articleMark($this->user, ['read'=>true,'starred'=>false]);
+ 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);
$state['arsse_marks']['rows'][8][2] = 1;
@@ -725,8 +726,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testSetNoteForAllArticles() {
- Arsse::$db->articleMark($this->user, ['note'=>"New note"]);
+ public function testSetNoteForAllArticles(): void {
+ 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";
@@ -744,8 +745,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkATreeFolder() {
- Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(7));
+ 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);
$state['arsse_marks']['rows'][] = [13,5,1,0,$now,''];
@@ -755,8 +756,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkALeafFolder() {
- Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->folder(8));
+ 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);
$state['arsse_marks']['rows'][] = [13,5,1,0,$now,''];
@@ -764,13 +765,13 @@ 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));
+ Arsse::$db->articleMark($this->user, ['read' => true], (new Context)->folder(42));
}
- public function testMarkASubscription() {
- Arsse::$db->articleMark($this->user, ['read'=>true], (new Context)->subscription(13));
+ 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);
$state['arsse_marks']['rows'][] = [13,5,1,0,$now,''];
@@ -778,13 +779,13 @@ 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));
+ Arsse::$db->articleMark($this->user, ['read' => true], (new Context)->folder(2112));
}
- public function testMarkAnArticle() {
- Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->article(20));
+ 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);
$state['arsse_marks']['rows'][9][3] = 1;
@@ -792,8 +793,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkMultipleArticles() {
- Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->articles([2,4,7,20]));
+ 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);
$state['arsse_marks']['rows'][9][3] = 1;
@@ -802,8 +803,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkMultipleArticlessUnreadAndStarred() {
- Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->articles([2,4,7,20]));
+ 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);
$state['arsse_marks']['rows'][9][2] = 0;
@@ -815,17 +816,18 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkTooManyMultipleArticles() {
- $this->assertSame(7, Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3))));
+ public function testMarkTooManyMultipleArticles(): void {
+ $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() {
+ 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() {
- Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->edition(1001));
+ 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);
$state['arsse_marks']['rows'][9][3] = 1;
@@ -833,8 +835,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkMultipleEditions() {
- Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->editions([2,4,7,20]));
+ 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);
$state['arsse_marks']['rows'][9][3] = 1;
@@ -843,14 +845,14 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkMultipleMissingEditions() {
- $this->assertSame(0, Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->editions([500,501])));
+ 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() {
- Arsse::$db->articleMark($this->user, ['read'=>false], (new Context)->editions([2,4,7,1001]));
+ 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);
$state['arsse_marks']['rows'][9][2] = 0;
@@ -860,8 +862,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkMultipleEditionsUnreadWithStale() {
- Arsse::$db->articleMark($this->user, ['read'=>false], (new Context)->editions([2,4,7,20]));
+ 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);
$state['arsse_marks']['rows'][11][2] = 0;
@@ -869,8 +871,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkMultipleEditionsUnreadAndStarredWithStale() {
- Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->editions([2,4,7,20]));
+ 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);
$state['arsse_marks']['rows'][9][3] = 1;
@@ -881,18 +883,18 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkTooManyMultipleEditions() {
- $this->assertSame(7, Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->editions(range(1, 51))));
+ 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() {
- Arsse::$db->articleMark($this->user, ['read'=>false], (new Context)->edition(20)); // no changes occur
+ 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() {
- Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->edition(20));
+ 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);
$state['arsse_marks']['rows'][9][3] = 1;
@@ -900,8 +902,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkAStaleEditionUnreadAndStarred() {
- Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->edition(20)); // only starred is changed
+ 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);
$state['arsse_marks']['rows'][9][3] = 1;
@@ -909,19 +911,19 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkAStaleEditionUnreadAndUnstarred() {
- Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>false], (new Context)->edition(20)); // no changes occur
+ 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));
+ Arsse::$db->articleMark($this->user, ['starred' => true], (new Context)->edition(2));
}
- public function testMarkByOldestEdition() {
- Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->oldestEdition(19));
+ 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);
$state['arsse_marks']['rows'][8][3] = 1;
@@ -931,8 +933,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkByLatestEdition() {
- Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->latestEdition(20));
+ 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);
$state['arsse_marks']['rows'][8][3] = 1;
@@ -944,8 +946,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkByLastMarked() {
- Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->markedSince('2017-01-01T00:00:00Z'));
+ 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);
$state['arsse_marks']['rows'][8][3] = 1;
@@ -955,8 +957,8 @@ trait SeriesArticle {
$this->compareExpectations(static::$drv, $state);
}
- public function testMarkByNotLastMarked() {
- Arsse::$db->articleMark($this->user, ['starred'=>true], (new Context)->notMarkedSince('2000-01-01T00:00:00Z'));
+ 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);
$state['arsse_marks']['rows'][] = [13,5,0,1,$now,''];
@@ -964,55 +966,56 @@ 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]);
+ Arsse::$db->articleMark($this->user, ['read' => false]);
}
- public function testCountArticles() {
+ 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() {
+ 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 +1024,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 +1044,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..ad40dcb3 100644
--- a/tests/cases/Database/SeriesCleanup.php
+++ b/tests/cases/Database/SeriesCleanup.php
@@ -7,22 +7,24 @@ declare(strict_types=1);
namespace JKingWeb\Arsse\TestCase\Database;
use JKingWeb\Arsse\Arsse;
+use DateTimeImmutable as Date;
trait SeriesCleanup {
- protected function setUpSeriesCleanup() {
+ protected function setUpSeriesCleanup(): void {
// set up the configuration
Arsse::$conf->import([
'userSessionTimeout' => "PT1H",
'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 = (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' => [
@@ -53,7 +55,7 @@ trait SeriesCleanup {
'columns' => [
'id' => "str",
'class' => "str",
- 'user' => "str",
+ 'user' => "str",
'expires' => "datetime",
],
'rows' => [
@@ -76,7 +78,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 +91,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 +112,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 +126,7 @@ trait SeriesCleanup {
[4,4],
[201,1],
[102,2],
- ]
+ ],
],
'arsse_marks' => [
'columns' => [
@@ -142,20 +144,20 @@ trait SeriesCleanup {
[8,1,1,0,$weeksago],
[9,1,1,0,$daysago],
[9,2,1,0,$daysago],
- ]
+ ],
],
];
}
- 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, [
- 'arsse_feeds' => ["id","orphaned"]
+ 'arsse_feeds' => ["id","orphaned"],
]);
$state['arsse_feeds']['rows'][0][1] = null;
unset($state['arsse_feeds']['rows'][1]);
@@ -163,24 +165,24 @@ trait SeriesCleanup {
$this->compareExpectations(static::$drv, $state);
}
- public function testCleanUpOrphanedFeedsWithUnlimitedRetention() {
+ public function testCleanUpOrphanedFeedsWithUnlimitedRetention(): void {
Arsse::$conf->import([
'purgeFeeds' => null,
]);
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;
$this->compareExpectations(static::$drv, $state);
}
- public function testCleanUpOldArticlesWithStandardRetention() {
+ 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]);
@@ -188,13 +190,13 @@ trait SeriesCleanup {
$this->compareExpectations(static::$drv, $state);
}
- public function testCleanUpOldArticlesWithUnlimitedReadRetention() {
+ public function testCleanUpOldArticlesWithUnlimitedReadRetention(): void {
Arsse::$conf->import([
'purgeArticlesRead' => null,
]);
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]);
@@ -202,13 +204,13 @@ trait SeriesCleanup {
$this->compareExpectations(static::$drv, $state);
}
- public function testCleanUpOldArticlesWithUnlimitedUnreadRetention() {
+ public function testCleanUpOldArticlesWithUnlimitedUnreadRetention(): void {
Arsse::$conf->import([
'purgeArticlesUnread' => null,
]);
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]);
@@ -216,22 +218,22 @@ trait SeriesCleanup {
$this->compareExpectations(static::$drv, $state);
}
- public function testCleanUpOldArticlesWithUnlimitedRetention() {
+ 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);
}
- public function testCleanUpExpiredSessions() {
+ 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]);
@@ -239,10 +241,10 @@ 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"]
+ '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 8db02351..d4a75213 100644
--- a/tests/cases/Database/SeriesFeed.php
+++ b/tests/cases/Database/SeriesFeed.php
@@ -9,9 +9,9 @@ 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"));
+ $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 = [
@@ -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");
@@ -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],
@@ -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..6d69f64a 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' => [
@@ -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,16 +88,16 @@ trait SeriesFolder {
[9, "jane.doe@example.com",2, 4],
[10,"jane.doe@example.com",3, 4],
[11,"jane.doe@example.com",4, 4],
- ]
+ ],
],
];
}
- 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..db9c4989 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' => [
@@ -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],
@@ -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..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() {
+ 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..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() {
+ 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..9a354f66 100644
--- a/tests/cases/Database/SeriesSession.php
+++ b/tests/cases/Database/SeriesSession.php
@@ -10,14 +10,14 @@ 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",
'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"));
@@ -49,18 +49,18 @@ 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"
+ '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"));
@@ -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..d8614e24 100644
--- a/tests/cases/Database/SeriesSubscription.php
+++ b/tests/cases/Database/SeriesSubscription.php
@@ -6,12 +6,13 @@
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;
trait SeriesSubscription {
- public function setUpSeriesSubscription() {
+ public function setUpSeriesSubscription(): void {
$this->data = [
'arsse_users' => [
'columns' => [
@@ -37,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' => [
@@ -50,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' => [
@@ -66,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' => [
@@ -83,9 +84,9 @@ trait SeriesSubscription {
],
'arsse_tag_members' => [
'columns' => [
- 'tag' => "int",
+ 'tag' => "int",
'subscription' => "int",
- 'assigned' => "bool",
+ 'assigned' => "bool",
],
'rows' => [
[1,1,1],
@@ -112,7 +113,7 @@ trait SeriesSubscription {
[6,3,"","",""],
[7,3,"","",""],
[8,3,"","",""],
- ]
+ ],
],
'arsse_marks' => [
'columns' => [
@@ -130,7 +131,7 @@ trait SeriesSubscription {
[1,1,1,0],
[7,3,1,0],
[8,3,0,0],
- ]
+ ],
],
];
$this->data['arsse_feeds']['rows'] = [
@@ -143,11 +144,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 +163,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 +180,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,10 +198,10 @@ 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()));
+ \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);
@@ -215,19 +216,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 +236,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 +254,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 +304,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 +319,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,54 +334,54 @@ 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,
- 'pinned' => false,
+ 'title' => "Ook Ook",
+ 'folder' => 3,
+ 'pinned' => false,
'order_type' => 0,
]);
\Phake::verify(Arsse::$user)->authorize($this->user, "subscriptionPropertiesSet");
@@ -400,56 +401,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 +466,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 +480,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 +488,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..f6a3f4ea 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' => [
@@ -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],
@@ -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..aad4a875 100644
--- a/tests/cases/Database/SeriesToken.php
+++ b/tests/cases/Database/SeriesToken.php
@@ -9,9 +9,9 @@ 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"));
+ $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' => [
@@ -43,25 +43,25 @@ trait SeriesToken {
];
}
- protected function tearDownSeriesToken() {
+ protected function tearDownSeriesToken(): void {
unset($this->data);
}
- public function testLookUpAValidToken() {
+ 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"));
@@ -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..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() {
+ 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..cfaed762 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();
@@ -28,17 +28,17 @@ 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));
}
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, "''"));
@@ -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"],
@@ -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];
@@ -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/Db/BaseDriver.php b/tests/cases/Db/BaseDriver.php
index 59165a1b..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,113 +75,113 @@ 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..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();
@@ -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..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();
@@ -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");
@@ -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 0c78dccb..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");
@@ -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..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() {
+ 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..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() {
+ 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..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() {
+ 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..606dc8df 100644
--- a/tests/cases/Db/PostgreSQL/TestCreation.php
+++ b/tests/cases/Db/PostgreSQL/TestCreation.php
@@ -18,9 +18,9 @@ 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) {
+ 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..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) {
+ 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..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' => "",
],
@@ -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..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' => "",
],
@@ -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..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() {
+ 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..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() {
+ 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..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() {
+ 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..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() {
+ 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/TestException.php b/tests/cases/Feed/TestException.php
new file mode 100644
index 00000000..95adde1d
--- /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 04d2194b..01f4f5f1 100644
--- a/tests/cases/Feed/TestFeed.php
+++ b/tests/cases/Feed/TestFeed.php
@@ -14,76 +14,75 @@ 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/";
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',
],
];
@@ -98,7 +97,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 +140,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,25 +197,27 @@ class TestFeed extends \JKingWeb\Arsse\Test\AbstractTest {
$this->assertSame("http://example.com/1", $f->newItems[0]->url);
}
- public function testHandleCacheHeadersOn304() {
- // 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 testHandleCacheHeadersOn200() {
+ 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;
$f = new Feed(null, $this->base."Caching/200Past");
@@ -244,7 +245,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 +258,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);
@@ -266,26 +267,26 @@ 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"],
];
}
- 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 +313,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 +329,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 +337,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..3ce3e8d2 100644
--- a/tests/cases/Feed/TestFetching.php
+++ b/tests/cases/Feed/TestFetching.php
@@ -27,48 +27,49 @@ class TestFetching extends \JKingWeb\Arsse\Test\AbstractTest {
self::setConf();
}
- public function testHandle400() {
- $this->assertException("unsupportedFeedFormat", "Feed");
+ public function testHandle400(): void {
+ $this->assertException("transmissionError", "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() {
- $this->assertException("unsupportedFeedFormat", "Feed");
+ public function testHandle500(): void {
+ $this->assertException("transmissionError", "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 {
+ $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");
}
- 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..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) {
+ 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..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],
@@ -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"]],
@@ -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],
@@ -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"]],
@@ -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],
@@ -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..1e65fa1e 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));
@@ -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/Lang/TestBasic.php b/tests/cases/Lang/TestBasic.php
index de4b54c4..f94b4f35 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,15 +36,16 @@ class TestBasic extends \JKingWeb\Arsse\Test\AbstractTest {
/**
* @depends testSetLanguage
*/
- public function testLoadInternalStrings() {
+ 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());
}
/**
* @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 +55,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..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() {
+ 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..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() {
+ 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..037ca8e1 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,46 +23,46 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest {
}
}
- public function testSetContextOptions() {
+ 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;
@@ -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..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() {
+ 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 70d1316b..9bffe073 100644
--- a/tests/cases/Misc/TestHTTP.php
+++ b/tests/cases/Misc/TestHTTP.php
@@ -7,19 +7,18 @@ 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 {
/** @dataProvider provideMediaTypes */
- public function testMatchMediaType(string $header, array $types, bool $exp) {
- $msg = (new \Zend\Diactoros\Request)->withHeader("Content-Type", $header);
+ 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 \Zend\Diactoros\Response)->withHeader("Content-Type", $header);
+ $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..db8a6295 100644
--- a/tests/cases/Misc/TestQuery.php
+++ b/tests/cases/Misc/TestQuery.php
@@ -7,18 +7,17 @@ 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 {
- 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 +45,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 +77,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 +89,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 +99,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 64645eae..1b6fff96 100644
--- a/tests/cases/Misc/TestURL.php
+++ b/tests/cases/Misc/TestURL.php
@@ -13,9 +13,9 @@ 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) {
+ public function testNormalizeAUrl(string $url, string $exp, string $user = null, string $pass = null): void {
$this->assertSame($exp, URL::normalize($url, $user, $pass));
}
@@ -78,7 +78,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));
}
@@ -94,11 +94,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..efa1becf 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],
@@ -87,11 +87,11 @@ 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));
}
}
- public function testGetStringInfo() {
+ public function testGetStringInfo(): void {
$tests = [
[null, I::NULL],
["", I::VALID | I::EMPTY],
@@ -157,12 +157,12 @@ 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));
}
}
- public function testValidateDatabaseIdentifier() {
+ public function testValidateDatabaseIdentifier(): void {
$tests = [
[null, false, true],
["", false, true],
@@ -228,13 +228,13 @@ 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));
}
}
- public function testValidateBoolean() {
+ public function testValidateBoolean(): void {
$tests = [
[null, null],
["", false],
@@ -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));
@@ -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,24 +397,25 @@ 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] ],
+ [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
+ $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'");
}
@@ -525,15 +526,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 +543,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 +573,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 +615,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];
}
}
@@ -640,7 +641,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 ad54243c..d0632c97 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 {
@@ -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,
],
],
@@ -173,10 +173,10 @@ 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,
+ 'userSessionEnforced' => $tokenEnforced,
], true);
Arsse::$user->id = null;
\Phake::when(Arsse::$db)->tokenLookup->thenThrow(new ExceptionInput("subjectMissing"));
@@ -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,13 +299,13 @@ 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']));
\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"));
@@ -329,31 +329,25 @@ 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));
\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() {
+ 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")));
}
/** @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 +365,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,33 +421,35 @@ 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));
}
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([])],
];
}
- 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"));
$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,13 +457,13 @@ 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);
}
- 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,9 +479,9 @@ 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'],
+ 'items' => $this->articles['rest'],
'total_items' => 1024,
]);
$exp = new XmlResponse("- 1018Article title 1<p>Article content 1</p>http://example.com/100946684800
- 1028Article title 2<p>Article content 2</p>http://example.com/201946771200
- 1039Article title 3<p>Article content 3</p>http://example.com/310946857600
- 1049Article title 4<p>Article content 4</p>http://example.com/411946944000
- 10510Article title 5<p>Article content 5</p>http://example.com/500947030400
1024");
@@ -493,17 +489,19 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest {
$this->assertMessage($exp, $act);
}
- public function testListFeedIcons() {
+ 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);
}
- public function testAnswerOptionsRequest() {
+ public function testAnswerOptionsRequest(): void {
$act = $this->h->dispatch($this->req("api", "", "OPTIONS"));
$exp = new EmptyResponse(204, [
- 'Allow' => "POST",
- 'Accept' => "application/x-www-form-urlencoded",
+ 'Allow' => "POST",
+ 'Accept' => "application/x-www-form-urlencoded, multipart/form-data",
]);
$this->assertMessage($exp, $act);
}
diff --git a/tests/cases/REST/Fever/TestUser.php b/tests/cases/REST/Fever/TestUser.php
index 481057a2..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) {
+ 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 9c8fd5a5..5e8c7d13 100644
--- a/tests/cases/REST/NextcloudNews/TestV1_2.php
+++ b/tests/cases/REST/NextcloudNews/TestV1_2.php
@@ -16,292 +16,298 @@ 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;
+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 {
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' => [
[
- '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',
],
],
];
- 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();
}
@@ -325,58 +333,45 @@ 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));
}
- 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"],
- ],
- ],
- ];
- 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.");
- }
- }
+ /** @dataProvider provideInvalidPaths */
+ 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 testRespondToInvalidInputTypes() {
+ public function provideInvalidPaths(): array {
+ 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"],
+ ];
+ }
+
+ 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);
@@ -384,27 +379,24 @@ 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): void {
$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 testListFolders() {
+ public function provideOptionsRequests(): array {
+ return [
+ ["/feeds", "HEAD,GET,POST", "application/json"],
+ ["/feeds/2112", "DELETE", "application/json"],
+ ["/user", "HEAD,GET", "application/json"],
+ ];
+ }
+
+ public function testListFolders(): void {
$list = [
['id' => 1, 'name' => "Software", 'parent' => null],
['id' => 12, 'name' => "Hardware", 'parent' => null],
@@ -413,59 +405,43 @@ 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"],
- ];
- $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])));
+ /** @dataProvider provideFolderCreations */
+ public function testAddAFolder(array $input, bool $body, $output, ResponseInterface $exp): void {
+ 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 testRemoveAFolder() {
+ 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, 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)],
+ ];
+ }
+
+ 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"));
@@ -475,45 +451,40 @@ 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" => " "],
- [],
- ];
- \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])));
+ /** @dataProvider provideFolderRenamings */
+ public function testRenameAFolder(array $input, int $id, $output, ResponseInterface $exp): void {
+ 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 testRetrieveServerVersion() {
+ public function provideFolderRenamings(): array {
+ 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)],
+ ];
+ }
+
+ 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"));
}
- public function testListSubscriptions() {
+ public function testListSubscriptions(): void {
$exp1 = [
- 'feeds' => [],
+ 'feeds' => [],
'starredCount' => 0,
];
$exp2 = [
@@ -530,55 +501,51 @@ 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],
- [],
- ];
- $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])));
+ /** @dataProvider provideNewSubscriptions */
+ 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 {
+ \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 testRemoveASubscription() {
+ 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]]])],
+ [['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])],
+ ];
+ }
+
+ 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"));
@@ -588,13 +555,13 @@ 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],
+ ['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,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"],
@@ -646,14 +613,14 @@ 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,
+ 'id' => 42,
'userId' => "",
],
[
- 'id' => 2112,
+ 'id' => 2112,
'userId' => "",
],
];
@@ -662,13 +629,13 @@ 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
+ ['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"));
@@ -683,21 +650,21 @@ 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
- ['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"));
@@ -737,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);
@@ -752,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);
@@ -767,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);
@@ -779,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];
@@ -805,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];
@@ -860,19 +827,19 @@ 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);
\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;
@@ -880,32 +847,32 @@ 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,
- '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() {
+
+ public function testPreferJsonOverQueryParameters(): void {
$in = ['name' => "Software"];
$url = "/folders?name=Hardware";
$out1 = ['id' => 1, 'name' => "Software"];
@@ -917,8 +884,8 @@ 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() {
+
+ 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 2fc40b80..aadb88d5 100644
--- a/tests/cases/REST/NextcloudNews/TestVersions.php
+++ b/tests/cases/REST/NextcloudNews/TestVersions.php
@@ -8,9 +8,8 @@ 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\Response\JsonResponse as Response;
+use Laminas\Diactoros\Response\EmptyResponse;
/** @covers \JKingWeb\Arsse\REST\NextcloudNews\Versions */
class TestVersions extends \JKingWeb\Arsse\Test\AbstractTest {
@@ -25,24 +24,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 ef28afb4..151d41b4 100644
--- a/tests/cases/REST/TestREST.php
+++ b/tests/cases/REST/TestREST.php
@@ -15,17 +15,17 @@ 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 {
/** @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);
@@ -113,7 +113,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);
@@ -156,7 +156,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) {
@@ -194,7 +194,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);
@@ -206,59 +206,59 @@ 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",
]],
];
}
/** @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) {
@@ -293,7 +293,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'];
@@ -302,7 +302,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 d3a275ac..d5ca279f 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;
@@ -16,9 +17,8 @@ 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\Response\JsonResponse as Response;
+use Laminas\Diactoros\Response\EmptyResponse;
/** @covers \JKingWeb\Arsse\REST\TinyTinyRSS\API
* @covers \JKingWeb\Arsse\REST\TinyTinyRSS\Exception */
@@ -57,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
@@ -133,14 +133,14 @@ 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);
}
protected function respGood($content = null, $seq = 0): Response {
return new Response([
- 'seq' => $seq,
- 'status' => 0,
+ 'seq' => $seq,
+ 'status' => 0,
'content' => $content,
]);
}
@@ -148,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),
]);
}
@@ -166,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,
@@ -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,17 +236,17 @@ 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([
- '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",
@@ -273,24 +273,24 @@ 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,
+ '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"];
@@ -304,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") {
@@ -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,19 +566,19 @@ LONG_STRING;
$this->assertMessage($exp, $this->req($data));
}
- public function testRetrieveServerVersion() {
+ public function testRetrieveServerVersion(): void {
$data = [
'op' => "getVersion",
'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));
}
- 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],
@@ -785,12 +785,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 +802,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"));
@@ -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,10 +980,10 @@ 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",],
+ ['op' => "addLabel", 'sid' => "PriestsOfSyrinx", 'caption' => "Hardware"],
['op' => "addLabel", 'sid' => "PriestsOfSyrinx"],
['op' => "addLabel", 'sid' => "PriestsOfSyrinx", 'caption' => ""],
['op' => "addLabel", 'sid' => "PriestsOfSyrinx", 'caption' => " "],
@@ -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);
@@ -1025,7 +1026,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 +1054,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 +1100,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 +1172,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 +1207,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 +1252,7 @@ LONG_STRING;
}
}
- public function testAssignArticlesToALabel() {
+ public function testAssignArticlesToALabel(): void {
$list = [
range(1, 100),
range(1, 50),
@@ -1289,7 +1290,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"],
@@ -1300,13 +1301,13 @@ 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]));
}
- public function testMarkFeedsAsRead() {
+ public function testMarkFeedsAsRead(): void {
$in1 = [
// no-ops
['op' => "catchupFeed", 'sid' => "PriestsOfSyrinx"],
@@ -1357,7 +1358,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],
@@ -1412,7 +1413,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],
@@ -1449,7 +1450,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],
@@ -1506,7 +1507,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']);
@@ -1519,7 +1520,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 +1605,7 @@ LONG_STRING;
}
}
- public function testListArticles() {
+ public function testListArticles(): void {
$in = [
// error conditions
['op' => "getArticle", 'sid' => "PriestsOfSyrinx"],
@@ -1630,42 +1631,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",
@@ -1678,9 +1679,9 @@ LONG_STRING;
'post_id' => "102",
],
],
- 'score' => 0,
- 'note' => "Note 2",
- 'lang' => "",
+ 'score' => 0,
+ 'note' => "Note 2",
+ 'lang' => "",
'content' => 'Article content 2
',
],
];
@@ -1693,7 +1694,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 +1780,7 @@ LONG_STRING;
}
}
- public function testRetrieveFullHeadlines() {
+ public function testRetrieveFullHeadlines(): void {
$in1 = [
// empty results
['op' => "getHeadlines", 'sid' => "PriestsOfSyrinx", 'feed_id' => 0],
@@ -1895,7 +1896,7 @@ LONG_STRING;
}
}
- public function testRetrieveFullHeadlinesCheckingExtraFields() {
+ public function testRetrieveFullHeadlinesCheckingExtraFields(): void {
$in = [
// empty results
['op' => "getHeadlines", 'sid' => "PriestsOfSyrinx", 'feed_id' => -4],
@@ -2011,44 +2012,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",
],
]));
}
@@ -2056,50 +2057,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 d7f50626..38dbd8fe 100644
--- a/tests/cases/REST/TinyTinyRSS/TestIcon.php
+++ b/tests/cases/REST/TinyTinyRSS/TestIcon.php
@@ -11,8 +11,7 @@ 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\Response\EmptyResponse as Response;
/** @covers \JKingWeb\Arsse\REST\TinyTinyRSS\Icon */
class TestIcon extends \JKingWeb\Arsse\Test\AbstractTest {
@@ -40,15 +39,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 +70,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..6999b0d6 100644
--- a/tests/cases/REST/TinyTinyRSS/TestSearch.php
+++ b/tests/cases/REST/TinyTinyRSS/TestSearch.php
@@ -13,112 +13,112 @@ 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")],
];
}
/** @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..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() {
+ 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..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() {
+ 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..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;
@@ -18,16 +17,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 +34,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..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 {
@@ -22,7 +21,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 +35,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..4333771d 100644
--- a/tests/cases/User/TestInternal.php
+++ b/tests/cases/User/TestInternal.php
@@ -21,19 +21,19 @@ 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);
}
/**
* @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..93b5ee72 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);
@@ -147,7 +147,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest {
$calls = 2;
}
} else {
- $calls = 4;
+ $calls = 4;
}
try {
$pass1 = $u->add($user, 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);
@@ -255,7 +255,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest {
$calls = 2;
}
} else {
- $calls = 4;
+ $calls = 4;
}
try {
$pass1 = $u->passwordSet($user, 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/docroot/Feed/Caching/304Conditional.php b/tests/docroot/Feed/Caching/304Conditional.php
new file mode 100644
index 00000000..42b4a5a8
--- /dev/null
+++ b/tests/docroot/Feed/Caching/304Conditional.php
@@ -0,0 +1,22 @@
+ 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/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 baac1a87..593edf80 100644
--- a/tests/lib/AbstractTest.php
+++ b/tests/lib/AbstractTest.php
@@ -7,6 +7,8 @@ declare(strict_types=1);
namespace JKingWeb\Arsse\Test;
use JKingWeb\Arsse\AbstractException;
+use GuzzleHttp\Exception\GuzzleException;
+use GuzzleHttp\Exception\RequestException;
use JKingWeb\Arsse\Exception;
use JKingWeb\Arsse\Arsse;
use JKingWeb\Arsse\Conf;
@@ -19,9 +21,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 {
@@ -35,7 +37,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());
@@ -47,7 +49,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,
@@ -67,8 +69,10 @@ 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 {
- // build an initial $_SERVER array
- $server = ['REQUEST_METHOD' => strtoupper($method)];
+ $server = [
+ 'REQUEST_METHOD' => $method,
+ 'REQUEST_URI' => $url,
+ ];
if (strlen($type)) {
$server['HTTP_CONTENT_TYPE'] = $type;
}
@@ -126,8 +130,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase {
$req = $req->withAttribute("authenticationFailed", true);
}
}
- // if a content type was specified, add it as a header
- if (strlen($type)) {
+ if (strlen($type) && strlen($body ?? "")) {
$req = $req->withHeader("Content-Type", $type);
}
// add any other headers
@@ -151,7 +154,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 \Exception) {
$this->expectException(get_class($msg));
@@ -160,8 +163,8 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase {
$this->expectExceptionMessage($msg->getMessage());
}
} 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 {
@@ -176,7 +179,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);
@@ -200,9 +203,9 @@ 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");
+ $exp = Date::transform($exp, "iso8601");
$test = Date::transform($test, "iso8601");
$this->assertSame($exp, $test, $msg);
}
@@ -285,7 +288,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase {
break;
}
}
- if ($row===$test) {
+ if ($row === $test) {
$data[$index] = $test;
break;
}
@@ -326,7 +329,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)) {
@@ -352,4 +355,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);
+ }
+ }
}
diff --git a/tests/lib/DatabaseDrivers/MySQL.php b/tests/lib/DatabaseDrivers/MySQL.php
index 332f3d99..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) {
@@ -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..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,16 +41,16 @@ trait MySQLPDO {
return;
}
}
-
+
public static function dbTableList($db): array {
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..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)) {
@@ -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) {
@@ -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) {
@@ -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..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,16 +28,16 @@ trait PostgreSQLPDO {
}
return $d;
}
-
+
public static function dbTableList($db): array {
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..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) {
@@ -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..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,16 +25,16 @@ trait SQLite3PDO {
return;
}
}
-
+
public static function dbTableList($db): array {
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);
}
}
diff --git a/tests/phpunit.dist.xml b/tests/phpunit.dist.xml
index d247906e..dc97a942 100644
--- a/tests/phpunit.dist.xml
+++ b/tests/phpunit.dist.xml
@@ -2,6 +2,7 @@
cases/User/TestUser.php
+ cases/Feed/TestException.php
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
diff --git a/tests/server.php b/tests/server.php
index 713e0ee4..2d738c95 100644
--- a/tests/server.php
+++ b/tests/server.php
@@ -29,8 +29,8 @@ which include the following data:
*/
-
ignore_user_abort(false);
+ob_start();
$defaults = [ // default values for response
'code' => 200,
'content' => "",
@@ -74,3 +74,4 @@ foreach ($response['fields'] as $h) {
}
// send the content
echo $response['content'];
+ob_end_flush();
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 6bf072a5..dc5ddc50 100644
--- a/vendor-bin/csfixer/composer.lock
+++ b/vendor-bin/csfixer/composer.lock
@@ -4,28 +4,28 @@
"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.0",
+ "version": "1.7.1",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
- "reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e"
+ "reference": "38276325bd896f90dfcfe30029aa5db40df387a7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/semver/zipball/46d9139568ccb8d9e7cdd4539cab7347568a5e2e",
- "reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e",
+ "url": "https://api.github.com/repos/composer/semver/zipball/38276325bd896f90dfcfe30029aa5db40df387a7",
+ "reference": "38276325bd896f90dfcfe30029aa5db40df387a7",
"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,20 +66,34 @@
"validation",
"versioning"
],
- "time": "2019-03-19T17:25:45+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-27T13:13:07+00:00"
},
{
"name": "composer/xdebug-handler",
- "version": "1.4.0",
+ "version": "1.4.4",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
- "reference": "cbe23383749496fe0f373345208b79568e4bc248"
+ "reference": "6e076a124f7ee146f2487554a94b6a19a74887ba"
},
"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/6e076a124f7ee146f2487554a94b6a19a74887ba",
+ "reference": "6e076a124f7ee146f2487554a94b6a19a74887ba",
"shasum": ""
},
"require": {
@@ -110,34 +124,51 @@
"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-10-24T12:39:10+00:00"
},
{
"name": "doctrine/annotations",
- "version": "v1.8.0",
+ "version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
- "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc"
+ "reference": "88fb6fb1dae011de24dd6b632811c1ff5c2928f5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/annotations/zipball/904dca4eb10715b92569fbcd79e201d5c349b6bc",
- "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc",
+ "url": "https://api.github.com/repos/doctrine/annotations/zipball/88fb6fb1dae011de24dd6b632811c1ff5c2928f5",
+ "reference": "88fb6fb1dae011de24dd6b632811c1ff5c2928f5",
"shasum": ""
},
"require": {
"doctrine/lexer": "1.*",
- "php": "^7.1"
+ "ext-tokenizer": "*",
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/cache": "1.*",
- "phpunit/phpunit": "^7.5"
+ "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.7.x-dev"
+ "dev-master": "1.11.x-dev"
}
},
"autoload": {
@@ -172,30 +203,30 @@
}
],
"description": "Docblock Annotations Parser",
- "homepage": "http://www.doctrine-project.org",
+ "homepage": "https://www.doctrine-project.org/projects/annotations.html",
"keywords": [
"annotations",
"docblock",
"parser"
],
- "time": "2019-10-01T18:55:10+00:00"
+ "time": "2020-10-17T22:05:33+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 +271,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 +330,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 +357,7 @@
"tests/Test/IntegrationCaseFactory.php",
"tests/Test/IntegrationCaseFactoryInterface.php",
"tests/Test/InternalIntegrationCaseFactory.php",
+ "tests/Test/IsIdenticalConstraint.php",
"tests/TestCase.php"
]
},
@@ -329,72 +376,33 @@
}
],
"description": "A tool to automatically fix PHP code style",
- "time": "2019-11-25T22:10:32+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": [
+ "funding": [
{
- "name": "Paragon Initiative Enterprises",
- "email": "security@paragonie.com",
- "homepage": "https://paragonie.com"
+ "url": "https://github.com/keradus",
+ "type": "github"
}
],
- "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"
+ "time": "2020-06-27T23:57:46+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",
@@ -408,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"
}
@@ -425,7 +433,7 @@
"keywords": [
"diff"
],
- "time": "2018-02-15T16:58:55+00:00"
+ "time": "2020-10-14T08:39:05+00:00"
},
{
"name": "psr/container",
@@ -524,16 +532,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 +575,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.1",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "dae5ef273d700771168ab889d9f8a19b2d206656"
+ "reference": "ae789a8a2ad189ce7e8216942cdb9b77319f5eb8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/dae5ef273d700771168ab889d9f8a19b2d206656",
- "reference": "dae5ef273d700771168ab889d9f8a19b2d206656",
+ "url": "https://api.github.com/repos/symfony/console/zipball/ae789a8a2ad189ce7e8216942cdb9b77319f5eb8",
+ "reference": "ae789a8a2ad189ce7e8216942cdb9b77319f5eb8",
"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 +627,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -643,25 +654,105 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2019-12-01T10:51:15+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-10-07T15:23:00+00:00"
},
{
- "name": "symfony/event-dispatcher",
- "version": "v5.0.1",
+ "name": "symfony/deprecation-contracts",
+ "version": "v2.2.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "7b738a51645e10f864cc25c24d232fb03f37b475"
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7b738a51645e10f864cc25c24d232fb03f37b475",
- "reference": "7b738a51645e10f864cc25c24d232fb03f37b475",
+ "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.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/event-dispatcher.git",
+ "reference": "d5de97d6af175a9e8131c546db054ca32842dd0f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d5de97d6af175a9e8131c546db054ca32842dd0f",
+ "reference": "d5de97d6af175a9e8131c546db054ca32842dd0f",
+ "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"
@@ -674,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",
@@ -686,7 +778,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -713,24 +805,38 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "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-18T14:27:32+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 +845,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 +881,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.1",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "1d71f670bc5a07b9ccc97dc44f932177a322d4e6"
+ "reference": "1a8697545a8d87b9f2f6b1d32414199cc5e20aae"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/1d71f670bc5a07b9ccc97dc44f932177a322d4e6",
- "reference": "1d71f670bc5a07b9ccc97dc44f932177a322d4e6",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/1a8697545a8d87b9f2f6b1d32414199cc5e20aae",
+ "reference": "1a8697545a8d87b9f2f6b1d32414199cc5e20aae",
"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 +945,43 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2019-11-26T23:25: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-27T14:02:37+00:00"
},
{
"name": "symfony/finder",
- "version": "v5.0.1",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "17874dd8ab9a19422028ad56172fb294287a701b"
+ "reference": "2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/17874dd8ab9a19422028ad56172fb294287a701b",
- "reference": "17874dd8ab9a19422028ad56172fb294287a701b",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8",
+ "reference": "2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8",
"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 +1008,45 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "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-02T16:23:27+00:00"
},
{
"name": "symfony/options-resolver",
- "version": "v5.0.1",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
- "reference": "1ad3d0ffc00cc1990e5c9c7bb6b81578ec3f5f68"
+ "reference": "4c7e155bf7d93ea4ba3824d5a14476694a5278dd"
},
"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/4c7e155bf7d93ea4ba3824d5a14476694a5278dd",
+ "reference": "4c7e155bf7d93ea4ba3824d5a14476694a5278dd",
"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,24 +1078,38 @@
"configuration",
"options"
],
- "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-27T03:44:28+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
+ "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
},
"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/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
+ "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"suggest": {
"ext-ctype": "For best performance"
@@ -949,7 +1117,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -982,24 +1154,197 @@
"polyfill",
"portable"
],
- "time": "2019-11-27T13:56: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-10-23T14:02:19+00:00"
},
{
- "name": "symfony/polyfill-mbstring",
- "version": "v1.13.1",
+ "name": "symfony/polyfill-intl-grapheme",
+ "version": "v1.20.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f"
+ "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+ "reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f",
- "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f",
+ "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"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.20-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-10-23T14:02:19+00:00"
+ },
+ {
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "v1.20.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "727d1096295d807c309fb01a851577302394c897"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897",
+ "reference": "727d1096295d807c309fb01a851577302394c897",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.20-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-10-23T14:02:19+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.20.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "39d483bdf39be819deabf04ec872eb0b2410b531"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531",
+ "reference": "39d483bdf39be819deabf04ec872eb0b2410b531",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
},
"suggest": {
"ext-mbstring": "For best performance"
@@ -1007,7 +1352,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1041,42 +1390,48 @@
"portable",
"shim"
],
- "time": "2019-11-27T14:18: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-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-php70",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php70.git",
- "reference": "af23c7bb26a73b850840823662dda371484926c4"
+ "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644"
},
"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/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.13-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Php70\\": ""
+ "dev-main": "1.20-dev"
},
- "files": [
- "bootstrap.php"
- ],
- "classmap": [
- "Resources/stubs"
- ]
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1100,29 +1455,47 @@
"portable",
"shim"
],
- "time": "2019-11-27T13:56: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-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-php72",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
- "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038"
+ "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930"
},
"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/cede45fcdfabdd6043b3592e83678e42ec69e930",
+ "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1155,29 +1528,47 @@
"portable",
"shim"
],
- "time": "2019-11-27T13:56: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-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f"
+ "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed"
},
"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/8ff431c517be11c78c48a39a66d37431e26a6bed",
+ "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1213,29 +1604,124 @@
"portable",
"shim"
],
- "time": "2019-11-27T16:25:15+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-10-23T14:02:19+00:00"
},
{
- "name": "symfony/process",
- "version": "v5.0.1",
+ "name": "symfony/polyfill-php80",
+ "version": "v1.20.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/process.git",
- "reference": "1568a2e8370fbc7416ef64eb5a698e4a05db5ff4"
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/1568a2e8370fbc7416ef64eb5a698e4a05db5ff4",
- "reference": "1568a2e8370fbc7416ef64eb5a698e4a05db5ff4",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
+ "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
"shasum": ""
},
"require": {
- "php": "^7.2.5"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-main": "1.20-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-10-23T14:02:19+00:00"
+ },
+ {
+ "name": "symfony/process",
+ "version": "v5.1.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/process.git",
+ "reference": "d3a2e64866169586502f0cd9cab69135ad12cee9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/process/zipball/d3a2e64866169586502f0cd9cab69135ad12cee9",
+ "reference": "d3a2e64866169586502f0cd9cab69135ad12cee9",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-php80": "^1.15"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -1262,24 +1748,38 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2019-11-28T14:20: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-09-02T16:23:27+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 +1788,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 +1824,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.1",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
- "reference": "d410282956706e0b08681a5527447a8e6b6f421e"
+ "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/stopwatch/zipball/d410282956706e0b08681a5527447a8e6b6f421e",
- "reference": "d410282956706e0b08681a5527447a8e6b6f421e",
+ "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,15 +1888,114 @@
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
- "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-05-20T17:43:50+00:00"
+ },
+ {
+ "name": "symfony/string",
+ "version": "v5.1.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/string.git",
+ "reference": "4a9afe9d07bac506f75bcee8ed3ce76da5a9343e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/string/zipball/4a9afe9d07bac506f75bcee8ed3ce76da5a9343e",
+ "reference": "4a9afe9d07bac506f75bcee8ed3ce76da5a9343e",
+ "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-09-15T12:23:47+00:00"
}
],
- "packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "1.1.0"
}
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 116c2b28..14ef3c4f 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",
@@ -79,23 +80,24 @@
},
{
"name": "guzzlehttp/guzzle",
- "version": "6.4.1",
+ "version": "6.5.5",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "0895c932405407fd3a7368b6910c09a24d26db11"
+ "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11",
- "reference": "0895c932405407fd3a7368b6910c09a24d26db11",
+ "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": "*",
@@ -108,7 +110,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.3-dev"
+ "dev-master": "6.5-dev"
}
},
"autoload": {
@@ -141,27 +143,27 @@
"rest",
"web service"
],
- "time": "2019-10-23T15:58:00+00:00"
+ "time": "2020-06-16T21:01:06+00:00"
},
{
"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": {
@@ -192,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": {
@@ -218,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": {
@@ -263,7 +265,7 @@
"uri",
"url"
],
- "time": "2019-07-01T23:21:34+00:00"
+ "time": "2020-09-30T07:37:11+00:00"
},
{
"name": "league/commonmark",
@@ -391,20 +393,20 @@
},
{
"name": "myclabs/deep-copy",
- "version": "1.9.3",
+ "version": "1.10.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
+ "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
- "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
+ "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"
@@ -435,7 +437,13 @@
"object",
"object graph"
],
- "time": "2019-08-09T12:45:53+00:00"
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-06-29T13:22:24+00:00"
},
{
"name": "psr/container",
@@ -578,16 +586,16 @@
},
{
"name": "scrivo/highlight.php",
- "version": "v9.15.10.0",
+ "version": "v9.18.1.3",
"source": {
"type": "git",
"url": "https://github.com/scrivo/highlight.php.git",
- "reference": "9ad3adb4456dc91196327498dbbce6aa1ba1239e"
+ "reference": "6a1699707b099081f20a488ac1f92d682181018c"
},
"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/6a1699707b099081f20a488ac1f92d682181018c",
+ "reference": "6a1699707b099081f20a488ac1f92d682181018c",
"shasum": ""
},
"require": {
@@ -597,7 +605,9 @@
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.7",
- "symfony/finder": "^2.8"
+ "sabberworm/php-css-parser": "^8.3",
+ "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"
@@ -625,7 +635,7 @@
{
"name": "Vladimir Jimenez",
"homepage": "https://allejo.io",
- "role": "Contributor"
+ "role": "Maintainer"
},
{
"name": "Martin Folkers",
@@ -641,26 +651,33 @@
"highlight.php",
"syntax"
],
- "time": "2019-08-27T04:27:48+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/allejo",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-16T07:43:22+00:00"
},
{
"name": "symfony/console",
- "version": "v4.4.1",
+ "version": "v4.4.15",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "f0aea3df20d15635b3cb9730ca5eea1c65b7f201"
+ "reference": "90933b39c7b312fc3ceaa1ddeac7eb48cb953124"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/f0aea3df20d15635b3cb9730ca5eea1c65b7f201",
- "reference": "f0aea3df20d15635b3cb9730ca5eea1c65b7f201",
+ "url": "https://api.github.com/repos/symfony/console/zipball/90933b39c7b312fc3ceaa1ddeac7eb48cb953124",
+ "reference": "90933b39c7b312fc3ceaa1ddeac7eb48cb953124",
"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": {
@@ -717,24 +734,38 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2019-12-01T10:06: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-09-15T07:58:55+00:00"
},
{
"name": "symfony/http-foundation",
- "version": "v4.4.1",
+ "version": "v4.4.15",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "8bccc59e61b41963d14c3dbdb23181e5c932a1d5"
+ "reference": "10683b407c3b6087c64619ebc97a87e36ea62c92"
},
"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/10683b407c3b6087c64619ebc97a87e36ea62c92",
+ "reference": "10683b407c3b6087c64619ebc97a87e36ea62c92",
"shasum": ""
},
"require": {
- "php": "^7.1.3",
+ "php": ">=7.1.3",
"symfony/mime": "^4.3|^5.0",
"symfony/polyfill-mbstring": "~1.1"
},
@@ -772,25 +803,40 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "time": "2019-11-28T13:33:56+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-27T14:14:06+00:00"
},
{
"name": "symfony/intl",
- "version": "v5.0.1",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/intl.git",
- "reference": "41f910d47883c6ab37087ca4a3332e21e1d682f4"
+ "reference": "9381fd69ce6407041185aa6f1bafbf7d65f0e66a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/intl/zipball/41f910d47883c6ab37087ca4a3332e21e1d682f4",
- "reference": "41f910d47883c6ab37087ca4a3332e21e1d682f4",
+ "url": "https://api.github.com/repos/symfony/intl/zipball/9381fd69ce6407041185aa6f1bafbf7d65f0e66a",
+ "reference": "9381fd69ce6407041185aa6f1bafbf7d65f0e66a",
"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"
@@ -801,7 +847,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -847,26 +893,41 @@
"l10n",
"localization"
],
- "time": "2019-11-26T23:25: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-27T03:44:28+00:00"
},
{
"name": "symfony/mime",
- "version": "v5.0.1",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/mime.git",
- "reference": "0e6a4ced216e49d457eddcefb61132173a876d79"
+ "reference": "4404d6545125863561721514ad9388db2661eec5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/mime/zipball/0e6a4ced216e49d457eddcefb61132173a876d79",
- "reference": "0e6a4ced216e49d457eddcefb61132173a876d79",
+ "url": "https://api.github.com/repos/symfony/mime/zipball/4404d6545125863561721514ad9388db2661eec5",
+ "reference": "4404d6545125863561721514ad9388db2661eec5",
"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"
@@ -878,7 +939,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -909,24 +970,38 @@
"mime",
"mime-type"
],
- "time": "2019-11-30T14:12:50+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-02T16:23:27+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
+ "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
},
"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/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
+ "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"suggest": {
"ext-ctype": "For best performance"
@@ -934,7 +1009,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -967,24 +1046,38 @@
"polyfill",
"portable"
],
- "time": "2019-11-27T13:56: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-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-intl-icu",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-icu.git",
- "reference": "b3dffd68afa61ca70f2327f2dd9bbeb6aa53d70b"
+ "reference": "c44d5bf6a75eed79555c6bf37505c6d39559353e"
},
"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/c44d5bf6a75eed79555c6bf37505c6d39559353e",
+ "reference": "c44d5bf6a75eed79555c6bf37505c6d39559353e",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
+ "php": ">=7.1",
"symfony/intl": "~2.3|~3.0|~4.0|~5.0"
},
"suggest": {
@@ -993,7 +1086,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1025,26 +1122,40 @@
"portable",
"shim"
],
- "time": "2019-11-27T13:56: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-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
- "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46"
+ "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117"
},
"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/3b75acd829741c768bc8b1f84eb33265e7cc5117",
+ "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
- "symfony/polyfill-mbstring": "^1.3",
- "symfony/polyfill-php72": "^1.9"
+ "php": ">=7.1",
+ "symfony/polyfill-intl-normalizer": "^1.10",
+ "symfony/polyfill-php72": "^1.10"
},
"suggest": {
"ext-intl": "For best performance"
@@ -1052,7 +1163,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1072,6 +1187,10 @@
"name": "Laurent Bassin",
"email": "laurent@bassin.info"
},
+ {
+ "name": "Trevor Rowbotham",
+ "email": "trevor.rowbotham@pm.me"
+ },
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
@@ -1087,24 +1206,119 @@
"portable",
"shim"
],
- "time": "2019-11-27T13:56: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-10-23T14:02:19+00:00"
},
{
- "name": "symfony/polyfill-mbstring",
- "version": "v1.13.1",
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "v1.20.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f"
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "727d1096295d807c309fb01a851577302394c897"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f",
- "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f",
+ "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"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.20-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-10-23T14:02:19+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.20.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "39d483bdf39be819deabf04ec872eb0b2410b531"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531",
+ "reference": "39d483bdf39be819deabf04ec872eb0b2410b531",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
},
"suggest": {
"ext-mbstring": "For best performance"
@@ -1112,7 +1326,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1146,29 +1364,47 @@
"portable",
"shim"
],
- "time": "2019-11-27T14:18: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-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-php72",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
- "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038"
+ "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930"
},
"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/cede45fcdfabdd6043b3592e83678e42ec69e930",
+ "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1201,29 +1437,47 @@
"portable",
"shim"
],
- "time": "2019-11-27T13:56: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-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f"
+ "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed"
},
"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/8ff431c517be11c78c48a39a66d37431e26a6bed",
+ "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1259,24 +1513,118 @@
"portable",
"shim"
],
- "time": "2019-11-27T16:25:15+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-10-23T14:02:19+00:00"
},
{
- "name": "symfony/process",
- "version": "v4.4.1",
+ "name": "symfony/polyfill-php80",
+ "version": "v1.20.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/process.git",
- "reference": "51c0135ef3f44c5803b33dc60e96bf4f77752726"
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/51c0135ef3f44c5803b33dc60e96bf4f77752726",
- "reference": "51c0135ef3f44c5803b33dc60e96bf4f77752726",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
+ "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
"shasum": ""
},
"require": {
- "php": "^7.1.3"
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.20-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-10-23T14:02:19+00:00"
+ },
+ {
+ "name": "symfony/process",
+ "version": "v4.4.15",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/process.git",
+ "reference": "9b887acc522935f77555ae8813495958c7771ba7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/process/zipball/9b887acc522935f77555ae8813495958c7771ba7",
+ "reference": "9b887acc522935f77555ae8813495958c7771ba7",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1.3"
},
"type": "library",
"extra": {
@@ -1308,24 +1656,38 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2019-11-28T13:33:56+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-02T16:08:58+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": {
@@ -1334,7 +1696,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": {
@@ -1366,24 +1732,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.1",
+ "version": "v4.4.15",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "76de473358fe802578a415d5bb43c296cf09d211"
+ "reference": "c7885964b1eceb70b0981556d0a9b01d2d97c8d1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/76de473358fe802578a415d5bb43c296cf09d211",
- "reference": "76de473358fe802578a415d5bb43c296cf09d211",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/c7885964b1eceb70b0981556d0a9b01d2d97c8d1",
+ "reference": "c7885964b1eceb70b0981556d0a9b01d2d97c8d1",
"shasum": ""
},
"require": {
- "php": "^7.1.3",
+ "php": ">=7.1.3",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
@@ -1425,7 +1805,21 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2019-11-12T14:51: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-27T03:36:23+00:00"
},
{
"name": "webuni/commonmark-table-extension",
@@ -1483,7 +1877,7 @@
"markdown",
"table"
],
- "abandoned": "league/commonmark-ext-table",
+ "abandoned": "league/commonmark",
"time": "2018-11-28T11:29:11+00:00"
},
{
@@ -1555,12 +1949,12 @@
"time": "2018-03-20T13:36:33+00:00"
}
],
- "packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "1.1.0"
}
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 392331bc..938fc8f3 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",
@@ -58,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",
@@ -95,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",
@@ -151,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",
@@ -201,20 +216,20 @@
},
{
"name": "myclabs/deep-copy",
- "version": "1.9.3",
+ "version": "1.10.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
+ "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
- "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
+ "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"
@@ -245,25 +260,31 @@
"object",
"object graph"
],
- "time": "2019-08-09T12:45:53+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",
@@ -303,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",
@@ -409,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": {
@@ -457,44 +475,41 @@
"reflection",
"static analysis"
],
- "time": "2018-08-07T13:53:10+00:00"
+ "time": "2020-06-27T09:03:43+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "4.3.2",
+ "version": "5.2.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e"
+ "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
- "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
+ "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
"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": "*",
+ "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.0.5",
- "mockery/mockery": "^1.0",
- "phpunit/phpunit": "^6.4"
+ "mockery/mockery": "~1.3.2"
},
"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/",
@@ -505,38 +520,40 @@
{
"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-09-12T14:27:41+00:00"
+ "time": "2020-09-03T19:13:55+00:00"
},
{
"name": "phpdocumentor/type-resolver",
- "version": "1.0.1",
+ "version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9"
+ "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
- "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
+ "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"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": {
@@ -555,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-09-17T18:55:26+00:00"
},
{
"name": "phpspec/prophecy",
- "version": "1.9.0",
+ "version": "1.12.1",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203"
+ "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203",
- "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d",
+ "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d",
"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/recursion-context": "^1.0|^2.0|^3.0"
+ "doctrine/instantiator": "^1.2",
+ "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": "^2.5|^3.2",
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
+ "phpspec/phpspec": "^6.0",
+ "phpunit/phpunit": "^8.0 || ^9.0 <9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.8.x-dev"
+ "dev-master": "1.11.x-dev"
}
},
"autoload": {
@@ -618,7 +635,7 @@
"spy",
"stub"
],
- "time": "2019-10-03T11:07:50+00:00"
+ "time": "2020-09-29T09:10:42+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -870,20 +887,21 @@
"keywords": [
"tokenizer"
],
+ "abandoned": true,
"time": "2019-09-17T06:23:10+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "8.5.0",
+ "version": "8.5.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab"
+ "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3ee1c1fd6fc264480c25b6fb8285edefe1702dab",
- "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34c18baa6a44f1d1fbf0338907139e9dce95b997",
+ "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997",
"shasum": ""
},
"require": {
@@ -953,7 +971,17 @@
"testing",
"xunit"
],
- "time": "2019-12-06T05:41:38+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",
@@ -1572,20 +1600,20 @@
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
+ "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
},
"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/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
+ "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"suggest": {
"ext-ctype": "For best performance"
@@ -1593,7 +1621,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1626,27 +1658,41 @@
"polyfill",
"portable"
],
- "time": "2019-11-27T13:56: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-10-23T14:02:19+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": {
@@ -1666,28 +1712,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.6.0",
+ "version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
- "reference": "573381c0a64f155a0d9a23f4b0c797194805b925"
+ "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925",
- "reference": "573381c0a64f155a0d9a23f4b0c797194805b925",
+ "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"
@@ -1714,7 +1767,7 @@
"check",
"validate"
],
- "time": "2019-11-24T13:36:37+00:00"
+ "time": "2020-07-08T17:02:28+00:00"
},
{
"name": "webmozart/glob",
@@ -1810,12 +1863,12 @@
"time": "2015-12-17T08:42:14+00:00"
}
],
- "packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "1.1.0"
}
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 7c5979c1..5fbe6804 100644
--- a/vendor-bin/robo/composer.lock
+++ b/vendor-bin/robo/composer.lock
@@ -4,35 +4,36 @@
"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",
+ "version": "4.2.3",
"source": {
"type": "git",
"url": "https://github.com/consolidation/annotated-command.git",
- "reference": "512a2e54c98f3af377589de76c43b24652bcb789"
+ "reference": "4b596872f24c39d9c04d7b3adb6bc51baa1f2fd5"
},
"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/4b596872f24c39d9c04d7b3adb6bc51baa1f2fd5",
+ "reference": "4b596872f24c39d9c04d7b3adb6bc51baa1f2fd5",
"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": {
@@ -46,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": {
@@ -100,7 +69,7 @@
}
],
"description": "Initialize Symfony Console commands from annotated command class methods.",
- "time": "2019-03-08T16:55:03+00:00"
+ "time": "2020-10-03T14:28:42+00:00"
},
{
"name": "consolidation/config",
@@ -185,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": {
@@ -271,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"
@@ -311,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": {
@@ -372,55 +278,48 @@
}
],
"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.13",
"source": {
"type": "git",
"url": "https://github.com/consolidation/Robo.git",
- "reference": "5fa1d901776a628167a325baa9db95d8edf13a80"
+ "reference": "fd28dcca1b935950ece26e63541fbdeeb09f7343"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/consolidation/Robo/zipball/5fa1d901776a628167a325baa9db95d8edf13a80",
- "reference": "5fa1d901776a628167a325baa9db95d8edf13a80",
+ "url": "https://api.github.com/repos/consolidation/Robo/zipball/fd28dcca1b935950ece26e63541fbdeeb09f7343",
+ "reference": "fd28dcca1b935950ece26e63541fbdeeb09f7343",
"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.12.1|^4.1",
+ "consolidation/config": "^1.2.1",
+ "consolidation/log": "^1.1.1|^2",
+ "consolidation/output-formatters": "^3.5.1|^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",
"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": {
"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",
@@ -434,6 +333,16 @@
"type": "library",
"extra": {
"scenarios": {
+ "finder5": {
+ "require": {
+ "symfony/finder": "^5"
+ },
+ "config": {
+ "platform": {
+ "php": "7.2.5"
+ }
+ }
+ },
"symfony4": {
"require": {
"symfony/console": "^4"
@@ -448,8 +357,11 @@
"require": {
"symfony/console": "^2.8"
},
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.36"
+ },
"remove": [
- "goaop/framework"
+ "php-coveralls/php-coveralls"
],
"config": {
"platform": {
@@ -462,7 +374,7 @@
}
},
"branch-alias": {
- "dev-master": "2.x-dev"
+ "dev-master": "1.x-dev"
}
},
"autoload": {
@@ -481,26 +393,26 @@
}
],
"description": "Modern task runner",
- "time": "2019-10-29T15:50:02+00:00"
+ "time": "2020-10-11T04:51:34+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"
@@ -521,17 +433,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",
@@ -786,16 +698,16 @@
},
{
"name": "pear/archive_tar",
- "version": "1.4.8",
+ "version": "1.4.10",
"source": {
"type": "git",
"url": "https://github.com/pear/Archive_Tar.git",
- "reference": "442bdffb7edb84c898cfd94f7ac8500e49d5bbb5"
+ "reference": "bbb4f10f71a1da2715ec6d9a683f4f23c507a49b"
},
"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/bbb4f10f71a1da2715ec6d9a683f4f23c507a49b",
+ "reference": "bbb4f10f71a1da2715ec6d9a683f4f23c507a49b",
"shasum": ""
},
"require": {
@@ -848,7 +760,7 @@
"archive",
"tar"
],
- "time": "2019-10-21T13:31:24+00:00"
+ "time": "2020-09-15T14:13:23+00:00"
},
{
"name": "pear/console_getopt",
@@ -943,16 +855,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 +880,9 @@
}
},
"autoload": {
- "psr-0": {
- "PEAR": ""
- }
+ "classmap": [
+ "PEAR/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
@@ -994,7 +906,7 @@
"keywords": [
"exception"
],
- "time": "2015-02-10T20:07:52+00:00"
+ "time": "2019-12-10T10:24:42+00:00"
},
{
"name": "psr/container",
@@ -1047,16 +959,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": {
@@ -1090,26 +1002,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.1",
+ "version": "v4.4.15",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "f0aea3df20d15635b3cb9730ca5eea1c65b7f201"
+ "reference": "90933b39c7b312fc3ceaa1ddeac7eb48cb953124"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/f0aea3df20d15635b3cb9730ca5eea1c65b7f201",
- "reference": "f0aea3df20d15635b3cb9730ca5eea1c65b7f201",
+ "url": "https://api.github.com/repos/symfony/console/zipball/90933b39c7b312fc3ceaa1ddeac7eb48cb953124",
+ "reference": "90933b39c7b312fc3ceaa1ddeac7eb48cb953124",
"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": {
@@ -1166,24 +1079,38 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2019-12-01T10:06: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-09-15T07:58:55+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v4.4.1",
+ "version": "v4.4.15",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "b3c3068a72623287550fe20b84a2b01dcba2686f"
+ "reference": "e17bb5e0663dc725f7cdcafc932132735b4725cd"
},
"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/e17bb5e0663dc725f7cdcafc932132735b4725cd",
+ "reference": "e17bb5e0663dc725f7cdcafc932132735b4725cd",
"shasum": ""
},
"require": {
- "php": "^7.1.3",
+ "php": ">=7.1.3",
"symfony/event-dispatcher-contracts": "^1.1"
},
"conflict": {
@@ -1197,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",
@@ -1236,24 +1164,38 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2019-11-28T13:33:56+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-18T14:07:46+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": "",
@@ -1263,6 +1205,10 @@
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
}
},
"autoload": {
@@ -1294,24 +1240,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.1",
+ "version": "v4.4.15",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "40c2606131d56eff6f193b6e2ceb92414653b591"
+ "reference": "ebc51494739d3b081ea543ed7c462fa73a4f74db"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/40c2606131d56eff6f193b6e2ceb92414653b591",
- "reference": "40c2606131d56eff6f193b6e2ceb92414653b591",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/ebc51494739d3b081ea543ed7c462fa73a4f74db",
+ "reference": "ebc51494739d3b081ea543ed7c462fa73a4f74db",
"shasum": ""
},
"require": {
- "php": "^7.1.3",
+ "php": ">=7.1.3",
"symfony/polyfill-ctype": "~1.8"
},
"type": "library",
@@ -1344,29 +1304,43 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2019-11-26T23:16:41+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-27T13:54:16+00:00"
},
{
"name": "symfony/finder",
- "version": "v4.4.1",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "ce8743441da64c41e2a667b8eb66070444ed911e"
+ "reference": "2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/ce8743441da64c41e2a667b8eb66070444ed911e",
- "reference": "ce8743441da64c41e2a667b8eb66070444ed911e",
+ "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": {
@@ -1393,24 +1367,38 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2019-11-17T21:56:56+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-02T16:23:27+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
+ "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
},
"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/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
+ "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"suggest": {
"ext-ctype": "For best performance"
@@ -1418,7 +1406,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1451,24 +1443,38 @@
"polyfill",
"portable"
],
- "time": "2019-11-27T13:56: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-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f"
+ "reference": "39d483bdf39be819deabf04ec872eb0b2410b531"
},
"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/39d483bdf39be819deabf04ec872eb0b2410b531",
+ "reference": "39d483bdf39be819deabf04ec872eb0b2410b531",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"suggest": {
"ext-mbstring": "For best performance"
@@ -1476,7 +1482,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1510,29 +1520,47 @@
"portable",
"shim"
],
- "time": "2019-11-27T14:18: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-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.13.1",
+ "version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f"
+ "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed"
},
"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/8ff431c517be11c78c48a39a66d37431e26a6bed",
+ "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -1568,20 +1596,114 @@
"portable",
"shim"
],
- "time": "2019-11-27T16:25:15+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-10-23T14:02:19+00:00"
},
{
- "name": "symfony/process",
- "version": "v3.4.36",
+ "name": "symfony/polyfill-php80",
+ "version": "v1.20.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/process.git",
- "reference": "9a4545c01e1e4f473492bd52b71e574dcc401ca2"
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/9a4545c01e1e4f473492bd52b71e574dcc401ca2",
- "reference": "9a4545c01e1e4f473492bd52b71e574dcc401ca2",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
+ "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.20-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-10-23T14:02:19+00:00"
+ },
+ {
+ "name": "symfony/process",
+ "version": "v3.4.45",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/process.git",
+ "reference": "46a862d0f334e51c1ed831b49cbe12863ffd5475"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/process/zipball/46a862d0f334e51c1ed831b49cbe12863ffd5475",
+ "reference": "46a862d0f334e51c1ed831b49cbe12863ffd5475",
"shasum": ""
},
"require": {
@@ -1617,24 +1739,38 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2019-11-28T10:05:51+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-02T16:06:40+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": {
@@ -1643,7 +1779,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": {
@@ -1675,24 +1815,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.1",
+ "version": "v4.4.15",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "76de473358fe802578a415d5bb43c296cf09d211"
+ "reference": "c7885964b1eceb70b0981556d0a9b01d2d97c8d1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/76de473358fe802578a415d5bb43c296cf09d211",
- "reference": "76de473358fe802578a415d5bb43c296cf09d211",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/c7885964b1eceb70b0981556d0a9b01d2d97c8d1",
+ "reference": "c7885964b1eceb70b0981556d0a9b01d2d97c8d1",
"shasum": ""
},
"require": {
- "php": "^7.1.3",
+ "php": ">=7.1.3",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
@@ -1734,15 +1888,29 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2019-11-12T14:51: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-27T03:36:23+00:00"
}
],
- "packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "1.1.0"
}
diff --git a/yarn.lock b/yarn.lock
index 70c36872..635cd097 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,57 +2,36 @@
# 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" "*"
-
-"@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 "12.6.9"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.9.tgz#ffeee23afdc19ab16e979338e7b536fdebbbaeaf"
- integrity sha512-+YB9FtyxXGyD54p8rXwWaN1EWEyar5L58GlGWgtH2I9rGmLGBQcw63+0jw+ujqVavNuO47S1ByAjm9zdHMnskw==
-
-abbrev@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==
+ "@nodelib/fs.scandir" "2.1.3"
+ fastq "^1.6.0"
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 +45,20 @@ 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.3.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
+ integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
dependencies:
- micromatch "^3.1.4"
- normalize-path "^2.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 +67,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.1:
- 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.6.1"
- resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.1.tgz#51967a02d2d2300bb01866c1611ec8348d355a47"
- integrity sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw==
+ version "9.8.6"
+ resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.6.tgz#3b73594ca1bf9266320c5acf1588d74dea74210f"
+ integrity sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg==
dependencies:
- browserslist "^4.6.3"
- caniuse-lite "^1.0.30000980"
- chalk "^2.4.2"
+ browserslist "^4.12.0"
+ caniuse-lite "^1.0.30001109"
+ colorette "^1.2.1"
normalize-range "^0.1.2"
num2fraction "^1.2.2"
- postcss "^7.0.17"
- postcss-value-parser "^4.0.0"
+ postcss "^7.0.32"
+ postcss-value-parser "^4.1.0"
balanced-match@0.1.0:
version "0.1.0"
@@ -164,23 +100,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==
+binary-extensions@^2.0.0:
+ 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"
@@ -190,50 +113,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.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.12.0:
+ 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.30000984"
- electron-to-chromium "^1.3.191"
- node-releases "^1.1.25"
-
-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.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"
@@ -259,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.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.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"
@@ -275,7 +170,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==
@@ -284,67 +179,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.6"
- resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.6.tgz#b6cad653a929e244ce8a834244164d241fa954c5"
- integrity sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==
- 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.2"
- resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.2.tgz#a18f1e0b269c8a6a5d3c86eb298beb14c3dd7bf6"
- integrity sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A==
-
-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.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"
+ glob-parent "~5.1.0"
+ is-binary-path "~2.1.0"
+ is-glob "~4.0.1"
+ normalize-path "~3.0.0"
+ readdirp "~3.5.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"
@@ -352,12 +223,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==
@@ -378,31 +256,16 @@ 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==
+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==
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"
@@ -413,17 +276,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"
@@ -434,34 +286,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@^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"
- 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==
@@ -473,71 +318,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.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==
-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.0"
- resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.8.0.tgz#2da2d35ed852ecc24a5d6c17788ba57c3708755b"
- integrity sha512-DCvzSq2UiMsuLnj/9AL484ummEgLtZIcRS7YvtO38QnpX3vqh9nJ8P+zhu8Ja+SmLrBHO2iDbva20jq38qvBkQ==
-
-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.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==
-
-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==
- 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"
@@ -546,6 +347,11 @@ error-ex@^1.3.1:
dependencies:
is-arrayish "^0.2.1"
+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"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
@@ -556,179 +362,76 @@ 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"
-
-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.6"
- resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07"
- integrity sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ==
- dependencies:
- minipass "^2.2.1"
-
-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.9"
- resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f"
- integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==
- dependencies:
- nan "^2.12.1"
- node-pre-gyp "^0.12.0"
-
-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==
+
+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"
+ integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
+
+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"
+ 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"
@@ -741,36 +444,22 @@ glob@^6.0.4:
once "^1.3.0"
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==
+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.0"
- resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b"
- integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==
+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"
@@ -789,60 +478,22 @@ 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=
+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:
- get-value "^2.0.3"
- has-values "^0.1.4"
- isobject "^2.0.0"
+ function-bind "^1.1.1"
-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.1"
- resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8"
- integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==
- 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"
@@ -879,161 +530,62 @@ 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"
+ 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"
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"
+ binary-extensions "^2.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=
+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:
- 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"
+ 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"
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"
@@ -1041,42 +593,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.1"
- resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121"
- integrity sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==
+ 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.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"
@@ -1086,56 +611,26 @@ 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=
+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:
- is-buffer "^1.1.5"
-
-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.2"
- resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
- integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==
-
-lcid@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf"
- integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==
- 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"
- path-exists "^3.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.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"
@@ -1144,200 +639,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.2.4"
- resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.4.tgz#c9269589e6885a60cf80605d9522d4b67ca646e3"
- integrity sha512-FYE8xI+6pjFOhokZu0We3S5NKCirLbCzSh2Usf3qEyr4X8U+0jNg9P8RZ4qz+V2UoECLVwSyzU3LxXBaLGtD3A==
-
-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@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:
- 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==
- 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==
- dependencies:
- minipass "^2.2.1"
-
-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.1"
- resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
- integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
- dependencies:
- minimist "0.0.8"
-
-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.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==
-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.4.0"
- resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c"
- integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==
- 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@^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==
- 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"
-
-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==
- dependencies:
- semver "^5.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=
- 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==
@@ -1347,136 +684,31 @@ 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.0.6"
- resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd"
- integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==
-
-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==
- dependencies:
- ignore-walk "^3.0.1"
- npm-bundled "^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==
- dependencies:
- execa "^1.0.0"
- lcid "^2.0.0"
- mem "^4.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.0"
- resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2"
- integrity sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==
+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@^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.0.0"
+ p-limit "^2.2.0"
p-try@^2.0.0:
version "2.2.0"
@@ -1491,80 +723,53 @@ 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==
-
-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.2"
+ resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-7.1.2.tgz#ba8d5d918b644bd18e80ad2c698064d4c0da51cd"
+ integrity sha512-3mlEmN1v2NVuosMWZM2tP8bgZn7rO5PYxRRrXtdSyL5KipcgBDjJ9ct8/LKxImMCJJi3x5nYhCGFJOkGyEqXBQ==
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 "^8.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"
@@ -1576,13 +781,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"
@@ -1592,9 +796,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.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"
@@ -1617,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"
@@ -1637,12 +841,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.3"
+ resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-4.2.3.tgz#c6f255b0a720549776d220d00c4b70cd244136f6"
+ integrity sha512-rOv0W1HquRCamWy2kFl3QazJMMe1ku6rCFoAAH+9AcxdbpDeBr6k968MLWuLjvjMcGEip01ak09hKOEgpK9hvw==
dependencies:
- postcss "^7.0.14"
- postcss-selector-parser "^5.0.0"
+ postcss "^7.0.32"
+ postcss-selector-parser "^6.0.2"
postcss-reporter@^6.0.0:
version "6.0.1"
@@ -1664,20 +868,21 @@ 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@^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.4"
+ resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz#56075a1380a04604c38b063ea7767a129af5c2b3"
+ integrity sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==
dependencies:
- cssesc "^2.0.0"
+ 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"
@@ -1691,18 +896,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.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.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.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.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"
@@ -1717,7 +921,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==
@@ -1726,10 +930,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.32, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7:
+ 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"
@@ -1740,29 +944,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"
@@ -1770,211 +951,62 @@ read-cache@^1.0.0:
dependencies:
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==
+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:
- 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.12.0"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6"
- integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==
+ 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"
-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.6.3"
- resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
- integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
- 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.0"
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
- integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==
-
-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.2"
- resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259"
- integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==
- dependencies:
- atob "^2.1.1"
- 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=
@@ -1984,73 +1016,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"
@@ -2078,86 +1070,34 @@ 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==
+supports-color@^7.1.0:
+ 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:
- chownr "^1.1.1"
- fs-minipass "^1.2.5"
- minipass "^2.3.5"
- 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.203.1"
- resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.203.1.tgz#4dc9b02f53de3315bc98b80665e13de3edfc1dfc"
- integrity sha512-7MUlYyGJ6rSitEZ3r1Q1QNV8uSIzapS8SmmhSusBuIc7uIxPPwsKllEP0GRp1NS6Ik6F+fRZvnjDWm3ecv2hDw==
+ version "1.212.0"
+ resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.212.0.tgz#f3f29bd5d10d0fd9a6f171a5f9d57d58b71eccf7"
+ integrity sha512-03rYYO1rGhOYpdYB+wlLY2d0xza6hdN/S67ol2ZpaH+CtFedMVAVhj8ft0rwxEkr90zatou8opBv7Xp6X4cK6g==
-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.1.2"
- resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068"
- integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==
-
-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"
@@ -2167,12 +1107,7 @@ 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:
+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=
@@ -2182,65 +1117,46 @@ which-module@^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.0.3"
- resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9"
- integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==
-
-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.2:
+ 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.4.1"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8"
+ integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==
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.2"