From 22397366614e9d80eed49d28994c5801e8821d27 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 8 May 2021 19:15:09 +0200 Subject: Add Psalm as dev dependency --- composer.json | 4 +- composer.lock | 2127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 2129 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 83619c6..65b7e58 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,9 @@ } ], "require-dev": { - "wp-phpunit/wp-phpunit": "^5.7" + "wp-phpunit/wp-phpunit": "^5.7", + "vimeo/psalm": "^4.7", + "humanmade/psalm-plugin-wordpress": "^2.0" }, "scripts": { "test": "npm run wp-env run phpunit 'phpunit -c /var/www/html/wp-content/plugins/giglogadmin/phpunit.xml'" diff --git a/composer.lock b/composer.lock index 72d332c..9a24a89 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,2134 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "29fc239b9db613932cc95a9291af4da1", + "content-hash": "da8593c79fc71116e3079512611bb8ec", "packages": [], "packages-dev": [ + { + "name": "amphp/amp", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/amphp/amp.git", + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/amp/zipball/efca2b32a7580087adb8aabbff6be1dc1bb924a9", + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9", + "shasum": "" + }, + "require": { + "php": ">=7" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6.0.9 | ^7", + "psalm/phar": "^3.11@dev", + "react/promise": "^2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Amp\\": "lib" + }, + "files": [ + "lib/functions.php", + "lib/Internal/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "http://amphp.org/amp", + "keywords": [ + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-01-10T17:06:37+00:00" + }, + { + "name": "amphp/byte-stream", + "version": "v1.8.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/byte-stream.git", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.4", + "friendsofphp/php-cs-fixer": "^2.3", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6 || ^7 || ^8", + "psalm/phar": "^3.11.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Amp\\ByteStream\\": "lib" + }, + "files": [ + "lib/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "http://amphp.org/byte-stream", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-03-30T17:13:30+00:00" + }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.1", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1" + }, + "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-11-11T10:22:58+00:00" + }, + { + "name": "composer/semver", + "version": "3.2.4", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.4" + }, + "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-11-13T08:59:24+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "31d57697eb1971712a08031cfaff5a846d10bdf5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/31d57697eb1971712a08031cfaff5a846d10bdf5", + "reference": "31d57697eb1971712a08031cfaff5a846d10bdf5", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.0" + }, + "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": "2021-04-09T19:40:06+00:00" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "support": { + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + }, + "time": "2019-12-04T15:06:13+00:00" + }, + { + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.0", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/06f0b06043c7438959dbdeed8bb3f699a19be22e", + "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e", + "shasum": "" + }, + "require": { + "netresearch/jsonmapper": "^1.0 || ^2.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "AdvancedJsonRpc\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "A more advanced JSONRPC implementation", + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.0" + }, + "time": "2021-01-10T17:48:47+00:00" + }, + { + "name": "felixfbecker/language-server-protocol", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-language-server-protocol.git", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpstan/phpstan": "*", + "squizlabs/php_codesniffer": "^3.1", + "vimeo/psalm": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "LanguageServerProtocol\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "PHP classes for the Language Server Protocol", + "keywords": [ + "language", + "microsoft", + "php", + "server" + ], + "support": { + "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + }, + "time": "2021-02-22T14:02:09+00:00" + }, + { + "name": "humanmade/psalm-plugin-wordpress", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/humanmade/psalm-plugin-wordpress.git", + "reference": "c15b5d5159ef879f0707c33cc9a3fe993618edd1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/humanmade/psalm-plugin-wordpress/zipball/c15b5d5159ef879f0707c33cc9a3fe993618edd1", + "reference": "c15b5d5159ef879f0707c33cc9a3fe993618edd1", + "shasum": "" + }, + "require": { + "johnbillion/wp-hooks": "^0.4.4", + "php-stubs/wordpress-stubs": "^5.5", + "vimeo/psalm": "^4" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "psalm-plugin", + "extra": { + "psalm": { + "pluginClass": "PsalmWordPress\\Plugin" + } + }, + "autoload": { + "psr-4": { + "PsalmWordPress\\": [ + "." + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Joe Hoyle", + "email": "joehoyle@gmail.com" + } + ], + "description": "WordPress stubs and plugin for Psalm.", + "support": { + "issues": "https://github.com/humanmade/psalm-plugin-wordpress/issues", + "source": "https://github.com/humanmade/psalm-plugin-wordpress/tree/2.0.4" + }, + "time": "2021-03-10T12:17:03+00:00" + }, + { + "name": "johnbillion/wp-hooks", + "version": "0.4.4", + "source": { + "type": "git", + "url": "https://github.com/johnbillion/wp-hooks.git", + "reference": "eb9d32917bb5a0a10a3fc9bedbb3f509f885b769" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/johnbillion/wp-hooks/zipball/eb9d32917bb5a0a10a3fc9bedbb3f509f885b769", + "reference": "eb9d32917bb5a0a10a3fc9bedbb3f509f885b769", + "shasum": "" + }, + "require-dev": { + "johnbillion/wp-hooks-generator": "~0.5.0", + "oomphinc/composer-installers-extender": "^1.1", + "roots/wordpress": "dev-nightly" + }, + "type": "library", + "extra": { + "wordpress-install-dir": "vendor/wordpress/wordpress", + "wp-hooks": { + "ignore-files": [ + "wp-admin/includes/deprecated.php", + "wp-admin/includes/ms-deprecated.php", + "wp-content/", + "wp-includes/deprecated.php", + "wp-includes/ID3/", + "wp-includes/IXR/", + "wp-includes/ms-deprecated.php", + "wp-includes/pomo/", + "wp-includes/random_compat/", + "wp-includes/Requests/", + "wp-includes/SimplePie/", + "wp-includes/sodium_compat/", + "wp-includes/Text/" + ], + "ignore-hooks": [ + "load-categories.php", + "load-edit-link-categories.php", + "load-edit-tags.php", + "load-page-new.php", + "load-page.php", + "option_enable_xmlrpc", + "pre_option_enable_xmlrpc", + "{$tag}" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "John Blackbourn", + "homepage": "https://johnblackbourn.com/" + } + ], + "description": "All the actions and filters from WordPress core in machine-readable JSON format.", + "support": { + "issues": "https://github.com/johnbillion/wp-hooks/issues", + "source": "https://github.com/johnbillion/wp-hooks/tree/0.4.4" + }, + "time": "2020-08-29T20:58:28+00:00" + }, + { + "name": "netresearch/jsonmapper", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e", + "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0", + "squizlabs/php_codesniffer": "~3.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JsonMapper": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" + } + ], + "description": "Map nested JSON structures onto PHP classes", + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/master" + }, + "time": "2020-04-16T18:48:43+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.10.5", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", + "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5" + }, + "time": "2021-05-03T19:11:20+00:00" + }, + { + "name": "openlss/lib-array2xml", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/nullivex/lib-array2xml.git", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "LSS": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Bryan Tong", + "email": "bryan@nullivex.com", + "homepage": "https://www.nullivex.com" + }, + { + "name": "Tony Butler", + "email": "spudz76@gmail.com", + "homepage": "https://www.nullivex.com" + } + ], + "description": "Array2XML conversion library credit to lalit.org", + "homepage": "https://www.nullivex.com", + "keywords": [ + "array", + "array conversion", + "xml", + "xml conversion" + ], + "support": { + "issues": "https://github.com/nullivex/lib-array2xml/issues", + "source": "https://github.com/nullivex/lib-array2xml/tree/master" + }, + "time": "2019-03-29T20:06:56+00:00" + }, + { + "name": "php-stubs/wordpress-stubs", + "version": "v5.7.0", + "source": { + "type": "git", + "url": "https://github.com/php-stubs/wordpress-stubs.git", + "reference": "69baf30e7c92f149526da950a68222af05f7bc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/69baf30e7c92f149526da950a68222af05f7bc67", + "reference": "69baf30e7c92f149526da950a68222af05f7bc67", + "shasum": "" + }, + "replace": { + "giacocorsiglia/wordpress-stubs": "*" + }, + "require-dev": { + "giacocorsiglia/stubs-generator": "^0.5.0", + "php": "~7.1" + }, + "suggest": { + "paragonie/sodium_compat": "Pure PHP implementation of libsodium", + "symfony/polyfill-php73": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WordPress function and class declaration stubs for static analysis.", + "homepage": "https://github.com/php-stubs/wordpress-stubs", + "keywords": [ + "PHPStan", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/php-stubs/wordpress-stubs/issues", + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v5.7.0" + }, + "time": "2021-03-10T10:29:23+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "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.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "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": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "symfony/console", + "version": "v5.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "90374b8ed059325b49a29b55b3f8bb4062c87629" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/90374b8ed059325b49a29b55b3f8bb4062c87629", + "reference": "90374b8ed059325b49a29b55b3f8bb4062c87629", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "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" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.2.7" + }, + "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": "2021-04-19T14:07:32+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + }, + "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": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-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" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + }, + "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": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-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" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + }, + "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": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "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 the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + }, + "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": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + }, + "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": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-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" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + }, + "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": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "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": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + }, + "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": "2021-04-01T10:43:52+00:00" + }, + { + "name": "symfony/string", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", + "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", + "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", + "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": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.2.6" + }, + "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": "2021-03-17T17:12:15+00:00" + }, + { + "name": "vimeo/psalm", + "version": "4.7.2", + "source": { + "type": "git", + "url": "https://github.com/vimeo/psalm.git", + "reference": "83a0325c0a95c0ab531d6b90c877068b464377b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/83a0325c0a95c0ab531d6b90c877068b464377b5", + "reference": "83a0325c0a95c0ab531d6b90c877068b464377b5", + "shasum": "" + }, + "require": { + "amphp/amp": "^2.4.2", + "amphp/byte-stream": "^1.5", + "composer/package-versions-deprecated": "^1.8.0", + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.1 || ^2.0", + "dnoegel/php-xdg-base-dir": "^0.1.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "felixfbecker/advanced-json-rpc": "^3.0.3", + "felixfbecker/language-server-protocol": "^1.5", + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "nikic/php-parser": "^4.10.1", + "openlss/lib-array2xml": "^1.0", + "php": "^7.1|^8", + "sebastian/diff": "^3.0 || ^4.0", + "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0", + "webmozart/path-util": "^2.3" + }, + "provide": { + "psalm/psalm": "self.version" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2", + "brianium/paratest": "^4.0||^6.0", + "ext-curl": "*", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpdocumentor/reflection-docblock": "^5", + "phpmyadmin/sql-parser": "5.1.0||dev-master", + "phpspec/prophecy": ">=1.9.0", + "phpunit/phpunit": "^9.0", + "psalm/plugin-phpunit": "^0.13", + "slevomat/coding-standard": "^6.3.11", + "squizlabs/php_codesniffer": "^3.5", + "symfony/process": "^4.3", + "weirdan/phpunit-appveyor-reporter": "^1.0.0", + "weirdan/prophecy-shim": "^1.0 || ^2.0" + }, + "suggest": { + "ext-igbinary": "^2.0.5" + }, + "bin": [ + "psalm", + "psalm-language-server", + "psalm-plugin", + "psalm-refactor", + "psalter" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev", + "dev-3.x": "3.x-dev", + "dev-2.x": "2.x-dev", + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psalm\\": "src/Psalm/" + }, + "files": [ + "src/functions.php", + "src/spl_object_id.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthew Brown" + } + ], + "description": "A static analysis tool for finding errors in PHP applications", + "keywords": [ + "code", + "inspection", + "php" + ], + "support": { + "issues": "https://github.com/vimeo/psalm/issues", + "source": "https://github.com/vimeo/psalm/tree/4.7.2" + }, + "time": "2021-05-01T20:56:25+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" + }, + { + "name": "webmozart/path-util", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "webmozart/assert": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\PathUtil\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "support": { + "issues": "https://github.com/webmozart/path-util/issues", + "source": "https://github.com/webmozart/path-util/tree/2.3.0" + }, + "time": "2015-12-17T08:42:14+00:00" + }, { "name": "wp-phpunit/wp-phpunit", "version": "5.7.0", -- cgit v1.2.3 From 4977a733b6f614de868fc405b820d5c66e5bf9b7 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 8 May 2021 19:18:38 +0200 Subject: Auto fixup missing return types by Psalm --- generate-sample-gig-data.php | 9 ++++++++ giglogadmin.php | 12 +++++----- includes/admin/helpfiles/instr_photog.php | 2 +- includes/admin/helpfiles/instr_reviewers.php | 2 +- includes/admin/helpfiles/instrunctions.php | 2 +- includes/admin/register_db_tables.php | 5 ++++- includes/admin/views/giglog_admin_page.php | 26 +++++++++++++--------- includes/admin/views/giglog_import_gigs.php | 8 ++++--- includes/band.php | 9 ++++++-- includes/concert.php | 7 ++++-- includes/concertlogs.php | 4 +++- includes/public/shortcodes/giglog_bands.php | 4 ++-- .../shortcodes/giglog_display_unprocessed.php | 6 ++--- .../public/shortcodes/giglog_photographers.php | 16 ++++++++----- .../public/shortcodes/giglog_process_files.php | 2 +- includes/venue.php | 20 ++++++++++++----- 16 files changed, 91 insertions(+), 43 deletions(-) diff --git a/generate-sample-gig-data.php b/generate-sample-gig-data.php index 26ba0cf..bbc3e7d 100644 --- a/generate-sample-gig-data.php +++ b/generate-sample-gig-data.php @@ -51,6 +51,9 @@ class BandNameGenerator extends GeneratorBase "ed", ); + /** + * @return string + */ public function get() { $parts = array( @@ -91,6 +94,9 @@ class VenueGenerator extends GeneratorBase "lighthouse" ); + /** + * @return string + */ public function get() { $parts = array( @@ -104,6 +110,9 @@ class VenueGenerator extends GeneratorBase class LinkGenerator extends GeneratorBase { + /** + * @return string + */ public function get() { return 'https://example.com/' . bin2hex(random_bytes(8)); diff --git a/giglogadmin.php b/giglogadmin.php index 0e8b399..d71496b 100644 --- a/giglogadmin.php +++ b/giglogadmin.php @@ -36,7 +36,7 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) { class GiglogAdmin_Plugin { - static public function init() { + static public function init(): void { add_shortcode('giglog_cities', 'giglogadmin_getfilters'); add_shortcode('giglog_bands', 'giglogadmin_getconcerts'); add_shortcode('giglog_unprocessed', 'giglogadmin_display_unprocessed'); @@ -49,18 +49,20 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) { add_filter( 'wp_nav_menu_args', array( 'GiglogAdmin_Plugin', 'nav_menu_args' )); } - static function activate() { + static function activate(): void { require_once __DIR__ . '/includes/admin/register_db_tables.php'; } - static function deactivate() { + static function deactivate(): void { } /** * Adds the 'Giglog' top level menu to the left side WordPress admin * menu. Other subpages will come later. + * + * @return void */ - static function add_admin_pages() { + static function add_admin_pages(): void { $top = add_menu_page( "Giglog admin", // Page title "Giglog", // Menu title @@ -86,7 +88,7 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) { wp_enqueue_style('css_style'); } - static function add_help_pages() { + static function add_help_pages(): void { add_menu_page( "Help for ET users", // Page title "Help for ET users", // Menu title diff --git a/includes/admin/helpfiles/instr_photog.php b/includes/admin/helpfiles/instr_photog.php index 0750557..f661c5f 100644 --- a/includes/admin/helpfiles/instr_photog.php +++ b/includes/admin/helpfiles/instr_photog.php @@ -13,7 +13,7 @@ if ( !class_exists( 'Instructions_Photogs' ) ) { - static function render_instr_photo_html() { + static function render_instr_photo_html(): void { diff --git a/includes/admin/helpfiles/instr_reviewers.php b/includes/admin/helpfiles/instr_reviewers.php index e00a432..3632980 100644 --- a/includes/admin/helpfiles/instr_reviewers.php +++ b/includes/admin/helpfiles/instr_reviewers.php @@ -9,7 +9,7 @@ if ( !class_exists( 'Instructions_Reviewers' ) ) { class Instructions_Reviewers { - static function render_instr_rev_html() { + static function render_instr_rev_html(): void { ?> diff --git a/includes/admin/helpfiles/instrunctions.php b/includes/admin/helpfiles/instrunctions.php index 49b77fe..b9c4d89 100644 --- a/includes/admin/helpfiles/instrunctions.php +++ b/includes/admin/helpfiles/instrunctions.php @@ -9,7 +9,7 @@ if ( !class_exists( 'Instructions_Page' ) ) { class Instructions_Page { - static function render_instr_html() { + static function render_instr_html(): void { ?> diff --git a/includes/admin/register_db_tables.php b/includes/admin/register_db_tables.php index 947be22..11223b3 100644 --- a/includes/admin/register_db_tables.php +++ b/includes/admin/register_db_tables.php @@ -5,7 +5,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later if (!function_exists('giglogadmin_populate_countries')) { - function giglogadmin_populate_countries() + function giglogadmin_populate_countries(): void { global $wpdb; $wpdb->query( @@ -254,6 +254,9 @@ if (!function_exists('giglogadmin_populate_countries')) { if ( !function_exists( "giglog_register_db_tables") ) { + /** + * @return void + */ function giglog_register_db_tables() { $db_version = get_option('giglogadmin_db_version'); diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index 72a34eb..f2b6edd 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -9,7 +9,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { require_once __DIR__ . '/../../venue.php'; class GiglogAdmin_AdminPage { - static function render_html() { + static function render_html(): void { ?>

Giglog Admin

@@ -36,7 +36,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { echo(GiglogAdmin_AdminPage::editforms()); //not sure why it doesn't show without the echo? } - static function get_allvenues($invenue) + static function get_allvenues($invenue): string { $select = ''; diff --git a/includes/public/shortcodes/giglog_photographers.php b/includes/public/shortcodes/giglog_photographers.php index 500445a..829c53e 100644 --- a/includes/public/shortcodes/giglog_photographers.php +++ b/includes/public/shortcodes/giglog_photographers.php @@ -10,7 +10,7 @@ * Admin users also control concert statuses here */ -function giglogadmin_assignconcert($p1, $c) +function giglogadmin_assignconcert($p1, $c): void { global $wpdb; @@ -40,7 +40,7 @@ function giglogadmin_assignconcert($p1, $c) } -function giglogadmin_unassignconcert($p1, $c) +function giglogadmin_unassignconcert($p1, $c): void { global $wpdb; @@ -71,6 +71,9 @@ function giglogadmin_unassignconcert($p1, $c) } +/** + * @return null|string + */ function giglogadmin_getpublishstatus ($c) { global $wpdb; @@ -88,6 +91,9 @@ function giglogadmin_getpublishstatus ($c) } +/** + * @return null|string + */ function giglogadmin_returnuser($p1, $c) { global $wpdb; @@ -164,7 +170,7 @@ function giglogadmin_returnuser($p1, $c) } -function giglogadmin_getfiltersphotog() { +function giglogadmin_getfiltersphotog(): string { global $wpdb; //echo (var_dump($_POST["selectvenue"])); @@ -211,7 +217,7 @@ function giglogadmin_getfiltersphotog() { } -function giglogadmin_getconcertsphotog ( ) { +function giglogadmin_getconcertsphotog ( ): string { $hf_user = wp_get_current_user(); $hf_username = $hf_user->user_login; $roles = ( array ) $hf_user->roles; @@ -370,7 +376,7 @@ function giglogadmin_getconcertsphotog ( ) { return $content; } -function giglogadmin_photographers() +function giglogadmin_photographers(): string { $output = giglogadmin_getfiltersphotog(); $output .= giglogadmin_getconcertsphotog(); diff --git a/includes/public/shortcodes/giglog_process_files.php b/includes/public/shortcodes/giglog_process_files.php index 9dc2ec0..9443cda 100644 --- a/includes/public/shortcodes/giglog_process_files.php +++ b/includes/public/shortcodes/giglog_process_files.php @@ -9,7 +9,7 @@ * Band Venue Date TicketLink Eventlink. The form is at the end of this snippet */ -function giglogadmin_upload_files() { +function giglogadmin_upload_files(): string { global $wpdb; $output = ""; $dir = wp_upload_dir()['basedir'].'/concertlists/'; //the basedir is from file uploader plugin, namely the uploads folder in which I created a concertlist folder diff --git a/includes/venue.php b/includes/venue.php index f6f46b2..ddd3d4a 100644 --- a/includes/venue.php +++ b/includes/venue.php @@ -28,7 +28,7 @@ if ( !class_exists('GiglogAdmin_Venue') ) { $this->webpage = isset($attrs->wpgvenue_webpage) ? $attrs->wpgvenue_webpage : NULL; } - static function create($name, $city = 'Oslo') + static function create($name, $city = 'Oslo'): self { $venue = new GiglogAdmin_Venue((object) [ 'wpgvenue_name' => $name, @@ -61,7 +61,7 @@ if ( !class_exists('GiglogAdmin_Venue') ) { } } - static function all_cities() + static function all_cities(): array { global $wpdb; $results = $wpdb->get_results('select distinct wpgvenue_city from wpg_venues'); @@ -69,7 +69,12 @@ if ( !class_exists('GiglogAdmin_Venue') ) { return array_map(function ($r) { return $r->wpgvenue_city; }, $results); } - static function all_venues() + /** + * @return self[] + * + * @psalm-return array + */ + static function all_venues(): array { global $wpdb; @@ -79,7 +84,12 @@ if ( !class_exists('GiglogAdmin_Venue') ) { } - static function venues_in_city($city) + /** + * @return self[] + * + * @psalm-return array + */ + static function venues_in_city($city): array { global $wpdb; $q = $wpdb->prepare( @@ -89,7 +99,7 @@ if ( !class_exists('GiglogAdmin_Venue') ) { return array_map(function ($r) { return new GiglogAdmin_Venue($r); }, $results); } - public function save() + public function save(): void { global $wpdb; -- cgit v1.2.3 From 557e9f48fb59194f581c6760f484aacb80d5d13d Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 8 May 2021 19:27:18 +0200 Subject: Fix return types for abstract class GeneratorBase. --- generate-sample-gig-data.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/generate-sample-gig-data.php b/generate-sample-gig-data.php index bbc3e7d..cd18197 100644 --- a/generate-sample-gig-data.php +++ b/generate-sample-gig-data.php @@ -7,9 +7,9 @@ abstract class GeneratorBase { - abstract public function get(); + abstract public function get() : string; - function pick($arr) + function pick(array $arr) : string { return $arr[array_rand($arr)]; } @@ -51,10 +51,7 @@ class BandNameGenerator extends GeneratorBase "ed", ); - /** - * @return string - */ - public function get() + public function get() : string { $parts = array( $this->pick($this->prefixes), @@ -94,10 +91,7 @@ class VenueGenerator extends GeneratorBase "lighthouse" ); - /** - * @return string - */ - public function get() + public function get() : string { $parts = array( $this->pick($this->prefix1), @@ -113,7 +107,7 @@ class LinkGenerator extends GeneratorBase /** * @return string */ - public function get() + public function get() : string { return 'https://example.com/' . bin2hex(random_bytes(8)); } -- cgit v1.2.3 From 00b7f2f443a29f345461b00b617bf0f155e938f1 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 8 May 2021 19:30:44 +0200 Subject: Autofix missing property types by Psalm. --- generate-sample-gig-data.php | 49 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/generate-sample-gig-data.php b/generate-sample-gig-data.php index cd18197..11e9a0a 100644 --- a/generate-sample-gig-data.php +++ b/generate-sample-gig-data.php @@ -17,13 +17,23 @@ abstract class GeneratorBase class BandNameGenerator extends GeneratorBase { - private $prefixes = array( + /** + * @var string[] + * + * @psalm-var array{0: string, 1: string, 2: string} + */ + private array $prefixes = array( "", "a", "the", ); - private $adverbs = array( + /** + * @var string[] + * + * @psalm-var array{0: string, 1: string, 2: string, 3: string, 4: string, 5: string, 6: string, 7: string} + */ + private array $adverbs = array( "bestial", "dead", "incongruent", @@ -34,7 +44,12 @@ class BandNameGenerator extends GeneratorBase "flamboyant", ); - private $verbs = array( + /** + * @var string[] + * + * @psalm-var array{0: string, 1: string, 2: string, 3: string, 4: string, 5: string, 6: string} + */ + private array $verbs = array( "kill", "regurgitat", "destroy", @@ -44,7 +59,12 @@ class BandNameGenerator extends GeneratorBase "mutilat", ); - private $endings = array( + /** + * @var string[] + * + * @psalm-var array{0: string, 1: string, 2: string, 3: string} + */ + private array $endings = array( "er", "ers", "ing", @@ -64,7 +84,12 @@ class BandNameGenerator extends GeneratorBase class VenueGenerator extends GeneratorBase { - private $prefix1 = array( + /** + * @var string[] + * + * @psalm-var array{0: string, 1: string, 2: string, 3: string, 4: string} + */ + private array $prefix1 = array( "", "royal", "shabby", @@ -72,7 +97,12 @@ class VenueGenerator extends GeneratorBase "drunken", ); - private $prefix2 = array( + /** + * @var string[] + * + * @psalm-var array{0: string, 1: string, 2: string, 3: string, 4: string, 5: string} + */ + private array $prefix2 = array( "", "music", "fiddler", @@ -81,7 +111,12 @@ class VenueGenerator extends GeneratorBase "mental", ); - private $type = array( + /** + * @var string[] + * + * @psalm-var array{0: string, 1: string, 2: string, 3: string, 4: string, 5: string, 6: string} + */ + private array $type = array( "hall", "museum", "asylum", -- cgit v1.2.3 From 88de0f55d7499009f0f316262757e70385d43ce5 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 8 May 2021 20:28:00 +0200 Subject: Psalm fixes --- giglogadmin.php | 8 ++++++-- includes/admin/views/giglog_admin_page.php | 12 ++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/giglogadmin.php b/giglogadmin.php index d71496b..c8ae9b0 100644 --- a/giglogadmin.php +++ b/giglogadmin.php @@ -82,7 +82,11 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) { "giglog_import", // menu slug array( 'GiglogAdmin_ImportGigsPage', 'render_html' )); // callable - add_action( 'load-' . $import_hook, array( 'GiglogAdmin_ImportGigsPage', 'submit_form' ) ); + if ($import_hook !== false) { + add_action( + 'load-' . $import_hook, + array( 'GiglogAdmin_ImportGigsPage', 'submit_form' ) ); + } wp_register_style( 'css_style', plugins_url( '/includes/css/main.css', __FILE__ ) ); wp_enqueue_style('css_style'); @@ -121,7 +125,7 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) { * Giglog admin pages should only be visible for logged in users/can eventually * be customized by role if needed */ - static function nav_menu_args( $args = '' ) { + static function nav_menu_args( array $args = [] ) : array { if ( is_user_logged_in() ) { $args['menu'] = 'Loggedusers'; } else { diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index f2b6edd..85c4193 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -36,7 +36,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { echo(GiglogAdmin_AdminPage::editforms()); //not sure why it doesn't show without the echo? } - static function get_allvenues($invenue): string + static function get_allvenues(int $invenue): string { $select = ''; - foreach ( $venues AS $venue ) { + foreach ( $venue_list as $venue ) { $select .= ''; } @@ -167,7 +167,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { return $content; } - static function adminactions($concert_id): string + static function adminactions( int $concert_id ) : string { global $wpdb; $query = "SELECT id,wpgs_name from wpg_pressstatus" ; @@ -195,7 +195,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { /** * @return null|string */ - static function getpublishstatus($concert_id) + static function getpublishstatus(int $concert_id) { global $wpdb; $date1 = new DateTime("now"); @@ -216,7 +216,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { { $hf_user = wp_get_current_user(); $hf_username = $hf_user->user_login; - $roles = ( array ) $hf_user->roles; + $roles = $hf_user->roles; global $wpdb; $content = ''; -- cgit v1.2.3 From 30f12e61317d9b181efb46382a4db98d73f65954 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 8 May 2021 20:50:39 +0200 Subject: Autofixes by Psalm --- includes/admin/views/giglog_admin_page.php | 6 +++--- includes/admin/views/giglog_import_gigs.php | 4 +++- includes/band.php | 2 +- includes/concert.php | 2 +- includes/venue.php | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index 85c4193..624566f 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -36,7 +36,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { echo(GiglogAdmin_AdminPage::editforms()); //not sure why it doesn't show without the echo? } - static function get_allvenues(int $invenue): string + static function get_allvenues( ?int $invenue ): string { $select = ''; $select .= ''; foreach ( GiglogAdmin_Venue::all_venues() AS $venue ) { - if($invenue==$venue ->id() ) $select .= ''; } $select .= ''; @@ -131,7 +135,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { $editing = filter_input(INPUT_POST, "edit") == "EDIT"; if ($editing && !empty($cid)) //A bit overdoing with the checks if concert ID is empty both here and in find_cid. But based on that, things are NULL or not. Better ideas? - $c = GiglogAdmin_Concert::find_cid($cid); + $c = GiglogAdmin_Concert::get($cid); else $c = new GiglogAdmin_Concert(); @@ -140,7 +144,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { .'
CONCERT DETAILS

' .'' .'
' - .''.GiglogAdmin_AdminPage::get_allvenues($c->venue()).'
' + .'' . GiglogAdmin_AdminPage::get_allvenues($c->venue()) . '
' .'
' .'
' .'
' diff --git a/includes/concert.php b/includes/concert.php index 5c17933..8c99c42 100644 --- a/includes/concert.php +++ b/includes/concert.php @@ -25,33 +25,41 @@ if ( !class_exists('GiglogAdmin_Concert') ) { { $this->id = isset($attrs->id) ? $attrs->id : NULL; $this->cname = isset($attrs->wpgconcert_name) ? $attrs->wpgconcert_name : NULL; - $this->venue = isset($attrs->venue) ? $attrs->venue : NULL; $this->cdate = isset($attrs->wpgconcert_date) ? $attrs->wpgconcert_date : NULL; $this->tickets = isset($attrs->wpgconcert_tickets) ? $attrs->wpgconcert_tickets : NULL; $this->eventlink = isset($attrs->wpgconcert_event) ? $attrs->wpgconcert_event : NULL; + + + if ( isset( $attrs->venue ) ) { + $venue_attrs = (object) [ + "id" => $attrs->venue, + "wpgvenue_name" => $attrs->wpgvenue_name, + "wpgvenue_city" => $attrs->wpgvenue_city, + ]; + + $this->venue = new GiglogAdmin_Venue($venue_attrs); + } } /** - * @return null|self + * Get concert with given id. + * + * @param int $id. + * @return null|self. */ - static function find_cid($id) + static function get( int $id ) : ?self { global $wpdb; - if(!empty($id)) - { - $csql = 'SELECT * FROM wpg_concerts WHERE id="' . $id . '"'; - $results = $wpdb->get_results($csql); - if ($results) - { - return new GiglogAdmin_Concert($results[0]); - } - } - else - { - return new GiglogAdmin_Concert(); - } + $query = 'SELECT wpg_concerts.*, wpg_venues.wpgvenue_name, wpg_venues.wpgvenue_city ' + . 'FROM wpg_concerts ' + . 'LEFT JOIN wpg_venues ON wpg_concerts.venue = wpg_venues.id ' + . 'WHERE ' . $wpdb->prepare('wpg_concerts.id = %d', $id); + + $results = $wpdb->get_results($query); + + return $results ? new GiglogAdmin_Concert($results[0]) : NULL; } public static function create(string $name, $venue, string $date, string $ticketlink, string $eventlink): ?self @@ -154,7 +162,6 @@ if ( !class_exists('GiglogAdmin_Concert') ) { . ' and venue = ' . $venue . ' and wpgconcert_date ="' . $date . '"'; - error_log(__CLASS__ . '::' . __FUNCTION__ . ": {$sql}"); return $wpdb->get_results($sql); } @@ -165,7 +172,7 @@ if ( !class_exists('GiglogAdmin_Concert') ) { $wpdb->insert('wpg_concerts', array( 'id' => '', 'wpgconcert_name' => $this->cname, - 'venue' => $this->venue, + 'venue' => $this->venue->id(), 'wpgconcert_date' => $this->cdate, 'wpgconcert_tickets' => $this->tickets, 'wpgconcert_event' => $this->eventlink diff --git a/tests/ConcertTest.php b/tests/ConcertTest.php index 6d14b68..0517ad8 100644 --- a/tests/ConcertTest.php +++ b/tests/ConcertTest.php @@ -19,7 +19,7 @@ final class ConcertTest extends WP_UnitTestCase "https://example.com/events/93"); $this->assertEquals("a concert", $concert->cname()); - $this->assertEquals($venue->id(), $concert->venue()); + $this->assertEquals($venue->id(), $concert->venue()->id()); $this->assertEquals($today, $concert->cdate()); $this->assertEquals("https://example.com/tickets/42", $concert->tickets()); $this->assertEquals("https://example.com/events/93", $concert->eventlink()); @@ -68,4 +68,23 @@ final class ConcertTest extends WP_UnitTestCase $this->assertNull($new); } + + public function testGetConcertByIdReturnsFullConcertObject() : void + { + $venue = GiglogAdmin_Venue::create("a venue"); + $today = date("Y-m-d"); + + $gig = GiglogAdmin_Concert::create( + "a concert123", + $venue->id(), + $today, + "https://example.com/tickets/42", + "https://example.com/events/93"); + + $fetched_gig = GiglogAdmin_Concert::get($gig->id()); + + $this->assertEquals($gig->id(), $fetched_gig->id()); + $this->assertEquals($gig->cname(), $fetched_gig->cname()); + $this->assertEquals($venue->id(), $fetched_gig->venue()->id()); + } } -- cgit v1.2.3 From b58211e3617f4125567c313736f5ed0bcea7313c Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 9 May 2021 15:51:37 +0200 Subject: Rename strangely named function. GoglogAdmin_AdminPage::get_allvenues did not get all venues, but presented a selection control for selecting a venue. Renamed it as get_venue_selector instead. --- includes/admin/views/giglog_admin_page.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index 2971a22..9d9d759 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -36,7 +36,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { echo(GiglogAdmin_AdminPage::editforms()); //not sure why it doesn't show without the echo? } - static function get_allvenues( ?GiglogAdmin_Venue $invenue ): string + static function get_venue_selector( ?GiglogAdmin_Venue $invenue ): string { $select = '' .'
' - .'' . GiglogAdmin_AdminPage::get_allvenues($c->venue()) . '
' + .'' . GiglogAdmin_AdminPage::get_venue_selector($c->venue()) . '
' .'
' .'
' .'
' -- cgit v1.2.3 From df7c0a5dbf772a535c383f31fab578b5f82cb337 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 9 May 2021 17:18:46 +0200 Subject: New method Venue::get to get venue by id --- includes/venue.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/includes/venue.php b/includes/venue.php index aaf51d0..f9f7e4f 100644 --- a/includes/venue.php +++ b/includes/venue.php @@ -28,6 +28,22 @@ if ( !class_exists('GiglogAdmin_Venue') ) { $this->webpage = isset($attrs->wpgvenue_webpage) ? $attrs->wpgvenue_webpage : NULL; } + /** + * Get venue by given id. + * + * @param int $id. + * @return null|self. + */ + static function get(int $id) : ?self + { + global $wpdb; + + $query = $wpdb->prepare('SELECT * from wpg_venues WHERE id = %d', $id); + $results = $wpdb->get_results($query); + + return $results ? new GiglogAdmin_Venue($results[0]) : NULL; + } + static function create($name, $city = 'Oslo'): self { $venue = new GiglogAdmin_Venue((object) [ -- cgit v1.2.3 From 8045b78bc2032f772e35d1bf484541332336c7e0 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 9 May 2021 17:19:22 +0200 Subject: Fix constructing concerts if only venue id passed. The previous changes required the full venue data to be included in the constructor. This patch ensures that we handle the old case, where only the venue id was passed in. We still should get the full concert object including the venue name and city back. --- includes/concert.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/includes/concert.php b/includes/concert.php index 8c99c42..e3c32e8 100644 --- a/includes/concert.php +++ b/includes/concert.php @@ -31,13 +31,18 @@ if ( !class_exists('GiglogAdmin_Concert') ) { if ( isset( $attrs->venue ) ) { - $venue_attrs = (object) [ - "id" => $attrs->venue, - "wpgvenue_name" => $attrs->wpgvenue_name, - "wpgvenue_city" => $attrs->wpgvenue_city, - ]; - - $this->venue = new GiglogAdmin_Venue($venue_attrs); + if (isset($attrs->wpgvenue_name) && isset($attrs->wpgvenue_city)) { + $venue_attrs = (object) [ + "id" => $attrs->venue, + "wpgvenue_name" => $attrs->wpgvenue_name, + "wpgvenue_city" => $attrs->wpgvenue_city, + ]; + + $this->venue = new GiglogAdmin_Venue($venue_attrs); + } + else { + $this->venue = GiglogAdmin_Venue::get($attrs->venue); + } } } -- cgit v1.2.3 From 142ff436282844677b8b4e7d8ececd44440ec96d Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 9 May 2021 17:24:12 +0200 Subject: Fix importing gigs after changes to the concert class. --- includes/admin/views/giglog_import_gigs.php | 30 ++++++++++------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/includes/admin/views/giglog_import_gigs.php b/includes/admin/views/giglog_import_gigs.php index 0e7406f..a8daa3f 100644 --- a/includes/admin/views/giglog_import_gigs.php +++ b/includes/admin/views/giglog_import_gigs.php @@ -42,7 +42,7 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) { * tab character: * * 1. Concertname - * 2. Venuename + * 2. Venuename or numeric venue id * 3. Concert date * 4. Ticket link * 5. Event info link @@ -65,31 +65,21 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) { } $resultArray = explode("\t", $line); - $cname = trim($resultArray[0]); + $cname = trim($resultArray[0]); $venue = trim($resultArray[1]); - $condate = date('Y-m-d', strtotime($resultArray[2])); - $ticketlink = trim($resultArray[3]); - $eventlink = trim($resultArray[4]); - //first item in the row should be concert name $resultArray[0]; second should be venue $resultArray[1]; third should be concert date $resultArray[2]; - //fourth item is ticketlink $resultArray[3]; fifth item is eventlink $resultArray[4]; - - - if (is_numeric($venue)) - $newconcert[1] = $venue; + if (is_numeric($venue)) { + $venue = GiglogAdmin_Venue::get($venue); + } else { - $v = GiglogAdmin_Venue::find_or_create($venue,'Oslo'); //phase 666 of the project should maybe consider both city and band country when creating concerts/importing files - $newconcert[1] = $v->id(); + $venue = GiglogAdmin_Venue::find_or_create($venue,'Oslo'); } - //not sure how to check dates, hopefully manual verification of files will take care of it + $condate = date('Y-m-d', strtotime($resultArray[2])); + $ticketlink = trim($resultArray[3]); + $eventlink = trim($resultArray[4]); - GiglogAdmin_Concert::create( - $cname, - $newconcert[1], - $condate, - $ticketlink, - $eventlink); + GiglogAdmin_Concert::create($cname, $venue->id(), $condate, $ticketlink, $eventlink); } } } -- cgit v1.2.3