1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 05:02:40 +00:00

Address our own deprecations in PHP 8.4

This commit is contained in:
J. King 2024-12-15 16:31:57 -05:00
parent 1ae3c33344
commit e8be7d0f38
43 changed files with 1836 additions and 1160 deletions

View file

@ -188,7 +188,7 @@ class RoboFile extends \Robo\Tasks {
* may not be equivalent due to subsequent changes in the exclude list, or because
* of new tooling.
*/
public function packageGeneric(string $commit = null): Result {
public function packageGeneric(?string $commit = null): Result {
if (!$this->toolExists("git")) {
throw new \Exception("Git is required in PATH to produce generic release tarballs");
}
@ -308,7 +308,7 @@ class RoboFile extends \Robo\Tasks {
* or any commit hash. If none is provided on the command line, Robo will prompt
* for a commit to package; the default is "HEAD".
*/
public function packageDebsrc(string $commit = null): Result {
public function packageDebsrc(?string $commit = null): Result {
// establish which commit to package
[$commit, $version] = $this->commitVersion($commit);
$tarball = BASE."release/$version/arsse-$version.tar.gz";
@ -362,7 +362,7 @@ class RoboFile extends \Robo\Tasks {
* Build Service instances and with slight modification the Arch User Repository.
* Use for Launchpad PPAs has not been tested.
*/
public function package(string $commit = null): Result {
public function package(?string $commit = null): Result {
if (!$this->toolExists("git")) {
throw new \Exception("Git is required in PATH to produce packages");
}

80
composer.lock generated
View file

@ -55,22 +55,22 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "7.8.1",
"version": "7.9.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "41042bc7ab002487b876a0683fc8dce04ddce104"
"reference": "d281ed313b989f213357e3be1a179f02196ac99b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104",
"reference": "41042bc7ab002487b876a0683fc8dce04ddce104",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b",
"reference": "d281ed313b989f213357e3be1a179f02196ac99b",
"shasum": ""
},
"require": {
"ext-json": "*",
"guzzlehttp/promises": "^1.5.3 || ^2.0.1",
"guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
"guzzlehttp/promises": "^1.5.3 || ^2.0.3",
"guzzlehttp/psr7": "^2.7.0",
"php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0"
@ -81,9 +81,9 @@
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"ext-curl": "*",
"php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
"guzzle/client-integration-tests": "3.0.2",
"php-http/message-factory": "^1.1",
"phpunit/phpunit": "^8.5.36 || ^9.6.15",
"phpunit/phpunit": "^8.5.39 || ^9.6.20",
"psr/log": "^1.1 || ^2.0 || ^3.0"
},
"suggest": {
@ -161,7 +161,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.8.1"
"source": "https://github.com/guzzle/guzzle/tree/7.9.2"
},
"funding": [
{
@ -177,20 +177,20 @@
"type": "tidelift"
}
],
"time": "2023-12-03T20:35:24+00:00"
"time": "2024-07-24T11:22:20+00:00"
},
{
"name": "guzzlehttp/promises",
"version": "2.0.2",
"version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "bbff78d96034045e58e13dedd6ad91b5d1253223"
"reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223",
"reference": "bbff78d96034045e58e13dedd6ad91b5d1253223",
"url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
"reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
"shasum": ""
},
"require": {
@ -198,7 +198,7 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"phpunit/phpunit": "^8.5.36 || ^9.6.15"
"phpunit/phpunit": "^8.5.39 || ^9.6.20"
},
"type": "library",
"extra": {
@ -244,7 +244,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/2.0.2"
"source": "https://github.com/guzzle/promises/tree/2.0.4"
},
"funding": [
{
@ -260,20 +260,20 @@
"type": "tidelift"
}
],
"time": "2023-12-03T20:19:20+00:00"
"time": "2024-10-17T10:06:22+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "2.6.2",
"version": "2.7.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221"
"reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221",
"reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
"reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
"shasum": ""
},
"require": {
@ -288,8 +288,8 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"http-interop/http-factory-tests": "^0.9",
"phpunit/phpunit": "^8.5.36 || ^9.6.15"
"http-interop/http-factory-tests": "0.9.0",
"phpunit/phpunit": "^8.5.39 || ^9.6.20"
},
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
@ -360,7 +360,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.6.2"
"source": "https://github.com/guzzle/psr7/tree/2.7.0"
},
"funding": [
{
@ -376,7 +376,7 @@
"type": "tidelift"
}
],
"time": "2023-12-03T20:05:35+00:00"
"time": "2024-07-18T11:15:46+00:00"
},
{
"name": "hosteurope/password-generator",
@ -795,20 +795,20 @@
},
{
"name": "psr/http-factory",
"version": "1.0.2",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-factory.git",
"reference": "e616d01114759c4c489f93b099585439f795fe35"
"reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
"reference": "e616d01114759c4c489f93b099585439f795fe35",
"url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
"reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
"shasum": ""
},
"require": {
"php": ">=7.0.0",
"php": ">=7.1",
"psr/http-message": "^1.0 || ^2.0"
},
"type": "library",
@ -832,7 +832,7 @@
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interfaces for PSR-7 HTTP message factories",
"description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
"keywords": [
"factory",
"http",
@ -844,9 +844,9 @@
"response"
],
"support": {
"source": "https://github.com/php-fig/http-factory/tree/1.0.2"
"source": "https://github.com/php-fig/http-factory"
},
"time": "2023-04-10T20:10:41+00:00"
"time": "2024-04-15T12:06:14+00:00"
},
{
"name": "psr/http-message",
@ -1053,16 +1053,16 @@
},
{
"name": "symfony/deprecation-contracts",
"version": "v2.5.2",
"version": "v2.5.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
"reference": "605389f2a7e5625f273b53960dc46aeaf9c62918"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
"reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918",
"reference": "605389f2a7e5625f273b53960dc46aeaf9c62918",
"shasum": ""
},
"require": {
@ -1100,7 +1100,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2"
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.4"
},
"funding": [
{
@ -1116,7 +1116,7 @@
"type": "tidelift"
}
],
"time": "2022-01-02T09:53:40+00:00"
"time": "2024-09-25T14:11:13+00:00"
}
],
"packages-dev": [
@ -1193,7 +1193,7 @@
"ext-filter": "*",
"ext-dom": "*"
},
"platform-dev": [],
"platform-dev": {},
"platform-overrides": {
"php": "7.3.33"
},

View file

@ -121,7 +121,7 @@ abstract class AbstractException extends \Exception {
protected $symbol;
protected $params;
public function __construct(string $msgID = "", $vars = null, \Throwable $e = null) {
public function __construct(string $msgID = "", $vars = null, ?\Throwable $e = null) {
$this->symbol = $msgID;
$this->params = $vars ?? [];
if ($msgID === "") {

View file

@ -72,7 +72,7 @@ USAGE_TEXT;
return ($file === "-" ? null : $file) ?? $stdinOrStdout;
}
public function dispatch(array $argv = null): int {
public function dispatch(?array $argv = null): int {
$argv = $argv ?? $_SERVER['argv'];
$argv0 = array_shift($argv);
$args = \Docopt::handle($this->usage($argv0), [
@ -198,7 +198,7 @@ USAGE_TEXT;
return 0;
}
protected function userAddOrSetPassword(string $method, string $user, string $password = null, string $oldpass = null): int {
protected function userAddOrSetPassword(string $method, string $user, ?string $password = null, ?string $oldpass = null): int {
$passwd = Arsse::$user->$method(...array_slice(func_get_args(), 1));
if (is_null($password)) {
echo $passwd.\PHP_EOL;

View file

@ -14,23 +14,23 @@ trait BooleanMembers {
public $labelled = null;
public $annotated = null;
public function unread(bool $spec = null) {
public function unread(?bool $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function starred(bool $spec = null) {
public function starred(?bool $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function hidden(bool $spec = null) {
public function hidden(?bool $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function labelled(bool $spec = null) {
public function labelled(?bool $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function annotated(bool $spec = null) {
public function annotated(?bool $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
}

View file

@ -10,7 +10,7 @@ namespace JKingWeb\Arsse\Context;
class ExclusionContext extends AbstractContext {
use ExclusionMembers;
public function __construct(Context $parent = null) {
public function __construct(?Context $parent = null) {
$this->parent = $parent;
}

View file

@ -83,127 +83,127 @@ trait ExclusionMembers {
return array_values(array_unique($spec, \SORT_REGULAR));
}
public function folder(int $spec = null) {
public function folder(?int $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function folders(array $spec = null) {
public function folders(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanIdArray($spec, true);
}
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function folderShallow(int $spec = null) {
public function folderShallow(?int $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function foldersShallow(array $spec = null) {
public function foldersShallow(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanIdArray($spec, true);
}
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function tag(int $spec = null) {
public function tag(?int $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function tags(array $spec = null) {
public function tags(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanIdArray($spec);
}
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function tagName(string $spec = null) {
public function tagName(?string $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function tagNames(array $spec = null) {
public function tagNames(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanStringArray($spec);
}
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function subscription(int $spec = null) {
public function subscription(?int $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function subscriptions(array $spec = null) {
public function subscriptions(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanIdArray($spec);
}
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function edition(int $spec = null) {
public function edition(?int $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function article(int $spec = null) {
public function article(?int $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function editions(array $spec = null) {
public function editions(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanIdArray($spec);
}
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function articles(array $spec = null) {
public function articles(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanIdArray($spec);
}
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function label(int $spec = null) {
public function label(?int $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function labels(array $spec = null) {
public function labels(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanIdArray($spec);
}
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function labelName(string $spec = null) {
public function labelName(?string $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function labelNames(array $spec = null) {
public function labelNames(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanStringArray($spec);
}
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function annotationTerms(array $spec = null) {
public function annotationTerms(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanStringArray($spec);
}
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function searchTerms(array $spec = null) {
public function searchTerms(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanStringArray($spec);
}
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function titleTerms(array $spec = null) {
public function titleTerms(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanStringArray($spec);
}
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function authorTerms(array $spec = null) {
public function authorTerms(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanStringArray($spec);
}
@ -237,7 +237,7 @@ trait ExclusionMembers {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function modifiedRanges(array $spec = null) {
public function modifiedRanges(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanDateRangeArray($spec);
}
@ -253,7 +253,7 @@ trait ExclusionMembers {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function markedRanges(array $spec = null) {
public function markedRanges(?array $spec = null) {
if (isset($spec)) {
$spec = $this->cleanDateRangeArray($spec);
}

View file

@ -11,11 +11,11 @@ abstract class RootContext extends AbstractContext {
public $limit = 0;
public $offset = 0;
public function limit(int $spec = null) {
public function limit(?int $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
public function offset(int $spec = null) {
public function offset(?int $spec = null) {
return $this->act(__FUNCTION__, func_num_args(), $spec);
}
}

View file

@ -413,7 +413,7 @@ class Database {
* @param string $user The user who owns the session to be destroyed
* @param string|null $id The identifier of the session to destroy
*/
public function sessionDestroy(string $user, string $id = null): bool {
public function sessionDestroy(string $user, ?string $id = null): bool {
if (is_null($id)) {
// delete all sessions and report success unconditionally if no identifier was specified
$this->db->prepare("DELETE FROM arsse_sessions where \"user\" = ?", "str")->run($user);
@ -467,7 +467,7 @@ class Database {
* @param \DateTimeInterface|null $expires An optional expiry date and time for the token
* @param string $data Application-specific data associated with a token
*/
public function tokenCreate(string $user, string $class, string $id = null, ?\DateTimeInterface $expires = null, string $data = null): string {
public function tokenCreate(string $user, string $class, ?string $id = null, ?\DateTimeInterface $expires = null, ?string $data = null): string {
if (!$this->userExists($user)) {
throw new User\ExceptionConflict("doesNotExist", ["action" => __FUNCTION__, "user" => $user]);
}
@ -681,7 +681,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): ?int {
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
@ -816,7 +816,7 @@ class Database {
* @param boolean $recursive Whether to list subscriptions of descendent folders as well as the selected folder
* @param integer|null $id The numeric identifier of a particular subscription; used internally by subscriptionPropertiesGet
*/
public function subscriptionList(string $user, $folder = null, bool $recursive = true, int $id = null): Db\Result {
public function subscriptionList(string $user, $folder = null, bool $recursive = true, ?int $id = null): Db\Result {
// validate inputs
$folder = $this->folderValidateId($user, $folder)['id'];
// create a complex query
@ -1056,7 +1056,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): ?\DateTimeImmutable {
public function subscriptionRefreshed(string $user, ?int $id = null): ?\DateTimeImmutable {
$q = new Query("SELECT max(arsse_feeds.updated) from arsse_feeds join arsse_subscriptions on arsse_subscriptions.feed = arsse_feeds.id");
$q->setWhere("arsse_subscriptions.owner = ?", "str", $user);
if ($id) {
@ -1646,7 +1646,7 @@ class Database {
return $q;
}
protected function articleFilter(Context $context, QueryFilter $q = null) {
protected function articleFilter(Context $context, ?QueryFilter $q = null) {
$q = $q ?? new QueryFilter;
$colDefs = $this->articleColumns();
// handle the simple context options
@ -1825,7 +1825,7 @@ class Database {
* @param array $fieldss The columns to return in the result set, any of: id, edition, url, title, author, content, guid, fingerprint, folder, subscription, feed, starred, unread, note, published_date, edited_date, modified_date, marked_date, subscription_title, media_url, media_type
* @param array $sort The columns to sort the result by eg. "edition desc" in decreasing order of importance
*/
public function articleList(string $user, RootContext $context = null, array $fields = ["id"], array $sort = []): Db\Result {
public function articleList(string $user, ?RootContext $context = null, array $fields = ["id"], array $sort = []): Db\Result {
// make a base query based on context and output columns
$context = $context ?? new Context;
$q = $this->articleQuery($user, $context, $fields);
@ -1869,7 +1869,7 @@ class Database {
* @param string $user The user whose articles are to be counted
* @param RootContext $context The search context
*/
public function articleCount(string $user, RootContext $context = null): int {
public function articleCount(string $user, ?RootContext $context = null): int {
$context = $context ?? new Context;
$q = $this->articleQuery($user, $context, []);
return (int) $this->db->prepare($q->getQuery(), $q->getTypes())->run($q->getValues())->getValue();
@ -1889,7 +1889,7 @@ class Database {
* @param RootContext $context The query context to match articles against
* @param bool $updateTimestamp Whether to also update the timestamp. This should only be false if a mark is changed as a result of an automated action not taken by the user
*/
public function articleMark(string $user, array $data, RootContext $context = null, bool $updateTimestamp = true): int {
public function articleMark(string $user, array $data, ?RootContext $context = null, bool $updateTimestamp = true): int {
$data = [
'read' => $data['read'] ?? null,
'starred' => $data['starred'] ?? null,
@ -2172,7 +2172,7 @@ class Database {
}
/** Returns the numeric identifier of the most recent edition of an article matching the given context */
public function editionLatest(string $user, RootContext $context = null): int {
public function editionLatest(string $user, ?RootContext $context = null): int {
$context = $context ?? new Context;
$q = $this->articleQuery($user, $context, ["latest_edition"]);
return (int) $this->db->prepare((string) $q, $q->getTypes())->run($q->getValues())->getValue();

View file

@ -20,7 +20,7 @@ abstract class AbstractDriver implements Driver {
abstract protected function unlock(bool $rollback = false): bool;
abstract protected static function buildEngineException($code, string $msg): array;
public function schemaUpdate(int $to, string $basePath = null): bool {
public function schemaUpdate(int $to, ?string $basePath = null): bool {
$ver = $this->schemaVersion();
if (!Arsse::$conf->dbAutoUpdate) {
throw new Exception("updateManual", ['version' => $ver, 'driver_name' => $this->driverName()]);
@ -91,7 +91,7 @@ abstract class AbstractDriver implements Driver {
return $this->transDepth;
}
public function savepointRelease(int $index = null): bool {
public function savepointRelease(?int $index = null): bool {
// assume the most recent savepoint if none was specified
$index = $index ?? $this->transDepth;
if (array_key_exists($index, $this->transStatus)) {
@ -150,7 +150,7 @@ abstract class AbstractDriver implements Driver {
}
}
public function savepointUndo(int $index = null): bool {
public function savepointUndo(?int $index = null): bool {
$index = $index ?? $this->transDepth;
if (array_key_exists($index, $this->transStatus)) {
switch ($this->transStatus[$index]) {

View file

@ -39,10 +39,10 @@ interface Driver {
public function savepointCreate(): int;
/** Manually commits either the latest or a specified nested transaction */
public function savepointRelease(int $index = null): bool;
public function savepointRelease(?int $index = null): bool;
/** Manually rolls back either the latest or a specified nested transaction */
public function savepointUndo(int $index = null): bool;
public function savepointUndo(?int $index = null): bool;
/** Performs an in-place upgrade of the database schema
*

View file

@ -99,7 +99,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver {
}
}
public function savepointRelease(int $index = null): bool {
public function savepointRelease(?int $index = null): bool {
$index = $index ?? $this->transDepth;
$out = parent::savepointRelease($index);
if ($index == $this->transStart) {
@ -109,7 +109,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver {
return $out;
}
public function savepointUndo(int $index = null): bool {
public function savepointUndo(?int $index = null): bool {
$index = $index ?? $this->transDepth;
$out = parent::savepointUndo($index);
if ($index == $this->transStart) {

View file

@ -10,6 +10,8 @@ namespace JKingWeb\Arsse\Db;
trait PDODriver {
use PDOError;
protected $db;
public function exec(string $query): bool {
try {
$this->db->exec($query);

View file

@ -139,7 +139,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver {
}
}
public function savepointRelease(int $index = null): bool {
public function savepointRelease(?int $index = null): bool {
$index = $index ?? $this->transDepth;
$out = parent::savepointRelease($index);
if ($index == $this->transStart) {
@ -149,7 +149,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver {
return $out;
}
public function savepointUndo(int $index = null): bool {
public function savepointUndo(?int $index = null): bool {
$index = $index ?? $this->transDepth;
$out = parent::savepointUndo($index);
if ($index == $this->transStart) {

View file

@ -11,4 +11,6 @@ abstract class AbstractPDODriver extends Driver {
// this class exists solely so SQLite's PDO driver can call methods of the generic PDO driver via parent::method()
// if there's a better way to do this, please FIXME ;)
use \JKingWeb\Arsse\Db\PDODriver;
protected $db;
}

View file

@ -131,7 +131,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver {
}
}
public function schemaUpdate(int $to, string $basePath = null): bool {
public function schemaUpdate(int $to, ?string $basePath = null): bool {
if ($to == 1) {
// if we're initializing the database for the first time, switch to WAL mode
$this->exec("PRAGMA journal_mode = wal");

View file

@ -26,7 +26,7 @@ class Result extends \JKingWeb\Arsse\Db\AbstractResult {
// constructor/destructor
public function __construct(\SQLite3Result $result, array $changes = [0,0], Statement $statement = null) {
public function __construct(\SQLite3Result $result, array $changes = [0,0], ?Statement $statement = null) {
$this->st = $statement; //keeps the statement from being destroyed, invalidating the result set
$this->set = $result;
$this->rows = $changes[0];

View file

@ -60,7 +60,7 @@ class Feed {
}
}
public function __construct(int $feedID = null, string $url, string $lastModified = '', string $etag = '', string $username = '', string $password = '', bool $scrape = false) {
public function __construct(?int $feedID, string $url, string $lastModified = '', string $etag = '', string $username = '', string $password = '', bool $scrape = false) {
// fetch the feed
[$client, $reader] = self::download($url, $lastModified, $etag, $username, $password);
// format the HTTP Last-Modified date returned
@ -288,7 +288,7 @@ class Feed {
return $out;
}
protected function matchToDatabase(int $feedID = null): void {
protected function matchToDatabase(?int $feedID = null): void {
// first perform deduplication on items
$items = $this->deduplicateItems($this->items);
// if we haven't been given a database feed ID to check against, all items are new

View file

@ -16,7 +16,7 @@ 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(string $msgID = "", $vars = null, \Throwable $e = null) {
public function __construct(string $msgID = "", $vars = null, ?\Throwable $e = null) {
if ($msgID === "") {
assert($e !== null, new \Exception("Expecting Picofeed or Guzzle exception when no message specified."));
if ($e instanceof BadResponseException) {

View file

@ -124,7 +124,7 @@ class Lang {
return $out;
}
public function match(string $locale, array $list = null): string {
public function match(string $locale, ?array $list = null): string {
$list = $list ?? $this->listFiles();
$default = ($this->locale === "") ? self::DEFAULT : $this->locale;
return \Locale::lookup($list, $locale, true, $default);

View file

@ -8,7 +8,7 @@ declare(strict_types=1);
namespace JKingWeb\Arsse\Misc;
abstract class Date {
public static function transform($date, string $outFormat = null, string $inFormat = null) {
public static function transform($date, ?string $outFormat = null, ?string $inFormat = null) {
$date = ValueInfo::normalize($date, ValueInfo::T_DATE, $inFormat);
if (!$date) {
return null;
@ -22,7 +22,7 @@ abstract class Date {
return $out;
}
public static function normalize($date, string $inFormat = null): ?\DateTimeImmutable {
public static function normalize($date, ?string $inFormat = null): ?\DateTimeImmutable {
return ValueInfo::normalize($date, ValueInfo::T_DATE, $inFormat);
}

View file

@ -36,7 +36,7 @@ class URL {
* @param string $u Username to add to the URL, replacing any existing credentials
* @param string $p Password to add to the URL, if a username is specified
*/
public static function normalize(string $url, string $u = null, string $p = null): string {
public static function normalize(string $url, ?string $u = null, ?string $p = null): string {
extract(parse_url($url));
$out = "";
if (isset($scheme)) {

View file

@ -60,7 +60,7 @@ class ValueInfo {
'float' => ["U.u", "U.u" ],
];
public static function normalize($value, int $type, string $dateInFormat = null, $dateOutFormat = null) {
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);
@ -511,7 +511,7 @@ class ValueInfo {
}
}
public static function bool($value, bool $default = null): ?bool {
public static function bool($value, ?bool $default = null): ?bool {
if (is_null($value) || ValueInfo::str($value) & ValueInfo::WHITE) {
return $default;
}

View file

@ -76,11 +76,11 @@ class REST {
];
protected $apis = [];
public function __construct(array $apis = null) {
public function __construct(?array $apis = null) {
$this->apis = $apis ?? self::API_LIST;
}
public function dispatch(ServerRequestInterface $req = null): ResponseInterface {
public function dispatch(?ServerRequestInterface $req = null): ResponseInterface {
try {
// ensure the require extensions are loaded
Arsse::checkExtensions(...Arsse::REQUIRED_EXTENSIONS);
@ -159,12 +159,12 @@ class REST {
return $req;
}
public function challenge(ResponseInterface $res, string $realm = null): ResponseInterface {
public function challenge(ResponseInterface $res, ?string $realm = null): ResponseInterface {
$realm = $realm ?? Arsse::$conf->httpRealm;
return $res->withAddedHeader("WWW-Authenticate", 'Basic realm="'.$realm.'", charset="UTF-8"');
}
public function normalizeResponse(ResponseInterface $res, RequestInterface $req = null): ResponseInterface {
public function normalizeResponse(ResponseInterface $res, ?RequestInterface $req = null): ResponseInterface {
// if the response code is 401, issue an HTTP authentication challenge
if ($res->getStatusCode() == 401) {
$res = $this->challenge($res);
@ -203,7 +203,7 @@ class REST {
return $res;
}
public function corsApply(ResponseInterface $res, RequestInterface $req = null): ResponseInterface {
public function corsApply(ResponseInterface $res, ?RequestInterface $req = null): ResponseInterface {
if ($req && $req->getMethod() === "OPTIONS") {
if ($res->hasHeader("Allow")) {
$res = $res->withHeader("Access-Control-Allow-Methods", $res->getHeaderLine("Allow"));
@ -218,7 +218,7 @@ class REST {
return $res->withAddedHeader("Vary", "Origin");
}
public function corsNegotiate(RequestInterface $req, string $allowed = null, string $denied = null): bool {
public function corsNegotiate(RequestInterface $req, ?string $allowed = null, ?string $denied = null): bool {
$allowed = trim($allowed ?? Arsse::$conf->httpOriginsAllowed);
$denied = trim($denied ?? Arsse::$conf->httpOriginsDenied);
// continue if at least one origin is allowed
@ -255,7 +255,7 @@ class REST {
return false;
}
public function corsNormalizeOrigin(string $origin, array $ports = null): string {
public function corsNormalizeOrigin(string $origin, ?array $ports = null): string {
$origin = trim($origin);
if ($origin === "null") {
// if the origin is the special value "null", use it

View file

@ -11,7 +11,7 @@ use JKingWeb\Arsse\Arsse;
use JKingWeb\Arsse\Db\ExceptionInput;
class User {
public function register(string $user, string $password = null): string {
public function register(string $user, ?string $password = null): string {
$password = $password ?? Arsse::$user->generatePassword();
$hash = md5("$user:$password");
$tr = Arsse::$db->begin();

View file

@ -1028,7 +1028,7 @@ class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {
return ['total' => $count, 'entries' => $out];
}
protected function findEntry(int $id, Context $c = null): array {
protected function findEntry(int $id, ?Context $c = null): array {
$c = ($c ?? new Context)->article($id);
$tr = Arsse::$db->begin();
$meta = $this->userMeta(Arsse::$user->id);

View file

@ -135,7 +135,7 @@ class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler {
return implode("/", $path);
}
protected function normalizeInput(array $data, array $types, string $dateFormat = null, int $mode = 0): array {
protected function normalizeInput(array $data, array $types, ?string $dateFormat = null, int $mode = 0): array {
$out = [];
foreach ($types as $key => $type) {
if (isset($data[$key])) {

View file

@ -33,7 +33,7 @@ class Search {
"" => "searchTerms",
];
public static function parse(string $search, string $tz, Context $context = null): ?Context {
public static function parse(string $search, string $tz, ?Context $context = null): ?Context {
// normalize the input
$search = strtolower(trim(preg_replace("<\s+>", " ", $search)));
// set initial state
@ -283,7 +283,7 @@ class Search {
return $context;
}
protected static function processToken(Context $c, string $value, string $tag, bool $neg, string $tz = null): Context {
protected static function processToken(Context $c, string $value, string $tag, bool $neg, ?string $tz = null): Context {
if (!strlen($value) && !strlen($tag)) {
return $c;
} elseif (!strlen($value)) {

View file

@ -35,7 +35,7 @@ class User {
/** @var User\Driver */
protected $u;
public function __construct(\JKingWeb\Arsse\User\Driver $driver = null) {
public function __construct(?\JKingWeb\Arsse\User\Driver $driver = null) {
$this->u = $driver ?? new Arsse::$conf->userDriver;
}

View file

@ -24,7 +24,7 @@ interface Driver {
* @param string $user The username to create
* @param string|null $password The cleartext password to assign to the user, or null to generate a random password
*/
public function userAdd(string $user, string $password = null): ?string;
public function userAdd(string $user, ?string $password = null): ?string;
/** Renames a user
*
@ -50,14 +50,14 @@ interface Driver {
* @param string|null $password The cleartext password to assign to the user, or null to generate a random password
* @param string|null $oldPassword The user's previous password, if known
*/
public function userPasswordSet(string $user, ?string $newPassword, string $oldPassword = null): ?string;
public function userPasswordSet(string $user, ?string $newPassword, ?string $oldPassword = null): ?string;
/** Removes a user's password; this makes authentication fail unconditionally
*
* @param string $user The user for whom to change the password
* @param string|null $oldPassword The user's previous password, if known
*/
public function userPasswordUnset(string $user, string $oldPassword = null): bool;
public function userPasswordUnset(string $user, ?string $oldPassword = null): bool;
/** Retrieves metadata about a user
*

View file

@ -33,7 +33,7 @@ class Driver implements \JKingWeb\Arsse\User\Driver {
return password_verify($password, $hash);
}
public function userAdd(string $user, string $password = null): ?string {
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);
@ -59,7 +59,7 @@ class Driver implements \JKingWeb\Arsse\User\Driver {
return Arsse::$db->userList();
}
public function userPasswordSet(string $user, ?string $newPassword, string $oldPassword = null): ?string {
public function userPasswordSet(string $user, ?string $newPassword, ?string $oldPassword = null): ?string {
// do nothing: the internal database is updated regardless of what the driver does (assuming it does not throw an exception)
// throw an exception if the user does not exist
if (!$this->userExists($user)) {
@ -69,7 +69,7 @@ class Driver implements \JKingWeb\Arsse\User\Driver {
}
}
public function userPasswordUnset(string $user, string $oldPassword = null): bool {
public function userPasswordUnset(string $user, ?string $oldPassword = null): bool {
// do nothing: the internal database is updated regardless of what the driver does (assuming it does not throw an exception)
// throw an exception if the user does not exist
if (!$this->userExists($user)) {

View file

@ -12,7 +12,7 @@ use JKingWeb\Arsse\Misc\URL;
/** @covers \JKingWeb\Arsse\Misc\URL */
class TestURL extends \JKingWeb\Arsse\Test\AbstractTest {
/** @dataProvider provideNormalizations */
public function testNormalizeAUrl(string $url, string $exp, string $user = null, string $pass = null): void {
public function testNormalizeAUrl(string $url, string $exp, ?string $user = null, ?string $pass = null): void {
$this->assertSame($exp, URL::normalize($url, $user, $pass));
}

View file

@ -172,7 +172,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest {
}
/** @dataProvider provideTokenAuthenticationRequests */
public function testAuthenticateAUserToken(bool $httpRequired, bool $tokenEnforced, string $httpUser = null, array $dataPost, array $dataGet, ResponseInterface $exp): void {
public function testAuthenticateAUserToken(bool $httpRequired, bool $tokenEnforced, ?string $httpUser, array $dataPost, array $dataGet, ResponseInterface $exp): void {
self::setConf([
'userHTTPAuthRequired' => $httpRequired,
'userSessionEnforced' => $tokenEnforced,

View file

@ -38,7 +38,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest {
}
/** @dataProvider providePasswordCreations */
public function testRegisterAUserPassword(string $user, string $password = null, $exp): void {
public function testRegisterAUserPassword(string $user, ?string $password, $exp): void {
$this->userMock->generatePassword->returns("RANDOM_PASSWORD");
$this->dbMock->tokenCreate->does(function($user, $class, $id = null) {
return $id ?? "RANDOM_TOKEN";

View file

@ -105,7 +105,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest {
}
/** @dataProvider provideUnnormalizedOrigins */
public function testNormalizeOrigins(string $origin, string $exp, array $ports = null): void {
public function testNormalizeOrigins(string $origin, string $exp, ?array $ports = null): void {
$r = new REST();
$act = $r->corsNormalizeOrigin($origin, $ports);
$this->assertSame($exp, $act);
@ -148,7 +148,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest {
}
/** @dataProvider provideCorsNegotiations */
public function testNegotiateCors($origin, bool $exp, string $allowed = null, string $denied = null): void {
public function testNegotiateCors($origin, bool $exp, ?string $allowed = null, ?string $denied = null): void {
self::setConf();
$rMock = $this->partialMock(REST::class);
$rMock->corsNormalizeOrigin->does(function($origin) {
@ -250,7 +250,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest {
}
/** @dataProvider provideUnnormalizedResponses */
public function testNormalizeHttpResponses(ResponseInterface $res, ResponseInterface $exp, RequestInterface $req = null): void {
public function testNormalizeHttpResponses(ResponseInterface $res, ResponseInterface $exp, ?RequestInterface $req = null): void {
$rMock = $this->partialMock(REST::class);
$rMock->corsNegotiate->returns(true);
$rMock->challenge->does(function($res) {

View file

@ -150,7 +150,7 @@ LONG_STRING;
$this->h = new API();
}
protected function req($data, string $method = "POST", string $target = "", string $strData = null, string $user = null): ResponseInterface {
protected function req($data, string $method = "POST", string $target = "", ?string $strData = null, ?string $user = null): ResponseInterface {
Arsse::$obj = $this->objMock->get();
Arsse::$db = $this->dbMock->get();
Arsse::$user = $this->userMock->get();
@ -1223,19 +1223,19 @@ LONG_STRING;
$this->assertMessage($exp, $this->req($in));
}
protected function filterFolders(int $id = null): array {
protected function filterFolders(?int $id = null): array {
return array_filter($this->folders, function($value) use ($id) {
return $value['parent'] == $id;
});
}
protected function filterSubs(int $folder = null): array {
protected function filterSubs(?int $folder = null): array {
return array_filter($this->subscriptions, function($value) use ($folder) {
return $value['folder'] == $folder;
});
}
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']);

View file

@ -29,7 +29,7 @@ class TestIcon extends \JKingWeb\Arsse\Test\AbstractTest {
$this->h = new Icon();
}
protected function req(string $target, string $method = "GET", string $user = null): ResponseInterface {
protected function req(string $target, string $method = "GET", ?string $user = null): ResponseInterface {
Arsse::$db = $this->dbMock->get();
$prefix = "/tt-rss/feed-icons/";
$url = $prefix.$target;

View file

@ -77,7 +77,7 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase {
Arsse::$conf = (($force ? null : Arsse::$conf) ?? (new Conf))->import($defaults)->import($conf);
}
protected function serverRequest(string $method, string $url, string $urlPrefix, array $headers = [], array $vars = [], $body = null, string $type = "", $params = [], string $user = null): ServerRequestInterface {
protected function serverRequest(string $method, string $url, string $urlPrefix, array $headers = [], array $vars = [], $body = null, string $type = "", $params = [], ?string $user = null): ServerRequestInterface {
$server = [
'REQUEST_METHOD' => $method,
'REQUEST_URI' => $url,

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -340,23 +340,24 @@
},
{
"name": "mikey179/vfsstream",
"version": "v1.6.11",
"version": "v1.6.12",
"source": {
"type": "git",
"url": "https://github.com/bovigo/vfsStream.git",
"reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f"
"reference": "fe695ec993e0a55c3abdda10a9364eb31c6f1bf0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bovigo/vfsStream/zipball/17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f",
"reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f",
"url": "https://api.github.com/repos/bovigo/vfsStream/zipball/fe695ec993e0a55c3abdda10a9364eb31c6f1bf0",
"reference": "fe695ec993e0a55c3abdda10a9364eb31c6f1bf0",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
"php": ">=7.1.0"
},
"require-dev": {
"phpunit/phpunit": "^4.5|^5.0"
"phpunit/phpunit": "^7.5||^8.5||^9.6",
"yoast/phpunit-polyfills": "^2.0"
},
"type": "library",
"extra": {
@ -387,20 +388,20 @@
"source": "https://github.com/bovigo/vfsStream/tree/master",
"wiki": "https://github.com/bovigo/vfsStream/wiki"
},
"time": "2022-02-23T02:02:42+00:00"
"time": "2024-08-29T18:43:31+00:00"
},
{
"name": "myclabs/deep-copy",
"version": "1.11.1",
"version": "1.12.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c"
"reference": "123267b2c49fbf30d78a7b2d333f6be754b94845"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
"reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845",
"reference": "123267b2c49fbf30d78a7b2d333f6be754b94845",
"shasum": ""
},
"require": {
@ -408,11 +409,12 @@
},
"conflict": {
"doctrine/collections": "<1.6.8",
"doctrine/common": "<2.13.3 || >=3,<3.2.2"
"doctrine/common": "<2.13.3 || >=3 <3.2.2"
},
"require-dev": {
"doctrine/collections": "^1.6.8",
"doctrine/common": "^2.13.3 || ^3.2.2",
"phpspec/prophecy": "^1.10",
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
@ -438,7 +440,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.11.1"
"source": "https://github.com/myclabs/DeepCopy/tree/1.12.1"
},
"funding": [
{
@ -446,29 +448,31 @@
"type": "tidelift"
}
],
"time": "2023-03-08T13:26:56+00:00"
"time": "2024-11-08T17:47:46+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.18.0",
"version": "v5.3.1",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999"
"reference": "8eea230464783aa9671db8eea6f8c6ac5285794b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999",
"reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b",
"reference": "8eea230464783aa9671db8eea6f8c6ac5285794b",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-json": "*",
"ext-tokenizer": "*",
"php": ">=7.0"
"php": ">=7.4"
},
"require-dev": {
"ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
"phpunit/phpunit": "^9.0"
},
"bin": [
"bin/php-parse"
@ -476,7 +480,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.9-dev"
"dev-master": "5.0-dev"
}
},
"autoload": {
@ -500,26 +504,27 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0"
"source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1"
},
"time": "2023-12-10T21:03:43+00:00"
"time": "2024-10-08T18:51:32+00:00"
},
{
"name": "phar-io/manifest",
"version": "2.0.3",
"version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
"reference": "97803eca37d319dfa7826cc2437fc020857acb53"
"reference": "54750ef60c58e43759730615a392c31c80e23176"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
"reference": "97803eca37d319dfa7826cc2437fc020857acb53",
"url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176",
"reference": "54750ef60c58e43759730615a392c31c80e23176",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-phar": "*",
"ext-xmlwriter": "*",
"phar-io/version": "^3.0.1",
@ -560,9 +565,15 @@
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"support": {
"issues": "https://github.com/phar-io/manifest/issues",
"source": "https://github.com/phar-io/manifest/tree/2.0.3"
"source": "https://github.com/phar-io/manifest/tree/2.0.4"
},
"time": "2021-07-20T11:28:43+00:00"
"funding": [
{
"url": "https://github.com/theseer",
"type": "github"
}
],
"time": "2024-03-03T12:33:53+00:00"
},
{
"name": "phar-io/version",
@ -617,35 +628,35 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.30",
"version": "9.2.32",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089"
"reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089",
"reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5",
"reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.18 || ^5.0",
"nikic/php-parser": "^4.19.1 || ^5.1.0",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
"sebastian/code-unit-reverse-lookup": "^2.0.2",
"sebastian/complexity": "^2.0",
"sebastian/environment": "^5.1.2",
"sebastian/lines-of-code": "^1.0.3",
"sebastian/version": "^3.0.1",
"theseer/tokenizer": "^1.2.0"
"phpunit/php-file-iterator": "^3.0.6",
"phpunit/php-text-template": "^2.0.4",
"sebastian/code-unit-reverse-lookup": "^2.0.3",
"sebastian/complexity": "^2.0.3",
"sebastian/environment": "^5.1.5",
"sebastian/lines-of-code": "^1.0.4",
"sebastian/version": "^3.0.2",
"theseer/tokenizer": "^1.2.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
"phpunit/phpunit": "^9.6"
},
"suggest": {
"ext-pcov": "PHP extension that provides line coverage",
@ -654,7 +665,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "9.2-dev"
"dev-main": "9.2.x-dev"
}
},
"autoload": {
@ -683,7 +694,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30"
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32"
},
"funding": [
{
@ -691,7 +702,7 @@
"type": "github"
}
],
"time": "2023-12-22T06:47:57+00:00"
"time": "2024-08-22T04:23:01+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -936,45 +947,45 @@
},
{
"name": "phpunit/phpunit",
"version": "9.6.15",
"version": "9.6.22",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "05017b80304e0eb3f31d90194a563fd53a6021f1"
"reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05017b80304e0eb3f31d90194a563fd53a6021f1",
"reference": "05017b80304e0eb3f31d90194a563fd53a6021f1",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f80235cb4d3caa59ae09be3adf1ded27521d1a9c",
"reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.3.1 || ^2",
"doctrine/instantiator": "^1.5.0 || ^2",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
"myclabs/deep-copy": "^1.10.1",
"phar-io/manifest": "^2.0.3",
"phar-io/version": "^3.0.2",
"myclabs/deep-copy": "^1.12.1",
"phar-io/manifest": "^2.0.4",
"phar-io/version": "^3.2.1",
"php": ">=7.3",
"phpunit/php-code-coverage": "^9.2.28",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-code-coverage": "^9.2.32",
"phpunit/php-file-iterator": "^3.0.6",
"phpunit/php-invoker": "^3.1.1",
"phpunit/php-text-template": "^2.0.3",
"phpunit/php-timer": "^5.0.2",
"sebastian/cli-parser": "^1.0.1",
"sebastian/code-unit": "^1.0.6",
"phpunit/php-text-template": "^2.0.4",
"phpunit/php-timer": "^5.0.3",
"sebastian/cli-parser": "^1.0.2",
"sebastian/code-unit": "^1.0.8",
"sebastian/comparator": "^4.0.8",
"sebastian/diff": "^4.0.3",
"sebastian/environment": "^5.1.3",
"sebastian/exporter": "^4.0.5",
"sebastian/global-state": "^5.0.1",
"sebastian/object-enumerator": "^4.0.3",
"sebastian/resource-operations": "^3.0.3",
"sebastian/type": "^3.2",
"sebastian/diff": "^4.0.6",
"sebastian/environment": "^5.1.5",
"sebastian/exporter": "^4.0.6",
"sebastian/global-state": "^5.0.7",
"sebastian/object-enumerator": "^4.0.4",
"sebastian/resource-operations": "^3.0.4",
"sebastian/type": "^3.2.1",
"sebastian/version": "^3.0.2"
},
"suggest": {
@ -1019,7 +1030,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.15"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.22"
},
"funding": [
{
@ -1035,20 +1046,20 @@
"type": "tidelift"
}
],
"time": "2023-12-01T16:55:19+00:00"
"time": "2024-12-05T13:48:26+00:00"
},
{
"name": "sebastian/cli-parser",
"version": "1.0.1",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
"reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
"reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
"reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
"reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
"shasum": ""
},
"require": {
@ -1083,7 +1094,7 @@
"homepage": "https://github.com/sebastianbergmann/cli-parser",
"support": {
"issues": "https://github.com/sebastianbergmann/cli-parser/issues",
"source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1"
"source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2"
},
"funding": [
{
@ -1091,7 +1102,7 @@
"type": "github"
}
],
"time": "2020-09-28T06:08:49+00:00"
"time": "2024-03-02T06:27:43+00:00"
},
{
"name": "sebastian/code-unit",
@ -1337,16 +1348,16 @@
},
{
"name": "sebastian/diff",
"version": "4.0.5",
"version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131"
"reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
"reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc",
"reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc",
"shasum": ""
},
"require": {
@ -1391,7 +1402,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
"source": "https://github.com/sebastianbergmann/diff/tree/4.0.5"
"source": "https://github.com/sebastianbergmann/diff/tree/4.0.6"
},
"funding": [
{
@ -1399,7 +1410,7 @@
"type": "github"
}
],
"time": "2023-05-07T05:35:17+00:00"
"time": "2024-03-02T06:30:58+00:00"
},
{
"name": "sebastian/environment",
@ -1466,16 +1477,16 @@
},
{
"name": "sebastian/exporter",
"version": "4.0.5",
"version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d"
"reference": "78c00df8f170e02473b682df15bfcdacc3d32d72"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
"reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72",
"reference": "78c00df8f170e02473b682df15bfcdacc3d32d72",
"shasum": ""
},
"require": {
@ -1531,7 +1542,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5"
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6"
},
"funding": [
{
@ -1539,20 +1550,20 @@
"type": "github"
}
],
"time": "2022-09-14T06:03:37+00:00"
"time": "2024-03-02T06:33:00+00:00"
},
{
"name": "sebastian/global-state",
"version": "5.0.6",
"version": "5.0.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "bde739e7565280bda77be70044ac1047bc007e34"
"reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34",
"reference": "bde739e7565280bda77be70044ac1047bc007e34",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
"reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
"shasum": ""
},
"require": {
@ -1595,7 +1606,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6"
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7"
},
"funding": [
{
@ -1603,7 +1614,7 @@
"type": "github"
}
],
"time": "2023-08-02T09:26:13+00:00"
"time": "2024-03-02T06:35:11+00:00"
},
{
"name": "sebastian/lines-of-code",
@ -1839,16 +1850,16 @@
},
{
"name": "sebastian/resource-operations",
"version": "3.0.3",
"version": "3.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
"reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
"reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
"reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
"url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
"reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
"shasum": ""
},
"require": {
@ -1860,7 +1871,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
"dev-main": "3.0-dev"
}
},
"autoload": {
@ -1881,8 +1892,7 @@
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"support": {
"issues": "https://github.com/sebastianbergmann/resource-operations/issues",
"source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3"
"source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4"
},
"funding": [
{
@ -1890,7 +1900,7 @@
"type": "github"
}
],
"time": "2020-09-28T06:45:17+00:00"
"time": "2024-03-14T16:00:52+00:00"
},
{
"name": "sebastian/type",
@ -2003,16 +2013,16 @@
},
{
"name": "theseer/tokenizer",
"version": "1.2.2",
"version": "1.2.3",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
"reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96"
"reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
"reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
"reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
"shasum": ""
},
"require": {
@ -2041,7 +2051,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
"source": "https://github.com/theseer/tokenizer/tree/1.2.2"
"source": "https://github.com/theseer/tokenizer/tree/1.2.3"
},
"funding": [
{
@ -2049,20 +2059,20 @@
"type": "github"
}
],
"time": "2023-11-20T00:12:19+00:00"
"time": "2024-03-03T12:36:25+00:00"
},
{
"name": "webmozart/glob",
"version": "4.6.0",
"version": "4.7.0",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/glob.git",
"reference": "3c17f7dec3d9d0e87b575026011f2e75a56ed655"
"reference": "8a2842112d6916e61e0e15e316465b611f3abc17"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozarts/glob/zipball/3c17f7dec3d9d0e87b575026011f2e75a56ed655",
"reference": "3c17f7dec3d9d0e87b575026011f2e75a56ed655",
"url": "https://api.github.com/repos/webmozarts/glob/zipball/8a2842112d6916e61e0e15e316465b611f3abc17",
"reference": "8a2842112d6916e61e0e15e316465b611f3abc17",
"shasum": ""
},
"require": {
@ -2096,17 +2106,17 @@
"description": "A PHP implementation of Ant's glob.",
"support": {
"issues": "https://github.com/webmozarts/glob/issues",
"source": "https://github.com/webmozarts/glob/tree/4.6.0"
"source": "https://github.com/webmozarts/glob/tree/4.7.0"
},
"time": "2022-05-24T19:45:58+00:00"
"time": "2024-03-07T20:33:40+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"platform": {},
"platform-dev": {},
"plugin-api-version": "2.6.0"
}

View file

@ -1,6 +1,6 @@
{
"require-dev": {
"consolidation/robo": "^3.0",
"consolidation/robo": "^5.0",
"pear/archive_tar": "^1.4"
}
}

File diff suppressed because it is too large Load diff