diff --git a/CHANGELOG.md b/CHANGELOG.md index 491c27e..bc23d9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Version [2.0.2] + +### Features: + +- Add slug to related item in API. +- Add multiple unit tests. + ## Version [2.0.1] ### Features: diff --git a/composer.json b/composer.json index 3d1e753..06ef940 100644 --- a/composer.json +++ b/composer.json @@ -1,14 +1,19 @@ { "name": "plugin/openpub-base", "description": "OpenPub base plugin", + "type": "wordpress-plugin", + "config": { + "preferred-install": "dist", + "optimize-autoloader": true, + "sort-packages": true + }, "authors": [ { - "name": "Yard Digital Agency", + "name": "Yard | Digital Agency", "email": "info@yard.nl", "homepage": "https://www.yard.nl" } ], - "type": "wordpress-plugin", "repositories": [ { "type": "composer", @@ -17,6 +22,7 @@ ], "require": { "php": ">=7.0", + "symfony/var-dumper": "^5.2", "wpackagist-plugin/elasticpress": ">2.0" }, "require-dev": { @@ -34,16 +40,16 @@ }, "autoload-dev": { "psr-4": { - "OWC\\OpenPub\\Base\\Tests\\": "./tests" + "OWC\\OpenPub\\Tests\\": "./tests/Unit" } }, "scripts": { - "format": "./vendor/bin/php-cs-fixer fix", + "format": "vendor/bin/php-cs-fixer fix", "phpstan": "./vendor/bin/phpstan analyse", "test": [ "@unit" ], "unit": "clear && ./vendor/bin/phpunit --testsuite 'Unit Test Suite' --colors=always", - "unit-coverage": "clear && ./vendor/bin/phpunit --testsuite 'Unit Test Suite' --colors=always --coverage-html ./tests/coverage" + "unit-coverage": "clear && XDEBUG_MODE=coverage ./vendor/bin/phpunit --testsuite 'Unit Test Suite' --colors=always --coverage-html ./tests/coverage" } } diff --git a/composer.lock b/composer.lock index 0b77772..09f7428 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "099690d5e0013aff32513977927c3a50", + "content-hash": "b56d40de14c59b23ded1b7d6e271f524", "packages": [ { "name": "composer/installers", - "version": "v1.9.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/composer/installers.git", - "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca" + "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca", - "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca", + "url": "https://api.github.com/repos/composer/installers/zipball/1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d", + "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d", "shasum": "" }, "require": { @@ -28,17 +28,18 @@ "shama/baton": "*" }, "require-dev": { - "composer/composer": "1.6.* || 2.0.*@dev", - "composer/semver": "1.0.* || 2.0.*@dev", - "phpunit/phpunit": "^4.8.36", - "sebastian/comparator": "^1.2.4", + "composer/composer": "1.6.* || ^2.0", + "composer/semver": "^1 || ^3", + "phpstan/phpstan": "^0.12.55", + "phpstan/phpstan-phpunit": "^0.12.16", + "symfony/phpunit-bridge": "^4.2 || ^5", "symfony/process": "^2.3" }, "type": "composer-plugin", "extra": { "class": "Composer\\Installers\\Plugin", "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "1.x-dev" } }, "autoload": { @@ -76,6 +77,7 @@ "Porto", "RadPHP", "SMF", + "Starbug", "Thelia", "Whmcs", "WolfCMS", @@ -116,6 +118,7 @@ "phpbb", "piwik", "ppi", + "processwire", "puppet", "pxcms", "reindex", @@ -131,29 +134,288 @@ "zend", "zikula" ], + "support": { + "issues": "https://github.com/composer/installers/issues", + "source": "https://github.com/composer/installers/tree/v1.10.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": "2020-04-07T06:57:05+00:00" + "time": "2021-01-14T11:07:16+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-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/var-dumper", + "version": "v5.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "72ca213014a92223a5d18651ce79ef441c12b694" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/72ca213014a92223a5d18651ce79ef441c12b694", + "reference": "72ca213014a92223a5d18651ce79ef441c12b694", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<4.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "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 mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v5.2.3" + }, + "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-27T10:15:41+00:00" }, { "name": "wpackagist-plugin/elasticpress", - "version": "3.5.1", + "version": "3.5.4", "source": { "type": "svn", "url": "https://plugins.svn.wordpress.org/elasticpress/", - "reference": "tags/3.5.1" + "reference": "tags/3.5.4" }, "dist": { "type": "zip", - "url": "https://downloads.wordpress.org/plugin/elasticpress.3.5.1.zip" + "url": "https://downloads.wordpress.org/plugin/elasticpress.3.5.4.zip" }, "require": { "composer/installers": "~1.0" @@ -188,6 +450,7 @@ "php-coveralls/php-coveralls": "^2.1", "sebastian/comparator": ">=1.2.3" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -202,6 +465,10 @@ "GPL-2.0-or-later" ], "description": "A mocking library to take the pain out of unit testing for WordPress", + "support": { + "issues": "https://github.com/10up/wp_mock/issues", + "source": "https://github.com/10up/wp_mock/tree/master" + }, "time": "2020-07-15T03:36:07+00:00" }, { @@ -246,27 +513,31 @@ "runkit", "testing" ], + "support": { + "issues": "https://github.com/antecedent/patchwork/issues", + "source": "https://github.com/antecedent/patchwork/tree/2.1.12" + }, "time": "2019-12-22T17:52:09+00:00" }, { "name": "composer/semver", - "version": "3.2.2", + "version": "3.2.4", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "4089fddb67bcf6bf860d91b979e95be303835002" + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/4089fddb67bcf6bf860d91b979e95be303835002", - "reference": "4089fddb67bcf6bf860d91b979e95be303835002", + "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.19", + "phpstan/phpstan": "^0.12.54", "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", @@ -308,6 +579,11 @@ "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", @@ -322,20 +598,20 @@ "type": "tidelift" } ], - "time": "2020-10-14T08:51:15+00:00" + "time": "2020-11-13T08:59:24+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.4.4", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "6e076a124f7ee146f2487554a94b6a19a74887ba" + "reference": "f28d44c286812c714741478d968104c5e604a1d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6e076a124f7ee146f2487554a94b6a19a74887ba", - "reference": "6e076a124f7ee146f2487554a94b6a19a74887ba", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f28d44c286812c714741478d968104c5e604a1d4", + "reference": "f28d44c286812c714741478d968104c5e604a1d4", "shasum": "" }, "require": { @@ -366,6 +642,11 @@ "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/1.4.5" + }, "funding": [ { "url": "https://packagist.com", @@ -380,20 +661,20 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:39:10+00:00" + "time": "2020-11-13T08:04:11+00:00" }, { "name": "doctrine/annotations", - "version": "1.11.1", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad" + "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/ce77a7ba1770462cd705a91a151b6c3746f9c6ad", - "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/b17c5014ef81d212ac539f07a1001832df1b6d3b", + "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b", "shasum": "" }, "require": { @@ -408,11 +689,6 @@ "phpunit/phpunit": "^7.5 || ^9.1.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" @@ -451,40 +727,39 @@ "docblock", "parser" ], - "time": "2020-10-26T10:28:16+00:00" + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.12.1" + }, + "time": "2021-02-21T21:00:45+00:00" }, { "name": "doctrine/instantiator", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", - "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", + "doctrine/coding-standard": "^8.0", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -498,7 +773,7 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", @@ -507,6 +782,10 @@ "constructor", "instantiate" ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -521,7 +800,7 @@ "type": "tidelift" } ], - "time": "2020-05-29T17:27:14+00:00" + "time": "2020-11-10T18:47:58+00:00" }, { "name": "doctrine/lexer", @@ -583,6 +862,10 @@ "parser", "php" ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -601,16 +884,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.16.7", + "version": "v2.18.2", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "4e35806a6d7d8510d6842ae932e8832363d22c87" + "reference": "18f8c9d184ba777380794a389fabc179896ba913" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/4e35806a6d7d8510d6842ae932e8832363d22c87", - "reference": "4e35806a6d7d8510d6842ae932e8832363d22c87", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/18f8c9d184ba777380794a389fabc179896ba913", + "reference": "18f8c9d184ba777380794a389fabc179896ba913", "shasum": "" }, "require": { @@ -619,7 +902,7 @@ "doctrine/annotations": "^1.2", "ext-json": "*", "ext-tokenizer": "*", - "php": "^7.1", + "php": "^5.6 || ^7.0 || ^8.0", "php-cs-fixer/diff": "^1.3", "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", @@ -632,17 +915,19 @@ "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" }, "require-dev": { - "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", "justinrainbow/json-schema": "^5.0", "keradus/cli-executor": "^1.4", "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.4.1", + "php-coveralls/php-coveralls": "^2.4.2", "php-cs-fixer/accessible-object": "^1.0", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1", + "phpspec/prophecy-phpunit": "^1.1 || ^2.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", + "phpunitgoodpractices/polyfill": "^1.5", "phpunitgoodpractices/traits": "^1.9.1", - "symfony/phpunit-bridge": "^5.1", + "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", + "symfony/phpunit-bridge": "^5.2.1", "symfony/yaml": "^3.0 || ^4.0 || ^5.0" }, "suggest": { @@ -688,13 +973,17 @@ } ], "description": "A tool to automatically fix PHP code style", + "support": { + "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.2" + }, "funding": [ { "url": "https://github.com/keradus", "type": "github" } ], - "time": "2020-10-27T22:44:27+00:00" + "time": "2021-01-26T00:22:21+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -741,20 +1030,24 @@ "keywords": [ "test" ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, "time": "2020-07-09T08:09:16+00:00" }, { "name": "mockery/mockery", - "version": "1.3.3", + "version": "1.3.4", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d" + "reference": "31467aeb3ca3188158613322d66df81cedd86626" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/60fa2f67f6e4d3634bb4a45ff3171fa52215800d", - "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d", + "url": "https://api.github.com/repos/mockery/mockery/zipball/31467aeb3ca3188158613322d66df81cedd86626", + "reference": "31467aeb3ca3188158613322d66df81cedd86626", "shasum": "" }, "require": { @@ -806,20 +1099,24 @@ "test double", "testing" ], - "time": "2020-08-11T18:10:21+00:00" + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/1.3.4" + }, + "time": "2021-02-24T09:51:00+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.1", + "version": "1.10.2", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5" + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", - "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "shasum": "" }, "require": { @@ -854,38 +1151,43 @@ "object", "object graph" ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, "funding": [ { "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", "type": "tidelift" } ], - "time": "2020-06-29T13:22:24+00:00" + "time": "2020-11-13T09:40:50+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -915,24 +1217,28 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/master" + }, + "time": "2020-06-27T14:33:11+00:00" }, { "name": "phar-io/version", - "version": "2.0.1", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -962,7 +1268,11 @@ } ], "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" }, { "name": "php-cs-fixer/diff", @@ -1013,20 +1323,24 @@ "keywords": [ "diff" ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/diff/issues", + "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" + }, "time": "2020-10-14T08:39:05+00:00" }, { "name": "php-stubs/wordpress-stubs", - "version": "v5.5.3", + "version": "v5.6.0", "source": { "type": "git", "url": "https://github.com/php-stubs/wordpress-stubs.git", - "reference": "7a8d0009b38c5fdec777a0a5333552ff6e445065" + "reference": "ed446cce304cd49f13900274b3ed60d1b526297e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/7a8d0009b38c5fdec777a0a5333552ff6e445065", - "reference": "7a8d0009b38c5fdec777a0a5333552ff6e445065", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/ed446cce304cd49f13900274b3ed60d1b526297e", + "reference": "ed446cce304cd49f13900274b3ed60d1b526297e", "shasum": "" }, "replace": { @@ -1053,7 +1367,11 @@ "static analysis", "wordpress" ], - "time": "2020-10-31T01:42:05+00:00" + "support": { + "issues": "https://github.com/php-stubs/wordpress-stubs/issues", + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v5.6.0" + }, + "time": "2020-12-09T00:38:16+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1102,6 +1420,10 @@ "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" }, { @@ -1154,6 +1476,10 @@ } ], "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" }, { @@ -1199,20 +1525,24 @@ } ], "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": "phpspec/prophecy", - "version": "1.12.1", + "version": "1.12.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" + "reference": "245710e971a030f42e08f4912863805570f23d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", + "reference": "245710e971a030f42e08f4912863805570f23d39", "shasum": "" }, "require": { @@ -1224,7 +1554,7 @@ }, "require-dev": { "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0 <9.3" + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { @@ -1262,20 +1592,24 @@ "spy", "stub" ], - "time": "2020-09-29T09:10:42+00:00" + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.12.2" + }, + "time": "2020-12-19T10:15:11+00:00" }, { "name": "phpstan/phpstan", - "version": "0.12.54", + "version": "0.12.78", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "45c7b999a4b7dd9ac5558bdaaf23dcebbef88223" + "reference": "eecce8d2ee3cac6769f37b4cb1998b2715f82984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/45c7b999a4b7dd9ac5558bdaaf23dcebbef88223", - "reference": "45c7b999a4b7dd9ac5558bdaaf23dcebbef88223", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/eecce8d2ee3cac6769f37b4cb1998b2715f82984", + "reference": "eecce8d2ee3cac6769f37b4cb1998b2715f82984", "shasum": "" }, "require": { @@ -1304,6 +1638,10 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/0.12.78" + }, "funding": [ { "url": "https://github.com/ondrejmirtes", @@ -1318,29 +1656,29 @@ "type": "tidelift" } ], - "time": "2020-11-05T13:36:26+00:00" + "time": "2021-02-20T13:24:36+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "7.0.10", + "version": "7.0.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" + "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/bb7c9a210c72e4709cdde67f8b7362f672f2225c", + "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.2", + "php": ">=7.2", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.1", + "phpunit/php-token-stream": "^3.1.1 || ^4.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", @@ -1381,27 +1719,37 @@ "testing", "xunit" ], - "time": "2019-11-20T13:55:58+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.14" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-02T13:39:03+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357", + "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -1431,7 +1779,17 @@ "filesystem", "iterator" ], - "time": "2018-09-13T20:33:42+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:25:21+00:00" }, { "name": "phpunit/php-text-template", @@ -1472,27 +1830,31 @@ "keywords": [ "template" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "2.1.2", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -1521,25 +1883,35 @@ "keywords": [ "timer" ], - "time": "2019-06-07T04:22:29+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:20:02+00:00" }, { "name": "phpunit/php-token-stream", - "version": "3.1.1", + "version": "3.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + "reference": "472b687829041c24b25f475e14c2f38a09edf1c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/472b687829041c24b25f475e14c2f38a09edf1c2", + "reference": "472b687829041c24b25f475e14c2f38a09edf1c2", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.0" @@ -1570,44 +1942,54 @@ "keywords": [ "tokenizer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "abandoned": true, - "time": "2019-09-17T06:23:10+00:00" + "time": "2020-11-30T08:38:46+00:00" }, { "name": "phpunit/phpunit", - "version": "8.5.8", + "version": "8.5.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997" + "reference": "c25f79895d27b6ecd5abfa63de1606b786a461a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34c18baa6a44f1d1fbf0338907139e9dce95b997", - "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c25f79895d27b6ecd5abfa63de1606b786a461a3", + "reference": "c25f79895d27b6ecd5abfa63de1606b786a461a3", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2.0", + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.9.1", - "phar-io/manifest": "^1.0.3", - "phar-io/version": "^2.0.1", - "php": "^7.2", - "phpspec/prophecy": "^1.8.1", - "phpunit/php-code-coverage": "^7.0.7", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpspec/prophecy": "^1.10.3", + "phpunit/php-code-coverage": "^7.0.12", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.1.2", "sebastian/comparator": "^3.0.2", "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.2", - "sebastian/exporter": "^3.1.1", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.2", "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0.1", @@ -1654,6 +2036,10 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.14" + }, "funding": [ { "url": "https://phpunit.de/donate.html", @@ -1664,7 +2050,7 @@ "type": "github" } ], - "time": "2020-06-22T07:06:58+00:00" + "time": "2021-01-17T07:37:30+00:00" }, { "name": "psr/container", @@ -1713,6 +2099,10 @@ "container-interop", "psr" ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/master" + }, "time": "2017-02-14T16:28:37+00:00" }, { @@ -1759,6 +2149,10 @@ "psr", "psr-14" ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, "time": "2019-01-08T18:20:26+00:00" }, { @@ -1806,27 +2200,30 @@ "psr", "psr-3" ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.3" + }, "time": "2020-03-23T09:12:05+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -1851,29 +2248,39 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:15:22+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", "shasum": "" }, "require": { - "php": "^7.1", + "php": ">=7.1", "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -1891,6 +2298,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -1902,14 +2313,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -1919,24 +2322,34 @@ "compare", "equality" ], - "time": "2018-07-12T15:12:46+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:04:30+00:00" }, { "name": "sebastian/diff", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.5 || ^8.0", @@ -1958,13 +2371,13 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", @@ -1975,24 +2388,34 @@ "unidiff", "unified diff" ], - "time": "2019-02-04T06:01:07+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:59:04+00:00" }, { "name": "sebastian/environment", - "version": "4.2.3", + "version": "4.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.5" @@ -2028,24 +2451,34 @@ "environment", "hhvm" ], - "time": "2019-11-20T08:46:58+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:53:42+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.2", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", "shasum": "" }, "require": { - "php": "^7.0", + "php": ">=7.0", "sebastian/recursion-context": "^3.0" }, "require-dev": { @@ -2095,24 +2528,34 @@ "export", "exporter" ], - "time": "2019-09-14T09:02:43+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:47:53+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", "shasum": "" }, "require": { - "php": "^7.2", + "php": ">=7.2", "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, @@ -2149,24 +2592,34 @@ "keywords": [ "global state" ], - "time": "2019-02-01T05:30:01+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:43:24+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", "shasum": "" }, "require": { - "php": "^7.0", + "php": ">=7.0", "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, @@ -2196,24 +2649,34 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:40:27+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" @@ -2241,24 +2704,34 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:37:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" @@ -2279,14 +2752,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" @@ -2294,24 +2767,34 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:34:24+00:00" }, { "name": "sebastian/resource-operations", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "type": "library", "extra": { @@ -2336,24 +2819,34 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:30:19+00:00" }, { "name": "sebastian/type", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", "shasum": "" }, "require": { - "php": "^7.2" + "php": ">=7.2" }, "require-dev": { "phpunit/phpunit": "^8.2" @@ -2382,7 +2875,17 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-07-02T08:10:15+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:25:11+00:00" }, { "name": "sebastian/version", @@ -2425,20 +2928,24 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, "time": "2016-10-03T07:35:21+00:00" }, { "name": "symfony/console", - "version": "v5.1.8", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "e0b2c29c0fa6a69089209bbe8fcff4df2a313d0e" + "reference": "89d4b176d12a2946a1ae4e34906a025b7b6b135a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/e0b2c29c0fa6a69089209bbe8fcff4df2a313d0e", - "reference": "e0b2c29c0fa6a69089209bbe8fcff4df2a313d0e", + "url": "https://api.github.com/repos/symfony/console/zipball/89d4b176d12a2946a1ae4e34906a025b7b6b135a", + "reference": "89d4b176d12a2946a1ae4e34906a025b7b6b135a", "shasum": "" }, "require": { @@ -2497,8 +3004,17 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "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.3" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2513,7 +3029,7 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:01:57+00:00" + "time": "2021-01-28T22:06:19+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2563,6 +3079,9 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/master" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2581,16 +3100,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.1.8", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "26f4edae48c913fc183a3da0553fe63bdfbd361a" + "reference": "4f9760f8074978ad82e2ce854dff79a71fe45367" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/26f4edae48c913fc183a3da0553fe63bdfbd361a", - "reference": "26f4edae48c913fc183a3da0553fe63bdfbd361a", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4f9760f8074978ad82e2ce854dff79a71fe45367", + "reference": "4f9760f8074978ad82e2ce854dff79a71fe45367", "shasum": "" }, "require": { @@ -2643,8 +3162,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.3" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2659,7 +3181,7 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:01:57+00:00" + "time": "2021-01-27T10:36:42+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -2721,6 +3243,9 @@ "interoperability", "standards" ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.2.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2739,16 +3264,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.1.8", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "df08650ea7aee2d925380069c131a66124d79177" + "reference": "262d033b57c73e8b59cd6e68a45c528318b15038" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/df08650ea7aee2d925380069c131a66124d79177", - "reference": "df08650ea7aee2d925380069c131a66124d79177", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/262d033b57c73e8b59cd6e68a45c528318b15038", + "reference": "262d033b57c73e8b59cd6e68a45c528318b15038", "shasum": "" }, "require": { @@ -2778,8 +3303,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Filesystem Component", + "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.2.3" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2794,20 +3322,20 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:01:57+00:00" + "time": "2021-01-27T10:01:46+00:00" }, { "name": "symfony/finder", - "version": "v5.1.8", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "e70eb5a69c2ff61ea135a13d2266e8914a67b3a0" + "reference": "4adc8d172d602008c204c2e16956f99257248e03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/e70eb5a69c2ff61ea135a13d2266e8914a67b3a0", - "reference": "e70eb5a69c2ff61ea135a13d2266e8914a67b3a0", + "url": "https://api.github.com/repos/symfony/finder/zipball/4adc8d172d602008c204c2e16956f99257248e03", + "reference": "4adc8d172d602008c204c2e16956f99257248e03", "shasum": "" }, "require": { @@ -2836,8 +3364,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Finder Component", + "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.2.3" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2852,25 +3383,26 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:01:57+00:00" + "time": "2021-01-28T22:06:19+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.1.8", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "c6a02905e4ffc7a1498e8ee019db2b477cd1cc02" + "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/c6a02905e4ffc7a1498e8ee019db2b477cd1cc02", - "reference": "c6a02905e4ffc7a1498e8ee019db2b477cd1cc02", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", + "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php73": "~1.0", "symfony/polyfill-php80": "^1.15" }, "type": "library", @@ -2896,13 +3428,16 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony OptionsResolver Component", + "description": "Provides an improved replacement for the array_replace PHP function", "homepage": "https://symfony.com", "keywords": [ "config", "configuration", "options" ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v5.2.3" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2917,20 +3452,20 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:01:57+00:00" + "time": "2021-01-27T12:56:27+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { @@ -2942,7 +3477,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2979,6 +3514,9 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2993,20 +3531,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c" + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c", - "reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", "shasum": "" }, "require": { @@ -3018,7 +3556,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3057,6 +3595,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3071,20 +3612,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "727d1096295d807c309fb01a851577302394c897" + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897", - "reference": "727d1096295d807c309fb01a851577302394c897", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", "shasum": "" }, "require": { @@ -3096,7 +3637,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3138,83 +3679,9 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-23T14:02:19+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", - "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" }, - "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" - ], "funding": [ { "url": "https://symfony.com/sponsor", @@ -3229,7 +3696,7 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-php70", @@ -3280,6 +3747,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3298,16 +3768,16 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930" + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930", - "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", "shasum": "" }, "require": { @@ -3316,7 +3786,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3353,6 +3823,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3367,20 +3840,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed" + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8ff431c517be11c78c48a39a66d37431e26a6bed", - "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", "shasum": "" }, "require": { @@ -3389,7 +3862,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3429,86 +3902,9 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-23T14:02:19+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de", - "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], "funding": [ { "url": "https://symfony.com/sponsor", @@ -3523,20 +3919,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/process", - "version": "v5.1.8", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "f00872c3f6804150d6a0f73b4151daab96248101" + "reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/f00872c3f6804150d6a0f73b4151daab96248101", - "reference": "f00872c3f6804150d6a0f73b4151daab96248101", + "url": "https://api.github.com/repos/symfony/process/zipball/313a38f09c77fbcdc1d223e57d368cea76a2fd2f", + "reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f", "shasum": "" }, "require": { @@ -3566,8 +3962,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.2.3" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3582,7 +3981,7 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:01:57+00:00" + "time": "2021-01-27T10:15:41+00:00" }, { "name": "symfony/service-contracts", @@ -3644,6 +4043,9 @@ "interoperability", "standards" ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/master" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3662,16 +4064,16 @@ }, { "name": "symfony/stopwatch", - "version": "v5.1.8", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "3d9f57c89011f0266e6b1d469e5c0110513859d5" + "reference": "b12274acfab9d9850c52583d136a24398cdf1a0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/3d9f57c89011f0266e6b1d469e5c0110513859d5", - "reference": "3d9f57c89011f0266e6b1d469e5c0110513859d5", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/b12274acfab9d9850c52583d136a24398cdf1a0c", + "reference": "b12274acfab9d9850c52583d136a24398cdf1a0c", "shasum": "" }, "require": { @@ -3701,8 +4103,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Stopwatch Component", + "description": "Provides a way to profile code", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v5.2.3" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3717,20 +4122,20 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:01:57+00:00" + "time": "2021-01-27T10:15:41+00:00" }, { "name": "symfony/string", - "version": "v5.1.8", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "a97573e960303db71be0dd8fda9be3bca5e0feea" + "reference": "c95468897f408dd0aca2ff582074423dd0455122" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/a97573e960303db71be0dd8fda9be3bca5e0feea", - "reference": "a97573e960303db71be0dd8fda9be3bca5e0feea", + "url": "https://api.github.com/repos/symfony/string/zipball/c95468897f408dd0aca2ff582074423dd0455122", + "reference": "c95468897f408dd0aca2ff582074423dd0455122", "shasum": "" }, "require": { @@ -3773,7 +4178,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony String component", + "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", @@ -3783,6 +4188,9 @@ "utf-8", "utf8" ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.2.3" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3797,7 +4205,7 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:01:57+00:00" + "time": "2021-01-25T15:14:59+00:00" }, { "name": "szepeviktor/phpstan-wordpress", @@ -3851,6 +4259,10 @@ "static analysis", "wordpress" ], + "support": { + "issues": "https://github.com/szepeviktor/phpstan-wordpress/issues", + "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v0.6.6" + }, "funding": [ { "url": "https://www.paypal.me/szepeviktor", @@ -3897,6 +4309,10 @@ } ], "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/master" + }, "funding": [ { "url": "https://github.com/theseer", @@ -3910,12 +4326,12 @@ "version": "1.9.1", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", + "url": "https://github.com/webmozarts/assert.git", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", "shasum": "" }, @@ -3952,6 +4368,10 @@ "check", "validate" ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.9.1" + }, "time": "2020-07-08T17:02:28+00:00" } ], @@ -3966,5 +4386,5 @@ "php": ">=7.0" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/openpub-base.php b/openpub-base.php index c418030..4ac2830 100644 --- a/openpub-base.php +++ b/openpub-base.php @@ -1,12 +1,11 @@ boot(); +\add_action('plugins_loaded', function () { + $plugin = (new OWC\OpenPub\Base\Foundation\Plugin(__DIR__))->boot(); }, 10); diff --git a/src/Base/Foundation/Loader.php b/src/Base/Foundation/Loader.php index c905998..7c810f2 100644 --- a/src/Base/Foundation/Loader.php +++ b/src/Base/Foundation/Loader.php @@ -14,7 +14,6 @@ class Loader /** * The array of actions registered with WordPress. * - * @since 2.0.0 * @var array $actions The actions registered with WordPress to fire when the plugin loads. */ protected $actions = []; @@ -22,7 +21,6 @@ class Loader /** * The array of filters registered with WordPress. * - * @since 2.0.0 * @var array $filters The filters registered with WordPress to fire when the plugin loads. */ protected $filters = []; @@ -30,7 +28,6 @@ class Loader /** * Add a new action to the collection to be registered with WordPress. * - * @since 2.0.0 * * @param string $hook The name of the WordPress action that is being registered. * @param object $component A reference to the instance of the object on which the action is defined. @@ -49,8 +46,6 @@ public function addAction($hook, $component, $callback, $priority = 10, $accepte /** * Add a new filter to the collection to be registered with WordPress. * - * @since 2.0.0 - * * @param string $hook The name of the WordPress filter that is being registered. * @param object $component A reference to the instance of the object on which the filter is defined. * @param string $callback The name of the function definition on the $component. @@ -69,8 +64,6 @@ public function addFilter($hook, $component, $callback, $priority = 10, $accepte * A utility function that is used to register the actions and hooks into a single * collection. * - * @since 2.0.0 - * * @param array $hooks The collection of hooks that is being registered (that is, actions or filters). * @param string $hook The name of the WordPress filter that is being registered. * @param object $component A reference to the instance of the object on which the filter is defined. @@ -96,8 +89,6 @@ protected function add($hooks, $hook, $component, $callback, $priority, $accepte /** * Register the filters and actions with WordPress. * - * @since 2.0.0 - * * @return void */ public function register() diff --git a/src/Base/Foundation/Plugin.php b/src/Base/Foundation/Plugin.php index ffdded5..6c51074 100644 --- a/src/Base/Foundation/Plugin.php +++ b/src/Base/Foundation/Plugin.php @@ -25,7 +25,7 @@ class Plugin * * @var string VERSION */ - const VERSION = '2.0.1'; + const VERSION = '2.0.2'; /** * Path to the root of the plugin. diff --git a/src/Base/Foundation/ServiceProvider.php b/src/Base/Foundation/ServiceProvider.php index de32147..42fa190 100644 --- a/src/Base/Foundation/ServiceProvider.php +++ b/src/Base/Foundation/ServiceProvider.php @@ -26,7 +26,7 @@ abstract class ServiceProvider */ public function __construct(Plugin $plugin) { - $this->plugin = $plugin; + $this->plugin = $plugin; $this->plugin->settings = SettingsPageOptions::make(); } diff --git a/src/Base/Models/Item.php b/src/Base/Models/Item.php index cd24fbd..d9216a0 100644 --- a/src/Base/Models/Item.php +++ b/src/Base/Models/Item.php @@ -167,7 +167,7 @@ public function hasThumbnail(): bool * Get the excerpt of the post, else fallback to the post content. * * @param integer $length - * + * * @return string */ public function getExcerpt(int $length = 20): string @@ -263,21 +263,21 @@ public function getPortalURL(): string /** * Create portal url, used in 'pdc items' overview * When connected add 'pdc category', 'pdc-subcategory', name and post ID to url - * + * * @return string */ private function createPortalURL(): string { $portalURL = esc_url(trailingslashit(get_option(self::PREFIX . 'openpub_base_settings')[self::PREFIX . 'setting_portal_url']) . trailingslashit(get_option(self::PREFIX . 'openpub_base_settings')[self::PREFIX . 'setting_portal_openpub_item_slug'])); - $portalURL .= trailingslashit($this->getPostName()) . $this->getID(); + $portalURL .= trailingslashit($this->getPostName()) . $this->getID(); return $portalURL; } /** * @param array $array - * + * * @return array */ public function arrayUnique($array): array diff --git a/src/Base/Repositories/Item.php b/src/Base/Repositories/Item.php index a830da0..90e7380 100644 --- a/src/Base/Repositories/Item.php +++ b/src/Base/Repositories/Item.php @@ -50,7 +50,7 @@ public static function addExpirationParameters(): array * Add parameters to meta_query to remove items that are expired or not expired * * @param boolean $highlighted - * + * * @return array */ public static function addHighlightedParameters(bool $highlighted): array @@ -58,7 +58,7 @@ public static function addHighlightedParameters(bool $highlighted): array return [ 'meta_query' => [ [ - 'key' => '_owc_openpub_highlighted_item', + 'key' => '_owc_openpub_highlighted_item', 'value' => $highlighted ? 1 : 0, 'compare' => '=', ], diff --git a/src/Base/RestAPI/Controllers/ItemController.php b/src/Base/RestAPI/Controllers/ItemController.php index f12bed2..95c743e 100644 --- a/src/Base/RestAPI/Controllers/ItemController.php +++ b/src/Base/RestAPI/Controllers/ItemController.php @@ -110,13 +110,9 @@ public function getItemBySlug(WP_REST_Request $request) } /** - * Get related items. - * - * @param array $item - * - * @return array + * Get related items */ - protected function addRelated($item) + protected function addRelated(array $item): array { $items = (new Item()) ->query([ @@ -132,21 +128,18 @@ protected function addRelated($item) } /** - * Transform a single WP_Post item. - * - * @param WP_Post $post - * - * @return array + * Transform a single WP_Post item into an array */ - public function transform(WP_Post $post) + public function transform(WP_Post $post): array { $data = [ - 'id' => $post->ID, - 'title' => $post->post_title, - 'content' => apply_filters('the_content', $post->post_content), - 'excerpt' => $post->post_excerpt, - 'date' => $post->post_date, - 'thumbnail_url' => get_the_post_thumbnail_url($post->ID), + 'id' => $post->ID, + 'title' => $post->post_title, + 'content' => \apply_filters('the_content', $post->post_content), + 'excerpt' => $post->post_excerpt, + 'date' => $post->post_date, + 'thumbnail_url' => \get_the_post_thumbnail_url($post->ID), + 'slug' => $post->post_name, ]; return $data; diff --git a/src/Base/RestAPI/ItemFields/CommentField.php b/src/Base/RestAPI/ItemFields/CommentField.php index c62bc0d..c699b8e 100644 --- a/src/Base/RestAPI/ItemFields/CommentField.php +++ b/src/Base/RestAPI/ItemFields/CommentField.php @@ -58,6 +58,7 @@ protected function getComments(int $postID): array return []; } + return array_map(function ($comment) { return $this->format($comment, $this->getChild($comment)); }, array_values($comments)); diff --git a/src/Base/RestAPI/ItemFields/DateModified.php b/src/Base/RestAPI/ItemFields/DateModified.php index 975cc10..b4cc761 100644 --- a/src/Base/RestAPI/ItemFields/DateModified.php +++ b/src/Base/RestAPI/ItemFields/DateModified.php @@ -6,9 +6,9 @@ namespace OWC\OpenPub\Base\RestAPI\ItemFields; -use WP_Post; use OWC\OpenPub\Base\Models\Item; use OWC\OpenPub\Base\Support\CreatesFields; +use WP_Post; class DateModified extends CreatesFields { diff --git a/src/Base/RestAPI/ItemFields/FeaturedImageField.php b/src/Base/RestAPI/ItemFields/FeaturedImageField.php index 459bd2a..03c9a05 100644 --- a/src/Base/RestAPI/ItemFields/FeaturedImageField.php +++ b/src/Base/RestAPI/ItemFields/FeaturedImageField.php @@ -17,12 +17,12 @@ class FeaturedImageField extends CreatesFields */ public function create(WP_Post $post): array { - if (! has_post_thumbnail($post->ID)) { + if (! \has_post_thumbnail($post->ID)) { return []; } - $id = get_post_thumbnail_id($post->ID); - $attachment = get_post($id); + $id = \get_post_thumbnail_id($post->ID); + $attachment = \get_post($id); $imageSize = 'large'; $result = []; @@ -30,13 +30,13 @@ public function create(WP_Post $post): array $result['title'] = $attachment->post_title; $result['description'] = $attachment->post_content; $result['caption'] = $attachment->post_excerpt; - $result['alt'] = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true); + $result['alt'] = \get_post_meta($attachment->ID, '_wp_attachment_image_alt', true); $meta = $this->getAttachmentMeta($id); - $result['rendered'] = wp_get_attachment_image($id, $imageSize); - $result['sizes'] = wp_get_attachment_image_sizes($id, $imageSize, $meta); - $result['srcset'] = wp_get_attachment_image_srcset($id, $imageSize, $meta); + $result['rendered'] = \wp_get_attachment_image($id, $imageSize); + $result['sizes'] = \wp_get_attachment_image_sizes($id, $imageSize, $meta); + $result['srcset'] = \wp_get_attachment_image_srcset($id, $imageSize, $meta); $result['meta'] = $meta; return $result; @@ -49,23 +49,23 @@ public function create(WP_Post $post): array * * @return array */ - private function getAttachmentMeta($id): array + private function getAttachmentMeta(int $id): array { - $meta = wp_get_attachment_metadata($id, false); + $meta = \wp_get_attachment_metadata($id, false); if (empty($meta['sizes'])) { return []; } - $meta['sizes']['full']['file'] = basename(get_attached_file($id)); - $meta['sizes']['full']['width'] = $meta['width']; - $meta['sizes']['full']['height'] = $meta['height']; - $meta['sizes']['full']['mime-type'] = get_post_mime_type($id); + $meta['sizes']['full']['file'] = \basename(\get_attached_file($id)); + $meta['sizes']['full']['width'] = $meta['width']; + $meta['sizes']['full']['height'] = $meta['height']; + $meta['sizes']['full']['mime-type'] = \get_post_mime_type($id); - foreach (array_keys($meta['sizes']) as $size) { - $src = wp_get_attachment_image_src($id, $size); + foreach (\array_keys($meta['sizes']) as $size) { + $src = \wp_get_attachment_image_src($id, $size); $meta['sizes'][$size]['url'] = $src[0]; - $meta['sizes'][$size]['rendered'] = wp_get_attachment_image($id, $size); + $meta['sizes'][$size]['rendered'] = \wp_get_attachment_image($id, $size); } unset($meta['image_meta']); diff --git a/src/Base/RestAPI/ItemFields/PortalURL.php b/src/Base/RestAPI/ItemFields/PortalURL.php index 81c5291..9074bed 100644 --- a/src/Base/RestAPI/ItemFields/PortalURL.php +++ b/src/Base/RestAPI/ItemFields/PortalURL.php @@ -6,9 +6,9 @@ namespace OWC\OpenPub\Base\RestAPI\ItemFields; -use WP_Post; use OWC\OpenPub\Base\Models\Item; use OWC\OpenPub\Base\Support\CreatesFields; +use WP_Post; class PortalURL extends CreatesFields { diff --git a/src/Base/RestAPI/RestAPIServiceProvider.php b/src/Base/RestAPI/RestAPIServiceProvider.php index 4a9889e..4308580 100644 --- a/src/Base/RestAPI/RestAPIServiceProvider.php +++ b/src/Base/RestAPI/RestAPIServiceProvider.php @@ -60,39 +60,39 @@ public function register(): void public function registerRoutes() { register_rest_route($this->namespace, 'items/active', [ - 'methods' => WP_REST_Server::READABLE, - 'callback' => [new ItemController($this->plugin), 'getActiveItems'], + 'methods' => WP_REST_Server::READABLE, + 'callback' => [new ItemController($this->plugin), 'getActiveItems'], 'permission_callback' => '__return_true', ]); register_rest_route($this->namespace, 'items', [ - 'methods' => WP_REST_Server::READABLE, - 'callback' => [new ItemController($this->plugin), 'getItems'], + 'methods' => WP_REST_Server::READABLE, + 'callback' => [new ItemController($this->plugin), 'getItems'], 'permission_callback' => '__return_true', ]); register_rest_route($this->namespace, 'items/(?P\d+)', [ - 'methods' => WP_REST_Server::READABLE, - 'callback' => [new ItemController($this->plugin), 'getItem'], + 'methods' => WP_REST_Server::READABLE, + 'callback' => [new ItemController($this->plugin), 'getItem'], 'permission_callback' => '__return_true', ]); register_rest_route($this->namespace, 'items/(?P[\w-]+)', [ - 'methods' => WP_REST_Server::READABLE, - 'callback' => [new Controllers\ItemController($this->plugin), 'getItemBySlug'], + 'methods' => WP_REST_Server::READABLE, + 'callback' => [new Controllers\ItemController($this->plugin), 'getItemBySlug'], 'permission_callback' => '__return_true', ]); register_rest_route($this->namespace, 'themes', [ - 'methods' => WP_REST_Server::READABLE, - 'callback' => [new ThemeController($this->plugin), 'getThemes'], + 'methods' => WP_REST_Server::READABLE, + 'callback' => [new ThemeController($this->plugin), 'getThemes'], 'permission_callback' => '__return_true', ]); register_rest_route($this->namespace, 'search', [ - 'methods' => WP_REST_Server::READABLE, - 'callback' => [new SearchController($this->plugin), 'search'], - 'args' => [], + 'methods' => WP_REST_Server::READABLE, + 'callback' => [new SearchController($this->plugin), 'search'], + 'args' => [], 'permission_callback' => '__return_true', ]); } diff --git a/tests/Unit/Base/ElasticPress/ElasticPressTest.php b/tests/Unit/Base/ElasticPress/ElasticPressTest.php index 1d86952..c0e0776 100644 --- a/tests/Unit/Base/ElasticPress/ElasticPressTest.php +++ b/tests/Unit/Base/ElasticPress/ElasticPressTest.php @@ -1,13 +1,14 @@ [ - 'args' => [], + 'args' => [], 'names' => [], ], ]; diff --git a/tests/Unit/Base/RestAPI/Controllers/ItemControllerTest.php b/tests/Unit/Base/RestAPI/Controllers/ItemControllerTest.php new file mode 100644 index 0000000..095ef07 --- /dev/null +++ b/tests/Unit/Base/RestAPI/Controllers/ItemControllerTest.php @@ -0,0 +1,67 @@ +plugin = m::mock(Plugin::class); + + $this->plugin->config = $config; + $this->plugin->loader = m::mock(Loader::class); + } + + protected function tearDown(): void + { + WP_Mock::tearDown(); + } + + /** @test */ + public function it_transforms_a_wp_object_to_array() + { + $post = m::mock(WP_Post::class); + $post->ID = 1; + $post->post_title = 'Test Test'; + $post->post_content = 'Test Content'; + $post->post_excerpt = 'Test excerpt'; + $post->post_date = '01-01-2021'; + $post->post_name = 'test-test'; + + WP_Mock::userFunction('get_the_post_thumbnail_url', [ + 'args' => [ + $post->ID + ], + 'times' => 1, + 'return' => 'url-to-image' + ]); + + $expected = [ + 'id' => 1, + 'title' => 'Test Test', + 'content' => 'Test Content', + 'excerpt' => 'Test excerpt', + 'date' => '01-01-2021', + 'thumbnail_url' => 'url-to-image', + 'slug' => 'test-test', + ]; + + $actual = (new ItemController($this->plugin))->transform($post); + $this->assertEquals($expected, $actual); + } +} diff --git a/tests/Unit/Base/RestAPI/ItemFields/CommentFieldTest.php b/tests/Unit/Base/RestAPI/ItemFields/CommentFieldTest.php new file mode 100644 index 0000000..0e66a21 --- /dev/null +++ b/tests/Unit/Base/RestAPI/ItemFields/CommentFieldTest.php @@ -0,0 +1,171 @@ +plugin = m::mock(Plugin::class); + + $this->plugin->config = $config; + $this->plugin->loader = m::mock(Loader::class); + + $this->post = m::mock(WP_Post::class); + $this->post->ID = 1; + $this->post->comment_count = 0; + $this->post->comment_status = 'closed'; + } + + protected function tearDown(): void + { + WP_Mock::tearDown(); + } + + /** @test */ + public function it_returns_with_no_results_if_comments_are_disabled() + { + $this->post->comment_count = 0; + $this->post->comment_status = 'closed'; + + $commentField = new CommentField($this->plugin); + $actual = $commentField->create($this->post); + + $expected = [ + 'count' => 0, + 'status' => 'closed', + 'items' => [] + ]; + $this->assertEquals($expected, $actual); + } + + /** @test */ + public function it_returns_the_comments_if_comments_are_enabled_but_there_are_no_comments() + { + $this->post->comment_count = 0; + $this->post->comment_status = 'open'; + + WP_Mock::userFunction('get_comments', [ + 'return' => [] + ]); + + $commentField = new CommentField($this->plugin); + $actual = $commentField->create($this->post); + + $expected = [ + 'count' => 0, + 'status' => 'open', + 'items' => [] + ]; + $this->assertEquals($expected, $actual); + } + + /** @test */ + public function it_returns_the_comments_if_comments_are_enabled_and_there_are_comments() + { + $this->post->comment_count = 2; + $this->post->comment_status = 'open'; + + $comment1 = m::mock(WP_Comment::class); + $comment1->shouldReceive('get_children') + ->andReturn([]); + $comment1->comment_ID = 1; + $comment1->comment_parent = 0; + $comment1->comment_author = 'author 1'; + $comment1->comment_content = 'comment 1'; + $comment1->comment_date = '13-01-2020'; + + $comment_child2 = m::mock(WP_Comment::class); + $comment_child2->shouldReceive('get_children') + ->andReturn([]); + $comment_child2->comment_ID = 4; + $comment_child2->comment_parent = 3; + $comment_child2->comment_author = 'child author 2'; + $comment_child2->comment_content = 'child comment 2'; + $comment_child2->comment_date = '12-01-2020'; + + $comment_child1 = m::mock(WP_Comment::class); + $comment_child1->shouldReceive('get_children') + ->andReturn([$comment_child2]); + $comment_child1->comment_ID = 3; + $comment_child1->comment_parent = 2; + $comment_child1->comment_author = 'child author 1'; + $comment_child1->comment_content = 'child comment 1'; + $comment_child1->comment_date = '12-01-2020'; + + $comment2 = m::mock(WP_Comment::class); + $comment2->shouldReceive('get_children') + ->andReturn([$comment_child1]); + $comment2->comment_ID = 2; + $comment2->comment_parent = 0; + $comment2->comment_author = 'author 2'; + $comment2->comment_content = 'comment 2'; + $comment2->comment_date = '12-01-2020'; + + WP_Mock::userFunction('get_comments', [ + 'return' => [$comment1, $comment2] + ]); + + $commentField = new CommentField($this->plugin); + $actual = $commentField->create($this->post); + + $expected = [ + 'count' => 2, + 'status' => 'open', + 'items' => [ + [ + 'id' => 1, + 'parentid' => 0, + 'author' => 'author 1', + 'content' => 'comment 1', + 'date' => '13-01-2020', + 'replies' => [] + ], + [ + 'id' => 2, + 'parentid' => 0, + 'author' => 'author 2', + 'content' => 'comment 2', + 'date' => '12-01-2020', + 'replies' => [ + [ + 'id' => 3, + 'parentid' => 2, + 'author' => 'child author 1', + 'content' => 'child comment 1', + 'date' => '12-01-2020', + 'replies' => [ + [ +'id' => 4, + 'parentid' => 3, + 'author' => 'child author 2', + 'content' => 'child comment 2', + 'date' => '12-01-2020', + 'replies' => [] + ] + ] + ] + ] + ] + ] + ]; + $this->assertEquals($expected, $actual); + } +} diff --git a/tests/Unit/Base/RestAPI/ItemFields/DownloadsFieldTest.php b/tests/Unit/Base/RestAPI/ItemFields/DownloadsFieldTest.php new file mode 100644 index 0000000..4fe798e --- /dev/null +++ b/tests/Unit/Base/RestAPI/ItemFields/DownloadsFieldTest.php @@ -0,0 +1,63 @@ +plugin = m::mock(Plugin::class); + + $this->plugin->config = $config; + $this->plugin->loader = m::mock(Loader::class); + + $this->post = m::mock(WP_Post::class); + $this->post->ID = 1; + } + + protected function tearDown(): void + { + WP_Mock::tearDown(); + } + + /** @test */ + public function it_returns_the_downloads() + { + WP_Mock::userFunction('get_post_meta', [ + 'return' => [ + [ + 'openpub_downloads_url' => 'url', + 'openpub_downloads_title' => 'title', + ] + ] + ]); + + $downloadsField = new DownloadsField($this->plugin); + $actual = $downloadsField->create($this->post); + + $this->assertTrue(is_array($actual)); + + $this->assertEquals([ + [ + 'title' => 'title', + 'url' => 'url' + ] + ], $actual); + } +} diff --git a/tests/Unit/Base/RestAPI/ItemFields/ExpiredFieldTest.php b/tests/Unit/Base/RestAPI/ItemFields/ExpiredFieldTest.php index 5c87861..c240eca 100644 --- a/tests/Unit/Base/RestAPI/ItemFields/ExpiredFieldTest.php +++ b/tests/Unit/Base/RestAPI/ItemFields/ExpiredFieldTest.php @@ -1,12 +1,13 @@ plugin = m::mock(Plugin::class); + + $this->plugin->config = $config; + $this->plugin->loader = m::mock(Loader::class); + + $this->post = m::mock(WP_Post::class); + $this->post->ID = 1; + } + + protected function tearDown(): void + { + WP_Mock::tearDown(); + } + + /** @test */ + public function it_does_not_return_a_thumbnail_it_does_not_exists() + { + WP_Mock::userFunction('has_post_thumbnail', [ + 'return' => false + ]); + + $featuredImageField = new FeaturedImageField($this->plugin); + $status = $featuredImageField->create($this->post); + + $this->assertEmpty($status); + } + + /** @test */ + public function it_returns_a_correct_featured_image_response() + { + WP_Mock::userFunction('has_post_thumbnail', [ + 'return' => true + ]); + + WP_Mock::userFunction('get_post_thumbnail_id', [ + 'return' => 2 + ]); + + $attachment = m::mock(WP_Post::class); + $attachment->ID = 1; + $attachment->post_title = 'title'; + $attachment->post_content = 'content'; + $attachment->post_excerpt = 'excerpt'; + + WP_Mock::userFunction('get_post', [ + 'return' => $attachment + ]); + + WP_Mock::userFunction('get_post_meta', [ + 'return' => 'alt' + ]); + + WP_Mock::userFunction('wp_get_attachment_metadata', [ + 'return' => ['sizes' => []] + ]); + + WP_Mock::userFunction('wp_get_attachment_image', [ + 'return' => 'large-size' + ]); + + WP_Mock::userFunction('wp_get_attachment_image_sizes', [ + 'return' => 'large-size' + ]); + + WP_Mock::userFunction('wp_get_attachment_image_srcset', [ + 'return' => 'large-size' + ]); + + $featuredImageField = new FeaturedImageField($this->plugin); + $actual = $featuredImageField->create($this->post); + + $expected = [ + 'title' => 'title', + 'description' => 'content', + 'caption' => 'excerpt', + 'alt' => 'alt', + 'rendered' => 'large-size', + 'sizes' => 'large-size', + 'srcset' => 'large-size', + 'meta' => [], + ]; + $this->assertEquals($expected, $actual); + } + + /** @test */ + public function it_returns_a_correct_featured_image_response_with_multiple_size() + { + WP_Mock::userFunction('has_post_thumbnail', [ + 'return' => true + ]); + + WP_Mock::userFunction('get_post_thumbnail_id', [ + 'return' => 2 + ]); + + $attachment = m::mock(WP_Post::class); + $attachment->ID = 1; + $attachment->post_title = 'title'; + $attachment->post_content = 'content'; + $attachment->post_excerpt = 'excerpt'; + + WP_Mock::userFunction('get_post', [ + 'return' => $attachment + ]); + + WP_Mock::userFunction('get_post_meta', [ + 'return' => 'alt' + ]); + + WP_Mock::userFunction('wp_get_attachment_metadata', [ + 'return' => [ + 'sizes' => [ + 'thumbnail' => [] + ], + 'width' => 100, + 'height' => 100, + ] + ]); + + WP_Mock::userFunction('get_attached_file', [ + 'return' => 'url-attached-full-file' + ]); + + WP_Mock::userFunction('get_post_mime_type', [ + 'return' => 'image/png' + ]); + + WP_Mock::userFunction('wp_get_attachment_image_src', [ + 'return_in_order' => [['url-to-thumbnail-image'], ['url-to-full-image']] + ]); + + WP_Mock::userFunction('wp_get_attachment_image', [ + 'return_in_order' => ['url-to-thumbnail-image', 'url-to-full-image'] + ]); + + WP_Mock::userFunction('wp_get_attachment_image', [ + 'return' => 'url-to-large-image' + ]); + + WP_Mock::userFunction('wp_get_attachment_image_sizes', [ + 'return' => '(max-width: 1024px) 100vw, 1024px' + ]); + + WP_Mock::userFunction('wp_get_attachment_image_srcset', [ + 'return' => 'large-size' + ]); + + $featuredImageField = new FeaturedImageField($this->plugin); + $actual = $featuredImageField->create($this->post); + + $expected = [ + 'title' => 'title', + 'description' => 'content', + 'caption' => 'excerpt', + 'alt' => 'alt', + 'rendered' => 'url-to-full-image', + 'sizes' => '(max-width: 1024px) 100vw, 1024px', + 'srcset' => 'large-size', + 'meta' => [ + 'sizes' => [ + 'full' => [ + 'file' => 'url-attached-full-file', + 'width' => 100, + 'height' => 100, + 'mime-type' => 'image/png', + 'url' => 'url-to-full-image', + 'rendered' => 'url-to-full-image' + ], + 'thumbnail' => [ + 'url' => 'url-to-thumbnail-image', + 'rendered' => 'url-to-thumbnail-image' + ] + ], + 'width' => 100, + 'height' => 100, + ], + ]; + $this->assertEquals($expected, $actual); + } +} diff --git a/tests/Unit/Base/RestAPI/ItemFields/HighlightedItemFieldTest.php b/tests/Unit/Base/RestAPI/ItemFields/HighlightedItemFieldTest.php new file mode 100644 index 0000000..4df260e --- /dev/null +++ b/tests/Unit/Base/RestAPI/ItemFields/HighlightedItemFieldTest.php @@ -0,0 +1,64 @@ +plugin = m::mock(Plugin::class); + + $this->plugin->config = $config; + $this->plugin->loader = m::mock(Loader::class); + + $this->post = m::mock(WP_Post::class); + $this->post->ID = 1; + } + + protected function tearDown(): void + { + WP_Mock::tearDown(); + } + + /** @test */ + public function it_returns_false_when_post_highlight_is_false() + { + WP_Mock::userFunction('get_post_meta', [ + 'return' => false + ]); + + $highlightedItemField = new HighlightedItemField($this->plugin); + $condition = $highlightedItemField->create($this->post); + + $this->assertFalse($condition); + } + + /** @test */ + public function it_returns_true_when_post_highlight_is_enabled() + { + WP_Mock::userFunction('get_post_meta', [ + 'return' => true + ]); + + $highlightedItemField = new HighlightedItemField($this->plugin); + $condition = $highlightedItemField->create($this->post); + + $this->assertTrue($condition); + } +} diff --git a/tests/Unit/Base/RestAPI/ItemFields/LinksFieldTest.php b/tests/Unit/Base/RestAPI/ItemFields/LinksFieldTest.php new file mode 100644 index 0000000..0e3131a --- /dev/null +++ b/tests/Unit/Base/RestAPI/ItemFields/LinksFieldTest.php @@ -0,0 +1,63 @@ +plugin = m::mock(Plugin::class); + + $this->plugin->config = $config; + $this->plugin->loader = m::mock(Loader::class); + + $this->post = m::mock(WP_Post::class); + $this->post->ID = 1; + } + + protected function tearDown(): void + { + WP_Mock::tearDown(); + } + + /** @test */ + public function it_returns_the_downloads() + { + WP_Mock::userFunction('get_post_meta', [ + 'return' => [ + [ + 'openpub_links_url' => 'url', + 'openpub_links_title' => 'title', + ] + ] + ]); + + $linksField = new LinksField($this->plugin); + $actual = $linksField->create($this->post); + + $this->assertTrue(is_array($actual)); + + $this->assertEquals([ + [ + 'title' => 'title', + 'url' => 'url' + ] + ], $actual); + } +} diff --git a/tests/Unit/Base/RestAPI/RestAPIServiceProviderTest.php b/tests/Unit/Base/RestAPI/RestAPIServiceProviderTest.php index 926350b..0ae792c 100644 --- a/tests/Unit/Base/RestAPI/RestAPIServiceProviderTest.php +++ b/tests/Unit/Base/RestAPI/RestAPIServiceProviderTest.php @@ -1,12 +1,13 @@