From a93dbd91d798c0b515825f6f49b42a05ee23731d Mon Sep 17 00:00:00 2001 From: Geoff Taylor Date: Fri, 18 Dec 2020 21:56:48 -0500 Subject: [PATCH] buddypress connector and test updated. --- composer.lock | 768 ++++++++++++++---- connectors/class-connector-buddypress.php | 64 +- tests/bootstrap.php | 24 + .../test-class-connector-buddypress.php | 504 +++++++++++- 4 files changed, 1145 insertions(+), 215 deletions(-) diff --git a/composer.lock b/composer.lock index 46f7e070..cf05e8be 100644 --- a/composer.lock +++ b/composer.lock @@ -131,6 +131,20 @@ "zend", "zikula" ], + "support": { + "issues": "https://github.com/composer/installers/issues", + "source": "https://github.com/composer/installers/tree/v1.9.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], "time": "2020-04-07T06:57:05+00:00" } ], @@ -180,6 +194,11 @@ "standards", "wordpress" ], + "support": { + "issues": "https://github.com/Automattic/VIP-Coding-Standards/issues", + "source": "https://github.com/Automattic/VIP-Coding-Standards", + "wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki" + }, "time": "2020-09-07T10:45:45+00:00" }, { @@ -236,6 +255,11 @@ "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.2.8" + }, "funding": [ { "url": "https://packagist.com", @@ -254,16 +278,16 @@ }, { "name": "composer/composer", - "version": "1.10.17", + "version": "1.10.19", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "09d42e18394d8594be24e37923031c4b7442a1cb" + "reference": "196601d50c08c3fae389a417a7689367fcf37cef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/09d42e18394d8594be24e37923031c4b7442a1cb", - "reference": "09d42e18394d8594be24e37923031c4b7442a1cb", + "url": "https://api.github.com/repos/composer/composer/zipball/196601d50c08c3fae389a417a7689367fcf37cef", + "reference": "196601d50c08c3fae389a417a7689367fcf37cef", "shasum": "" }, "require": { @@ -272,7 +296,7 @@ "composer/spdx-licenses": "^1.2", "composer/xdebug-handler": "^1.1", "justinrainbow/json-schema": "^5.2.10", - "php": "^5.3.2 || ^7.0", + "php": "^5.3.2 || ^7.0 || ^8.0", "psr/log": "^1.0", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.0", @@ -330,6 +354,11 @@ "dependency", "package" ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/composer/issues", + "source": "https://github.com/composer/composer/tree/1.10.19" + }, "funding": [ { "url": "https://packagist.com", @@ -344,24 +373,24 @@ "type": "tidelift" } ], - "time": "2020-10-30T21:31:58+00:00" + "time": "2020-12-04T08:14:16+00:00" }, { "name": "composer/semver", - "version": "1.7.1", + "version": "1.7.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "38276325bd896f90dfcfe30029aa5db40df387a7" + "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/38276325bd896f90dfcfe30029aa5db40df387a7", - "reference": "38276325bd896f90dfcfe30029aa5db40df387a7", + "url": "https://api.github.com/repos/composer/semver/zipball/647490bbcaf7fc4891c58f47b825eb99d19c377a", + "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^4.5 || ^5.0.5" @@ -405,6 +434,11 @@ "validation", "versioning" ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/1.7.2" + }, "funding": [ { "url": "https://packagist.com", @@ -419,20 +453,20 @@ "type": "tidelift" } ], - "time": "2020-09-27T13:13:07+00:00" + "time": "2020-12-03T15:47:16+00:00" }, { "name": "composer/spdx-licenses", - "version": "1.5.4", + "version": "1.5.5", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "6946f785871e2314c60b4524851f3702ea4f2223" + "reference": "de30328a7af8680efdc03e396aad24befd513200" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/6946f785871e2314c60b4524851f3702ea4f2223", - "reference": "6946f785871e2314c60b4524851f3702ea4f2223", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200", + "reference": "de30328a7af8680efdc03e396aad24befd513200", "shasum": "" }, "require": { @@ -444,7 +478,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "1.x-dev" } }, "autoload": { @@ -479,6 +513,11 @@ "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.5" + }, "funding": [ { "url": "https://packagist.com", @@ -493,20 +532,20 @@ "type": "tidelift" } ], - "time": "2020-07-15T15:35:07+00:00" + "time": "2020-12-03T16:04:16+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.4.4", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "6e076a124f7ee146f2487554a94b6a19a74887ba" + "reference": "f28d44c286812c714741478d968104c5e604a1d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6e076a124f7ee146f2487554a94b6a19a74887ba", - "reference": "6e076a124f7ee146f2487554a94b6a19a74887ba", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f28d44c286812c714741478d968104c5e604a1d4", + "reference": "f28d44c286812c714741478d968104c5e604a1d4", "shasum": "" }, "require": { @@ -537,6 +576,11 @@ "Xdebug", "performance" ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/1.4.5" + }, "funding": [ { "url": "https://packagist.com", @@ -551,7 +595,7 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:39:10+00:00" + "time": "2020-11-13T08:04:11+00:00" }, { "name": "cweagans/composer-patches", @@ -595,6 +639,10 @@ } ], "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.0" + }, "time": "2020-09-30T17:56:20+00:00" }, { @@ -649,20 +697,24 @@ "constructor", "instantiate" ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/master" + }, "time": "2015-06-14T21:17:01+00:00" }, { "name": "gettext/gettext", - "version": "v4.8.2", + "version": "v4.8.3", "source": { "type": "git", "url": "https://github.com/php-gettext/Gettext.git", - "reference": "e474f872f2c8636cf53fd283ec4ce1218f3d236a" + "reference": "57ff4fb16647e78e80a5909fe3c190f1c3110321" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/e474f872f2c8636cf53fd283ec4ce1218f3d236a", - "reference": "e474f872f2c8636cf53fd283ec4ce1218f3d236a", + "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/57ff4fb16647e78e80a5909fe3c190f1c3110321", + "reference": "57ff4fb16647e78e80a5909fe3c190f1c3110321", "shasum": "" }, "require": { @@ -711,7 +763,12 @@ "po", "translation" ], - "time": "2019-12-02T10:21:14+00:00" + "support": { + "email": "oom@oscarotero.com", + "issues": "https://github.com/oscarotero/Gettext/issues", + "source": "https://github.com/php-gettext/Gettext/tree/v4.8.3" + }, + "time": "2020-11-18T22:35:49+00:00" }, { "name": "gettext/languages", @@ -772,6 +829,10 @@ "translations", "unicode" ], + "support": { + "issues": "https://github.com/php-gettext/Languages/issues", + "source": "https://github.com/php-gettext/Languages/tree/2.6.0" + }, "time": "2019-11-13T10:30:21+00:00" }, { @@ -839,6 +900,10 @@ "rest", "web service" ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/6.5" + }, "time": "2020-06-16T21:01:06+00:00" }, { @@ -890,6 +955,10 @@ "keywords": [ "promise" ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.4.0" + }, "time": "2020-09-30T07:37:28+00:00" }, { @@ -961,24 +1030,28 @@ "uri", "url" ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/1.7.0" + }, "time": "2020-09-30T07:37:11+00:00" }, { "name": "johnpbloch/wordpress", - "version": "5.5.3", + "version": "5.6.0", "source": { "type": "git", "url": "https://github.com/johnpbloch/wordpress.git", - "reference": "f706595a0be04446e1c6c4ff984be414d1a3064b" + "reference": "3055975734646c8d0b8caf7b5af168ced6ec4309" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress/zipball/f706595a0be04446e1c6c4ff984be414d1a3064b", - "reference": "f706595a0be04446e1c6c4ff984be414d1a3064b", + "url": "https://api.github.com/repos/johnpbloch/wordpress/zipball/3055975734646c8d0b8caf7b5af168ced6ec4309", + "reference": "3055975734646c8d0b8caf7b5af168ced6ec4309", "shasum": "" }, "require": { - "johnpbloch/wordpress-core": "5.5.3", + "johnpbloch/wordpress-core": "5.6.0", "johnpbloch/wordpress-core-installer": "^1.0 || ^2.0", "php": ">=5.6.20" }, @@ -1000,20 +1073,27 @@ "cms", "wordpress" ], - "time": "2020-10-30T20:48:17+00:00" + "support": { + "forum": "http://wordpress.org/support/", + "irc": "irc://irc.freenode.net/wordpress", + "issues": "http://core.trac.wordpress.org/", + "source": "http://core.trac.wordpress.org/browser", + "wiki": "http://codex.wordpress.org/" + }, + "time": "2020-12-08T22:34:35+00:00" }, { "name": "johnpbloch/wordpress-core", - "version": "5.5.3", + "version": "5.6.0", "source": { "type": "git", "url": "https://github.com/johnpbloch/wordpress-core.git", - "reference": "6f25ae53f3d4058f8dd702c097d5a4a45667af61" + "reference": "f074617dd69f466302836d1ae5de75c0bd7b6dfd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/6f25ae53f3d4058f8dd702c097d5a4a45667af61", - "reference": "6f25ae53f3d4058f8dd702c097d5a4a45667af61", + "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/f074617dd69f466302836d1ae5de75c0bd7b6dfd", + "reference": "f074617dd69f466302836d1ae5de75c0bd7b6dfd", "shasum": "" }, "require": { @@ -1021,7 +1101,7 @@ "php": ">=5.6.20" }, "provide": { - "wordpress/core-implementation": "5.5.3" + "wordpress/core-implementation": "5.6.0" }, "type": "wordpress-core", "notification-url": "https://packagist.org/downloads/", @@ -1041,7 +1121,14 @@ "cms", "wordpress" ], - "time": "2020-10-30T20:48:12+00:00" + "support": { + "forum": "https://wordpress.org/support/", + "irc": "irc://irc.freenode.net/wordpress", + "issues": "https://core.trac.wordpress.org/", + "source": "https://core.trac.wordpress.org/browser", + "wiki": "https://codex.wordpress.org/" + }, + "time": "2020-12-08T22:34:23+00:00" }, { "name": "johnpbloch/wordpress-core-installer", @@ -1091,6 +1178,10 @@ "keywords": [ "wordpress" ], + "support": { + "issues": "https://github.com/johnpbloch/wordpress-core-installer/issues", + "source": "https://github.com/johnpbloch/wordpress-core-installer/tree/master" + }, "time": "2020-04-16T21:44:57+00:00" }, { @@ -1157,6 +1248,10 @@ "json", "schema" ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.10" + }, "time": "2020-05-27T16:41:55+00:00" }, { @@ -1202,6 +1297,10 @@ } ], "description": "Peast is PHP library that generates AST for JavaScript code", + "support": { + "issues": "https://github.com/mck89/peast/issues", + "source": "https://github.com/mck89/peast/tree/v1.11.0" + }, "time": "2020-10-09T15:12:13+00:00" }, { @@ -1248,6 +1347,10 @@ "mustache", "templating" ], + "support": { + "issues": "https://github.com/bobthecow/mustache.php/issues", + "source": "https://github.com/bobthecow/mustache.php/tree/master" + }, "time": "2019-11-23T21:40:31+00:00" }, { @@ -1293,6 +1396,10 @@ "object", "object graph" ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.x" + }, "time": "2017-10-19T19:58:43+00:00" }, { @@ -1334,6 +1441,10 @@ "keywords": [ "xml" ], + "support": { + "issues": "https://github.com/nb/oxymel/issues", + "source": "https://github.com/nb/oxymel/tree/master" + }, "time": "2013-02-24T15:01:54+00:00" }, { @@ -1383,6 +1494,11 @@ "pseudorandom", "random" ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, "time": "2020-10-15T10:06:57+00:00" }, { @@ -1462,6 +1578,10 @@ "github", "test" ], + "support": { + "issues": "https://github.com/php-coveralls/php-coveralls/issues", + "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.4.2" + }, "time": "2020-10-23T16:34:35+00:00" }, { @@ -1516,6 +1636,10 @@ "reflection", "static analysis" ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/master" + }, "time": "2017-09-11T18:02:19+00:00" }, { @@ -1561,6 +1685,10 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/release/3.x" + }, "time": "2017-11-10T14:09:06+00:00" }, { @@ -1608,6 +1736,10 @@ "email": "me@mikevanriel.com" } ], + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/master" + }, "time": "2017-07-14T14:27:02+00:00" }, { @@ -1671,6 +1803,10 @@ "spy", "stub" ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" + }, "time": "2020-03-05T15:02:03+00:00" }, { @@ -1734,6 +1870,11 @@ "testing", "xunit" ], + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/4.0" + }, "time": "2017-04-02T07:44:40+00:00" }, { @@ -1781,6 +1922,11 @@ "filesystem", "iterator" ], + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5" + }, "time": "2017-11-27T13:52:08+00:00" }, { @@ -1822,6 +1968,10 @@ "keywords": [ "template" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, "time": "2015-06-21T13:50:34+00:00" }, { @@ -1871,6 +2021,10 @@ "keywords": [ "timer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/master" + }, "time": "2017-02-26T11:10:40+00:00" }, { @@ -1920,6 +2074,10 @@ "keywords": [ "tokenizer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/1.4" + }, "abandoned": true, "time": "2017-12-04T08:55:13+00:00" }, @@ -2003,6 +2161,10 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/5.7.27" + }, "time": "2018-02-01T05:50:59+00:00" }, { @@ -2062,6 +2224,11 @@ "mock", "xunit" ], + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues", + "source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/3.4" + }, "abandoned": true, "time": "2017-06-30T09:13:00+00:00" }, @@ -2113,6 +2280,9 @@ "request", "response" ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, "time": "2016-08-06T14:39:51+00:00" }, { @@ -2160,6 +2330,9 @@ "psr", "psr-3" ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.3" + }, "time": "2020-03-23T09:12:05+00:00" }, { @@ -2200,6 +2373,10 @@ } ], "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, "time": "2019-03-08T08:55:37+00:00" }, { @@ -2249,27 +2426,31 @@ "iri", "sockets" ], + "support": { + "issues": "https://github.com/rmccue/Requests/issues", + "source": "https://github.com/rmccue/Requests/tree/master" + }, "time": "2016-10-13T00:11:37+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -2294,7 +2475,17 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:15:22+00:00" }, { "name": "sebastian/comparator", @@ -2358,6 +2549,10 @@ "compare", "equality" ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/1.2" + }, "time": "2017-01-29T09:50:25+00:00" }, { @@ -2410,6 +2605,10 @@ "keywords": [ "diff" ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/1.4" + }, "time": "2017-05-22T07:24:03+00:00" }, { @@ -2460,6 +2659,10 @@ "environment", "hhvm" ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/master" + }, "time": "2016-11-26T07:53:53+00:00" }, { @@ -2527,6 +2730,10 @@ "export", "exporter" ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/master" + }, "time": "2016-11-19T08:54:04+00:00" }, { @@ -2578,6 +2785,10 @@ "keywords": [ "global state" ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/1.1.1" + }, "time": "2015-10-12T03:26:01+00:00" }, { @@ -2624,6 +2835,10 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/master" + }, "time": "2017-02-18T15:18:39+00:00" }, { @@ -2677,6 +2892,10 @@ ], "description": "Provides functionality to recursively process PHP variables", "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/master" + }, "time": "2016-11-19T07:33:16+00:00" }, { @@ -2719,6 +2938,10 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/master" + }, "time": "2015-07-28T20:34:47+00:00" }, { @@ -2762,20 +2985,24 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, "time": "2016-10-03T07:35:21+00:00" }, { "name": "seld/jsonlint", - "version": "1.8.2", + "version": "1.8.3", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "590cfec960b77fd55e39b7d9246659e95dd6d337" + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/590cfec960b77fd55e39b7d9246659e95dd6d337", - "reference": "590cfec960b77fd55e39b7d9246659e95dd6d337", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", "shasum": "" }, "require": { @@ -2811,6 +3038,10 @@ "parser", "validator" ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" + }, "funding": [ { "url": "https://github.com/Seldaek", @@ -2821,7 +3052,7 @@ "type": "tidelift" } ], - "time": "2020-08-25T06:56:57+00:00" + "time": "2020-11-11T09:19:24+00:00" }, { "name": "seld/phar-utils", @@ -2865,28 +3096,32 @@ "keywords": [ "phar" ], + "support": { + "issues": "https://github.com/Seldaek/phar-utils/issues", + "source": "https://github.com/Seldaek/phar-utils/tree/master" + }, "time": "2020-07-07T18:42:57+00:00" }, { "name": "sirbrillig/phpcs-variable-analysis", - "version": "v2.9.0", + "version": "v2.10.1", "source": { "type": "git", "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git", - "reference": "ff54d4ec7f2bd152d526fdabfeff639aa9b8be01" + "reference": "c6716a98fe7bee25d31306e14fb62c3ffa16d70a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/ff54d4ec7f2bd152d526fdabfeff639aa9b8be01", - "reference": "ff54d4ec7f2bd152d526fdabfeff639aa9b8be01", + "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/c6716a98fe7bee25d31306e14fb62c3ffa16d70a", + "reference": "c6716a98fe7bee25d31306e14fb62c3ffa16d70a", "shasum": "" }, "require": { "php": ">=5.4.0", - "squizlabs/php_codesniffer": "^3.1" + "squizlabs/php_codesniffer": "^3.5" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4 || ^0.5 || ^0.6", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "limedeck/phpunit-detailed-printer": "^3.1 || ^4.0 || ^5.0", "phpstan/phpstan": "^0.11.8", "phpunit/phpunit": "^5.0 || ^6.5 || ^7.0 || ^8.0", @@ -2913,7 +3148,12 @@ } ], "description": "A PHPCS sniff to detect problems with variables.", - "time": "2020-10-07T23:32:29+00:00" + "support": { + "issues": "https://github.com/sirbrillig/phpcs-variable-analysis/issues", + "source": "https://github.com/sirbrillig/phpcs-variable-analysis", + "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki" + }, + "time": "2020-12-12T18:28:57+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -2964,11 +3204,16 @@ "phpcs", "standards" ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, "time": "2020-10-23T02:01:07+00:00" }, { "name": "symfony/config", - "version": "v3.4.46", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/config.git", @@ -3023,6 +3268,9 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v3.4.47" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3041,7 +3289,7 @@ }, { "name": "symfony/console", - "version": "v3.4.46", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/console.git", @@ -3104,6 +3352,9 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/console/tree/v3.4.47" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3122,7 +3373,7 @@ }, { "name": "symfony/debug", - "version": "v3.4.46", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", @@ -3169,6 +3420,9 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/debug/tree/v3.4.47" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3187,7 +3441,7 @@ }, { "name": "symfony/filesystem", - "version": "v3.4.46", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -3228,6 +3482,9 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v3.4.47" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3246,16 +3503,16 @@ }, { "name": "symfony/finder", - "version": "v3.4.46", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "4e1da3c110c52d868f8a9153b7de3ebc381fba78" + "reference": "b6b6ad3db3edb1b4b1c1896b1975fb684994de6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/4e1da3c110c52d868f8a9153b7de3ebc381fba78", - "reference": "4e1da3c110c52d868f8a9153b7de3ebc381fba78", + "url": "https://api.github.com/repos/symfony/finder/zipball/b6b6ad3db3edb1b4b1c1896b1975fb684994de6e", + "reference": "b6b6ad3db3edb1b4b1c1896b1975fb684994de6e", "shasum": "" }, "require": { @@ -3286,6 +3543,9 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v3.4.47" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3300,7 +3560,7 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2020-11-16T17:02:08+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3362,6 +3622,9 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.19.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3447,6 +3710,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.19.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3528,6 +3794,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.19.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3605,6 +3874,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.19.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3682,6 +3954,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php70/tree/v1.19.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3755,6 +4030,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.19.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3773,7 +4051,7 @@ }, { "name": "symfony/process", - "version": "v3.4.46", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -3813,6 +4091,9 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v3.4.47" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3831,7 +4112,7 @@ }, { "name": "symfony/stopwatch", - "version": "v3.4.46", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -3871,6 +4152,9 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v3.4.47" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3889,7 +4173,7 @@ }, { "name": "symfony/yaml", - "version": "v3.4.46", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", @@ -3939,6 +4223,9 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v3.4.47" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -4002,20 +4289,24 @@ "check", "validate" ], + "support": { + "issues": "https://github.com/webmozart/assert/issues", + "source": "https://github.com/webmozart/assert/tree/master" + }, "time": "2020-07-08T17:02:28+00:00" }, { "name": "wp-cli/cache-command", - "version": "v2.0.4", + "version": "v2.0.5", "source": { "type": "git", "url": "https://github.com/wp-cli/cache-command.git", - "reference": "f6c2678c960b60bddaded01d5a33eb0a012451f6" + "reference": "c1a91b35f274e8aa5142eb4d82842421ed89049a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/cache-command/zipball/f6c2678c960b60bddaded01d5a33eb0a012451f6", - "reference": "f6c2678c960b60bddaded01d5a33eb0a012451f6", + "url": "https://api.github.com/repos/wp-cli/cache-command/zipball/c1a91b35f274e8aa5142eb4d82842421ed89049a", + "reference": "c1a91b35f274e8aa5142eb4d82842421ed89049a", "shasum": "" }, "require": { @@ -4071,20 +4362,24 @@ ], "description": "Manages object and transient caches.", "homepage": "https://github.com/wp-cli/cache-command", - "time": "2020-06-12T00:17:09+00:00" + "support": { + "issues": "https://github.com/wp-cli/cache-command/issues", + "source": "https://github.com/wp-cli/cache-command/tree/v2.0.5" + }, + "time": "2020-12-07T19:32:47+00:00" }, { "name": "wp-cli/checksum-command", - "version": "v2.0.4", + "version": "v2.0.5", "source": { "type": "git", "url": "https://github.com/wp-cli/checksum-command.git", - "reference": "6b2648b01cd016044e2862afc96d3cb2028f2fee" + "reference": "a03cb058fcb295b8a1b060cc90618e777b86ad49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/checksum-command/zipball/6b2648b01cd016044e2862afc96d3cb2028f2fee", - "reference": "6b2648b01cd016044e2862afc96d3cb2028f2fee", + "url": "https://api.github.com/repos/wp-cli/checksum-command/zipball/a03cb058fcb295b8a1b060cc90618e777b86ad49", + "reference": "a03cb058fcb295b8a1b060cc90618e777b86ad49", "shasum": "" }, "require": { @@ -4126,7 +4421,11 @@ ], "description": "Verifies file integrity by comparing to published checksums.", "homepage": "https://github.com/wp-cli/checksum-command", - "time": "2020-06-10T13:24:38+00:00" + "support": { + "issues": "https://github.com/wp-cli/checksum-command/issues", + "source": "https://github.com/wp-cli/checksum-command/tree/v2.0.5" + }, + "time": "2020-12-07T22:47:40+00:00" }, { "name": "wp-cli/config-command", @@ -4195,20 +4494,24 @@ ], "description": "Generates and reads the wp-config.php file.", "homepage": "https://github.com/wp-cli/config-command", + "support": { + "issues": "https://github.com/wp-cli/config-command/issues", + "source": "https://github.com/wp-cli/config-command/tree/v2.0.7" + }, "time": "2020-10-31T11:20:34+00:00" }, { "name": "wp-cli/core-command", - "version": "v2.0.11", + "version": "v2.0.12", "source": { "type": "git", "url": "https://github.com/wp-cli/core-command.git", - "reference": "db88c14881bb927452c4ae13d7129132ab267e4a" + "reference": "a7001bd43b58fe67decd02c739615102cc0beb51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/core-command/zipball/db88c14881bb927452c4ae13d7129132ab267e4a", - "reference": "db88c14881bb927452c4ae13d7129132ab267e4a", + "url": "https://api.github.com/repos/wp-cli/core-command/zipball/a7001bd43b58fe67decd02c739615102cc0beb51", + "reference": "a7001bd43b58fe67decd02c739615102cc0beb51", "shasum": "" }, "require": { @@ -4262,20 +4565,24 @@ ], "description": "Downloads, installs, updates, and manages a WordPress installation.", "homepage": "https://github.com/wp-cli/core-command", - "time": "2020-08-26T14:01:29+00:00" + "support": { + "issues": "https://github.com/wp-cli/core-command/issues", + "source": "https://github.com/wp-cli/core-command/tree/v2.0.12" + }, + "time": "2020-12-07T19:31:14+00:00" }, { "name": "wp-cli/cron-command", - "version": "v2.0.5", + "version": "v2.0.6", "source": { "type": "git", "url": "https://github.com/wp-cli/cron-command.git", - "reference": "f4e1d02642fc56d84504dd012aeb64adee0aae8c" + "reference": "668b8c7bc1c1a1930e8a956b1a8325d159cce78c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/cron-command/zipball/f4e1d02642fc56d84504dd012aeb64adee0aae8c", - "reference": "f4e1d02642fc56d84504dd012aeb64adee0aae8c", + "url": "https://api.github.com/repos/wp-cli/cron-command/zipball/668b8c7bc1c1a1930e8a956b1a8325d159cce78c", + "reference": "668b8c7bc1c1a1930e8a956b1a8325d159cce78c", "shasum": "" }, "require": { @@ -4325,7 +4632,11 @@ ], "description": "Tests, runs, and deletes WP-Cron events; manages WP-Cron schedules.", "homepage": "https://github.com/wp-cli/cron-command", - "time": "2020-07-04T07:16:56+00:00" + "support": { + "issues": "https://github.com/wp-cli/cron-command/issues", + "source": "https://github.com/wp-cli/cron-command/tree/v2.0.6" + }, + "time": "2020-12-07T19:30:59+00:00" }, { "name": "wp-cli/db-command", @@ -4395,20 +4706,24 @@ ], "description": "Performs basic database operations using credentials stored in wp-config.php.", "homepage": "https://github.com/wp-cli/db-command", + "support": { + "issues": "https://github.com/wp-cli/db-command/issues", + "source": "https://github.com/wp-cli/db-command/tree/v2.0.6" + }, "time": "2020-01-28T16:39:32+00:00" }, { "name": "wp-cli/embed-command", - "version": "v2.0.6", + "version": "v2.0.7", "source": { "type": "git", "url": "https://github.com/wp-cli/embed-command.git", - "reference": "7186d8f969de31324dd2b54a18e5718f2c5db3e5" + "reference": "93d5582a9b03e950d3a2fe0869ae2c12d55a6242" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/embed-command/zipball/7186d8f969de31324dd2b54a18e5718f2c5db3e5", - "reference": "7186d8f969de31324dd2b54a18e5718f2c5db3e5", + "url": "https://api.github.com/repos/wp-cli/embed-command/zipball/93d5582a9b03e950d3a2fe0869ae2c12d55a6242", + "reference": "93d5582a9b03e950d3a2fe0869ae2c12d55a6242", "shasum": "" }, "require": { @@ -4458,7 +4773,11 @@ ], "description": "Inspects oEmbed providers, clears embed cache, and more.", "homepage": "https://github.com/wp-cli/embed-command", - "time": "2020-07-05T19:16:43+00:00" + "support": { + "issues": "https://github.com/wp-cli/embed-command/issues", + "source": "https://github.com/wp-cli/embed-command/tree/v2.0.7" + }, + "time": "2020-12-07T19:30:42+00:00" }, { "name": "wp-cli/entity-command", @@ -4664,20 +4983,24 @@ ], "description": "Manage WordPress comments, menus, options, posts, sites, terms, and users.", "homepage": "https://github.com/wp-cli/entity-command", + "support": { + "issues": "https://github.com/wp-cli/entity-command/issues", + "source": "https://github.com/wp-cli/entity-command/tree/master" + }, "time": "2019-11-12T11:32:14+00:00" }, { "name": "wp-cli/eval-command", - "version": "v2.0.7", + "version": "v2.0.8", "source": { "type": "git", "url": "https://github.com/wp-cli/eval-command.git", - "reference": "390627d0cb5d991ad341c367de1e8e4534edc5ad" + "reference": "8a5e0340e82e1fb2b48a5dedd88cef1fb8b410ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/eval-command/zipball/390627d0cb5d991ad341c367de1e8e4534edc5ad", - "reference": "390627d0cb5d991ad341c367de1e8e4534edc5ad", + "url": "https://api.github.com/repos/wp-cli/eval-command/zipball/8a5e0340e82e1fb2b48a5dedd88cef1fb8b410ce", + "reference": "8a5e0340e82e1fb2b48a5dedd88cef1fb8b410ce", "shasum": "" }, "require": { @@ -4718,20 +5041,24 @@ ], "description": "Executes arbitrary PHP code or files.", "homepage": "https://github.com/wp-cli/eval-command", - "time": "2020-06-13T00:17:03+00:00" + "support": { + "issues": "https://github.com/wp-cli/eval-command/issues", + "source": "https://github.com/wp-cli/eval-command/tree/v2.0.8" + }, + "time": "2020-12-07T19:30:26+00:00" }, { "name": "wp-cli/export-command", - "version": "v2.0.4", + "version": "v2.0.5", "source": { "type": "git", "url": "https://github.com/wp-cli/export-command.git", - "reference": "d1b280be8a7d806e345bb4c6965bc85ef0a8bb8a" + "reference": "015725833e7e0a89b188df4fb66b88415d4414ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/export-command/zipball/d1b280be8a7d806e345bb4c6965bc85ef0a8bb8a", - "reference": "d1b280be8a7d806e345bb4c6965bc85ef0a8bb8a", + "url": "https://api.github.com/repos/wp-cli/export-command/zipball/015725833e7e0a89b188df4fb66b88415d4414ec", + "reference": "015725833e7e0a89b188df4fb66b88415d4414ec", "shasum": "" }, "require": { @@ -4776,7 +5103,11 @@ ], "description": "Exports WordPress content to a WXR file.", "homepage": "https://github.com/wp-cli/export-command", - "time": "2020-06-13T00:17:03+00:00" + "support": { + "issues": "https://github.com/wp-cli/export-command/issues", + "source": "https://github.com/wp-cli/export-command/tree/v2.0.5" + }, + "time": "2020-12-07T19:30:08+00:00" }, { "name": "wp-cli/extension-command", @@ -4868,20 +5199,24 @@ ], "description": "Manages plugins and themes, including installs, activations, and updates.", "homepage": "https://github.com/wp-cli/extension-command", + "support": { + "issues": "https://github.com/wp-cli/extension-command/issues", + "source": "https://github.com/wp-cli/extension-command/tree/master" + }, "time": "2020-07-05T08:07:53+00:00" }, { "name": "wp-cli/i18n-command", - "version": "v2.2.5", + "version": "v2.2.6", "source": { "type": "git", "url": "https://github.com/wp-cli/i18n-command.git", - "reference": "b02ecdc9a57f9633740c254d19749118b7411f0f" + "reference": "a66da3f09f6a728832381012848c3074bf1635c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/b02ecdc9a57f9633740c254d19749118b7411f0f", - "reference": "b02ecdc9a57f9633740c254d19749118b7411f0f", + "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/a66da3f09f6a728832381012848c3074bf1635c8", + "reference": "a66da3f09f6a728832381012848c3074bf1635c8", "shasum": "" }, "require": { @@ -4925,20 +5260,24 @@ ], "description": "Provides internationalization tools for WordPress projects.", "homepage": "https://github.com/wp-cli/i18n-command", - "time": "2020-07-08T15:20:38+00:00" + "support": { + "issues": "https://github.com/wp-cli/i18n-command/issues", + "source": "https://github.com/wp-cli/i18n-command/tree/v2.2.6" + }, + "time": "2020-12-07T19:28:27+00:00" }, { "name": "wp-cli/import-command", - "version": "v2.0.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/wp-cli/import-command.git", - "reference": "5c5762401b570b95a61152411c4120cd69419001" + "reference": "c7438c1eeda5669531c52fc9223fcea5bda39cc8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/import-command/zipball/5c5762401b570b95a61152411c4120cd69419001", - "reference": "5c5762401b570b95a61152411c4120cd69419001", + "url": "https://api.github.com/repos/wp-cli/import-command/zipball/c7438c1eeda5669531c52fc9223fcea5bda39cc8", + "reference": "c7438c1eeda5669531c52fc9223fcea5bda39cc8", "shasum": "" }, "require": { @@ -4981,20 +5320,24 @@ ], "description": "Imports content from a given WXR file.", "homepage": "https://github.com/wp-cli/import-command", - "time": "2020-06-11T00:17:12+00:00" + "support": { + "issues": "https://github.com/wp-cli/import-command/issues", + "source": "https://github.com/wp-cli/import-command/tree/v2.0.4" + }, + "time": "2020-12-07T19:28:45+00:00" }, { "name": "wp-cli/language-command", - "version": "v2.0.7", + "version": "v2.0.8", "source": { "type": "git", "url": "https://github.com/wp-cli/language-command.git", - "reference": "aea62e70125d040d1fbe5c24e0fd49d977de3e9d" + "reference": "c4f3cddd816e26df2b0e7e7753d786b54a2c95c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/language-command/zipball/aea62e70125d040d1fbe5c24e0fd49d977de3e9d", - "reference": "aea62e70125d040d1fbe5c24e0fd49d977de3e9d", + "url": "https://api.github.com/repos/wp-cli/language-command/zipball/c4f3cddd816e26df2b0e7e7753d786b54a2c95c8", + "reference": "c4f3cddd816e26df2b0e7e7753d786b54a2c95c8", "shasum": "" }, "require": { @@ -5056,20 +5399,24 @@ ], "description": "Installs, activates, and manages language packs.", "homepage": "https://github.com/wp-cli/language-command", - "time": "2020-08-26T14:58:05+00:00" + "support": { + "issues": "https://github.com/wp-cli/language-command/issues", + "source": "https://github.com/wp-cli/language-command/tree/v2.0.8" + }, + "time": "2020-12-07T19:29:09+00:00" }, { "name": "wp-cli/maintenance-mode-command", - "version": "v2.0.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/wp-cli/maintenance-mode-command.git", - "reference": "5409778b62daf93e2192f43e2774c5d263d7297d" + "reference": "1f4f09ad15696f65e713c4c73008f6550318b3bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/maintenance-mode-command/zipball/5409778b62daf93e2192f43e2774c5d263d7297d", - "reference": "5409778b62daf93e2192f43e2774c5d263d7297d", + "url": "https://api.github.com/repos/wp-cli/maintenance-mode-command/zipball/1f4f09ad15696f65e713c4c73008f6550318b3bd", + "reference": "1f4f09ad15696f65e713c4c73008f6550318b3bd", "shasum": "" }, "require": { @@ -5113,7 +5460,11 @@ ], "description": "Activates, deactivates or checks the status of the maintenance mode of a site.", "homepage": "https://github.com/wp-cli/maintenance-mode-command", - "time": "2020-06-11T00:17:12+00:00" + "support": { + "issues": "https://github.com/wp-cli/maintenance-mode-command/issues", + "source": "https://github.com/wp-cli/maintenance-mode-command/tree/v2.0.4" + }, + "time": "2020-12-07T19:29:39+00:00" }, { "name": "wp-cli/media-command", @@ -5171,6 +5522,10 @@ ], "description": "Imports files as attachments, regenerates thumbnails, or lists registered image sizes.", "homepage": "https://github.com/wp-cli/media-command", + "support": { + "issues": "https://github.com/wp-cli/media-command/issues", + "source": "https://github.com/wp-cli/media-command/tree/master" + }, "time": "2020-06-11T00:17:12+00:00" }, { @@ -5219,6 +5574,9 @@ ], "description": "A simple YAML loader/dumper class for PHP (WP-CLI fork)", "homepage": "https://github.com/mustangostang/spyc/", + "support": { + "source": "https://github.com/wp-cli/spyc/tree/autoload" + }, "time": "2017-04-25T11:26:20+00:00" }, { @@ -5280,6 +5638,10 @@ ], "description": "Lists, installs, and removes WP-CLI packages.", "homepage": "https://github.com/wp-cli/package-command", + "support": { + "issues": "https://github.com/wp-cli/package-command/issues", + "source": "https://github.com/wp-cli/package-command/tree/master" + }, "time": "2020-01-28T12:55:09+00:00" }, { @@ -5330,20 +5692,24 @@ "cli", "console" ], + "support": { + "issues": "https://github.com/wp-cli/php-cli-tools/issues", + "source": "https://github.com/wp-cli/php-cli-tools/tree/master" + }, "time": "2018-09-04T13:28:00+00:00" }, { "name": "wp-cli/rewrite-command", - "version": "v2.0.5", + "version": "v2.0.6", "source": { "type": "git", "url": "https://github.com/wp-cli/rewrite-command.git", - "reference": "5115c82d6c339ac783d5ee9c7d3ce2949ac25a4b" + "reference": "6b2c7d186b375976869b8d74f1a3bac1f98aca57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/rewrite-command/zipball/5115c82d6c339ac783d5ee9c7d3ce2949ac25a4b", - "reference": "5115c82d6c339ac783d5ee9c7d3ce2949ac25a4b", + "url": "https://api.github.com/repos/wp-cli/rewrite-command/zipball/6b2c7d186b375976869b8d74f1a3bac1f98aca57", + "reference": "6b2c7d186b375976869b8d74f1a3bac1f98aca57", "shasum": "" }, "require": { @@ -5387,20 +5753,24 @@ ], "description": "Lists or flushes the site's rewrite rules, updates the permalink structure.", "homepage": "https://github.com/wp-cli/rewrite-command", - "time": "2020-06-12T00:17:09+00:00" + "support": { + "issues": "https://github.com/wp-cli/rewrite-command/issues", + "source": "https://github.com/wp-cli/rewrite-command/tree/v2.0.6" + }, + "time": "2020-12-07T19:27:22+00:00" }, { "name": "wp-cli/role-command", - "version": "v2.0.4", + "version": "v2.0.5", "source": { "type": "git", "url": "https://github.com/wp-cli/role-command.git", - "reference": "9f2172988dee5bbeb98e54f291254bee94a556a6" + "reference": "50e563a81f7462c4c5374abf6a1c0e88dfb01c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/role-command/zipball/9f2172988dee5bbeb98e54f291254bee94a556a6", - "reference": "9f2172988dee5bbeb98e54f291254bee94a556a6", + "url": "https://api.github.com/repos/wp-cli/role-command/zipball/50e563a81f7462c4c5374abf6a1c0e88dfb01c9c", + "reference": "50e563a81f7462c4c5374abf6a1c0e88dfb01c9c", "shasum": "" }, "require": { @@ -5449,7 +5819,11 @@ ], "description": "Adds, removes, lists, and resets roles and capabilities.", "homepage": "https://github.com/wp-cli/role-command", - "time": "2020-06-11T00:17:12+00:00" + "support": { + "issues": "https://github.com/wp-cli/role-command/issues", + "source": "https://github.com/wp-cli/role-command/tree/v2.0.5" + }, + "time": "2020-12-07T19:27:04+00:00" }, { "name": "wp-cli/scaffold-command", @@ -5512,6 +5886,10 @@ ], "description": "Generates code for post types, taxonomies, blocks, plugins, child themes, etc.", "homepage": "https://github.com/wp-cli/scaffold-command", + "support": { + "issues": "https://github.com/wp-cli/scaffold-command/issues", + "source": "https://github.com/wp-cli/scaffold-command/tree/master" + }, "time": "2019-11-25T13:26:31+00:00" }, { @@ -5568,20 +5946,24 @@ ], "description": "Searches/replaces strings in the database.", "homepage": "https://github.com/wp-cli/search-replace-command", + "support": { + "issues": "https://github.com/wp-cli/search-replace-command/issues", + "source": "https://github.com/wp-cli/search-replace-command/tree/v2.0.7" + }, "time": "2020-06-10T13:24:39+00:00" }, { "name": "wp-cli/server-command", - "version": "v2.0.5", + "version": "v2.0.6", "source": { "type": "git", "url": "https://github.com/wp-cli/server-command.git", - "reference": "945b6843d9f130c378869e3277a33af3fceea78d" + "reference": "be65465bda181209c95011f15d4575809d039ea9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/server-command/zipball/945b6843d9f130c378869e3277a33af3fceea78d", - "reference": "945b6843d9f130c378869e3277a33af3fceea78d", + "url": "https://api.github.com/repos/wp-cli/server-command/zipball/be65465bda181209c95011f15d4575809d039ea9", + "reference": "be65465bda181209c95011f15d4575809d039ea9", "shasum": "" }, "require": { @@ -5621,20 +6003,24 @@ ], "description": "Launches PHP's built-in web server for a specific WordPress installation.", "homepage": "https://github.com/wp-cli/server-command", - "time": "2020-06-16T00:17:21+00:00" + "support": { + "issues": "https://github.com/wp-cli/server-command/issues", + "source": "https://github.com/wp-cli/server-command/tree/v2.0.6" + }, + "time": "2020-12-07T19:26:47+00:00" }, { "name": "wp-cli/shell-command", - "version": "v2.0.6", + "version": "v2.0.7", "source": { "type": "git", "url": "https://github.com/wp-cli/shell-command.git", - "reference": "d29fceda4c79b2e6e4295b563427f76e3b7bc1ba" + "reference": "76088e1ff69855d89454aed886d27c3f62b12c2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/shell-command/zipball/d29fceda4c79b2e6e4295b563427f76e3b7bc1ba", - "reference": "d29fceda4c79b2e6e4295b563427f76e3b7bc1ba", + "url": "https://api.github.com/repos/wp-cli/shell-command/zipball/76088e1ff69855d89454aed886d27c3f62b12c2c", + "reference": "76088e1ff69855d89454aed886d27c3f62b12c2c", "shasum": "" }, "require": { @@ -5675,20 +6061,24 @@ ], "description": "Opens an interactive PHP console for running and testing PHP code.", "homepage": "https://github.com/wp-cli/shell-command", - "time": "2020-10-31T08:19:44+00:00" + "support": { + "issues": "https://github.com/wp-cli/shell-command/issues", + "source": "https://github.com/wp-cli/shell-command/tree/v2.0.7" + }, + "time": "2020-12-07T19:26:30+00:00" }, { "name": "wp-cli/super-admin-command", - "version": "v2.0.4", + "version": "v2.0.5", "source": { "type": "git", "url": "https://github.com/wp-cli/super-admin-command.git", - "reference": "a4b93491afb74a7e4836ab4ab5c2d8c42fa5e3d1" + "reference": "23b9a4e6f27d5effe5cfd67db2329e0d58dbb53f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/super-admin-command/zipball/a4b93491afb74a7e4836ab4ab5c2d8c42fa5e3d1", - "reference": "a4b93491afb74a7e4836ab4ab5c2d8c42fa5e3d1", + "url": "https://api.github.com/repos/wp-cli/super-admin-command/zipball/23b9a4e6f27d5effe5cfd67db2329e0d58dbb53f", + "reference": "23b9a4e6f27d5effe5cfd67db2329e0d58dbb53f", "shasum": "" }, "require": { @@ -5732,20 +6122,24 @@ ], "description": "Lists, adds, or removes super admin users on a multisite installation.", "homepage": "https://github.com/wp-cli/super-admin-command", - "time": "2020-06-10T13:24:39+00:00" + "support": { + "issues": "https://github.com/wp-cli/super-admin-command/issues", + "source": "https://github.com/wp-cli/super-admin-command/tree/v2.0.5" + }, + "time": "2020-12-07T19:26:13+00:00" }, { "name": "wp-cli/widget-command", - "version": "v2.1.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/wp-cli/widget-command.git", - "reference": "1ba59443fc07608450155c7770fe459ddfbc412f" + "reference": "0c73470adbc73b45f4d371e4869672eacca104b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/widget-command/zipball/1ba59443fc07608450155c7770fe459ddfbc412f", - "reference": "1ba59443fc07608450155c7770fe459ddfbc412f", + "url": "https://api.github.com/repos/wp-cli/widget-command/zipball/0c73470adbc73b45f4d371e4869672eacca104b3", + "reference": "0c73470adbc73b45f4d371e4869672eacca104b3", "shasum": "" }, "require": { @@ -5795,7 +6189,11 @@ ], "description": "Adds, moves, and removes widgets; lists sidebars.", "homepage": "https://github.com/wp-cli/widget-command", - "time": "2020-06-16T00:17:21+00:00" + "support": { + "issues": "https://github.com/wp-cli/widget-command/issues", + "source": "https://github.com/wp-cli/widget-command/tree/v2.1.2" + }, + "time": "2020-12-07T19:25:02+00:00" }, { "name": "wp-cli/wp-cli", @@ -5857,6 +6255,11 @@ "cli", "wordpress" ], + "support": { + "docs": "https://make.wordpress.org/cli/handbook/", + "issues": "https://github.com/wp-cli/wp-cli/issues", + "source": "https://github.com/wp-cli/wp-cli" + }, "time": "2020-02-18T08:15:37+00:00" }, { @@ -5927,27 +6330,32 @@ "cli", "wordpress" ], + "support": { + "docs": "https://make.wordpress.org/cli/handbook/", + "issues": "https://github.com/wp-cli/wp-cli-bundle/issues", + "source": "https://github.com/wp-cli/wp-cli-bundle" + }, "time": "2019-11-12T17:43:58+00:00" }, { "name": "wp-cli/wp-config-transformer", - "version": "v1.2.7", + "version": "v1.2.8", "source": { "type": "git", "url": "https://github.com/wp-cli/wp-config-transformer.git", - "reference": "bae1e975ed1277470e3dcc7fd0ef99c2d4f4c7a8" + "reference": "0bb2b9162c38ca72370380aea11dc06e431e13a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/wp-config-transformer/zipball/bae1e975ed1277470e3dcc7fd0ef99c2d4f4c7a8", - "reference": "bae1e975ed1277470e3dcc7fd0ef99c2d4f4c7a8", + "url": "https://api.github.com/repos/wp-cli/wp-config-transformer/zipball/0bb2b9162c38ca72370380aea11dc06e431e13a5", + "reference": "0bb2b9162c38ca72370380aea11dc06e431e13a5", "shasum": "" }, "require": { "php": ">=5.3.29" }, "require-dev": { - "composer/composer": "^1.5.6", + "composer/composer": ">=1.5.6 <1.7.0 || ^1.7.1 || ^2.0.0", "phpunit/phpunit": "^6.5.5 || ^7.0.0", "wp-coding-standards/wpcs": "^0.14.0 || ^1.0.0 || ^2.0.0" }, @@ -5968,7 +6376,11 @@ } ], "description": "Programmatically edit a wp-config.php file.", - "time": "2020-07-05T12:30:35+00:00" + "support": { + "issues": "https://github.com/wp-cli/wp-config-transformer/issues", + "source": "https://github.com/wp-cli/wp-config-transformer/tree/v1.2.8" + }, + "time": "2020-11-12T08:08:10+00:00" }, { "name": "wp-coding-standards/wpcs", @@ -6014,20 +6426,25 @@ "standards", "wordpress" ], + "support": { + "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", + "source": "https://github.com/WordPress/WordPress-Coding-Standards", + "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" + }, "time": "2020-05-13T23:57:56+00:00" }, { "name": "wp-phpunit/wp-phpunit", - "version": "5.5.3", + "version": "5.6.0", "source": { "type": "git", "url": "https://github.com/wp-phpunit/wp-phpunit.git", - "reference": "763121e752594664c150643e05c991a0acf3800a" + "reference": "7130a214573cc8c12a0f8fe8a74b18b453bce1e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-phpunit/wp-phpunit/zipball/763121e752594664c150643e05c991a0acf3800a", - "reference": "763121e752594664c150643e05c991a0acf3800a", + "url": "https://api.github.com/repos/wp-phpunit/wp-phpunit/zipball/7130a214573cc8c12a0f8fe8a74b18b453bce1e9", + "reference": "7130a214573cc8c12a0f8fe8a74b18b453bce1e9", "shasum": "" }, "type": "library", @@ -6057,7 +6474,12 @@ "test", "wordpress" ], - "time": "2020-09-02T15:53:50+00:00" + "support": { + "docs": "https://github.com/wp-phpunit/docs", + "issues": "https://github.com/wp-phpunit/issues", + "source": "https://github.com/wp-phpunit/wp-phpunit" + }, + "time": "2020-12-09T18:06:02+00:00" }, { "name": "wpackagist-plugin/advanced-custom-fields", @@ -6079,15 +6501,15 @@ }, { "name": "wpackagist-plugin/buddypress", - "version": "6.3.0", + "version": "6.4.0", "source": { "type": "svn", "url": "https://plugins.svn.wordpress.org/buddypress/", - "reference": "tags/6.3.0" + "reference": "tags/6.4.0" }, "dist": { "type": "zip", - "url": "https://downloads.wordpress.org/plugin/buddypress.6.3.0.zip" + "url": "https://downloads.wordpress.org/plugin/buddypress.6.4.0.zip" }, "require": { "composer/installers": "~1.0" @@ -6151,6 +6573,10 @@ "MIT" ], "description": "A Docker Compose development environment for any project.", + "support": { + "issues": "https://github.com/wpsh/wpsh-local/issues", + "source": "https://github.com/wpsh/wpsh-local/tree/master" + }, "time": "2019-06-12T10:54:32+00:00" } ], @@ -6164,5 +6590,5 @@ "platform-overrides": { "php": "5.6.20" }, - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/connectors/class-connector-buddypress.php b/connectors/class-connector-buddypress.php index 9e89c8dd..7c11cb9b 100644 --- a/connectors/class-connector-buddypress.php +++ b/connectors/class-connector-buddypress.php @@ -61,9 +61,11 @@ class Connector_BuddyPress extends Connector { 'groups_unban_member', 'groups_remove_member', + 'xprofile_field_before_save', 'xprofile_field_after_save', 'xprofile_fields_deleted_field', + 'xprofile_group_before_save', 'xprofile_group_after_save', 'xprofile_groups_deleted_group', ); @@ -583,7 +585,7 @@ public function callback_bp_before_activity_delete( $args ) { * @param array $activities_ids Activity IDs of deleted activities. */ public function callback_bp_activity_deleted_activities( $activities_ids ) { - if ( 1 === count( $activities_ids ) && isset( $this->deleted_activity ) ) { // Single activity deletion. + if ( 1 === count( $activities_ids ) && ! empty( $this->deleted_activity ) ) { // Single activity deletion. $activity = $this->deleted_activity; $this->log( sprintf( @@ -749,11 +751,13 @@ public function group_action( $group, $action, $meta = array(), $message = null /* translators: %s: a group name (e.g. "Favourites") */ $message = esc_html__( '"%s" group deleted', 'stream' ); } elseif ( 'joined' === $action ) { - /* translators: %s: a group name (e.g. "Favourites") */ - $message = esc_html__( 'Joined group "%s"', 'stream' ); + /* translators: %2$s: a user display name, %1$s: a group name (e.g. "Jane Doe", "Favourites") */ + $message = esc_html__( '"%2$s" joined group "%1$s"', 'stream' ); + $replacements[] = get_user_by( 'id', $meta['user_id'] )->display_name; } elseif ( 'left' === $action ) { - /* translators: %s: a group name (e.g. "Favourites") */ - $message = esc_html__( 'Left group "%s"', 'stream' ); + /* translators: %2$s: a user display name, %1$s: a group name (e.g. "Jane Doe", "Favourites") */ + $message = esc_html__( '"%2$s" left group "%1$s"', 'stream' ); + $replacements[] = get_user_by( 'id', $meta['user_id'] )->display_name; } elseif ( 'banned' === $action ) { /* translators: %1$s: a user display name, %2$s: a group name (e.g. "Jane Doe", "Favourites") */ $message = esc_html__( 'Banned "%2$s" from "%1$s"', 'stream' ); @@ -1020,15 +1024,34 @@ public function field_action( $field, $action, $meta = array(), $message = null ); } + /** + * Capture field status before create/updating field so it can + * be logged in the "after_save" callback. + * + * @action xprofile_field_before_save + * + * @param BP_XProfile_Field $field Field object. + */ + public function callback_xprofile_field_before_save( $field ) { + $this->incoming_field_action = empty( $field->id ) ? 'created' : 'updated'; + } + /** * Logs field writes * * @action xprofile_field_after_save * - * @param object $field Field object. + * @param BP_XProfile_Field $field Field object. */ public function callback_xprofile_field_after_save( $field ) { - $action = isset( $field->id ) ? 'updated' : 'created'; + // Bail if the field's action wasn't captured. + if ( is_null( $this->incoming_field_action ) ) { + return; + } + + $action = $this->incoming_field_action; + unset( $this->incomming_field_action ); + $this->field_action( $field, $action ); } @@ -1089,6 +1112,19 @@ public function field_group_action( $group, $action, $meta = array(), $message = ); } + /** + * Capture field group status before create/updating field so it can + * be logged in the "after_save" callback. + * + * @action xprofile_group_before_save + * + * @param BP_XProfile_Group $group Field group object. + */ + public function callback_xprofile_group_before_save( $group ) { + $this->incoming_field_group_action = empty( $group->id ) ? 'created' : 'updated'; + } + + /** * Logs field group writes * @@ -1097,12 +1133,14 @@ public function field_group_action( $group, $action, $meta = array(), $message = * @param object $group Field group. */ public function callback_xprofile_group_after_save( $group ) { - global $wpdb; - /** - * A bit hacky, due to inconsistency with BP action scheme, - * see callback_xprofile_field_after_save for correct behavior. - */ - $action = ( $group->id === $wpdb->insert_id ) ? 'created' : 'updated'; + // Bail if the field group's action wasn't captured. + if ( is_null( $this->incoming_field_group_action ) ) { + return; + } + + $action = $this->incoming_field_group_action; + unset( $this->incomming_field_group_action ); + $this->field_group_action( $group, $action ); } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index f3e85b0e..bd231e0e 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -47,6 +47,30 @@ function() { } ); +tests_add_filter( + 'bp_core_loaded', + function() { + $components = array( + 'members', + 'activity', + 'blogs', + 'friends', + 'groups', + 'messages', + 'notifications', + 'settings', + 'xprofile', + ); + $active_components =& buddypress()->active_components; + foreach( $components as $component ) { + $active_components[ $component ] = 1; + } + + \bp_delete_option( 'bp-active-components'); + \bp_delete_option( 'bp-deactivated-components' ); + } +); + // @see https://core.trac.wordpress.org/browser/trunk/tests/phpunit/includes/bootstrap.php require $_tests_dir . '/includes/bootstrap.php'; diff --git a/tests/tests/connectors/test-class-connector-buddypress.php b/tests/tests/connectors/test-class-connector-buddypress.php index 5f4c7efa..23a4d2d5 100644 --- a/tests/tests/connectors/test-class-connector-buddypress.php +++ b/tests/tests/connectors/test-class-connector-buddypress.php @@ -8,32 +8,97 @@ */ namespace WP_Stream; -class Test_WP_Stream_Connector_BuddyPress extends WP_StreamTestCase { +/** + * Mocked delete field function from XProfile admin function page. + * + * @global string $message The feedback message to show. + * @global string $type The type of feedback message to show. + * + * @param int $field_id The field to delete. + * @param string $field_type The type of field being deleted. + * @param bool $delete_data Should the field data be deleted too. + */ +function xprofile_admin_delete_field( $field_id, $field_type = 'field', $delete_data = false ) { + global $message, $type; + + $field_type = ( 'field' == $field_type ) ? __( 'field', 'buddypress' ) : __( 'option', 'buddypress' ); + + // Handle the deletion of field + $field = \xprofile_get_field( $field_id, null, false ); + + if ( !$field->delete( (bool) $delete_data ) ) { + /* translators: %s: the field type */ + $message = sprintf( __( 'There was an error deleting the %s. Please try again.', 'buddypress' ), $field_type ); + $type = 'error'; + + return false; + } else { + /* translators: %s: the field type */ + $message = sprintf( __( 'The %s was deleted successfully!', 'buddypress' ), $field_type ); + $type = 'success'; - /** - * Runs before all tests - */ - public static function wpSetUpBeforeClass() { /** - * Ensure all BuddyPress components are loaded. + * Fires at the end of the field deletion process, if successful. + * + * @since 1.0.0 + * + * @param \BP_XProfile_Field $field Current BP_XProfile_Field object. */ - delete_option( 'bp-active-components' ); - delete_option( 'bp-deactivated-components' ); - buddypress(); + do_action( 'xprofile_fields_deleted_field', $field ); + + return true; } +} +/** + * Handles the deletion of profile data groups. + * + * @param int $group_id ID of the group to delete. + */ +function xprofile_admin_delete_group( $group_id ) { + global $message, $type; + + // Handle the deletion of group. + $group = new \BP_XProfile_Group( $group_id ); + + if ( ! $group->delete() ) { + $message = _x( 'There was an error deleting the group. Please try again.', 'Error when deleting profile fields group', 'buddypress' ); + $type = 'error'; + + return false; + } else { + $message = _x( 'The group was deleted successfully.', 'Profile fields group was deleted successfully', 'buddypress' ); + $type = 'success'; + + /** + * Fires at the end of group deletion process, if successful. + * + * @since 1.0.0 + * + * @param \BP_XProfile_Group $group Current BP_XProfile_Group object. + */ + do_action( 'xprofile_groups_deleted_group', $group ); + + return true; + } +} + +class Test_WP_Stream_Connector_BuddyPress extends WP_StreamTestCase { /** * Run before each test */ public function setUp() { parent::setUp(); + $this->plugin->connectors->unload_connector( 'buddypress' ); + // Make partial of Connector_BuddyPress class, with mocked "log" function. $this->mock = $this->getMockBuilder( Connector_BuddyPress::class ) ->setMethods( array( 'log' ) ) ->getMock(); $this->mock->register(); + update_option( 'users_can_register', true ); } /** @@ -43,7 +108,7 @@ public function tearDown() { parent::tearDown(); } - public function test_bbpress_installed_and_activated() { + public function test_buddypress_installed_and_activated() { $this->assertTrue( is_callable( 'buddypress' ) ); } @@ -141,18 +206,19 @@ public function test_option_callbacks() { } public function test_activity_callbacks() { - // Create activity for later use. - $activity_id = \bp_activity_add( - array( - 'component' => 'testComponent', - 'content' => 'Testing testing 123' - ) + $activity_args = array( + 'component' => \buddypress()->activity->id, + 'content' => 'Testing testing 123', + 'primary_link' => 'http://example.com', + 'type' => 'activity_update', + 'recorded_time' => \bp_core_current_time(), ); - $activity = new \BP_Activity_Activity( $activity_id ); + // Create activity for later use. + $activity = new \BP_Activity_Activity( \bp_activity_add( $activity_args ) ); // Expected log actions. - $this->mock->expects( $this->atLeastOnce() ) + $this->mock->expects( $this->exactly( 3 ) ) ->method( 'log' ) ->withConsecutive( array( @@ -218,9 +284,9 @@ public function test_activity_callbacks() { ); // Update activity to trigger callbacks. - \bp_activity_mark_as_spam( $activity_id ); - \bp_activity_mark_as_ham( $activity_id ); - \bp_activity_delete_by_activity_id( $activity_id ); + \bp_activity_mark_as_spam( $activity ); + \bp_activity_mark_as_ham( $activity ); + \bp_activity_delete_by_activity_id( $activity->id ); // Check callback test actions. $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_bp_activity_mark_as_spam' ) ); @@ -230,30 +296,406 @@ public function test_activity_callbacks() { } public function test_group_action_callbacks() { + // Authenticate as admin and re-evaluate user access. + wp_set_current_user( 1 ); + bp_update_is_item_admin( bp_user_has_access(), 'core' ); + + // Create users for later use. + $test_user_id = self::factory()->user->create( array( 'display_name' => 'testuser' ) ); + // Expected log actions. - $this->mock->expects( $this->atLeastOnce() ) + $this->mock->expects( $this->exactly( 13 ) ) ->method( 'log' ) ->withConsecutive( - + array( + $this->equalTo( esc_html__( '"Test group" group created' ) ), + $this->callback( + function( $subject ) { + $expected = array( + 'name' => 'Test group', + 'slug' => 'test-group' + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'created' + ), + array( + $this->equalTo( esc_html__( '"Old test group" group updated' ) ), + $this->callback( + function( $subject ) { + $expected = array( + 'name' => 'Old test group', + 'slug' => 'test-group' + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'updated' + ), + array( + $this->equalTo( esc_html__( '"Old test group" group updated' ) ), + $this->callback( + function( $subject ) { + $expected = array( + 'name' => 'Old test group', + 'slug' => 'old-test-group' + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'updated' + ), + array( + $this->equalTo( esc_html__( '"Old test group" group updated' ) ), + $this->callback( + function( $subject ) { + $expected = array( + 'name' => 'Old test group', + 'slug' => 'old-test-group' + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'updated' + ), + array( + $this->equalTo( esc_html__( '"testuser" joined group "Old test group"' ) ), + $this->callback( + function( $subject ) use ( $test_user_id ) { + $expected = array( + 'name' => 'Old test group', + 'slug' => 'old-test-group', + 'user_id' => $test_user_id, + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'joined' + ), + array( + $this->equalTo( __( 'Promoted "testuser" to "Moderator" in "Old test group"' ) ), + $this->callback( + function( $subject ) use ( $test_user_id ) { + $expected = array( + 'name' => 'Old test group', + 'slug' => 'old-test-group', + 'user_id' => $test_user_id, + 'status' => 'mod', + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'promoted' + ), + array( + $this->equalTo( __( 'Demoted "testuser" to "Member" in "Old test group"' ) ), + $this->callback( + function( $subject ) use ( $test_user_id ) { + $expected = array( + 'name' => 'Old test group', + 'slug' => 'old-test-group', + 'user_id' => $test_user_id, + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'demoted' + ), + array( + $this->equalTo( esc_html__( 'Banned "testuser" from "Old test group"' ) ), + $this->callback( + function( $subject ) use ( $test_user_id ) { + $expected = array( + 'name' => 'Old test group', + 'slug' => 'old-test-group', + 'user_id' => $test_user_id, + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'banned' + ), + array( + $this->equalTo( esc_html__( 'Unbanned "testuser" from "Old test group"' ) ), + $this->callback( + function( $subject ) use ( $test_user_id ) { + $expected = array( + 'name' => 'Old test group', + 'slug' => 'old-test-group', + 'user_id' => $test_user_id, + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'unbanned' + ), + array( + $this->equalTo( esc_html__( '"testuser" left group "Old test group"' ) ), + $this->callback( + function( $subject ) use ( $test_user_id ) { + $expected = array( + 'name' => 'Old test group', + 'slug' => 'old-test-group', + 'user_id' => $test_user_id, + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'left' + ), + array( + $this->equalTo( esc_html__( '"testuser" joined group "Old test group"' ) ), + $this->callback( + function( $subject ) use ( $test_user_id ) { + $expected = array( + 'name' => 'Old test group', + 'slug' => 'old-test-group', + 'user_id' => $test_user_id, + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'joined' + ), + array( + $this->equalTo( esc_html__( 'Removed "testuser" from "Old test group"' ) ), + $this->callback( + function( $subject ) use ( $test_user_id ) { + $expected = array( + 'name' => 'Old test group', + 'slug' => 'old-test-group', + 'user_id' => $test_user_id, + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'removed' + ), + array( + $this->equalTo( esc_html__( '"Old test group" group deleted' ) ), + $this->callback( + function( $subject ) { + $expected = array( + 'name' => 'Old test group', + 'slug' => 'old-test-group', + ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'groups', + 'deleted' + ) ); - // Do stuff. + // Create and manipulate Groups to trigger callbacks. + $group_args = array( + 'creator_id' => 1, + 'name' => 'Test group', + 'description' => 'Lorem ipsum dolor', + 'slug' => 'test-group', + 'status' => 'public', + ); + $group_id = \groups_create_group( $group_args ); + + \groups_create_group( + array( + 'group_id' => $group_id, + 'name' => 'Old test group', + ) + ); + + \groups_edit_base_group_details( + array( + 'group_id' => $group_id, + 'slug' => 'old-test-group', + 'description' => 'Lorem ipsum dolor two', + ) + ); + + // Manually reset duplicate log blocker flag + $this->mock->is_update = false; + + \groups_edit_group_settings( $group_id, false, 'public' ); + + \groups_join_group( $group_id, $test_user_id ); + \groups_promote_member( $test_user_id, $group_id, 'mod' ); + \groups_demote_member( $test_user_id, $group_id ); + + // In order to bypass bulk activity deletion logs. + $this->mock->ignore_activity_bulk_deletion = true; + \groups_ban_member( $test_user_id, $group_id ); + + \groups_unban_member( $test_user_id, $group_id ); + \groups_leave_group( $group_id, $test_user_id ); + \groups_join_group( $group_id, $test_user_id ); + + // In order to bypass bulk activity deletion logs. + $this->mock->ignore_activity_bulk_deletion = true; + \groups_remove_member( $test_user_id, $group_id ); - // Check that all callback test actions were executed. - $this->assertFalse( 0 === did_action( 'wp_stream_test_callback_' ) ); + \groups_delete_group( $group_id ); + + // Check callback test actions. + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_groups_create_group' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_groups_update_group' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_groups_details_updated' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_groups_settings_updated' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_groups_leave_group' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_groups_join_group' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_groups_promote_member' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_groups_demote_member' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_groups_ban_member' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_groups_unban_member' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_groups_remove_member' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_groups_before_delete_group' ) ); } public function test_profile_action_callbacks() { // Expected log actions. - $this->mock->expects( $this->atLeastOnce() ) + $this->mock->expects( $this->exactly( 6 ) ) ->method( 'log' ) ->withConsecutive( - + array( + $this->equalTo( esc_html__( 'Created profile field group "Test field group"' ) ), + $this->callback( + function( $subject ) { + $expected = array( 'group_name' => 'Test field group' ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'profile_fields', + 'created', + ), + array( + $this->equalTo( esc_html__( 'Created profile field "Test field"' ) ), + $this->callback( + function( $subject ) { + $expected = array( 'field_name' => 'Test field' ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'profile_fields', + 'created', + ), + array( + $this->equalTo( esc_html__( 'Updated profile field "Test field"' ) ), + $this->callback( + function( $subject ) { + $expected = array( 'field_name' => 'Test field' ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'profile_fields', + 'updated', + ), + array( + $this->equalTo( esc_html__( 'Deleted profile field "Test field"' ) ), + $this->callback( + function( $subject ) { + $expected = array( 'field_name' => 'Test field' ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'profile_fields', + 'deleted', + ), + array( + $this->equalTo( esc_html__( 'Updated profile field group "Test field group"' ) ), + $this->callback( + function( $subject ) { + $expected = array( 'group_name' => 'Test field group' ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'profile_fields', + 'updated', + ), + array( + $this->equalTo( esc_html__( 'Deleted profile field group "Test field group"' ) ), + $this->callback( + function( $subject ) { + $expected = array( 'group_name' => 'Test field group' ); + return $expected === array_intersect_key( $expected, $subject ); + } + ), + $this->greaterThan( 0 ), + 'profile_fields', + 'deleted', + ) ); - // Do stuff. + // Create/trigger/update fields and field groups to trigger callbacks. + // Create new field group. + $field_group_args = array( + 'name' => 'Test field group', + 'description' => 'Lorem ipsum dolor', + 'slug' => 'test-field-group', + 'can_delete' => 'false', + ); + $group_id = \xprofile_insert_field_group( $field_group_args ); + $group = new \BP_XProfile_Group( $group_id ); - // Check that all callback test actions were executed. - $this->assertFalse( 0 === did_action( 'wp_stream_test_callback_' ) ); + // Create new field in field group. + $field_args = array( + 'name' => 'Test field', + 'description' => 'Lorem ipsum dolor', + 'type' => 'textbox', + 'field_group_id' => $group + ); + $field_id = \xprofile_insert_field( $field_args ); + $field = new \BP_XProfile_Field( $field_id ); + + // Update field. + $field->is_required = true; + $field->save(); + + // Delete field. + $this->assertTrue( xprofile_admin_delete_field( $field_id, 'textbox' ) ); + + // Update field group. + $group->can_delete = 1; + $group->save(); + + // Delete field group. + $this->assertTrue( xprofile_admin_delete_group( $group->id ) ); + + // Check callback test actions. + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_xprofile_field_before_save' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_xprofile_field_after_save' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_xprofile_fields_deleted_field' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_xprofile_group_before_save' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_xprofile_group_after_save' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_xprofile_groups_deleted_group' ) ); } }