From 2f5f32586ff638c0848b507dea6eba844a657286 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 11 Aug 2022 10:34:55 -0600 Subject: [PATCH 01/21] Bump sub-repos composer PHP versions to `>=7.4` --- src/ACF/composer.json | 2 +- src/Assets/composer.json | 2 +- src/Blog_Copier/composer.json | 2 +- src/CLI/composer.json | 2 +- src/Cache/composer.json | 2 +- src/Container/composer.json | 2 +- src/Generators/composer.json | 2 +- src/Log/composer.json | 6 +++--- src/Media/composer.json | 2 +- src/Nav/composer.json | 2 +- src/Object_Meta/composer.json | 2 +- src/Oembed/composer.json | 2 +- src/P2P/composer.json | 2 +- src/Pipeline/composer.json | 2 +- src/Post_Meta/composer.json | 2 +- src/Post_Type/composer.json | 2 +- src/Queues/composer.json | 2 +- src/Queues_Mysql/composer.json | 2 +- src/Request/composer.json | 2 +- src/Required_Page/composer.json | 2 +- src/Routes/composer.json | 2 +- src/Schema/composer.json | 2 +- src/Settings/composer.json | 2 +- src/Taxonomy/composer.json | 2 +- src/Twig/composer.json | 2 +- src/User/composer.json | 2 +- src/Utils/composer.json | 2 +- src/Whoops/composer.json | 2 +- 28 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/ACF/composer.json b/src/ACF/composer.json index dc39f698..d673bb9c 100644 --- a/src/ACF/composer.json +++ b/src/ACF/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2", + "php": ">=7.4", "moderntribe/square1-object-meta": "^3.7" }, "autoload": { diff --git a/src/Assets/composer.json b/src/Assets/composer.json index be0de9e4..6b2a2ab1 100644 --- a/src/Assets/composer.json +++ b/src/Assets/composer.json @@ -9,7 +9,7 @@ }, "require": { "moderntribe/square1-container": "^3.7", - "php": "^7.2" + "php": ">=7.4" }, "autoload": { "psr-4": { diff --git a/src/Blog_Copier/composer.json b/src/Blog_Copier/composer.json index b2a66421..001a5951 100644 --- a/src/Blog_Copier/composer.json +++ b/src/Blog_Copier/composer.json @@ -11,7 +11,7 @@ "require": { "moderntribe/square1-container": "^3.7", "moderntribe/square1-queues": "^3.7", - "php": "^7.2" + "php": ">=7.4" }, "autoload": { "psr-4": { diff --git a/src/CLI/composer.json b/src/CLI/composer.json index 3dff688a..f788164f 100644 --- a/src/CLI/composer.json +++ b/src/CLI/composer.json @@ -9,7 +9,7 @@ }, "minimum-stability": "dev", "require": { - "php": "^7.2", + "php": ">=7.4", "moderntribe/square1-container": "^3.7" }, "autoload": { diff --git a/src/Cache/composer.json b/src/Cache/composer.json index a49d8ad6..426f08a2 100644 --- a/src/Cache/composer.json +++ b/src/Cache/composer.json @@ -10,7 +10,7 @@ "require": { "moderntribe/square1-cli": "^3.7", "moderntribe/square1-container": "^3.7", - "php": "^7.2" + "php": ">=7.4" }, "autoload": { "psr-4": { diff --git a/src/Container/composer.json b/src/Container/composer.json index 4ba2deba..4b01b175 100644 --- a/src/Container/composer.json +++ b/src/Container/composer.json @@ -9,7 +9,7 @@ }, "minimum-stability": "dev", "require": { - "php": "^7.2", + "php": ">=7.4", "php-di/php-di": "^6.0" }, "autoload": { diff --git a/src/Generators/composer.json b/src/Generators/composer.json index 316e8ef1..d37a3ecb 100644 --- a/src/Generators/composer.json +++ b/src/Generators/composer.json @@ -10,7 +10,7 @@ "require": { "moderntribe/square1-cli": "^3.7", "moderntribe/square1-container": "^3.7", - "php": "^7.2" + "php": ">=7.4" }, "autoload": { "psr-4": { diff --git a/src/Log/composer.json b/src/Log/composer.json index e9bbfb6d..ae912314 100644 --- a/src/Log/composer.json +++ b/src/Log/composer.json @@ -8,11 +8,11 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2", + "php": ">=7.4", "psr/log": "^1.1 || ^2.0 || ^3.0", "moderntribe/square1-container": "^3.7", - "monolog/monolog": "^2.0", - "mhcg/monolog-wp-cli": "^1.0" + "monolog/monolog": "^2.5", + "mhcg/monolog-wp-cli": "^1.2" }, "autoload": { "psr-4": { diff --git a/src/Media/composer.json b/src/Media/composer.json index c5020f6a..e897125d 100644 --- a/src/Media/composer.json +++ b/src/Media/composer.json @@ -9,7 +9,7 @@ }, "minimum-stability": "dev", "require": { - "php": "^7.2", + "php": ">=7.4", "enshrined/svg-sanitize": "^0.13.3", "moderntribe/square1-container": "^3.7" }, diff --git a/src/Nav/composer.json b/src/Nav/composer.json index 0e7ddbf5..b1b3e277 100644 --- a/src/Nav/composer.json +++ b/src/Nav/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2" + "php": ">=7.4" }, "autoload": { "psr-4": { diff --git a/src/Object_Meta/composer.json b/src/Object_Meta/composer.json index f6015e16..dfc41010 100644 --- a/src/Object_Meta/composer.json +++ b/src/Object_Meta/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2", + "php": ">=7.4", "moderntribe/square1-container": "^3.7" }, "autoload": { diff --git a/src/Oembed/composer.json b/src/Oembed/composer.json index ca80b118..0d2fa3c0 100644 --- a/src/Oembed/composer.json +++ b/src/Oembed/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2", + "php": ">=7.4", "moderntribe/square1-cache": "^3.7" }, "autoload": { diff --git a/src/P2P/composer.json b/src/P2P/composer.json index ef2fd7f4..be5bc6fe 100644 --- a/src/P2P/composer.json +++ b/src/P2P/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2", + "php": ">=7.4", "moderntribe/square1-container": "^3.7" }, "autoload": { diff --git a/src/Pipeline/composer.json b/src/Pipeline/composer.json index 20a8937b..084a9d8c 100644 --- a/src/Pipeline/composer.json +++ b/src/Pipeline/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2", + "php": ">=7.4", "moderntribe/square1-container": "^3.7" }, "autoload": { diff --git a/src/Post_Meta/composer.json b/src/Post_Meta/composer.json index 6725b219..6aec08ad 100644 --- a/src/Post_Meta/composer.json +++ b/src/Post_Meta/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2", + "php": ">=7.4", "moderntribe/square1-object-meta": "^3.7" }, "autoload": { diff --git a/src/Post_Type/composer.json b/src/Post_Type/composer.json index cc55288c..0c7504d6 100644 --- a/src/Post_Type/composer.json +++ b/src/Post_Type/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2", + "php": ">=7.4", "moderntribe/square1-object-meta": "^3.7" }, "autoload": { diff --git a/src/Queues/composer.json b/src/Queues/composer.json index e4950de5..b265055e 100644 --- a/src/Queues/composer.json +++ b/src/Queues/composer.json @@ -11,7 +11,7 @@ "require": { "moderntribe/square1-cli": "^3.7", "moderntribe/square1-container": "^3.7", - "php": "^7.2" + "php": ">=7.4" }, "autoload": { "psr-4": { diff --git a/src/Queues_Mysql/composer.json b/src/Queues_Mysql/composer.json index 9ee80f6a..ea9696f1 100644 --- a/src/Queues_Mysql/composer.json +++ b/src/Queues_Mysql/composer.json @@ -12,7 +12,7 @@ "moderntribe/square1-cli": "^3.7", "moderntribe/square1-container": "^3.7", "moderntribe/square1-queues": "^3.7", - "php": "^7.2" + "php": ">=7.4" }, "autoload": { "psr-4": { diff --git a/src/Request/composer.json b/src/Request/composer.json index 4c569dd1..5ea24123 100644 --- a/src/Request/composer.json +++ b/src/Request/composer.json @@ -9,7 +9,7 @@ }, "minimum-stability": "dev", "require": { - "php": "^7.2" + "php": ">=7.4" }, "autoload": { "psr-4": { diff --git a/src/Required_Page/composer.json b/src/Required_Page/composer.json index 7d2b9adf..30af60d8 100644 --- a/src/Required_Page/composer.json +++ b/src/Required_Page/composer.json @@ -10,7 +10,7 @@ "minimum-stability": "dev", "require": { "moderntribe/square1-container": "^3.7", - "php": "^7.2" + "php": ">=7.4" }, "suggest": { "moderntribe/square1-acf": "Supports automatic registration of options to manage the assigned pages" diff --git a/src/Routes/composer.json b/src/Routes/composer.json index fedeb0ce..cf452846 100644 --- a/src/Routes/composer.json +++ b/src/Routes/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2", + "php": ">=7.4", "moderntribe/square1-container": "^3.7" }, "autoload": { diff --git a/src/Schema/composer.json b/src/Schema/composer.json index 0d479bbe..47ac7d35 100644 --- a/src/Schema/composer.json +++ b/src/Schema/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2" + "php": ">=7.4" }, "autoload": { "psr-4": { diff --git a/src/Settings/composer.json b/src/Settings/composer.json index 68fc3cdc..c0fbefae 100644 --- a/src/Settings/composer.json +++ b/src/Settings/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2" + "php": ">=7.4" }, "autoload": { "psr-4": { diff --git a/src/Taxonomy/composer.json b/src/Taxonomy/composer.json index 072ae4c3..727b7fa9 100644 --- a/src/Taxonomy/composer.json +++ b/src/Taxonomy/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2", + "php": ">=7.4", "moderntribe/square1-object-meta": "^3.7" }, "autoload": { diff --git a/src/Twig/composer.json b/src/Twig/composer.json index 1b0323bb..a90132ea 100644 --- a/src/Twig/composer.json +++ b/src/Twig/composer.json @@ -9,7 +9,7 @@ }, "minimum-stability": "dev", "require": { - "php": "^7.2", + "php": ">=7.4", "twig/twig": "^3.0" }, "autoload": { diff --git a/src/User/composer.json b/src/User/composer.json index 89fc9b68..272782f7 100644 --- a/src/User/composer.json +++ b/src/User/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2", + "php": ">=7.4", "moderntribe/square1-object-meta": "^3.7" }, "autoload": { diff --git a/src/Utils/composer.json b/src/Utils/composer.json index a6c35935..6523e1f6 100644 --- a/src/Utils/composer.json +++ b/src/Utils/composer.json @@ -8,7 +8,7 @@ "preferred-install": "dist" }, "require": { - "php": "^7.2" + "php": ">=7.4" }, "autoload": { "psr-4": { diff --git a/src/Whoops/composer.json b/src/Whoops/composer.json index 9f81a772..5ce4564c 100644 --- a/src/Whoops/composer.json +++ b/src/Whoops/composer.json @@ -9,7 +9,7 @@ }, "minimum-stability": "dev", "require": { - "php": "^7.2", + "php": ">=7.4", "filp/whoops": "^2.2@dev", "moderntribe/square1-container": "^3.7" }, From dc39c583a589a6ab1f2b593f10d53a439e706fc6 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 11 Aug 2022 10:35:37 -0600 Subject: [PATCH 02/21] Bump main composer.json to `>=7.4`, set platform version to PHP 7.4.7 and start dependency updates --- composer.json | 10 +- composer.lock | 1184 +++++++++++++++++++++++++++++++++---------------- 2 files changed, 812 insertions(+), 382 deletions(-) diff --git a/composer.json b/composer.json index 5b59d47b..e5008307 100644 --- a/composer.json +++ b/composer.json @@ -13,12 +13,12 @@ } ], "require": { - "php": "^7.2", + "php": ">=7.4", "composer-plugin-api": "^1.0 || ^2.0", "enshrined/svg-sanitize": "^0.15.4", "filp/whoops": "^2.2@dev", - "mhcg/monolog-wp-cli": "^1.0", - "monolog/monolog": "^2.0", + "mhcg/monolog-wp-cli": "^1.2", + "monolog/monolog": "^2.5", "php-di/php-di": "^6.0", "psr/log": "^1.1 || ^2.0 || ^3.0", "twig/twig": "^3.0" @@ -32,7 +32,7 @@ "phpcompatibility/php-compatibility": "*", "phpcompatibility/phpcompatibility-wp": "^2.0", "phpstan/phpstan": "^0.12.25", - "phpunit/phpunit": "^8.0", + "phpunit/phpunit": "^8.0 || ^9.0 <9.5", "sirbrillig/phpcs-variable-analysis": "^2.0.1", "squizlabs/php_codesniffer": "^3.4.2", "symplify/monorepo-builder": "^8.2", @@ -116,7 +116,7 @@ "vendor-dir": "vendor", "preferred-install": "dist", "platform": { - "php": "7.2.32" + "php": "7.4.7" }, "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true diff --git a/composer.lock b/composer.lock index 55d300a2..5be97cf5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8e1d54559e8beeafdbf4d535f61c5cfd", + "content-hash": "7129416043f4df6e9f456ee92f0342ca", "packages": [ { "name": "enshrined/svg-sanitize", @@ -122,26 +122,85 @@ ], "time": "2022-01-07T12:00:00+00:00" }, + { + "name": "laravel/serializable-closure", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "09f0e9fb61829f628205b7c94906c28740ff9540" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/09f0e9fb61829f628205b7c94906c28740ff9540", + "reference": "09f0e9fb61829f628205b7c94906c28740ff9540", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "pestphp/pest": "^1.18", + "phpstan/phpstan": "^0.12.98", + "symfony/var-dumper": "^5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "time": "2022-05-16T17:09:47+00:00" + }, { "name": "mhcg/monolog-wp-cli", - "version": "v1.1.0", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/mhcg/monolog-wp-cli.git", - "reference": "33cd515fa7e5eac2ebca8aac995aa97a4ab2b77b" + "reference": "15147930eb6e5582c8e676afc519843c89aa878a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mhcg/monolog-wp-cli/zipball/33cd515fa7e5eac2ebca8aac995aa97a4ab2b77b", - "reference": "33cd515fa7e5eac2ebca8aac995aa97a4ab2b77b", + "url": "https://api.github.com/repos/mhcg/monolog-wp-cli/zipball/15147930eb6e5582c8e676afc519843c89aa878a", + "reference": "15147930eb6e5582c8e676afc519843c89aa878a", "shasum": "" }, "require": { - "monolog/monolog": "^2.0", - "php": "^7.2" + "monolog/monolog": "^2.5", + "php": ">=7.4" }, "require-dev": { - "phpunit/phpunit": "8.5.* || 9.0.*", + "phpunit/phpunit": "^9", "squizlabs/php_codesniffer": "^3.5", "wp-cli/wp-cli": "^2.0" }, @@ -174,7 +233,7 @@ "source": "https://github.com/mhcg/monolog-wp-cli", "wiki": "https://github.com/mhcg/monolog-wp-cli/wiki" }, - "time": "2020-03-23T20:17:57+00:00" + "time": "2022-08-11T01:57:09+00:00" }, { "name": "monolog/monolog", @@ -278,91 +337,28 @@ ], "time": "2022-07-24T11:55:47+00:00" }, - { - "name": "opis/closure", - "version": "3.6.3", - "source": { - "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/3d81e4309d2a927abbe66df935f4bb60082805ad", - "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad", - "shasum": "" - }, - "require": { - "php": "^5.4 || ^7.0 || ^8.0" - }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6.x-dev" - } - }, - "autoload": { - "files": [ - "functions.php" - ], - "psr-4": { - "Opis\\Closure\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" - } - ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", - "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" - ], - "support": { - "issues": "https://github.com/opis/closure/issues", - "source": "https://github.com/opis/closure/tree/3.6.3" - }, - "time": "2022-01-27T09:35:39+00:00" - }, { "name": "php-di/invoker", - "version": "2.0.0", + "version": "2.3.3", "source": { "type": "git", "url": "https://github.com/PHP-DI/Invoker.git", - "reference": "540c27c86f663e20fe39a24cd72fa76cdb21d41a" + "reference": "cd6d9f267d1a3474bdddf1be1da079f01b942786" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/540c27c86f663e20fe39a24cd72fa76cdb21d41a", - "reference": "540c27c86f663e20fe39a24cd72fa76cdb21d41a", + "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/cd6d9f267d1a3474bdddf1be1da079f01b942786", + "reference": "cd6d9f267d1a3474bdddf1be1da079f01b942786", "shasum": "" }, "require": { - "psr/container": "~1.0" + "php": ">=7.3", + "psr/container": "^1.0|^2.0" }, "require-dev": { "athletic/athletic": "~0.1.8", - "phpunit/phpunit": "~4.5" + "mnapoli/hard-mode": "~0.3.0", + "phpunit/phpunit": "^9.0" }, "type": "library", "autoload": { @@ -386,27 +382,33 @@ ], "support": { "issues": "https://github.com/PHP-DI/Invoker/issues", - "source": "https://github.com/PHP-DI/Invoker/tree/master" + "source": "https://github.com/PHP-DI/Invoker/tree/2.3.3" }, - "time": "2017-03-20T19:28:22+00:00" + "funding": [ + { + "url": "https://github.com/mnapoli", + "type": "github" + } + ], + "time": "2021-12-13T09:22:56+00:00" }, { "name": "php-di/php-di", - "version": "6.3.5", + "version": "6.4.0", "source": { "type": "git", "url": "https://github.com/PHP-DI/PHP-DI.git", - "reference": "b8126d066ce144765300ee0ab040c1ed6c9ef588" + "reference": "ae0f1b3b03d8b29dff81747063cbfd6276246cc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/b8126d066ce144765300ee0ab040c1ed6c9ef588", - "reference": "b8126d066ce144765300ee0ab040c1ed6c9ef588", + "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/ae0f1b3b03d8b29dff81747063cbfd6276246cc4", + "reference": "ae0f1b3b03d8b29dff81747063cbfd6276246cc4", "shasum": "" }, "require": { - "opis/closure": "^3.5.5", - "php": ">=7.2.0", + "laravel/serializable-closure": "^1.0", + "php": ">=7.4.0", "php-di/invoker": "^2.0", "php-di/phpdoc-reader": "^2.0.1", "psr/container": "^1.0" @@ -415,12 +417,12 @@ "psr/container-implementation": "^1.0" }, "require-dev": { - "doctrine/annotations": "~1.2", + "doctrine/annotations": "~1.10", "friendsofphp/php-cs-fixer": "^2.4", "mnapoli/phpunit-easymock": "^1.2", - "ocramius/proxy-manager": "^2.0.2", + "ocramius/proxy-manager": "^2.11.2", "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^8.5|^9.0" + "phpunit/phpunit": "^9.5" }, "suggest": { "doctrine/annotations": "Install it if you want to use annotations (version ~1.2)", @@ -452,7 +454,7 @@ ], "support": { "issues": "https://github.com/PHP-DI/PHP-DI/issues", - "source": "https://github.com/PHP-DI/PHP-DI/tree/6.3.5" + "source": "https://github.com/PHP-DI/PHP-DI/tree/6.4.0" }, "funding": [ { @@ -464,7 +466,7 @@ "type": "tidelift" } ], - "time": "2021-09-02T09:49:58+00:00" + "time": "2022-04-09T16:46:38+00:00" }, { "name": "php-di/phpdoc-reader", @@ -510,20 +512,20 @@ }, { "name": "psr/container", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", "autoload": { @@ -552,9 +554,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { "name": "psr/log", @@ -1214,22 +1216,22 @@ }, { "name": "codeception/lib-asserts", - "version": "1.13.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/Codeception/lib-asserts.git", - "reference": "184231d5eab66bc69afd6b9429344d80c67a33b6" + "reference": "df9c8346722ddde4a20e6372073c09c8df87c296" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/lib-asserts/zipball/184231d5eab66bc69afd6b9429344d80c67a33b6", - "reference": "184231d5eab66bc69afd6b9429344d80c67a33b6", + "url": "https://api.github.com/repos/Codeception/lib-asserts/zipball/df9c8346722ddde4a20e6372073c09c8df87c296", + "reference": "df9c8346722ddde4a20e6372073c09c8df87c296", "shasum": "" }, "require": { - "codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.0.3 | ^9.0", + "codeception/phpunit-wrapper": "^7.7.1 | ^8.0.3 | ^9.0", "ext-dom": "*", - "php": ">=5.6.0 <9.0" + "php": "^7.4 | ^8.0" }, "type": "library", "autoload": { @@ -1262,33 +1264,31 @@ ], "support": { "issues": "https://github.com/Codeception/lib-asserts/issues", - "source": "https://github.com/Codeception/lib-asserts/tree/1.13.2" + "source": "https://github.com/Codeception/lib-asserts/tree/2.0.0" }, - "time": "2020-10-21T16:26:20+00:00" + "time": "2021-12-03T12:40:37+00:00" }, { "name": "codeception/phpunit-wrapper", - "version": "8.1.6", + "version": "9.0.9", "source": { "type": "git", "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "7d3479bab7e2b6349044db8af11cd05d57809f9c" + "reference": "7439a53ae367986e9c22b2ac00f9d7376bb2f8cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/7d3479bab7e2b6349044db8af11cd05d57809f9c", - "reference": "7d3479bab7e2b6349044db8af11cd05d57809f9c", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/7439a53ae367986e9c22b2ac00f9d7376bb2f8cf", + "reference": "7439a53ae367986e9c22b2ac00f9d7376bb2f8cf", "shasum": "" }, "require": { "php": ">=7.2", - "phpunit/php-code-coverage": "^7.0", - "phpunit/phpunit": "^8.0", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0" + "phpunit/phpunit": "^9.0" }, "require-dev": { "codeception/specify": "*", + "consolidation/robo": "^3.0.0-alpha3", "vlucas/phpdotenv": "^3.0" }, "type": "library", @@ -1305,31 +1305,38 @@ { "name": "Davert", "email": "davert.php@resend.cc" + }, + { + "name": "Naktibalda" } ], "description": "PHPUnit classes used by Codeception", "support": { "issues": "https://github.com/Codeception/phpunit-wrapper/issues", - "source": "https://github.com/Codeception/phpunit-wrapper/tree/8.1.6" + "source": "https://github.com/Codeception/phpunit-wrapper/tree/9.0.9" }, - "time": "2022-05-23T06:22:33+00:00" + "time": "2022-05-23T06:24:11+00:00" }, { "name": "codeception/stub", - "version": "3.7.0", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/Codeception/Stub.git", - "reference": "468dd5fe659f131fc997f5196aad87512f9b1304" + "reference": "18a148dacd293fc7b044042f5aa63a82b08bff5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Stub/zipball/468dd5fe659f131fc997f5196aad87512f9b1304", - "reference": "468dd5fe659f131fc997f5196aad87512f9b1304", + "url": "https://api.github.com/repos/Codeception/Stub/zipball/18a148dacd293fc7b044042f5aa63a82b08bff5d", + "reference": "18a148dacd293fc7b044042f5aa63a82b08bff5d", "shasum": "" }, "require": { - "phpunit/phpunit": "^8.4 | ^9.0" + "php": "^7.4 | ^8.0", + "phpunit/phpunit": "^8.4 | ^9.0 | ^10.0 | 10.0.x-dev" + }, + "require-dev": { + "consolidation/robo": "^3.0" }, "type": "library", "autoload": { @@ -1344,9 +1351,9 @@ "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", "support": { "issues": "https://github.com/Codeception/Stub/issues", - "source": "https://github.com/Codeception/Stub/tree/3.7.0" + "source": "https://github.com/Codeception/Stub/tree/4.0.2" }, - "time": "2020-07-03T15:54:43+00:00" + "time": "2022-01-31T19:25:15+00:00" }, { "name": "composer/ca-bundle", @@ -1678,20 +1685,20 @@ }, { "name": "composer/pcre", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "c8e9d27cfc5ed22643c19c160455b473ffd8aabe" + "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/c8e9d27cfc5ed22643c19c160455b473ffd8aabe", - "reference": "c8e9d27cfc5ed22643c19c160455b473ffd8aabe", + "url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd", + "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "phpstan/phpstan": "^1.3", @@ -1701,7 +1708,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -1729,7 +1736,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/2.0.0" + "source": "https://github.com/composer/pcre/tree/3.0.0" }, "funding": [ { @@ -1745,7 +1752,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T20:05:29+00:00" + "time": "2022-02-25T20:21:48+00:00" }, { "name": "composer/semver", @@ -2368,29 +2375,83 @@ ], "time": "2022-06-20T21:43:11+00:00" }, + { + "name": "illuminate/collections", + "version": "v8.83.23", + "source": { + "type": "git", + "url": "https://github.com/illuminate/collections.git", + "reference": "705a4e1ef93cd492c45b9b3e7911cccc990a07f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/collections/zipball/705a4e1ef93cd492c45b9b3e7911cccc990a07f4", + "reference": "705a4e1ef93cd492c45b9b3e7911cccc990a07f4", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "php": "^7.3|^8.0" + }, + "suggest": { + "symfony/var-dumper": "Required to use the dump method (^5.4)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "files": [ + "helpers.php" + ], + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Collections package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2022-06-23T15:29:49+00:00" + }, { "name": "illuminate/contracts", - "version": "v7.30.6", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "2449f2ea949ddf995a3dcffe5e21c768cf7d6478" + "reference": "5e0fd287a1b22a6b346a9f7cd484d8cf0234585d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/2449f2ea949ddf995a3dcffe5e21c768cf7d6478", - "reference": "2449f2ea949ddf995a3dcffe5e21c768cf7d6478", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/5e0fd287a1b22a6b346a9f7cd484d8cf0234585d", + "reference": "5e0fd287a1b22a6b346a9f7cd484d8cf0234585d", "shasum": "" }, "require": { - "php": "^7.2.5|^8.0", + "php": "^7.3|^8.0", "psr/container": "^1.0", "psr/simple-cache": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -2414,46 +2475,94 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-11-17T15:00:14+00:00" + "time": "2022-01-13T14:47:47+00:00" + }, + { + "name": "illuminate/macroable", + "version": "v8.83.23", + "source": { + "type": "git", + "url": "https://github.com/illuminate/macroable.git", + "reference": "aed81891a6e046fdee72edd497f822190f61c162" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/aed81891a6e046fdee72edd497f822190f61c162", + "reference": "aed81891a6e046fdee72edd497f822190f61c162", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Macroable package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-11-16T13:57:03+00:00" }, { "name": "illuminate/support", - "version": "v7.30.6", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "c7b42acd009c94a3f8b749a65f6835db90174d58" + "reference": "c3d643e77082786ae8a51502c757e9b1a3ee254e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/c7b42acd009c94a3f8b749a65f6835db90174d58", - "reference": "c7b42acd009c94a3f8b749a65f6835db90174d58", + "url": "https://api.github.com/repos/illuminate/support/zipball/c3d643e77082786ae8a51502c757e9b1a3ee254e", + "reference": "c3d643e77082786ae8a51502c757e9b1a3ee254e", "shasum": "" }, "require": { "doctrine/inflector": "^1.4|^2.0", "ext-json": "*", "ext-mbstring": "*", - "illuminate/contracts": "^7.0", - "nesbot/carbon": "^2.31", - "php": "^7.2.5|^8.0", - "voku/portable-ascii": "^1.4.8" + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "nesbot/carbon": "^2.53.1", + "php": "^7.3|^8.0", + "voku/portable-ascii": "^1.6.1" }, "conflict": { "tightenco/collect": "<5.5.33" }, "suggest": { - "illuminate/filesystem": "Required to use the composer class (^7.0).", - "moontoast/math": "Required to use ordered UUIDs (^1.1).", - "ramsey/uuid": "Required to use Str::uuid() (^3.7|^4.0).", - "symfony/process": "Required to use the composer class (^5.0).", - "symfony/var-dumper": "Required to use the dd function (^5.0).", - "vlucas/phpdotenv": "Required to use the Env class and env helper (^4.0)." + "illuminate/filesystem": "Required to use the composer class (^8.0).", + "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3|^2.0.2).", + "ramsey/uuid": "Required to use Str::uuid() (^4.2.2).", + "symfony/process": "Required to use the composer class (^5.4).", + "symfony/var-dumper": "Required to use the dd function (^5.4).", + "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.4.1)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -2480,7 +2589,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-12-06T19:25:06+00:00" + "time": "2022-06-27T13:26:30+00:00" }, { "name": "jean85/pretty-package-versions", @@ -2934,16 +3043,16 @@ }, { "name": "nesbot/carbon", - "version": "2.60.0", + "version": "2.61.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "00a259ae02b003c563158b54fb6743252b638ea6" + "reference": "bdf4f4fe3a3eac4de84dbec0738082a862c68ba6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/00a259ae02b003c563158b54fb6743252b638ea6", - "reference": "00a259ae02b003c563158b54fb6743252b638ea6", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bdf4f4fe3a3eac4de84dbec0738082a862c68ba6", + "reference": "bdf4f4fe3a3eac4de84dbec0738082a862c68ba6", "shasum": "" }, "require": { @@ -3032,7 +3141,7 @@ "type": "tidelift" } ], - "time": "2022-07-27T15:57:48+00:00" + "time": "2022-08-06T12:41:24+00:00" }, { "name": "nette/finder", @@ -3186,6 +3295,62 @@ }, "time": "2022-01-24T11:29:14+00:00" }, + { + "name": "nikic/php-parser", + "version": "v4.14.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" + }, + "time": "2022-05-31T20:59:12+00:00" + }, { "name": "phar-io/manifest", "version": "2.0.3", @@ -3809,40 +3974,44 @@ }, { "name": "phpunit/php-code-coverage", - "version": "7.0.15", + "version": "9.2.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "819f92bba8b001d4363065928088de22f25a3a48" + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", - "reference": "819f92bba8b001d4363065928088de22f25a3a48", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": ">=7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.3 || ^4.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1.3" + "nikic/php-parser": "^4.13.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^8.2.2" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-xdebug": "^2.7.2" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -3870,7 +4039,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" }, "funding": [ { @@ -3878,32 +4047,32 @@ "type": "github" } ], - "time": "2021-07-26T12:20:09+00:00" + "time": "2022-03-07T09:28:20+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.5", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", - "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -3930,7 +4099,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { @@ -3938,26 +4107,38 @@ "type": "github" } ], - "time": "2021-12-02T12:42:26+00:00" + "time": "2021-12-02T12:48:52+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -3974,41 +4155,47 @@ "role": "lead" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "template" + "process" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" }, - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" }, { - "name": "phpunit/php-timer", - "version": "2.1.3", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -4027,14 +4214,14 @@ "role": "lead" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "timer" + "template" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" }, "funding": [ { @@ -4042,33 +4229,32 @@ "type": "github" } ], - "time": "2020-11-30T08:20:02+00:00" + "time": "2020-10-26T05:33:50+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "3.1.3", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "9c1da83261628cb24b6a6df371b6e312b3954768" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9c1da83261628cb24b6a6df371b6e312b3954768", - "reference": "9c1da83261628cb24b6a6df371b6e312b3954768", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -4083,17 +4269,18 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "tokenizer" + "timer" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.3" + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, "funding": [ { @@ -4101,21 +4288,20 @@ "type": "github" } ], - "abandoned": true, - "time": "2021-07-26T12:15:06+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "8.5.28", + "version": "9.4.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "8f2d1c9c7b30382459c871467853da1a6e44fbd4" + "reference": "6535e637961f0829832621dc1b7308c2d24a799e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8f2d1c9c7b30382459c871467853da1a6e44fbd4", - "reference": "8f2d1c9c7b30382459c871467853da1a6e44fbd4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6535e637961f0829832621dc1b7308c2d24a799e", + "reference": "6535e637961f0829832621dc1b7308c2d24a799e", "shasum": "" }, "require": { @@ -4126,29 +4312,35 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.0", - "phar-io/manifest": "^2.0.3", + "myclabs/deep-copy": "^1.10.1", + "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.4", - "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.3", - "sebastian/exporter": "^3.1.2", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -4156,10 +4348,13 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.5-dev" + "dev-master": "9.4-dev" } }, "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], "classmap": [ "src/" ] @@ -4184,11 +4379,11 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.28" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.4.4" }, "funding": [ { - "url": "https://phpunit.de/sponsors.html", + "url": "https://phpunit.de/donate.html", "type": "custom" }, { @@ -4196,7 +4391,7 @@ "type": "github" } ], - "time": "2022-07-29T09:20:50+00:00" + "time": "2020-12-01T04:58:47+00:00" }, { "name": "psr/event-dispatcher", @@ -4587,30 +4782,142 @@ }, "time": "2021-06-04T09:56:25+00:00" }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -4632,7 +4939,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" }, "funding": [ { @@ -4640,34 +4947,34 @@ "type": "github" } ], - "time": "2020-11-30T08:15:22+00:00" + "time": "2020-09-28T05:30:19+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", "shasum": "" }, "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -4706,7 +5013,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" }, "funding": [ { @@ -4714,33 +5021,90 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" }, { "name": "sebastian/diff", - "version": "3.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -4772,7 +5136,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" }, "funding": [ { @@ -4780,27 +5144,27 @@ "type": "github" } ], - "time": "2020-11-30T07:59:04+00:00" + "time": "2020-10-26T13:10:38+00:00" }, { "name": "sebastian/environment", - "version": "4.2.4", + "version": "5.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-posix": "*" @@ -4808,7 +5172,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -4835,7 +5199,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" }, "funding": [ { @@ -4843,34 +5207,34 @@ "type": "github" } ], - "time": "2020-11-30T07:53:42+00:00" + "time": "2022-04-03T09:37:03+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.4", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -4905,14 +5269,14 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" }, "funding": [ { @@ -4920,30 +5284,30 @@ "type": "github" } ], - "time": "2021-11-11T13:51:24+00:00" + "time": "2021-11-11T14:18:36+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.2", + "version": "5.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921" + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921", - "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", "shasum": "" }, "require": { - "php": ">=7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -4951,7 +5315,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -4976,7 +5340,64 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-14T08:28:10+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" }, "funding": [ { @@ -4984,34 +5405,34 @@ "type": "github" } ], - "time": "2022-02-10T06:55:38+00:00" + "time": "2020-11-28T06:42:11+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.4", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -5033,7 +5454,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { @@ -5041,32 +5462,32 @@ "type": "github" } ], - "time": "2020-11-30T07:40:27+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -5088,7 +5509,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { @@ -5096,32 +5517,32 @@ "type": "github" } ], - "time": "2020-11-30T07:37:18+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.1", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -5151,7 +5572,7 @@ "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" }, "funding": [ { @@ -5159,29 +5580,32 @@ "type": "github" } ], - "time": "2020-11-30T07:34:24+00:00" + "time": "2020-10-26T13:17:30+00:00" }, { "name": "sebastian/resource-operations", - "version": "2.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -5203,7 +5627,7 @@ "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" }, "funding": [ { @@ -5211,32 +5635,32 @@ "type": "github" } ], - "time": "2020-11-30T07:30:19+00:00" + "time": "2020-09-28T06:45:17+00:00" }, { "name": "sebastian/type", - "version": "1.1.4", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", "shasum": "" }, "require": { - "php": ">=7.2" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.2" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -5259,7 +5683,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" }, "funding": [ { @@ -5267,29 +5691,29 @@ "type": "github" } ], - "time": "2020-11-30T07:25:11+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -5312,9 +5736,15 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, - "time": "2016-10-03T07:35:21+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" }, { "name": "seld/jsonlint", @@ -8460,12 +8890,12 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^7.2", + "php": ">=7.4", "composer-plugin-api": "^1.0 || ^2.0" }, "platform-dev": [], "platform-overrides": { - "php": "7.2.32" + "php": "7.4.7" }, "plugin-api-version": "2.3.0" } From aad94754bf467e44a834a57cf6c08a606b624bcb Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 11 Aug 2022 10:38:31 -0600 Subject: [PATCH 03/21] Update ci, remove php 7.3, bump WP versions --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c983856..0aa0a7e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,8 +10,13 @@ jobs: strategy: matrix: operating-system: [ ubuntu-latest ] - php-versions: [ '7.3', '7.4' ] - wordpress-version: [ 'latest', '5.3.2' ] + php-versions: [ '7.4', '8.0', '8.1' ] + wordpress-version: [ 'latest', '5.3.12', '5.9.3' ] + exclude: + - php-versions: '8.0' + wordpress-version: '5.3.12' + - php-versions: '8.1' + wordpress-version: '5.3.12' fail-fast: false env: From c2a83b3a66dabef5b6548afcb481a570dcf7cced Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 11 Aug 2022 10:55:34 -0600 Subject: [PATCH 04/21] Bump phpstan --- composer.json | 4 ++-- composer.lock | 62 ++++++++++++++++++++++++--------------------------- 2 files changed, 31 insertions(+), 35 deletions(-) diff --git a/composer.json b/composer.json index e5008307..bc3d5a33 100644 --- a/composer.json +++ b/composer.json @@ -31,12 +31,12 @@ "lucatume/wp-browser": "^3.0.9", "phpcompatibility/php-compatibility": "*", "phpcompatibility/phpcompatibility-wp": "^2.0", - "phpstan/phpstan": "^0.12.25", + "phpstan/phpstan": "^1.8", "phpunit/phpunit": "^8.0 || ^9.0 <9.5", "sirbrillig/phpcs-variable-analysis": "^2.0.1", "squizlabs/php_codesniffer": "^3.4.2", "symplify/monorepo-builder": "^8.2", - "szepeviktor/phpstan-wordpress": "^0.6.0", + "szepeviktor/phpstan-wordpress": "^1.0", "wp-cli/wp-cli": "^2.5" }, "autoload": { diff --git a/composer.lock b/composer.lock index 5be97cf5..e833e7fb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7129416043f4df6e9f456ee92f0342ca", + "content-hash": "abd8f7332e12d43edb643053a71fffe9", "packages": [ { "name": "enshrined/svg-sanitize", @@ -3464,16 +3464,16 @@ }, { "name": "php-stubs/wordpress-stubs", - "version": "v5.9.3", + "version": "v6.0.1", "source": { "type": "git", "url": "https://github.com/php-stubs/wordpress-stubs.git", - "reference": "18d56875e5078a50b8ea4bc4b20b735ca61edeee" + "reference": "e04781a84e364615a7b5f70fdc345c8253ca5b8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/18d56875e5078a50b8ea4bc4b20b735ca61edeee", - "reference": "18d56875e5078a50b8ea4bc4b20b735ca61edeee", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/e04781a84e364615a7b5f70fdc345c8253ca5b8f", + "reference": "e04781a84e364615a7b5f70fdc345c8253ca5b8f", "shasum": "" }, "replace": { @@ -3505,9 +3505,9 @@ ], "support": { "issues": "https://github.com/php-stubs/wordpress-stubs/issues", - "source": "https://github.com/php-stubs/wordpress-stubs/tree/v5.9.3" + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.0.1" }, - "time": "2022-04-06T15:33:59+00:00" + "time": "2022-07-15T11:10:45+00:00" }, { "name": "phpcompatibility/php-compatibility", @@ -3910,20 +3910,20 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.99", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7" + "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b4d40f1d759942f523be267a1bab6884f46ca3f7", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c53312ecc575caf07b0e90dee43883fdf90ca67c", + "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.2|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -3933,11 +3933,6 @@ "phpstan.phar" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - } - }, "autoload": { "files": [ "bootstrap.php" @@ -3950,7 +3945,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.99" + "source": "https://github.com/phpstan/phpstan/tree/1.8.2" }, "funding": [ { @@ -3970,7 +3965,7 @@ "type": "tidelift" } ], - "time": "2021-09-12T20:09:55+00:00" + "time": "2022-07-20T09:57:31+00:00" }, { "name": "phpunit/php-code-coverage", @@ -8301,30 +8296,31 @@ }, { "name": "szepeviktor/phpstan-wordpress", - "version": "v0.6.6", + "version": "v1.1.2", "source": { "type": "git", "url": "https://github.com/szepeviktor/phpstan-wordpress.git", - "reference": "f5040549dc5f46d81ea2432de726c2a0a4ad1141" + "reference": "e487dc725845ac914681e148d0e8ac479ad887ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/f5040549dc5f46d81ea2432de726c2a0a4ad1141", - "reference": "f5040549dc5f46d81ea2432de726c2a0a4ad1141", + "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/e487dc725845ac914681e148d0e8ac479ad887ec", + "reference": "e487dc725845ac914681e148d0e8ac479ad887ec", "shasum": "" }, "require": { - "php": "~7.1", - "php-stubs/wordpress-stubs": "^4.7 || ^5.0", - "phpstan/phpstan": "^0.12.26", + "php": "^7.2 || ^8.0", + "php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0", + "phpstan/phpstan": "^1.6", "symfony/polyfill-php73": "^1.12.0" }, "require-dev": { - "composer/composer": "^1.8.6", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "composer/composer": "^2.1.14", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", "php-parallel-lint/php-parallel-lint": "^1.1", - "phpstan/phpstan-strict-rules": "^0.12", - "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.4.3" + "phpstan/phpstan-strict-rules": "^1.2", + "phpunit/phpunit": "^8 || ^9", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.6" }, "type": "phpstan-extension", "extra": { @@ -8336,7 +8332,7 @@ }, "autoload": { "psr-4": { - "PHPStan\\WordPress\\": "src/" + "SzepeViktor\\PHPStan\\WordPress\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -8353,7 +8349,7 @@ ], "support": { "issues": "https://github.com/szepeviktor/phpstan-wordpress/issues", - "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v0.6.6" + "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.1.2" }, "funding": [ { @@ -8361,7 +8357,7 @@ "type": "custom" } ], - "time": "2020-10-18T12:11:45+00:00" + "time": "2022-06-21T10:51:00+00:00" }, { "name": "theseer/tokenizer", From 2020deb53cfea1725a6cd09a24092fb9f6e00b23 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 11 Aug 2022 14:41:37 -0600 Subject: [PATCH 05/21] Add an .editorconfig file --- .editorconfig | 165 +++++++++++++++++++++++++++++++++++++++++++++++++ .gitattributes | 1 + 2 files changed, 166 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..d89f0094 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,165 @@ +root = true + +# Base styles from WordPress Coding Standards +# https://github.com/WordPress/wordpress-develop/blob/master/.editorconfig + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.yml] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false + +# Indentation override for all JS +[*.js] +indent_style = tab + +[*.json] +indent_style = space +tab_width = 4 + +[*.php] +indent_style = tab +indent_size = 4 +ij_formatter_off_tag = @formatter:off +ij_formatter_on_tag = @formatter:on +ij_formatter_tags_enabled = false +ij_php_align_assignments = true +ij_php_align_class_constants = true +ij_php_align_group_field_declarations = false +ij_php_align_inline_comments = false +ij_php_align_key_value_pairs = true +ij_php_align_multiline_array_initializer_expression = true +ij_php_align_phpdoc_comments = true +ij_php_align_phpdoc_param_names = true +ij_smart_tabs = true +ij_php_array_initializer_new_line_after_left_brace = true +ij_php_array_initializer_right_brace_on_new_line = true +ij_php_array_initializer_wrap = on_every_item +ij_php_blank_lines_after_class_header = 0 +ij_php_blank_lines_after_function = 1 +ij_php_blank_lines_after_imports = 1 +ij_php_blank_lines_after_opening_tag = 0 +ij_php_blank_lines_after_package = 0 +ij_php_blank_lines_around_class = 1 +ij_php_blank_lines_around_constants = 0 +ij_php_blank_lines_around_field = 0 +ij_php_blank_lines_around_method = 1 +ij_php_blank_lines_before_class_end = 0 +ij_php_blank_lines_before_imports = 1 +ij_php_blank_lines_before_method_body = 0 +ij_php_blank_lines_before_package = 1 +ij_php_blank_lines_before_return_statement = 1 +ij_php_block_brace_style = end_of_line +ij_php_class_brace_style = end_of_line +ij_php_comma_after_last_array_element = true +ij_php_concat_spaces = true +ij_php_do_while_brace_force = always +ij_php_else_on_new_line = false +ij_php_fields_default_visibility = private +ij_php_finally_on_new_line = false +ij_php_for_brace_force = always +ij_php_force_short_declaration_array_style = true +ij_php_group_use_wrap = on_every_item +ij_php_if_brace_force = always +ij_php_import_sorting = alphabetic +ij_php_indent_break_from_case = true +ij_php_indent_case_from_switch = true +ij_php_indent_code_in_php_tags = false +ij_php_keep_blank_lines_after_lbrace = 1 +ij_php_keep_blank_lines_before_right_brace = 1 +ij_php_keep_blank_lines_in_code = 2 +ij_php_keep_blank_lines_in_declarations = 2 +ij_php_keep_indents_on_empty_lines = false +ij_php_keep_line_breaks = true +ij_php_keep_rparen_and_lbrace_on_one_line = true +ij_php_keep_simple_methods_in_one_line = false +ij_php_lambda_brace_style = end_of_line +ij_php_lower_case_boolean_const = true +ij_php_lower_case_null_const = true +ij_php_method_brace_style = end_of_line +ij_php_namespace_brace_style = 1 +ij_php_phpdoc_blank_line_before_tags = true +ij_php_phpdoc_blank_lines_around_parameters = true +ij_php_phpdoc_keep_blank_lines = true +ij_php_phpdoc_param_spaces_between_name_and_description = 1 +ij_php_phpdoc_param_spaces_between_tag_and_type = 1 +ij_php_phpdoc_param_spaces_between_type_and_name = 1 +ij_php_phpdoc_use_fqcn = true +ij_php_phpdoc_wrap_long_lines = true +ij_php_space_after_colon = true +ij_php_space_after_colon_in_return_type = true +ij_php_space_after_comma = true +ij_php_space_after_for_semicolon = true +ij_php_space_after_quest = true +ij_php_space_after_type_cast = true +ij_php_space_after_unary_not = true +ij_php_space_before_array_initializer_left_brace = false +ij_php_space_before_catch_keyword = true +ij_php_space_before_catch_left_brace = true +ij_php_space_before_catch_parentheses = true +ij_php_space_before_class_left_brace = true +ij_php_space_before_closure_left_parenthesis = true +ij_php_space_before_colon = true +ij_php_space_before_colon_in_return_type = false +ij_php_space_before_comma = false +ij_php_space_before_do_left_brace = true +ij_php_space_before_else_keyword = true +ij_php_space_before_else_left_brace = true +ij_php_space_before_finally_keyword = true +ij_php_space_before_finally_left_brace = true +ij_php_space_before_for_left_brace = true +ij_php_space_before_for_parentheses = true +ij_php_space_before_for_semicolon = false +ij_php_space_before_if_left_brace = true +ij_php_space_before_if_parentheses = true +ij_php_space_before_method_call_parentheses = false +ij_php_space_before_method_left_brace = true +ij_php_space_before_method_parentheses = false +ij_php_space_before_quest = true +ij_php_space_before_switch_left_brace = true +ij_php_space_before_switch_parentheses = true +ij_php_space_before_try_left_brace = true +ij_php_space_before_unary_not = true +ij_php_space_before_while_keyword = true +ij_php_space_before_while_left_brace = true +ij_php_space_before_while_parentheses = true +ij_php_space_between_ternary_quest_and_colon = false +ij_php_spaces_around_additive_operators = true +ij_php_spaces_around_arrow = false +ij_php_spaces_around_assignment_in_declare = false +ij_php_spaces_around_assignment_operators = true +ij_php_spaces_around_bitwise_operators = true +ij_php_spaces_around_equality_operators = true +ij_php_spaces_around_logical_operators = true +ij_php_spaces_around_multiplicative_operators = true +ij_php_spaces_around_null_coalesce_operator = true +ij_php_spaces_around_relational_operators = true +ij_php_spaces_around_shift_operators = true +ij_php_spaces_around_unary_operator = true +ij_php_spaces_around_var_within_brackets = true +ij_php_spaces_within_array_initializer_braces = true +ij_php_spaces_within_brackets = false +ij_php_spaces_within_catch_parentheses = true +ij_php_spaces_within_for_parentheses = true +ij_php_spaces_within_if_parentheses = true +ij_php_spaces_within_method_call_parentheses = true +ij_php_spaces_within_method_parentheses = true +ij_php_spaces_within_parentheses = true +ij_php_spaces_within_short_echo_tags = true +ij_php_spaces_within_switch_parentheses = true +ij_php_spaces_within_while_parentheses = true +ij_php_special_else_if_treatment = true +ij_php_ternary_operation_signs_on_next_line = false +ij_php_ternary_operation_wrap = off +ij_php_upper_case_boolean_const = false +ij_php_upper_case_null_const = false +ij_php_variable_naming_style = snake_case +ij_php_while_brace_force = always +ij_php_while_on_new_line = false \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 98fefb69..730b069e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,6 +5,7 @@ /.gitattributes export-ignore /.github export-ignore /.gitignore export-ignore +/.editorconfig export-ignore /monorepo.sh export-ignore /monorepo-builder.php export-ignore /tests export-ignore From 5d4404dabf247445d21edca94c92d8cd24eed9b7 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 11 Aug 2022 15:03:12 -0600 Subject: [PATCH 06/21] Add mt coding standards, update phpcs rules --- composer.json | 10 +-- composer.lock | 212 +++++++++++++++++++++++++++++++++++++++++++++++- tests/phpcs.xml | 79 ++++-------------- 3 files changed, 232 insertions(+), 69 deletions(-) diff --git a/composer.json b/composer.json index bc3d5a33..3622127b 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ ], "require": { "php": ">=7.4", + "ext-json": "*", "composer-plugin-api": "^1.0 || ^2.0", "enshrined/svg-sanitize": "^0.15.4", "filp/whoops": "^2.2@dev", @@ -27,14 +28,11 @@ "automattic/phpcs-neutron-standard": "^1.5", "automattic/vipwpcs": "^2.0.0", "composer/composer": "^1.0 || ^2.0", - "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0 || ^0.7.0", "lucatume/wp-browser": "^3.0.9", - "phpcompatibility/php-compatibility": "*", - "phpcompatibility/phpcompatibility-wp": "^2.0", + "moderntribe/coding-standards": "^3.0", "phpstan/phpstan": "^1.8", "phpunit/phpunit": "^8.0 || ^9.0 <9.5", "sirbrillig/phpcs-variable-analysis": "^2.0.1", - "squizlabs/php_codesniffer": "^3.4.2", "symplify/monorepo-builder": "^8.2", "szepeviktor/phpstan-wordpress": "^1.0", "wp-cli/wp-cli": "^2.5" @@ -113,13 +111,15 @@ "moderntribe/square1-whoops": "self.version" }, "config": { + "sort-packages": true, "vendor-dir": "vendor", "preferred-install": "dist", "platform": { "php": "7.4.7" }, "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "cweagans/composer-patches": true } }, "extra": { diff --git a/composer.lock b/composer.lock index e833e7fb..12b945bd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "abd8f7332e12d43edb643053a71fffe9", + "content-hash": "56168802b587532d99de0b6e2891870f", "packages": [ { "name": "enshrined/svg-sanitize", @@ -1981,6 +1981,54 @@ ], "time": "2022-02-25T21:32:43+00:00" }, + { + "name": "cweagans/composer-patches", + "version": "1.7.2", + "source": { + "type": "git", + "url": "https://github.com/cweagans/composer-patches.git", + "reference": "e9969cfc0796e6dea9b4e52f77f18e1065212871" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e9969cfc0796e6dea9b4e52f77f18e1065212871", + "reference": "e9969cfc0796e6dea9b4e52f77f18e1065212871", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3.0" + }, + "require-dev": { + "composer/composer": "~1.0 || ~2.0", + "phpunit/phpunit": "~4.6" + }, + "type": "composer-plugin", + "extra": { + "class": "cweagans\\Composer\\Patches" + }, + "autoload": { + "psr-4": { + "cweagans\\Composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Cameron Eagans", + "email": "me@cweagans.net" + } + ], + "description": "Provides a way to patch Composer packages.", + "support": { + "issues": "https://github.com/cweagans/composer-patches/issues", + "source": "https://github.com/cweagans/composer-patches/tree/1.7.2" + }, + "time": "2022-01-25T19:21:20+00:00" + }, { "name": "dealerdirect/phpcodesniffer-composer-installer", "version": "v0.7.2", @@ -2932,6 +2980,61 @@ }, "time": "2021-09-30T13:48:57+00:00" }, + { + "name": "moderntribe/coding-standards", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/moderntribe/coding-standards.git", + "reference": "9fa4bd683827e6a9b6f9beace1bae1ed24cbb124" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/moderntribe/coding-standards/zipball/9fa4bd683827e6a9b6f9beace1bae1ed24cbb124", + "reference": "9fa4bd683827e6a9b6f9beace1bae1ed24cbb124", + "shasum": "" + }, + "require": { + "automattic/vipwpcs": "^2.3", + "cweagans/composer-patches": "^1.7", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", + "php": ">=7.4", + "phpcompatibility/phpcompatibility-wp": "^2.1", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "phpcodesniffer-standard", + "extra": { + "enable-patching": true, + "patches": { + "wp-coding-standards/wpcs": { + "Add PHP 8 support until WordPress releases a new version": "https://github.com/WordPress/WordPress-Coding-Standards/commit/7cd46bed1e6a7a2af3fe24c7f4a044da3076d8f4.patch" + } + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "The Modern Tribe Coding Standard for PHPCS", + "keywords": [ + "checks", + "code", + "coding", + "moderntribe", + "phpcs", + "rules", + "sniffer", + "sniffs", + "standard", + "style" + ], + "support": { + "issues": "https://github.com/moderntribe/coding-standards/issues", + "source": "https://github.com/moderntribe/coding-standards/tree/v3.0.0" + }, + "time": "2022-08-11T20:56:53+00:00" + }, { "name": "mustache/mustache", "version": "v2.14.1", @@ -3908,6 +4011,51 @@ }, "time": "2021-12-08T12:19:24+00:00" }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "367a8d9d5f7da2a0136422d27ce8840583926955" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/367a8d9d5f7da2a0136422d27ce8840583926955", + "reference": "367a8d9d5f7da2a0136422d27ce8840583926955", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.7.0" + }, + "time": "2022-08-09T12:23:23+00:00" + }, { "name": "phpstan/phpstan", "version": "1.8.2", @@ -5906,6 +6054,67 @@ }, "time": "2022-06-13T13:49:41+00:00" }, + { + "name": "slevomat/coding-standard", + "version": "7.2.1", + "source": { + "type": "git", + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/aff06ae7a84e4534bf6f821dc982a93a5d477c90", + "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "php": "^7.2 || ^8.0", + "phpstan/phpdoc-parser": "^1.5.1", + "squizlabs/php_codesniffer": "^3.6.2" + }, + "require-dev": { + "phing/phing": "2.17.3", + "php-parallel-lint/php-parallel-lint": "1.3.2", + "phpstan/phpstan": "1.4.10|1.7.1", + "phpstan/phpstan-deprecation-rules": "1.0.0", + "phpstan/phpstan-phpunit": "1.0.0|1.1.1", + "phpstan/phpstan-strict-rules": "1.2.3", + "phpunit/phpunit": "7.5.20|8.5.21|9.5.20" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "SlevomatCodingStandard\\": "SlevomatCodingStandard" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "support": { + "issues": "https://github.com/slevomat/coding-standard/issues", + "source": "https://github.com/slevomat/coding-standard/tree/7.2.1" + }, + "funding": [ + { + "url": "https://github.com/kukulich", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", + "type": "tidelift" + } + ], + "time": "2022-05-25T10:58:12+00:00" + }, { "name": "squizlabs/php_codesniffer", "version": "3.7.1", @@ -8887,6 +9096,7 @@ "prefer-lowest": false, "platform": { "php": ">=7.4", + "ext-json": "*", "composer-plugin-api": "^1.0 || ^2.0" }, "platform-dev": [], diff --git a/tests/phpcs.xml b/tests/phpcs.xml index af9f66d8..186ec403 100644 --- a/tests/phpcs.xml +++ b/tests/phpcs.xml @@ -1,73 +1,26 @@ - - Modern Tribe Coding Standards. - ../src + + + + - - *Generators/templates - - + + + + - - - - - - - - - - - - - - - - - - - - - + + - - - 3 - - - + + ./src - - - - - - - - - - - - - - 3 - - - 3 - - - 3 - + + *Generators/templates - - - - error - - - 2 - + + From 8383060db445cb7668bbc8b700bdb36efce9b339 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 11 Aug 2022 16:00:58 -0600 Subject: [PATCH 07/21] Fix WordPress Sniff bad typing by providing the configuration item it wants, so it doesn't return null --- tests/phpcs.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/phpcs.xml b/tests/phpcs.xml index 186ec403..fb67eac2 100644 --- a/tests/phpcs.xml +++ b/tests/phpcs.xml @@ -12,6 +12,9 @@ + + + From a02731b3b3c203c8d86f390fc1c3fb69d30ae3d7 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 11 Aug 2022 16:01:58 -0600 Subject: [PATCH 08/21] Remove deps provided from dependencies, bump mt coding standards to 3.0.1, enable patching --- composer.json | 4 +- composer.lock | 903 +++----------------------------------------------- 2 files changed, 47 insertions(+), 860 deletions(-) diff --git a/composer.json b/composer.json index 3622127b..fd7b40b3 100644 --- a/composer.json +++ b/composer.json @@ -26,13 +26,10 @@ }, "require-dev": { "automattic/phpcs-neutron-standard": "^1.5", - "automattic/vipwpcs": "^2.0.0", - "composer/composer": "^1.0 || ^2.0", "lucatume/wp-browser": "^3.0.9", "moderntribe/coding-standards": "^3.0", "phpstan/phpstan": "^1.8", "phpunit/phpunit": "^8.0 || ^9.0 <9.5", - "sirbrillig/phpcs-variable-analysis": "^2.0.1", "symplify/monorepo-builder": "^8.2", "szepeviktor/phpstan-wordpress": "^1.0", "wp-cli/wp-cli": "^2.5" @@ -123,6 +120,7 @@ } }, "extra": { + "enable-patching": true, "branch-alias": { "dev-master": "3.7-dev" } diff --git a/composer.lock b/composer.lock index 12b945bd..eb7f80ca 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "56168802b587532d99de0b6e2891870f", + "content-hash": "d3f7327f97b7d09815740a7391f8e405", "packages": [ { "name": "enshrined/svg-sanitize", @@ -1356,515 +1356,41 @@ "time": "2022-01-31T19:25:15+00:00" }, { - "name": "composer/ca-bundle", - "version": "1.3.3", - "source": { - "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "30897edbfb15e784fe55587b4f73ceefd3c4d98c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/30897edbfb15e784fe55587b4f73ceefd3c4d98c", - "reference": "30897edbfb15e784fe55587b4f73ceefd3c4d98c", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "psr/log": "^1.0", - "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.3" - }, - "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": "2022-07-20T07:14:26+00:00" - }, - { - "name": "composer/composer", - "version": "2.3.10", - "source": { - "type": "git", - "url": "https://github.com/composer/composer.git", - "reference": "ebac357c0a41359f3981098729042ed6dedc97ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/ebac357c0a41359f3981098729042ed6dedc97ba", - "reference": "ebac357c0a41359f3981098729042ed6dedc97ba", - "shasum": "" - }, - "require": { - "composer/ca-bundle": "^1.0", - "composer/metadata-minifier": "^1.0", - "composer/pcre": "^2 || ^3", - "composer/semver": "^3.0", - "composer/spdx-licenses": "^1.2", - "composer/xdebug-handler": "^2.0.2 || ^3.0.3", - "justinrainbow/json-schema": "^5.2.11", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1.0 || ^2.0 || ^3.0", - "react/promise": "^2.8", - "seld/jsonlint": "^1.4", - "seld/phar-utils": "^1.2", - "symfony/console": "^5.4.7 || ^6.0.7", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/polyfill-php73": "^1.24", - "symfony/polyfill-php80": "^1.24", - "symfony/process": "^5.4 || ^6.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.4.1", - "phpstan/phpstan-deprecation-rules": "^1", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1", - "phpstan/phpstan-symfony": "^1.1", - "symfony/phpunit-bridge": "^6.0" - }, - "suggest": { - "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", - "ext-zip": "Enabling the zip extension allows you to unzip archives", - "ext-zlib": "Allow gzip compression of HTTP requests" - }, - "bin": [ - "bin/composer" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.3-dev" - }, - "phpstan": { - "includes": [ - "phpstan/rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "Composer\\": "src/Composer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "https://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", - "homepage": "https://getcomposer.org/", - "keywords": [ - "autoload", - "dependency", - "package" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.3.10" - }, - "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": "2022-07-13T13:48:23+00:00" - }, - { - "name": "composer/metadata-minifier", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/metadata-minifier.git", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "composer/composer": "^2", - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\MetadataMinifier\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Small utility library that handles metadata minification and expansion.", - "keywords": [ - "composer", - "compression" - ], - "support": { - "issues": "https://github.com/composer/metadata-minifier/issues", - "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-04-07T13:37:33+00:00" - }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "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": "2022-01-17T14:14:24+00:00" - }, - { - "name": "composer/pcre", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd", - "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-02-25T20:21:48+00:00" - }, - { - "name": "composer/semver", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" - }, - "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": "2022-04-01T19:23:25+00:00" - }, - { - "name": "composer/spdx-licenses", - "version": "1.5.7", + "name": "composer/package-versions-deprecated", + "version": "1.11.99.5", "source": { "type": "git", - "url": "https://github.com/composer/spdx-licenses.git", - "reference": "c848241796da2abf65837d51dce1fae55a960149" + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/c848241796da2abf65837d51dce1fae55a960149", - "reference": "c848241796da2abf65837d51dce1fae55a960149", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" }, - "type": "library", + "type": "composer-plugin", "extra": { + "class": "PackageVersions\\Installer", "branch-alias": { - "dev-main": "1.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { "psr-4": { - "Composer\\Spdx\\": "src" + "PackageVersions\\": "src/PackageVersions" } }, "notification-url": "https://packagist.org/downloads/", @@ -1873,97 +1399,18 @@ ], "authors": [ { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" }, { "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "SPDX licenses list and validation library.", - "keywords": [ - "license", - "spdx", - "validator" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/spdx-licenses/issues", - "source": "https://github.com/composer/spdx-licenses/tree/1.5.7" - }, - "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": "2022-05-23T07:37:50+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", - "shasum": "" - }, - "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" + "email": "j.boggiano@seld.be" } ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" }, "funding": [ { @@ -1979,7 +1426,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T21:32:43+00:00" + "time": "2022-01-17T14:14:24+00:00" }, { "name": "cweagans/composer-patches", @@ -2694,76 +2141,6 @@ }, "time": "2021-02-04T16:20:16+00:00" }, - { - "name": "justinrainbow/json-schema", - "version": "5.2.12", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", - "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" - }, - "time": "2022-04-13T08:02:27+00:00" - }, { "name": "lucatume/wp-browser", "version": "3.1.6", @@ -2982,16 +2359,16 @@ }, { "name": "moderntribe/coding-standards", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/moderntribe/coding-standards.git", - "reference": "9fa4bd683827e6a9b6f9beace1bae1ed24cbb124" + "reference": "4cea08e0c9ab87230c624b7681b8f4c21b5e3346" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/moderntribe/coding-standards/zipball/9fa4bd683827e6a9b6f9beace1bae1ed24cbb124", - "reference": "9fa4bd683827e6a9b6f9beace1bae1ed24cbb124", + "url": "https://api.github.com/repos/moderntribe/coding-standards/zipball/4cea08e0c9ab87230c624b7681b8f4c21b5e3346", + "reference": "4cea08e0c9ab87230c624b7681b8f4c21b5e3346", "shasum": "" }, "require": { @@ -3000,7 +2377,7 @@ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", "php": ">=7.4", "phpcompatibility/phpcompatibility-wp": "^2.1", - "slevomat/coding-standard": "^7.0", + "slevomat/coding-standard": "^8.0", "squizlabs/php_codesniffer": "^3.6" }, "type": "phpcodesniffer-standard", @@ -3031,9 +2408,9 @@ ], "support": { "issues": "https://github.com/moderntribe/coding-standards/issues", - "source": "https://github.com/moderntribe/coding-standards/tree/v3.0.0" + "source": "https://github.com/moderntribe/coding-standards/tree/v3.0.1" }, - "time": "2022-08-11T20:56:53+00:00" + "time": "2022-08-11T21:56:03+00:00" }, { "name": "mustache/mustache", @@ -4789,82 +4166,6 @@ }, "time": "2019-03-08T08:55:37+00:00" }, - { - "name": "react/promise", - "version": "v2.9.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "keywords": [ - "promise", - "promises" - ], - "support": { - "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.9.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-02-11T10:27:51+00:00" - }, { "name": "rmccue/requests", "version": "v1.8.1", @@ -5889,118 +5190,6 @@ ], "time": "2020-09-28T06:39:44+00:00" }, - { - "name": "seld/jsonlint", - "version": "1.9.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "4211420d25eba80712bff236a98960ef68b866b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", - "reference": "4211420d25eba80712bff236a98960ef68b866b7", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.5", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "support": { - "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", - "type": "tidelift" - } - ], - "time": "2022-04-01T13:37:23+00:00" - }, - { - "name": "seld/phar-utils", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "9f3452c93ff423469c0d56450431562ca423dcee" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/9f3452c93ff423469c0d56450431562ca423dcee", - "reference": "9f3452c93ff423469c0d56450431562ca423dcee", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\PharUtils\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "PHAR file format utilities, for when PHP phars you up", - "keywords": [ - "phar" - ], - "support": { - "issues": "https://github.com/Seldaek/phar-utils/issues", - "source": "https://github.com/Seldaek/phar-utils/tree/1.2.0" - }, - "time": "2021-12-10T11:20:11+00:00" - }, { "name": "sirbrillig/phpcs-variable-analysis", "version": "v2.11.4", @@ -6056,37 +5245,37 @@ }, { "name": "slevomat/coding-standard", - "version": "7.2.1", + "version": "8.4.0", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90" + "reference": "02f27326be19633a1b6ba76745390bbf9a4be0b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/aff06ae7a84e4534bf6f821dc982a93a5d477c90", - "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/02f27326be19633a1b6ba76745390bbf9a4be0b6", + "reference": "02f27326be19633a1b6ba76745390bbf9a4be0b6", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": "^1.5.1", - "squizlabs/php_codesniffer": "^3.6.2" + "phpstan/phpdoc-parser": ">=1.7.0 <1.8.0", + "squizlabs/php_codesniffer": "^3.7.1" }, "require-dev": { - "phing/phing": "2.17.3", + "phing/phing": "2.17.4", "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.4.10|1.7.1", + "phpstan/phpstan": "1.4.10|1.8.2", "phpstan/phpstan-deprecation-rules": "1.0.0", "phpstan/phpstan-phpunit": "1.0.0|1.1.1", - "phpstan/phpstan-strict-rules": "1.2.3", - "phpunit/phpunit": "7.5.20|8.5.21|9.5.20" + "phpstan/phpstan-strict-rules": "1.3.0", + "phpunit/phpunit": "7.5.20|8.5.21|9.5.21" }, "type": "phpcodesniffer-standard", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -6101,7 +5290,7 @@ "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/7.2.1" + "source": "https://github.com/slevomat/coding-standard/tree/8.4.0" }, "funding": [ { @@ -6113,7 +5302,7 @@ "type": "tidelift" } ], - "time": "2022-05-25T10:58:12+00:00" + "time": "2022-08-09T19:03:45+00:00" }, { "name": "squizlabs/php_codesniffer", From c454dd26b81b7e6f299f0ac13dad5ef15d979b69 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 11 Aug 2022 16:31:02 -0600 Subject: [PATCH 09/21] Bump analysis php version to 7.4 --- .github/workflows/analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index b25657c0..1eea812d 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: operating-system: [ ubuntu-latest ] - php-versions: [ '7.3' ] + php-versions: [ '7.4' ] env: cache_version: 1 # increment to flush all caches From 0e3f57c6d7262074f1a0752fe3b3a51557047ab8 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 11 Aug 2022 16:31:25 -0600 Subject: [PATCH 10/21] Bump monorepo workflow PHP version to 7.4 --- .github/workflows/monorepo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/monorepo.yml b/.github/workflows/monorepo.yml index 35e34911..2eb7924d 100644 --- a/.github/workflows/monorepo.yml +++ b/.github/workflows/monorepo.yml @@ -12,7 +12,7 @@ jobs: env: cache_version: 1 # increment to flush all caches - php_version: '7.3' + php_version: '7.4' steps: From 878b6616cd9fd1ce0468cbc97471f3a101e99923 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 11 Aug 2022 16:33:37 -0600 Subject: [PATCH 11/21] Allow manual runs of phpcs/phpstan --- .github/workflows/analysis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 1eea812d..a15bd951 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -1,6 +1,7 @@ name: PHP Code Sniffer and Static Analysis on: + workflow_run: pull_request: paths: - 'src/**.php' From ade182f7e0c68611594b48755489450b86730cb4 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 11 Aug 2022 16:34:31 -0600 Subject: [PATCH 12/21] Use proper event for dispatching --- .github/workflows/analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index a15bd951..6f2b4960 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -1,7 +1,7 @@ name: PHP Code Sniffer and Static Analysis on: - workflow_run: + workflow_dispatch: pull_request: paths: - 'src/**.php' From a62d664504c3c1d4735ff39066507d115214477d Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Fri, 12 Aug 2022 09:38:18 -0600 Subject: [PATCH 13/21] Convert Whoops repo --- src/Whoops/Whoops_Definer.php | 7 ++++--- src/Whoops/Whoops_Subscriber.php | 16 ++++++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/Whoops/Whoops_Definer.php b/src/Whoops/Whoops_Definer.php index fdb48a26..0ce8d6bc 100644 --- a/src/Whoops/Whoops_Definer.php +++ b/src/Whoops/Whoops_Definer.php @@ -1,16 +1,17 @@ - DI\autowire() + Run::class => DI\autowire() ->constructor( null ) ->method( 'pushHandler', DI\get( PrettyPageHandler::class ) ), ]; diff --git a/src/Whoops/Whoops_Subscriber.php b/src/Whoops/Whoops_Subscriber.php index 963090c7..f3b27a0c 100644 --- a/src/Whoops/Whoops_Subscriber.php +++ b/src/Whoops/Whoops_Subscriber.php @@ -1,16 +1,20 @@ -container->get( \Whoops\Run::class )->register(); - }, - 10, 0 ); + if ( ! defined( 'WHOOPS_ENABLE' ) || ! WHOOPS_ENABLE ) { + return; } + + add_action( 'init', function (): void { + $this->container->get( Run::class )->register(); + }, - 10, 0 ); } + } From 1a5b8c767a929aaf01e4a9a292374ff4b161fd13 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Fri, 12 Aug 2022 09:43:48 -0600 Subject: [PATCH 14/21] Convert Utils repo --- src/Utils/Collection.php | 8 +++++--- src/Utils/Markup_Utils.php | 18 ++++++++++++++---- src/Utils/Path_Utils.php | 7 ++++--- src/Utils/Query_Utils.php | 7 +++---- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/src/Utils/Collection.php b/src/Utils/Collection.php index a4d76e11..1d9c0a50 100644 --- a/src/Utils/Collection.php +++ b/src/Utils/Collection.php @@ -1,7 +1,9 @@ - $value ) { @@ -29,7 +38,7 @@ public static function concat_attrs( array $attrs = null, $prefix = '' ) { * * @return string */ - public static function class_attribute( $classes, $attribute = true ) { + public static function class_attribute( array $classes, bool $attribute = true ): string { if ( empty( $classes ) ) { return ''; } @@ -55,7 +64,7 @@ public static function class_attribute( $classes, $attribute = true ) { * * @return string */ - public static function truncate_html( string $html = '', int $words = 55, string $more = null, bool $autop = true ): string { + public static function truncate_html( string $html = '', int $words = 55, ?string $more = null, bool $autop = true ): string { $result = wp_trim_words( strip_shortcodes( $html ), $words, $more ); if ( $autop ) { @@ -64,4 +73,5 @@ public static function truncate_html( string $html = '', int $words = 55, string return $result; } + } diff --git a/src/Utils/Path_Utils.php b/src/Utils/Path_Utils.php index 6d3a1ae9..0c1f8118 100644 --- a/src/Utils/Path_Utils.php +++ b/src/Utils/Path_Utils.php @@ -1,9 +1,9 @@ - $quote . esc_sql( $string ) . $quote, $elements ) ); } /** @@ -29,4 +27,5 @@ public static function get_quoted_string_list( array $elements, string $quote = public static function get_int_list( array $elements ): string { return implode( ',', array_map( 'intval', $elements ) ); } + } From 144b745cb5f31d05be05c94f4ff1ba735e221f51 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Fri, 12 Aug 2022 09:45:56 -0600 Subject: [PATCH 15/21] Convert User repo --- src/User/User_Object.php | 57 ++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/src/User/User_Object.php b/src/User/User_Object.php index 7c5c57ca..7d8747d7 100644 --- a/src/User/User_Object.php +++ b/src/User/User_Object.php @@ -1,5 +1,4 @@ -user_id = $user_id; if ( isset( $meta ) ) { $this->meta = $meta; @@ -42,8 +39,23 @@ public function __construct( $user_id = 0, Meta_Map $meta = null ) { } } - public function __get( $key ) { - return $this->get_meta( $key ); + /** + * Get an instance of the User_Object corresponding + * to the user with the given $user_id + * + * @param int $user_id The ID of an existing user + * + * @return static + */ + public static function factory( int $user_id ): self { + /** @var \Tribe\Libs\Object_Meta\Meta_Repository|null $meta_repo */ + $meta_repo = apply_filters( Meta_Repository::GET_REPO_FILTER, null ); + + if ( empty( $meta_repo ) ) { + $meta_repo = new Meta_Repository(); + } + + return new static( $user_id, $meta_repo->get( self::NAME ) ); } /** @@ -51,29 +63,22 @@ public function __get( $key ) { * to this user. * * @param string $key + * * @return mixed */ - public function get_meta( $key ) { + public function get_meta( string $key ) { $user = sprintf( 'user_%s', $this->user_id ); + return $this->meta->get_value( $user, $key ); } /** - * Get an instance of the User_Object corresponding - * to the user with the given $user_id + * @param string $key * - * @param int $user_id The ID of an existing user - * @return static + * @return mixed */ - public static function factory( $user_id ) { - /** @var Meta_Repository $meta_repo */ - $meta_repo = apply_filters( Meta_Repository::GET_REPO_FILTER, null ); - if ( empty( $meta_repo ) ) { - $meta_repo = new Meta_Repository(); - } - - $user = new static( $user_id, $meta_repo->get( self::NAME ) ); - - return $user; + public function __get( string $key ) { + return $this->get_meta( $key ); } + } From 4e2c69e7eb8b0b08b796281ea24e12c405599700 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Fri, 12 Aug 2022 09:49:02 -0600 Subject: [PATCH 16/21] Convert Twig repo --- src/Twig/Extension.php | 12 +++++------- src/Twig/Twig_Cache.php | 10 ++++++---- src/Twig/Twig_Definer.php | 18 +++++++++--------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/Twig/Extension.php b/src/Twig/Extension.php index ff155395..5e373b6e 100644 --- a/src/Twig/Extension.php +++ b/src/Twig/Extension.php @@ -1,4 +1,4 @@ - true ] ), + new TwigFilter( 'apply_filters', static fn($tag, $args) => apply_filters_ref_array( $tag, $args ), [ 'is_variadic' => true ] ), new TwigFilter( 'esc_url', 'esc_url' ), new TwigFilter( 'esc_attr', 'esc_attr' ), new TwigFilter( 'esc_html', 'esc_html' ), @@ -26,7 +25,7 @@ public function getFilters() { ] ); } - public function getFunctions() { + public function getFunctions(): array { return apply_filters( 'tribe/libs/twig/funcitons', [ new TwigFunction( 'do_action', 'do_action' ), new TwigFunction( 'do_shortcode', 'do_shortcode' ), @@ -36,5 +35,4 @@ public function getFunctions() { ] ); } - } diff --git a/src/Twig/Twig_Cache.php b/src/Twig/Twig_Cache.php index d704ad59..2de95b70 100644 --- a/src/Twig/Twig_Cache.php +++ b/src/Twig/Twig_Cache.php @@ -1,20 +1,22 @@ -path = $path; parent::__construct( $path, $options ); } - public function generateKey(string $name, string $className): string { + public function generateKey( string $name, string $className ): string { $hash = hash( 'sha256', $className ); return $this->path . $hash[0] . $hash[1] . '/' . $hash . '.html'; } + } diff --git a/src/Twig/Twig_Definer.php b/src/Twig/Twig_Definer.php index 232d5eb0..3ad0f6be 100644 --- a/src/Twig/Twig_Definer.php +++ b/src/Twig/Twig_Definer.php @@ -1,5 +1,4 @@ - DI\create() + Twig_Cache::class => DI\create() ->constructor( $this->twig_cache_dir(), FilesystemCache::FORCE_BYTECODE_INVALIDATION ), - self::OPTIONS => static function ( ContainerInterface $container ) { - return apply_filters( 'tribe/libs/twig/options', [ + self::OPTIONS => static fn(ContainerInterface $container) => apply_filters( 'tribe/libs/twig/options', [ 'debug' => WP_DEBUG, 'cache' => defined( 'TWIG_CACHE' ) && TWIG_CACHE === false ? false : $container->get( Twig_Cache::class ), 'autoescape' => false, 'auto_reload' => true, - ] ); - }, + ] ), - LoaderInterface::class => static function () { + LoaderInterface::class => static function (): \Twig\Loader\FilesystemLoader { $stylesheet_path = get_stylesheet_directory(); $template_path = get_template_directory(); $loader = new FilesystemLoader( [ $stylesheet_path ] ); @@ -43,7 +41,7 @@ public function define(): array { return $loader; }, - Environment::class => static function ( ContainerInterface $c ) { + Environment::class => static function ( ContainerInterface $c ): \Twig\Environment { $environment = new Environment( $c->get( LoaderInterface::class ), $c->get( self::OPTIONS ) ); $environment->addExtension( $c->get( Extension::class ) ); @@ -61,9 +59,11 @@ private function twig_cache_dir(): string { if ( defined( 'TWIG_CACHE_DIR' ) && TWIG_CACHE_DIR ) { return TWIG_CACHE_DIR; } + if ( defined( 'WP_CONTENT_DIR' ) && WP_CONTENT_DIR ) { return WP_CONTENT_DIR . '/cache/twig/'; } + return sys_get_temp_dir() . '/cache/twig/'; } From c0ee98a9158095c3a57988f747a4fac307411491 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Fri, 12 Aug 2022 10:24:06 -0600 Subject: [PATCH 17/21] Convert Settings repo --- src/Settings/Base_Settings.php | 16 ++++++++-------- src/Settings/Settings_Builder.php | 19 +++++++------------ src/Settings/Settings_Definer.php | 6 +++--- src/Settings/Settings_Subscriber.php | 7 ++++--- 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/src/Settings/Base_Settings.php b/src/Settings/Base_Settings.php index 9fce28dc..17516b0e 100644 --- a/src/Settings/Base_Settings.php +++ b/src/Settings/Base_Settings.php @@ -1,4 +1,4 @@ -set_slug(); } /** - * Generates a unique-ish slug for this settings screen + * @param int $priority */ - protected function set_slug() { - $this->slug = sanitize_title( $this->get_parent_slug() . '-' . $this->get_title() ); + public function hook( int $priority = 10 ): void { + add_action( 'init', [ $this, 'register_settings' ], $priority, 0 ); } /** - * @param int $priority + * Generates a unique-ish slug for this settings screen */ - public function hook( $priority = 10 ) { - add_action( 'init', [ $this, 'register_settings' ], $priority, 0 ); + protected function set_slug(): void { + $this->slug = sanitize_title( $this->get_parent_slug() . '-' . $this->get_title() ); } } diff --git a/src/Settings/Settings_Builder.php b/src/Settings/Settings_Builder.php index 0eaba98e..2c95984f 100644 --- a/src/Settings/Settings_Builder.php +++ b/src/Settings/Settings_Builder.php @@ -1,4 +1,5 @@ - DI\add( [] ), - ]; } + } diff --git a/src/Settings/Settings_Subscriber.php b/src/Settings/Settings_Subscriber.php index aa7fa8f3..2a34705b 100644 --- a/src/Settings/Settings_Subscriber.php +++ b/src/Settings/Settings_Subscriber.php @@ -1,16 +1,17 @@ -container->get( Settings_Definer::PAGES ) as $page ) { $page->hook(); } }, 0, 0 ); } + } From 8ea65ff38b70937e1f81b0bf75bda7663778d742 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Fri, 12 Aug 2022 10:50:10 -0600 Subject: [PATCH 18/21] Remove useless returns in Utils --- src/Utils/Markup_Utils.php | 6 ------ src/Utils/Path_Utils.php | 2 -- 2 files changed, 8 deletions(-) diff --git a/src/Utils/Markup_Utils.php b/src/Utils/Markup_Utils.php index 564b3094..89fea3a0 100644 --- a/src/Utils/Markup_Utils.php +++ b/src/Utils/Markup_Utils.php @@ -9,8 +9,6 @@ class Markup_Utils { * * @param array|null $attrs * @param string $prefix - * - * @return string */ public static function concat_attrs( ?array $attrs = null, string $prefix = '' ): string { if ( empty( $attrs ) ) { @@ -35,8 +33,6 @@ public static function concat_attrs( ?array $attrs = null, string $prefix = '' ) * * @param array $classes * @param bool $attribute - * - * @return string */ public static function class_attribute( array $classes, bool $attribute = true ): string { if ( empty( $classes ) ) { @@ -61,8 +57,6 @@ public static function class_attribute( array $classes, bool $attribute = true ) * @param int $words The number of words to keep * @param string|null $more What to append if the text is truncated. Defaults to … if null * @param bool $autop Whether to apply wpautop to the output - * - * @return string */ public static function truncate_html( string $html = '', int $words = 55, ?string $more = null, bool $autop = true ): string { $result = wp_trim_words( strip_shortcodes( $html ), $words, $more ); diff --git a/src/Utils/Path_Utils.php b/src/Utils/Path_Utils.php index 0c1f8118..491e71f9 100644 --- a/src/Utils/Path_Utils.php +++ b/src/Utils/Path_Utils.php @@ -8,8 +8,6 @@ abstract class Path_Utils { * Make a best-effort at extracting the file extension from a URL * * @param string $uri - * - * @return string */ public static function file_extension( string $uri ): string { if ( empty( $uri ) ) { From 642be06bccf14d3353b0d3c7c5ca474a5f575de5 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Fri, 12 Aug 2022 10:53:02 -0600 Subject: [PATCH 19/21] Convert Schema repo --- src/Schema/Capabilities.php | 30 +++++++------ src/Schema/Schema.php | 85 +++++++++++++++++++++--------------- src/Schema/Schema_Loader.php | 38 ++++++++++------ 3 files changed, 90 insertions(+), 63 deletions(-) diff --git a/src/Schema/Capabilities.php b/src/Schema/Capabilities.php index c1d264a4..352aaf94 100644 --- a/src/Schema/Capabilities.php +++ b/src/Schema/Capabilities.php @@ -1,17 +1,18 @@ -> + */ + private array $caps = [ 'editor' => [ 'read', 'read_private_posts', @@ -53,21 +54,23 @@ class Capabilities { * @param string $role_id The name of a registered role * @param string $level The access level the user should have. One of 'subscriber', 'contributor', 'author', or * 'editor' - * @return bool */ - public function register_post_type_caps( $post_type, $role_id, $level = 'editor' ) { + public function register_post_type_caps( string $post_type, string $role_id, string $level = 'editor' ): bool { if ( ! isset( $this->caps[ $level ] ) ) { return false; } $role = get_role( $role_id ); + if ( ! $role ) { return false; } $pto = get_post_type_object( $post_type ); + if ( ! $pto ) { _deprecated_argument( __FUNCTION__, '2016-09-02', 'First argument should be a registered post type, rather than the plural capability prefix.' ); + return $this->register_post_type_caps_with_prefix( $post_type, $role, $level ); } @@ -89,14 +92,15 @@ public function register_post_type_caps( $post_type, $role_id, $level = 'editor' * @param \WP_Role $role The role object * @param string $level The access level the user should have. One of 'subscriber', 'contributor', * 'author', or 'editor' - * @return bool */ - private function register_post_type_caps_with_prefix( $post_type_suffix, $role, $level = 'editor' ) { + private function register_post_type_caps_with_prefix( string $post_type_suffix, WP_Role $role, string $level = 'editor' ): bool { // argument validation handled above in self::register_post_type_caps() foreach ( $this->caps[ $level ] as $cap ) { $prefix = str_replace( '_posts', '', $cap ); $role->add_cap( $prefix . '_' . $post_type_suffix ); } + return true; } -} + +} diff --git a/src/Schema/Schema.php b/src/Schema/Schema.php index 2734764e..5a3f56d9 100644 --- a/src/Schema/Schema.php +++ b/src/Schema/Schema.php @@ -1,7 +1,9 @@ -version_option = get_class($this).'-schema'; - } + /** + * Defaults to the child class's with a -schema suffix. + */ + protected string $version_option = ''; /** - * We've had problems with the notoptions and - * alloptions caches getting out of sync with the DB, - * forcing an eternal update cycle + * Returns an array of callbacks with numeric keys. + * Any key higher than the version recorded in the DB + * and lower than $this->schema_version will have its + * callback called. * - * @return void + * @return callable[] */ - protected function clear_option_caches() { - wp_cache_delete( 'notoptions', 'options' ); - wp_cache_delete( 'alloptions', 'options' ); + abstract protected function get_updates(): array; + + public function __construct() { + $this->version_option = static::class . '-schema'; } - public function do_updates() { + public function do_updates(): void { $this->clear_option_caches(); $updates = $this->get_updates(); - ksort($updates); + ksort( $updates ); + try { foreach ( $updates as $version => $callback ) { - if ( $this->is_version_in_db_less_than($version) ) { - call_user_func($callback); + if ( ! $this->is_version_in_db_less_than( $version ) ) { + continue; } + + call_user_func( $callback ); } - $this->update_version_option( $this->schema_version ); - } catch ( \Exception $e ) { + + $this->update_version_option( (string) $this->schema_version ); + } catch ( Throwable $e ) { // fail silently, but it should try again next time } } - protected function update_version_option( $new_version ) { - update_option( $this->version_option, $new_version ); + public function update_required(): bool { + return $this->is_version_in_db_less_than( (string) $this->schema_version ); } /** - * Returns an array of callbacks with numeric keys. - * Any key higher than the version recorded in the DB - * and lower than $this->schema_version will have its - * callback called. - * - * @return array + * We've had problems with the notoptions and + * alloptions caches getting out of sync with the DB, + * forcing an eternal update cycle */ - abstract protected function get_updates(); - - protected function is_version_in_db_less_than( $version ) { - $version_in_db = get_option($this->version_option, 0 ); + protected function clear_option_caches(): void { + wp_cache_delete( 'notoptions', 'options' ); + wp_cache_delete( 'alloptions', 'options' ); + } - if ( version_compare( $version, $version_in_db ) > 0 ) { - return true; - } - return false; + protected function update_version_option( string $new_version ): void { + update_option( $this->version_option, $new_version ); } - public function update_required() { - return $this->is_version_in_db_less_than( $this->schema_version ); + protected function is_version_in_db_less_than( string $version ): bool { + $version_in_db = get_option( $this->version_option, '0' ); + + return version_compare( $version, $version_in_db ) > 0; } + } diff --git a/src/Schema/Schema_Loader.php b/src/Schema/Schema_Loader.php index e750fa5a..c98dbed4 100644 --- a/src/Schema/Schema_Loader.php +++ b/src/Schema/Schema_Loader.php @@ -1,40 +1,50 @@ -[] + */ + private array $schema_classes; + + /** + * @param class-string<\Tribe\Libs\Schema\Schema>[] $schema_classes A list of schema classes. */ public function __construct( array $schema_classes = [] ) { $this->schema_classes = $schema_classes; } - public function add( $schema_class ) { + /** + * @param class-string<\Tribe\Libs\Schema\Schema> $schema_class + */ + public function add( string $schema_class ): void { $this->schema_classes[] = $schema_class; } - public function hook() { - if ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) { - add_action( 'admin_init', [ $this, 'load_schema_updates' ], 10, 0 ); + public function hook(): void { + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { + return; } + + add_action( 'admin_init', [ $this, 'load_schema_updates' ], 10, 0 ); } /** * Load any expected updates for the given schemata - * - * @return void */ - public function load_schema_updates() { + public function load_schema_updates(): void { foreach ( $this->schema_classes as $classname ) { - /** @var Schema $schema */ + /** @var \Tribe\Libs\Schema\Schema $schema */ $schema = new $classname; - if ( $schema->update_required() ) { - $schema->do_updates(); + + if ( ! $schema->update_required() ) { + continue; } + + $schema->do_updates(); } } + } From 385158fee4330e235368bc65684acb32ea5b1a5e Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Fri, 12 Aug 2022 12:06:24 -0600 Subject: [PATCH 20/21] Convert Routes repo, lots of clean up --- src/Routes/Abstract_REST_Route.php | 13 ++--- src/Routes/Abstract_Route.php | 55 ++++++++++----------- src/Routes/Cache_Manager.php | 15 +++--- src/Routes/Route_Definer.php | 24 ++++------ src/Routes/Route_Subscriber.php | 35 +++++++------- src/Routes/Router_Factory.php | 76 ++++++++++-------------------- src/Routes/Router_Rule_Manager.php | 69 +++++++++++++-------------- 7 files changed, 117 insertions(+), 170 deletions(-) diff --git a/src/Routes/Abstract_REST_Route.php b/src/Routes/Abstract_REST_Route.php index 8c43235a..284e3fe3 100644 --- a/src/Routes/Abstract_REST_Route.php +++ b/src/Routes/Abstract_REST_Route.php @@ -1,20 +1,16 @@ -/ at ThingRoute, @@ -37,10 +38,12 @@ namespace Tribe\Libs\Routes; -/** - * Base class for routes. - */ +use WP; +use WP_Query; +use WP_REST_Server; + abstract class Abstract_Route { + /** * Required - The Route's name. This is useful to refer to the route * by name. Eg:- \MTTrial\is_route( 'foo' ); @@ -62,8 +65,6 @@ public function get_pattern(): string { /** * Returns the priority of the rewrite rule. - * - * @return string */ public function get_priority(): string { return 'top'; @@ -72,7 +73,7 @@ public function get_priority(): string { /** * Multi-pattern routes can use this to declare their patterns. * - * @return array Patterns for the route. + * @return string[] Patterns for the route. */ public function get_patterns(): array { return [ $this->get_pattern() ]; @@ -91,7 +92,7 @@ public function get_patterns(): array { * * [ 'static' => 'foo', 'first' => '$matches[1]', 'second' => '$matches[2]' ]. * - * @return array Matches for the route. + * @return array Matches for the route. */ public function get_matches(): array { return [ @@ -120,8 +121,6 @@ public function is_admin(): bool { /** * Returns a bool based on whether this is a public route. - * - * @return bool */ public function is_public(): bool { return ! $this->is_admin(); @@ -131,8 +130,6 @@ public function is_public(): bool { * Routes that use patterns that shadow the WordPress Core Pattern * should set this to true. This prevents registration of the Core * WordPress pattern. - * - * @return bool */ public function is_core(): bool { return false; @@ -169,7 +166,7 @@ public function get_body_class(): string { * * This vars are added to the WP query vars array. * - * @return array Query variable names. + * @return string[] Query variable names. */ public function get_query_var_names(): array { return array_keys( $this->get_matches() ); @@ -189,7 +186,7 @@ public function get_query_var_names(): array { * 'first' => 'a', 'second' => 'b', * ] * - * @return array + * @return array */ public function get_query_vars(): array { $query_vars = $this->get_query_var_names(); @@ -206,20 +203,18 @@ public function get_query_vars(): array { * The request methods that are authorized on this route. Only GET * is authorized by default. * - * @return array Accepted request methods for the route. + * @return string[] Accepted request methods for the route. */ public function get_request_methods(): array { return [ - \WP_REST_Server::READABLE, + WP_REST_Server::READABLE, ]; } /** * Authorization hook. Custom authorization can be done here. * - * By default only checks if request method is authorized. - * - * @return void + * By default, only checks if request method is authorized. */ public function authorize(): void { $this->authorize_request_method(); @@ -229,29 +224,26 @@ public function authorize(): void { * Override to change the $wp global object. * * @param \WP $wp The WP object. - * @return void */ - public function parse( \WP $wp ): void { - return; + public function parse( WP $wp ): void { } /** * Override to change the wp_query. This is equivalent to using 'pre_get_posts'. * * @param \WP_Query $wp_query The WP query object. - * @return void */ - public function before( \WP_Query $wp_query ): void { - return; + public function before( WP_Query $wp_query ): void { } /** * Has the template included been fired. * * @param string $template The template name. + * * @return string The modified template path. */ - public function did_template_include( $template ): string { + public function did_template_include( string $template ): string { $template_path = $this->get_template(); // Bail early if no template path. @@ -265,7 +257,7 @@ public function did_template_include( $template ): string { if ( false !== strpos( $template_path, '404' ) ) { $wp_query->is_404 = true; $protocol = $_SERVER['SERVER_PROTOCOL'] ?? ''; - header( "{$protocol} 404 Not Found", true, 404 ); + header( "$protocol 404 Not Found", true, 404 ); } // Use the theme path if the passed in path doesn't exist. @@ -273,10 +265,11 @@ public function did_template_include( $template ): string { $template_path = get_template_directory() . '/' . $template_path; } - // Bail ealy if the template file exists. + // Bail early if the template file exists. if ( file_exists( $template_path ) ) { $wp_query->is_home = false; $this->before( $wp_query ); + return $template_path; } @@ -287,9 +280,10 @@ public function did_template_include( $template ): string { * Get document title. * * @param string $title The current document title. + * * @return string The modified document title. */ - public function did_pre_get_document_title( $title ): string { + public function did_pre_get_document_title( string $title ): string { $route_title = $this->get_title(); if ( ! empty( $route_title ) ) { @@ -330,4 +324,5 @@ public function authorize_request_method() { wp_die( 'Not Authorized', 403 ); } + } diff --git a/src/Routes/Cache_Manager.php b/src/Routes/Cache_Manager.php index 875d49a5..48587b35 100644 --- a/src/Routes/Cache_Manager.php +++ b/src/Routes/Cache_Manager.php @@ -1,16 +1,14 @@ -get_version() ); } + } diff --git a/src/Routes/Route_Definer.php b/src/Routes/Route_Definer.php index d0d09e24..32a661b9 100644 --- a/src/Routes/Route_Definer.php +++ b/src/Routes/Route_Definer.php @@ -1,36 +1,29 @@ - DI\add( [] ), + self::ROUTES => DI\add( [] ), /** * The array of REST routes that will be registered. @@ -51,4 +44,5 @@ public function define(): array { self::REST_ROUTES => DI\add( [] ), ]; } + } diff --git a/src/Routes/Route_Subscriber.php b/src/Routes/Route_Subscriber.php index ee4ee1e4..b116df7c 100644 --- a/src/Routes/Route_Subscriber.php +++ b/src/Routes/Route_Subscriber.php @@ -1,35 +1,31 @@ -container->get( Cache_Manager::class )->flush_if_changed(); }, 999 ); add_filter( - 'rewrite_rules_array', + 'rewrite_rules_array', function ( array $rules ): array { return $this->container->get( Router_Rule_Manager::class )->load( $rules, $this->container->get( Route_Definer::ROUTES ) ); }, @@ -37,14 +33,14 @@ function ( array $rules ): array { ); add_action( - 'rest_api_init', - function () { + 'rest_api_init', + function (): void { $this->container->get( Router_Rule_Manager::class )->init_rest_routes( $this->container->get( Route_Definer::REST_ROUTES ) ); } ); add_filter( - 'query_vars', + 'query_vars', function ( $vars ) { return $this->container->get( Router_Rule_Manager::class )->did_query_vars( $vars, $this->container->get( Route_Definer::ROUTES ) ); }, @@ -53,8 +49,8 @@ function ( $vars ) { ); add_action( - 'parse_request', - function ( \WP $wp ) { + 'parse_request', + function ( WP $wp ): void { $matched_route = $this->container->get( Router_Factory::class )->did_parse_request( $wp, $this->container->get( Route_Definer::ROUTES ) ); // Bail early if no matched route. @@ -67,10 +63,11 @@ function ( \WP $wp ) { add_filter( 'template_include', [ $matched_route, 'did_template_include' ] ); add_filter( 'pre_get_document_title', [ $matched_route, 'did_pre_get_document_title' ] ); - + $matched_route->authorize(); $matched_route->parse( $wp ); } ); } + } diff --git a/src/Routes/Router_Factory.php b/src/Routes/Router_Factory.php index 3a19d8d8..fd045f0a 100644 --- a/src/Routes/Router_Factory.php +++ b/src/Routes/Router_Factory.php @@ -1,52 +1,29 @@ - */ - public function __construct( Router_Rule_Manager $manager ) { + protected array $routes; + + public function __construct( ?Router_Rule_Manager $manager = null ) { $this->manager = $manager; } @@ -54,42 +31,37 @@ public function __construct( Router_Rule_Manager $manager ) { * Looks up the custom route for the pattern matched. Returns false * if not found. * - * @param string $pattern The regex pattern to lookup. - * @param array $registered_routes Routes registered. - * @return Abstract_Route|null The route or null on failure. + * @param string $pattern The regex pattern to lookup. + * @param array $registered_routes Routes registered. + * + * @return \Tribe\Libs\Routes\Abstract_Route|null The route or null on failure. */ - public function find_route( $pattern, $registered_routes ): ?Abstract_Route { + public function find_route( string $pattern, array $registered_routes ): ?Abstract_Route { // Load routes if not already loaded. if ( empty( $this->routes ) ) { $this->routes = $this->manager->get_route_objects( $registered_routes ); } - // Bail early if the route pattern doesn't exist. - if ( empty( $this->routes[ $pattern ] ) ) { - return null; - } + $route = $this->routes[ $pattern ] ?? null; - return $this->routes[ $pattern ]; + return $route ?: null; } /** * Checks if the current route is a custom route and activates it if matched. * - * @hook parse_request + * @action parse_request * - * @param \WP $wp The global wp object. + * @param \WP $wp The global wp object. * @param array $registered_routes Routes registered. - * @return Abstract_Route|null The matched route on success, null on failure. + * + * @return \Tribe\Libs\Routes\Abstract_Route|null The matched route on success, null on failure. */ - public function did_parse_request( \WP $wp, $registered_routes ): ?Abstract_Route { + public function did_parse_request( WP $wp, array $registered_routes ): ?Abstract_Route { $pattern = $wp->matched_rule; $matched_route = $this->find_route( $pattern, $registered_routes ); - // Bail early if no matched route. - if ( empty( $matched_route ) ) { - return null; - } - - return $matched_route; + return $matched_route ?: null; } + } diff --git a/src/Routes/Router_Rule_Manager.php b/src/Routes/Router_Rule_Manager.php index 9a2c94ac..16a1ebb1 100644 --- a/src/Routes/Router_Rule_Manager.php +++ b/src/Routes/Router_Rule_Manager.php @@ -1,43 +1,34 @@ - */ - public $router_vars = []; + protected array $routes; /** * Register REST API routes. * - * @return void + * @action rest_api_init + * + * @param \Tribe\Libs\Routes\Abstract_REST_Route[] $rest_routes */ public function init_rest_routes( array $rest_routes = [] ): void { // Register all REST routes defined. @@ -49,13 +40,14 @@ public function init_rest_routes( array $rest_routes = [] ): void { /** * Merges the WordPress Rewrite Rules with the CS Rules. * - * @hook rewrite_rules_array hook + * @filter rewrite_rules_array * * @param array $wp_rules The WP rules array. * @param array $registered_routes Routes registered. - * @return array The modified rewrite rules array. + * + * @return array The modified rewrite rules array. */ - public function load( $wp_rules = [], array $registered_routes = [] ): array { + public function load( array $wp_rules = [], array $registered_routes = [] ): array { $rules = $this->get_rules( $registered_routes ); // Loop through rules to determine where to add the rule. @@ -72,8 +64,9 @@ public function load( $wp_rules = [], array $registered_routes = [] ): array { * Converts Route instances into Rewrite rules for adding to * the WordPress rewrites * - * @param array $registered_routes Routes registered. - * @return array Rules for the route instances. + * @param \Tribe\Libs\Routes\Abstract_Route[] $registered_routes Routes registered. + * + * @return array Rules for the route instances. */ public function get_rules( array $registered_routes ): array { $rules = []; @@ -105,6 +98,7 @@ public function get_rules( array $registered_routes ): array { * values are not URL encoded. * * @param array $params The query params. + * * @return string Query string. */ public function get_redirect_params( array $params = [] ): string { @@ -126,8 +120,9 @@ public function get_redirect_params( array $params = [] ): string { * regex pattern. Any custom query vars are also scanned and stored * here. * - * @param array $registered_routes Routes registered. - * @return array Route instances. + * @param \Tribe\Libs\Routes\Abstract_Route[] $registered_routes Routes registered. + * + * @return array Route instances. */ public function get_route_objects( array $registered_routes = [] ): array { $this->init_routes( $registered_routes ); @@ -138,8 +133,7 @@ public function get_route_objects( array $registered_routes = [] ): array { /** * Lazy init routes and route vars. * - * @param array $registered_routes Routes registered. - * @return void + * @param \Tribe\Libs\Routes\Abstract_Route[] $registered_routes Routes registered. */ public function init_routes( array $registered_routes = [] ): void { // Bail early if routes are already defined. @@ -149,8 +143,7 @@ public function init_routes( array $registered_routes = [] ): void { // Register any routes defined. foreach ( $registered_routes as $route ) { - $patterns = $route->get_patterns(); - $route_vars = $route->get_query_var_names(); + $patterns = $route->get_patterns(); // Add patterns to routes array. foreach ( $patterns as $pattern ) { @@ -162,12 +155,13 @@ public function init_routes( array $registered_routes = [] ): void { /** * Adds the custom query vars. * - * @hook query_vars + * @filter query_vars + * + * @param string[] $query_vars WordPress query vars. * - * @param array $query_vars WordPress query vars. - * @return array Modified query vars. + * @return string[] Modified query vars. */ - public function did_query_vars( $query_vars, array $registered_routes ): array { + public function did_query_vars( array $query_vars, array $registered_routes ): array { // Register any route variables defined. foreach ( $registered_routes as $route ) { $this->router_vars = array_merge( $this->router_vars, $route->get_query_var_names() ); @@ -177,4 +171,5 @@ public function did_query_vars( $query_vars, array $registered_routes ): array { return array_merge( $query_vars, $this->router_vars ); } + } From 96aa22020774be9d746efadcb852a27dac094a96 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Fri, 12 Aug 2022 12:14:22 -0600 Subject: [PATCH 21/21] Convert Required_Page repo --- src/Required_Page/Required_Page.php | 177 +++++++++--------- src/Required_Page/Required_Page_Definer.php | 11 +- .../Required_Page_Subscriber.php | 19 +- 3 files changed, 111 insertions(+), 96 deletions(-) diff --git a/src/Required_Page/Required_Page.php b/src/Required_Page/Required_Page.php index 4ee6d7ee..46963623 100644 --- a/src/Required_Page/Required_Page.php +++ b/src/Required_Page/Required_Page.php @@ -1,10 +1,10 @@ -field_group_key = $field_group_key; - } + public const NAME = ''; - /** - * @return string The post type of the post that will be created - */ - protected function get_post_type() { - return 'page'; - } + private string $field_group_key; /** * @return string The title of the post */ - abstract protected function get_title(); + abstract protected function get_title(): string; /** * @return string The slug of the post */ - abstract protected function get_slug(); + abstract protected function get_slug(): string; - /** - * @return string The content of the post - */ - protected function get_content() { - return ''; + public function __construct( string $field_group_key = '' ) { + if ( ! static::NAME ) { + throw new LogicException( __( 'NAME constant must be set', 'tribe' ) ); + } + + $this->field_group_key = $field_group_key; } /** * Ensure that there is a page designated as this page * at all times. Creates one if necessary. * - * @return void * @action admin_init */ - public function ensure_page_exists() { + public function ensure_page_exists(): void { $post_id = $this->get_post_id(); + if ( ! empty( $post_id ) ) { return; } + $post_id = $this->create_post(); + if ( ! empty( $post_id ) ) { $this->set_post_id( $post_id ); } - /** * Triggered when a required page is created * @@ -78,32 +67,14 @@ public function ensure_page_exists() { } /** - * @return int The ID of the post registered as this page - */ - private function get_post_id() { - return (int) get_field( static::NAME, 'option', false ); - } - - /** - * Set the ID of the post registered as this page - * - * @param int $post_id - * - * @return void - */ - private function set_post_id( $post_id ) { - update_field( static::NAME, (int) $post_id, 'option' ); - } - - /** - * @param int $post_id + * @param int|string $post_id * - * @return void * @action trashed_post * @action deleted_post */ - public function clear_option_on_delete( $post_id ) { + public function clear_option_on_delete( $post_id ): void { $existing = $this->get_post_id(); + if ( $existing === (int) $post_id ) { delete_field( static::NAME, 'option' ); } @@ -116,22 +87,73 @@ public function clear_option_on_delete( $post_id ) { do_action( 'tribe/project/required_page/deleted', static::NAME ); } + /** + * Adds a field to control the page selection to an existing meta group + * + * @action acf/init 20 + */ + public function register_setting(): void { + $config = $this->get_field_config(); + + if ( ! $config ) { + return; + } + + acf_add_local_field( $config ); + } + + /** + * Add a post state to the list table indicating + * that this is a required page. + * + * @filter display_post_states + * + * @param array $post_states + * @param \WP_Post $post + * + * @return array + */ + public function indicate_post_state( array $post_states, WP_Post $post ): array { + + if ( $this->get_post_id() === $post->ID ) { + $label = $this->get_field_label(); + if ( $label ) { + $post_states[ static::NAME ] = $label; + } + } + + return $post_states; + } + + /** + * @return string The post type of the post that will be created + */ + protected function get_post_type(): string { + return 'page'; + } + + /** + * @return string The content of the post + */ + protected function get_content(): string { + return ''; + } + /** * Create the post for this config * * @return int the ID of the created post */ - protected function create_post() { - $args = $this->get_post_args(); - $post_id = wp_insert_post( $args ); + protected function create_post(): int { + $args = $this->get_post_args(); - return $post_id; + return wp_insert_post( $args ); } /** - * @return array The args for creating the post + * @return mixed[] The args for creating the post */ - protected function get_post_args() { + protected function get_post_args(): array { $args = [ 'post_type' => $this->get_post_type(), 'post_status' => 'publish', @@ -152,22 +174,9 @@ protected function get_post_args() { } /** - * Adds a field to control the page selection to an existing meta group - * - * @return void - * @action acf/init 20 - */ - public function register_setting() { - $config = $this->get_field_config(); - if ( $config ) { - acf_add_local_field( $config ); - } - } - - /** - * @return array The field configuration array + * @return mixed[] The field configuration array */ - protected function get_field_config() { + protected function get_field_config(): array { if ( empty( $this->field_group_key ) || ! class_exists( '\Tribe\Libs\ACF\Field' ) ) { return []; } @@ -186,28 +195,24 @@ protected function get_field_config() { return $field->get_attributes(); } - protected function get_field_label() { + protected function get_field_label(): string { return sprintf( __( '%s Page', 'tribe' ), $this->get_title() ); } /** - * Add a post state to the list table indicating - * that this is a required page. - * - * @param array $post_states - * @param \WP_Post $post + * @return int The ID of the post registered as this page + */ + private function get_post_id(): int { + return (int) get_field( static::NAME, 'option', false ); + } + + /** + * Set the ID of the post registered as this page * - * @return array - * @filter display_post_states + * @param int|string $post_id */ - public function indicate_post_state( $post_states, $post ) { - if ( $this->get_post_id() === $post->ID ) { - $label = $this->get_field_label(); - if ( $label ) { - $post_states[ static::NAME ] = $label; - } - } - return $post_states; + private function set_post_id( $post_id ): void { + update_field( static::NAME, (int) $post_id, 'option' ); } } diff --git a/src/Required_Page/Required_Page_Definer.php b/src/Required_Page/Required_Page_Definer.php index 5aa5a975..92b3f50f 100644 --- a/src/Required_Page/Required_Page_Definer.php +++ b/src/Required_Page/Required_Page_Definer.php @@ -1,16 +1,21 @@ - \DI\add( [] ), + self::PAGES => DI\add( [] ), ]; } + } diff --git a/src/Required_Page/Required_Page_Subscriber.php b/src/Required_Page/Required_Page_Subscriber.php index d3a76a37..684ea4c4 100644 --- a/src/Required_Page/Required_Page_Subscriber.php +++ b/src/Required_Page/Required_Page_Subscriber.php @@ -1,42 +1,47 @@ -required_pages(); } private function required_pages(): void { - add_action( 'admin_init', function () { + add_action( 'admin_init', function (): void { foreach ( $this->container->get( Required_Page_Definer::PAGES ) as $page ) { $page->ensure_page_exists(); } }, 10, 0 ); - add_action( 'trashed_post', function ( $post_id ) { + + add_action( 'trashed_post', function ( $post_id ): void { foreach ( $this->container->get( Required_Page_Definer::PAGES ) as $page ) { $page->clear_option_on_delete( $post_id ); } }, 10, 1 ); - add_action( 'deleted_post', function ( $post_id ) { + + add_action( 'deleted_post', function ( $post_id ): void { foreach ( $this->container->get( Required_Page_Definer::PAGES ) as $page ) { $page->clear_option_on_delete( $post_id ); } }, 10, 1 ); - add_action( 'acf/init', function () { + + add_action( 'acf/init', function (): void { foreach ( $this->container->get( Required_Page_Definer::PAGES ) as $page ) { $page->register_setting(); } }, 10, 0 ); + add_filter( 'display_post_states', function ( $post_states, $post ) { foreach ( $this->container->get( Required_Page_Definer::PAGES ) as $page ) { - $post_states = $page->indicate_post_state( $post_states, $post ); + $post_states = $page->indicate_post_state( (array) $post_states, $post ); } return $post_states; }, 10, 2 ); } + }