diff --git a/.wordpress-org/screenshot-1.jpg b/.wordpress-org/screenshot-1.jpg new file mode 100644 index 0000000..fed024a Binary files /dev/null and b/.wordpress-org/screenshot-1.jpg differ diff --git a/.wordpress-org/screenshot-2.jpg b/.wordpress-org/screenshot-2.jpg new file mode 100644 index 0000000..3d12215 Binary files /dev/null and b/.wordpress-org/screenshot-2.jpg differ diff --git a/.wordpress-org/screenshot-3.jpg b/.wordpress-org/screenshot-3.jpg new file mode 100644 index 0000000..e652125 Binary files /dev/null and b/.wordpress-org/screenshot-3.jpg differ diff --git a/.wordpress-org/screenshot-4.jpg b/.wordpress-org/screenshot-4.jpg new file mode 100644 index 0000000..7906980 Binary files /dev/null and b/.wordpress-org/screenshot-4.jpg differ diff --git a/.wordpress-org/screenshot-5.jpg b/.wordpress-org/screenshot-5.jpg new file mode 100644 index 0000000..24a597f Binary files /dev/null and b/.wordpress-org/screenshot-5.jpg differ diff --git a/CHANGELOG.md b/CHANGELOG.md index 9567247..12941d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,19 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] +## [1.2.0] - 2021-09-01 +### Added +- Boolean Search Operators Feature. Props [@moraleida](https://github.com/moraleida), [@Rahmon](https://github.com/Rahmon), and [@felipeelia](https://github.com/felipeelia) via [#7](https://github.com/10up/ElasticPressLabs/pull/7). + ## [1.1.0] - 2021-07-27 ### Added -- Integration with [Co-Authors Plus](https://wordpress.org/plugins/co-authors-plus/). Props [@dinhtungdu](https://github.com/dinhtungdu) and [@Rahmon](https://github.com/Rahmon). +- Integration with [Co-Authors Plus](https://wordpress.org/plugins/co-authors-plus/). Props [@dinhtungdu](https://github.com/dinhtungdu), [@Rahmon](https://github.com/Rahmon), and [@mbanusic](https://github.com/mbanusic) via [#4](https://github.com/10up/ElasticPressLabs/pull/4). ### [1.0.0] - 2021-02-09 +### Added +- Initial plugin release. -Initial plugin release - -[Unreleased]: https://github.com/10up/ElasticPressLabs/compare/1.1.0...HEAD +[Unreleased]: https://github.com/10up/ElasticPressLabs/compare/trunk...develop +[1.2.0]: https://github.com/10up/ElasticPressLabs/compare/1.1.0...1.2.0 [1.1.0]: https://github.com/10up/ElasticPressLabs/compare/1.0.0...1.1.0 [1.0.0]: https://github.com/10up/ElasticPressLabs/releases/tag/1.0.0 diff --git a/README.md b/README.md index eb54bd7..363a695 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,18 @@ # ElasticPress Labs - A developer focused interface to commonly [ElasticPress plugin](https://github.com/10up/ElasticPress/) issues +> A developer-focused interface to enabling experimental [ElasticPress plugin](https://github.com/10up/ElasticPress/) features. -**Please note:** trunk is the stable branch +[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Tests](https://github.com/10up/ElasticPressLabs/actions/workflows/test.yml/badge.svg)](https://github.com/10up/ElasticPressLabs/actions/workflows/test.yml) [![Linting](https://github.com/10up/ElasticPressLabs/actions/workflows/lint.yml/badge.svg)](https://github.com/10up/ElasticPressLabs/actions/workflows/lint.yml) [![Release Version](https://img.shields.io/github/release/10up/ElasticPressLabs.svg)](https://github.com/10up/ElasticPressLabs/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v5.0%20tested-success.svg) [![GPLv2 License](https://img.shields.io/github/license/10up/ElasticPressLabs.svg)](https://github.com/10up/ElasticPressLabs/blob/develop/LICENSE.md) + +**Please note:** `trunk` is the stable branch ## Overview -This plugin provides a developer focused interface to commonly used filters without the need -of being fully accessible and skipping the need of providing a streamlined used experience. -It's meant to be an easy way to solve common issues without code changes. +This plugin provides a developer-focused interface to commonly used filters without the need of being fully accessible and skipping the need of providing a streamlined user experience. It's meant to be an easy way to solve common issues without code changes. ## Documentation -ElasticPress Labs acts as a ElasticPress feature and registers its methods through the -[ElasticPress Feature -API](http://10up.github.io/ElasticPress/tutorial-feature-api.html). In this way the -features added to this plugin will be immediately available in the ElasticPress interface. +ElasticPress Labs acts as an ElasticPress feature and registers its methods through the [ElasticPress Feature API](http://10up.github.io/ElasticPress/tutorial-feature-api.html). In this way the features added to this plugin will be immediately available in the ElasticPress interface. This plugin provides a simple interface to enable and disable features. @@ -34,14 +31,8 @@ If you identify any errors or have an idea for improving the plugin, please [ope **Active:** 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome. -## Changelog - -### 1.0.0 -- Initial plugin release - ## Like what you see?
- diff --git a/composer.lock b/composer.lock index b89b2f8..c2e26eb 100644 --- a/composer.lock +++ b/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "10up/elasticpress", - "version": "3.5.1", + "version": "3.6.2", "source": { "type": "git", "url": "https://github.com/10up/ElasticPress.git", - "reference": "8bc017231c0979129a644c0994e5bd12748a08b5" + "reference": "b64d09291b17e1c58969424b8f167071bc7dbddb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/10up/ElasticPress/zipball/8bc017231c0979129a644c0994e5bd12748a08b5", - "reference": "8bc017231c0979129a644c0994e5bd12748a08b5", + "url": "https://api.github.com/repos/10up/ElasticPress/zipball/b64d09291b17e1c58969424b8f167071bc7dbddb", + "reference": "b64d09291b17e1c58969424b8f167071bc7dbddb", "shasum": "" }, "require": { @@ -27,6 +27,7 @@ "require-dev": { "10up/phpcs-composer": "dev-master", "10up/wpacceptance": "dev-master", + "phpcompatibility/phpcompatibility-wp": "*", "phpunit/phpunit": "^7", "wpackagist-plugin/woocommerce": "*" }, @@ -66,7 +67,11 @@ "search", "wordpress" ], - "time": "2020-10-29T13:55:20+00:00" + "support": { + "issues": "https://github.com/10up/ElasticPress/issues", + "source": "https://github.com/10up/ElasticPress/tree/3.6.2" + }, + "time": "2021-08-26T17:25:32+00:00" }, { "name": "10up/phpcs-composer", @@ -74,12 +79,12 @@ "source": { "type": "git", "url": "https://github.com/10up/phpcs-composer.git", - "reference": "2fcd33205f7742c46fa09b28829321d847cc472d" + "reference": "2f5c3608bc03fe1ca65acf462dd7b5008f6829a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/10up/phpcs-composer/zipball/2fcd33205f7742c46fa09b28829321d847cc472d", - "reference": "2fcd33205f7742c46fa09b28829321d847cc472d", + "url": "https://api.github.com/repos/10up/phpcs-composer/zipball/2f5c3608bc03fe1ca65acf462dd7b5008f6829a0", + "reference": "2f5c3608bc03fe1ca65acf462dd7b5008f6829a0", "shasum": "" }, "require": { @@ -88,6 +93,7 @@ "squizlabs/php_codesniffer": "^3.4.0", "wp-coding-standards/wpcs": "*" }, + "default-branch": true, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", "license": [ @@ -99,7 +105,11 @@ "email": "ephraim.gregor@10up.com" } ], - "time": "2020-07-15T03:05:06+00:00" + "support": { + "issues": "https://github.com/10up/phpcs-composer/issues", + "source": "https://github.com/10up/phpcs-composer/tree/master" + }, + "time": "2021-01-08T03:03:06+00:00" }, { "name": "10up/wp_mock", @@ -126,6 +136,7 @@ "php-coveralls/php-coveralls": "^2.1", "sebastian/comparator": ">=1.2.3" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -140,20 +151,24 @@ "GPL-2.0-or-later" ], "description": "A mocking library to take the pain out of unit testing for WordPress", + "support": { + "issues": "https://github.com/10up/wp_mock/issues", + "source": "https://github.com/10up/wp_mock/tree/master" + }, "time": "2020-07-15T03:36:07+00:00" }, { "name": "antecedent/patchwork", - "version": "2.1.12", + "version": "2.1.15", "source": { "type": "git", "url": "https://github.com/antecedent/patchwork.git", - "reference": "b98e046dd4c0acc34a0846604f06f6111654d9ea" + "reference": "0430ceaac7f447f1778c199ec19d7e4362a6f961" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/antecedent/patchwork/zipball/b98e046dd4c0acc34a0846604f06f6111654d9ea", - "reference": "b98e046dd4c0acc34a0846604f06f6111654d9ea", + "url": "https://api.github.com/repos/antecedent/patchwork/zipball/0430ceaac7f447f1778c199ec19d7e4362a6f961", + "reference": "0430ceaac7f447f1778c199ec19d7e4362a6f961", "shasum": "" }, "require": { @@ -184,26 +199,30 @@ "runkit", "testing" ], - "time": "2019-12-22T17:52:09+00:00" + "support": { + "issues": "https://github.com/antecedent/patchwork/issues", + "source": "https://github.com/antecedent/patchwork/tree/2.1.15" + }, + "time": "2021-08-22T08:00:13+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.0", + "version": "v0.7.1", "source": { "type": "git", "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "e8d808670b8f882188368faaf1144448c169c0b7" + "reference": "fe390591e0241955f22eb9ba327d137e501c771c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e8d808670b8f882188368faaf1144448c169c0b7", - "reference": "e8d808670b8f882188368faaf1144448c169c0b7", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c", "shasum": "" }, "require": { "composer-plugin-api": "^1.0 || ^2.0", "php": ">=5.3", - "squizlabs/php_codesniffer": "^2 || ^3 || 4.0.x-dev" + "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" }, "require-dev": { "composer/composer": "*", @@ -250,7 +269,11 @@ "stylecheck", "tests" ], - "time": "2020-06-25T14:57:39+00:00" + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2020-12-07T18:04:37+00:00" }, { "name": "doctrine/instantiator", @@ -301,6 +324,10 @@ "constructor", "instantiate" ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -362,20 +389,24 @@ "keywords": [ "test" ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, "time": "2020-07-09T08:09:16+00:00" }, { "name": "mockery/mockery", - "version": "1.3.3", + "version": "1.3.4", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d" + "reference": "31467aeb3ca3188158613322d66df81cedd86626" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/60fa2f67f6e4d3634bb4a45ff3171fa52215800d", - "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d", + "url": "https://api.github.com/repos/mockery/mockery/zipball/31467aeb3ca3188158613322d66df81cedd86626", + "reference": "31467aeb3ca3188158613322d66df81cedd86626", "shasum": "" }, "require": { @@ -427,7 +458,11 @@ "test double", "testing" ], - "time": "2020-08-11T18:10:21+00:00" + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/1.3.4" + }, + "time": "2021-02-24T09:51:00+00:00" }, { "name": "myclabs/deep-copy", @@ -475,6 +510,10 @@ "object", "object graph" ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, "funding": [ { "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", @@ -536,6 +575,10 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/master" + }, "time": "2018-07-08T19:23:20+00:00" }, { @@ -583,6 +626,10 @@ } ], "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/master" + }, "time": "2018-07-08T19:19:57+00:00" }, { @@ -641,32 +688,36 @@ "phpcs", "standards" ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibility" + }, "time": "2019-12-27T09:44:58+00:00" }, { "name": "phpcompatibility/phpcompatibility-paragonie", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", - "reference": "b862bc32f7e860d0b164b199bd995e690b4b191c" + "reference": "ddabec839cc003651f2ce695c938686d1086cf43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/b862bc32f7e860d0b164b199bd995e690b4b191c", - "reference": "b862bc32f7e860d0b164b199bd995e690b4b191c", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/ddabec839cc003651f2ce695c938686d1086cf43", + "reference": "ddabec839cc003651f2ce695c938686d1086cf43", "shasum": "" }, "require": { "phpcompatibility/php-compatibility": "^9.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", "paragonie/random_compat": "dev-master", "paragonie/sodium_compat": "dev-master" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." }, "type": "phpcodesniffer-standard", @@ -693,20 +744,24 @@ "polyfill", "standards" ], - "time": "2019-11-04T15:17:54+00:00" + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" + }, + "time": "2021-02-15T10:24:51+00:00" }, { "name": "phpcompatibility/phpcompatibility-wp", - "version": "2.1.0", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", - "reference": "41bef18ba688af638b7310666db28e1ea9158b2f" + "reference": "a792ab623069f0ce971b2417edef8d9632e32f75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/41bef18ba688af638b7310666db28e1ea9158b2f", - "reference": "41bef18ba688af638b7310666db28e1ea9158b2f", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/a792ab623069f0ce971b2417edef8d9632e32f75", + "reference": "a792ab623069f0ce971b2417edef8d9632e32f75", "shasum": "" }, "require": { @@ -714,10 +769,10 @@ "phpcompatibility/phpcompatibility-paragonie": "^1.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5" + "dealerdirect/phpcodesniffer-composer-installer": "^0.7" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." }, "type": "phpcodesniffer-standard", @@ -743,7 +798,11 @@ "standards", "wordpress" ], - "time": "2019-08-28T14:22:28+00:00" + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP" + }, + "time": "2021-07-21T11:09:57+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -792,6 +851,10 @@ "reflection", "static analysis" ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, "time": "2020-06-27T09:03:43+00:00" }, { @@ -844,6 +907,10 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, "time": "2020-09-03T19:13:55+00:00" }, { @@ -889,20 +956,24 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, "time": "2020-09-17T18:55:26+00:00" }, { "name": "phpspec/prophecy", - "version": "1.12.1", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", "shasum": "" }, "require": { @@ -914,7 +985,7 @@ }, "require-dev": { "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0 <9.3" + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { @@ -952,7 +1023,11 @@ "spy", "stub" ], - "time": "2020-09-29T09:10:42+00:00" + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + }, + "time": "2021-03-17T13:42:18+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1015,27 +1090,31 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master" + }, "time": "2018-10-31T16:06:48+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/28af674ff175d0768a5a978e6de83f697d4a7f05", + "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -1065,7 +1144,17 @@ "filesystem", "iterator" ], - "time": "2018-09-13T20:33:42+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-19T06:46:01+00:00" }, { "name": "phpunit/php-text-template", @@ -1106,27 +1195,31 @@ "keywords": [ "template" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "2.1.2", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -1155,25 +1248,35 @@ "keywords": [ "timer" ], - "time": "2019-06-07T04:22:29+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:20:02+00:00" }, { "name": "phpunit/php-token-stream", - "version": "3.1.1", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + "reference": "9c1da83261628cb24b6a6df371b6e312b3954768" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9c1da83261628cb24b6a6df371b6e312b3954768", + "reference": "9c1da83261628cb24b6a6df371b6e312b3954768", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.0" @@ -1204,7 +1307,18 @@ "keywords": [ "tokenizer" ], - "time": "2019-09-17T06:23:10+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "abandoned": true, + "time": "2021-07-26T12:15:06+00:00" }, { "name": "phpunit/phpunit", @@ -1288,27 +1402,31 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/7.5.20" + }, "time": "2020-01-08T08:45:45+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": { @@ -1333,29 +1451,39 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:15:22+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", "shasum": "" }, "require": { - "php": "^7.1", + "php": ">=7.1", "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -1373,6 +1501,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -1384,10 +1516,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -1397,24 +1525,34 @@ "compare", "equality" ], - "time": "2018-07-12T15:12:46+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:04:30+00:00" }, { "name": "sebastian/diff", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.5 || ^8.0", @@ -1436,13 +1574,13 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", @@ -1453,24 +1591,34 @@ "unidiff", "unified diff" ], - "time": "2019-02-04T06:01:07+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:59:04+00:00" }, { "name": "sebastian/environment", - "version": "4.2.3", + "version": "4.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.5" @@ -1506,24 +1654,34 @@ "environment", "hhvm" ], - "time": "2019-11-20T08:46:58+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:53:42+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.2", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", "shasum": "" }, "require": { - "php": "^7.0", + "php": ">=7.0", "sebastian/recursion-context": "^3.0" }, "require-dev": { @@ -1573,7 +1731,17 @@ "export", "exporter" ], - "time": "2019-09-14T09:02:43+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:47:53+00:00" }, { "name": "sebastian/global-state", @@ -1624,24 +1792,28 @@ "keywords": [ "global state" ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/2.0.0" + }, "time": "2017-04-27T15:39:26+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", "shasum": "" }, "require": { - "php": "^7.0", + "php": ">=7.0", "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, @@ -1671,24 +1843,34 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:40:27+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" @@ -1716,24 +1898,34 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:37:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" @@ -1754,14 +1946,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" @@ -1769,24 +1961,34 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:34:24+00:00" }, { "name": "sebastian/resource-operations", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "type": "library", "extra": { @@ -1811,7 +2013,17 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:30:19+00:00" }, { "name": "sebastian/version", @@ -1854,20 +2066,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": "squizlabs/php_codesniffer", - "version": "3.5.8", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", - "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", "shasum": "" }, "require": { @@ -1905,20 +2121,25 @@ "phpcs", "standards" ], - "time": "2020-10-23T02:01:07+00:00" + "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": "2021-04-09T00:54:41+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.20.0", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { @@ -1930,7 +2151,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1967,6 +2188,9 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1981,20 +2205,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { @@ -2021,40 +2245,49 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, "funding": [ { "url": "https://github.com/theseer", "type": "github" } ], - "time": "2020-07-12T23:59:07+00:00" + "time": "2021-07-28T10:34:58+00:00" }, { "name": "webmozart/assert", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", + "php": "^7.2 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -2076,7 +2309,11 @@ "check", "validate" ], - "time": "2020-07-08T17:02:28+00:00" + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" }, { "name": "wp-coding-standards/wpcs", @@ -2122,6 +2359,11 @@ "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" } ], @@ -2137,5 +2379,5 @@ "php": ">=7.0" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/elasticpresslabs.php b/elasticpresslabs.php index fa0ec48..6c905fc 100644 --- a/elasticpresslabs.php +++ b/elasticpresslabs.php @@ -3,7 +3,7 @@ * Plugin Name: ElasticPress Labs * Plugin URI: https://github.com/10up/ElasticPressLabs * Description: A developer focused interface to commonly ElasticPress plugin issues. - * Version: 1.1.0 + * Version: 1.2.0 * Requires at least: 4.9 * Requires PHP: 7.2 * Author: 10up @@ -17,7 +17,7 @@ */ // Useful global constants. -define( 'ELASTICPRESS_LABS_VERSION', '1.1.0' ); +define( 'ELASTICPRESS_LABS_VERSION', '1.2.0' ); define( 'ELASTICPRESS_LABS_URL', plugin_dir_url( __FILE__ ) ); define( 'ELASTICPRESS_LABS_PATH', plugin_dir_path( __FILE__ ) ); define( 'ELASTICPRESS_LABS_INC', ELASTICPRESS_LABS_PATH . 'includes/' ); diff --git a/includes/classes/Feature/BooleanSearchOperators.php b/includes/classes/Feature/BooleanSearchOperators.php new file mode 100644 index 0000000..8be3b4c --- /dev/null +++ b/includes/classes/Feature/BooleanSearchOperators.php @@ -0,0 +1,400 @@ +slug = 'boolean_search_operators'; + + $this->title = esc_html__( 'Boolean Search Operators', 'elasticpress-labs' ); + + $this->requires_install_reindex = false; + $this->default_settings = [ + 'active' => false, + ]; + + parent::__construct(); + } + + /** + * Setup Feature Functionality + */ + public function setup() { + $settings = $this->get_settings(); + + if ( $settings['active'] ) { + /** Features Class @var Features $features */ + $features = Features::factory(); + + /** Search Feature @var Feature\Search\Search $search */ + $search = $features->get_registered_feature( 'search' ); + + if ( ! $search->is_active() && $this->is_active() ) { + $features->deactivate_feature( $this->slug ); + + return false; + } + + add_filter( 'ep_elasticpress_enabled', [ $this, 'integrate_boolean_search_operators' ], 10, 2 ); + } + } + + /** + * Hook up the boolean operators query if it is enabled + * + * @hook ep_elasticpress_enabled + * + * @param {bool} $enabled Whether to integrate with Elasticsearch or not + * @param {WP_Query} $query WP_Query to evaluate + * + * @return bool + */ + public function integrate_boolean_search_operators( $enabled, $query ) { + if ( ! $enabled ) { + return false; + } + + if ( true === $query->query_vars['ep_integrate'] && + ( $this->is_active() || true === $query->query_vars['ep_boolean_operators'] ) ) { + + \add_filter( 'ep_formatted_args_query', [ $this, 'replace_query_if_boolean' ], 999, 4 ); + } + + return true; + } + + /** + * Check if a search query uses boolean operators and switch queries accordingly + * + * @hook ep_formatted_args_query + * + * @param {array} $query Current query + * @param {array} $query_vars Query variables + * @param {string} $search_text Search text + * @param {array} $search_fields Search fields + * + * @return array + */ + public function replace_query_if_boolean( $query, $query_vars, $search_text, $search_fields ) { + + if ( $this->query_uses_boolean_operators( $search_text ) ) { + + $simple_query = array( + 'simple_query_string' => array( + /** + * Filter the fields to use in boolean operator searches + * + * @hook ep_labs_boolean_operators_fields + * @since 1.2.0 + * + * @param {array} $search_fields + * @param {array} $query_vars Query variables + * @param {string} $search_text Search text modified to replace tokens + * @param {array} $search_fields Search fields + * @param {array} $query The original query + * + * @return {array} New fields + */ + 'fields' => \apply_filters( 'ep_labs_boolean_operators_fields', $search_fields, $query_vars, $search_text, $query ), + + /** + * Filter the default boolean operator + * Valid values: OR, AND + * + * @hook ep_labs_boolean_operators_default + * @since 1.2.0 + * + * @param {string} $default + * @param {array} $query_vars Query variables + * @param {string} $search_text Search text modified to replace tokens + * @param {array} $search_fields Search fields + * @param {array} $query The original query + * + * @return {string} New operator + */ + 'default_operator' => \apply_filters( 'ep_labs_boolean_operators_default', 'OR', $query_vars, $search_text, $search_fields, $query ), + + /** + * Filter allowed boolean operators. + * Valid flags: ALL, AND, ESCAPE, FUZZY, NEAR, NONE, NOT, OR, PHRASE, PRECEDENCE, PREFIX, SLOP, WHITESPACE + * Must return a string with a single flag or use pipe separators, e.g.: 'OR|AND|PREFIX' + * + * @hook ep_labs_boolean_operators_flags + * @since 1.2.0 + * + * @param {string} $flags + * @param {array} $query_vars Query variables + * @param {string} $search_text Search text modified to replace tokens + * @param {array} $search_fields Search fields + * @param {array} $query The original query + * + * @return {string} New flags + */ + 'flags' => \apply_filters( 'ep_labs_boolean_operators_flags', 'ALL', $query_vars, $search_text, $search_fields, $query ), + ), + ); + + if ( version_compare( Elasticsearch::factory()->get_elasticsearch_version(), '6.0', '>=' ) ) { + /** + * Filter automatic synonym generation for boolean operators queries + * + * @hook ep_labs_boolean_operators_generate_synonyms + * @since 1.2.0 + * + * @param {bool} $auto_generate_synonyms + * @param {array} $query_vars Query variables + * @param {string} $search_text Search text modified to replace tokens + * @param {array} $search_fields Search fields + * @param {array} $query The original query + * + * @return {bool} New fuzziness + */ + $simple_query['simple_query_string']['auto_generate_synonyms_phrase_query'] = \apply_filters( 'ep_labs_boolean_operators_generate_synonyms', true, $query_vars, $search_text, $search_fields, $query ); + } + + $original_text = $search_text; + + if ( 'ALL' === $simple_query['simple_query_string']['flags'] ) { + $search_text = \str_replace( array( ' AND ', ' OR ', ' NOT ' ), array( ' +', ' | ', ' -' ), $search_text ); + } else { + $flags = explode( '|', $simple_query['simple_query_string']['flags'] ); + $ops = array( 'AND', 'OR', 'NOT' ); + + foreach ( $ops as $flag ) { + if ( \in_array( $flag, $flags, true ) ) { + switch ( $flag ) { + case 'AND': + $search_text = \str_replace( " $flag ", ' +', $search_text ); + break; + case 'OR': + $search_text = \str_replace( " $flag ", ' | ', $search_text ); + break; + case 'NOT': + $search_text = \str_replace( " $flag ", ' -', $search_text ); + break; + } + } + } + } + + /** + * Filter the search text to use in boolean operator queries + * + * @hook ep_labs_boolean_operators_search_text + * @since 1.2.0 + * + * @param {string} $search_text Search text modified to replace tokens + * @param {string} $original_text The original search text + * @param {array} $query_vars Query variables + * @param {array} $search_fields Search fields + * @param {array} $query The original query + * + * @return {string} New search text + */ + $simple_query['simple_query_string']['query'] = \apply_filters( 'ep_labs_boolean_operators_search_text', $search_text, $original_text, $query_vars, $search_fields, $query ); + + /** + * Filter formatted Elasticsearch simple query string query (only contains query part) + * + * @hook ep_boolean_operators_query_args + * @since 1.2.0 + * + * @param {array} $simple_query Current query + * @param {array} $query_vars Query variables + * @param {string} $search_text Search text modified to replace tokens + * @param {array} $search_fields Search fields + * @param {array} $query The original query + * + * @return {array} New query + */ + return \apply_filters( 'ep_labs_boolean_operators_query_args', $simple_query, $query_vars, $search_text, $search_fields, $query ); + } + + return $query; + } + + /** + * Test if a search text uses boolean operators + * reference for this RegEx: https://regex101.com/r/JizB0Z/1 + * reference for acceptable operators: + * https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html#simple-query-string-syntax + * + * # matches + * (museum (art)) # no extra requirements for surrounding parentheses + * "american museum" # no extra requirements for surrounding double quotes + * museum art* # requires zero space before the operator + * museum art~35 # requires zero space before and at least one digit after the operator + * museum | art # requires surrounding spaces + * museum +art # requires space before + * museum -art # requires space before + * museum OR art # requires surrounding spaces and uppercase operator + * museum AND art # requires surrounding spaces and uppercase operator + * museum NOT art # requires surrounding spaces and uppercase operator + * + * # non matches + * museum art + * art () + * museum art 1985 + * 35 artists~ + * museum or art + * museum and art + * museum not art + * "museum + * (museum + * museum) + * museum *art + * + * @param string $search_text the search query + * + * @return bool + */ + public function query_uses_boolean_operators( $search_text ) { + $boolean_regex = '/(\".+\")|(\+)|(\-)|(\S\*)|(\S\~\d)|(.+\|.+)|(\(\S+\))|(\sOR\s)|(\sAND\s)|(\sNOT\s)/'; + + return (bool) preg_match( $boolean_regex, $search_text ); + } + + /** + * Returns requirements status of feature + * + * Requires the search feature to be activated + * + * @return FeatureRequirementsStatus + */ + public function requirements_status() { + /** Features Class @var Features $features */ + $features = Features::factory(); + + /** Search Feature @var Feature\Search\Search $search */ + $search = $features->get_registered_feature( 'search' ); + + if ( ! $search->is_active() ) { + return new FeatureRequirementsStatus( 2, esc_html__( 'This feature requires the "Post Search" feature to be enabled', 'elasticpress-labs' ) ); + } + + return parent::requirements_status(); + } + + /** + * Output feature box summary + */ + public function output_feature_box_summary() { + ?> + + + +AND
*/
+ esc_html__( '%1$s or %2$s signifies AND operation. eg.: modern +art, modern AND art', 'elasticpress-labs' ),
+ '+
',
+ 'AND
'
+ )
+ );
+ ?>
+ OR
*/
+ esc_html__( '%1$s or %2$s signifies OR operation. eg.: modern | art, modern OR art', 'elasticpress-labs' ),
+ '|
',
+ 'OR
'
+ )
+ );
+ ?>
+ NOT
*/
+ esc_html__( '%1$s or %2$s signifies NOT operation. eg.: modern -art, modern NOT art', 'elasticpress-labs' ),
+ '-
',
+ 'NOT
'
+ )
+ );
+ ?>
+ "
'
+ )
+ );
+ ?>
+ *
'
+ )
+ );
+ ?>
+ ()
'
+ )
+ );
+ ?>
+ ~#
'
+ )
+ );
+ ?>
+ +
, 2: AND
+#: includes/classes/Feature/BooleanSearchOperators.php:322
+msgid "%1$s or %2$s signifies AND operation. eg.: modern +art, modern AND art"
+msgstr ""
+
+#. translators: 1: |
, 2: OR
+#: includes/classes/Feature/BooleanSearchOperators.php:334
+msgid "%1$s or %2$s signifies OR operation. eg.: modern | art, modern OR art"
+msgstr ""
+
+#. translators: 1: -
, 2: NOT
+#: includes/classes/Feature/BooleanSearchOperators.php:346
+msgid "%1$s or %2$s signifies NOT operation. eg.: modern -art, modern NOT art"
+msgstr ""
+
+#. translators: 1: "
+#: includes/classes/Feature/BooleanSearchOperators.php:358
+msgid "%1$s wraps characters to signify a phrase. eg.: \"modern art\""
+msgstr ""
+
+#. translators: 1: *
+#: includes/classes/Feature/BooleanSearchOperators.php:369
+msgid "%1$s signifies a prefix wildcard. eg.: art*"
+msgstr ""
+
+#. translators: 1: ()
+#: includes/classes/Feature/BooleanSearchOperators.php:380
+msgid "%1$s signifies precedence. eg.: (MoMA OR (modern AND art))"
+msgstr ""
+
+#. translators: 1: ~#
+#: includes/classes/Feature/BooleanSearchOperators.php:391
+msgid "%1$s signifies slop if used on a phrase. eg.: \"modern art\"~2. Signifies fuzziness if used on a word: eg: modern~1"
+msgstr ""
+
#: includes/classes/Feature/CoAuthorsPlus.php:34
msgid "Co-Authors Plus"
msgstr ""
diff --git a/package-lock.json b/package-lock.json
index 8f7ffbb..434042f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "elasticpress-labs",
- "version": "1.1.0",
+ "version": "1.2.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 334dd31..ebc1e1c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "elasticpress-labs",
- "version": "1.1.0",
+ "version": "1.2.0",
"description": "ElasticPress Labs",
"author": {
"name": "10up",
diff --git a/readme.txt b/readme.txt
new file mode 100644
index 0000000..447cb10
--- /dev/null
+++ b/readme.txt
@@ -0,0 +1,30 @@
+=== ElasticPress Labs ===
+Contributors: 10up
+Tags: Elasticsearch, ElasticPress, search, boolean, Co-Authors Plus
+Requires at least: 3.7.1
+Tested up to: 5.8
+Stable tag: 1.2.0
+Requires PHP: 7.2
+License: GPLv2 or later
+License URI: https://www.gnu.org/licenses/gpl-2.0.html
+
+A developer-focused interface to enabling experimental ElasticPress plugin features.
+
+== Description ==
+
+This plugin provides a developer-focused interface to commonly used filters without the need of being fully accessible and skipping the need of providing a streamlined user experience. It's meant to be an easy way to solve common issues without code changes.
+
+ElasticPress Labs acts as an ElasticPress feature and registers its methods through the [ElasticPress Feature API](http://10up.github.io/ElasticPress/tutorial-feature-api.html). In this way the features added to this plugin will be immediately available in the ElasticPress interface.
+
+This plugin provides a simple interface to enable and disable features.
+
+== Changelog ==
+
+= 1.2.0 =
+* **Added:** Boolean Search Operators Feature. Props [@moraleida](https://github.com/moraleida), [@Rahmon](https://github.com/Rahmon), and [@felipeelia](https://github.com/felipeelia).
+
+= 1.1.0 =
+* **Added:** Integration with [Co-Authors Plus](https://wordpress.org/plugins/co-authors-plus/). Props [@dinhtungdu](https://github.com/dinhtungdu), [@Rahmon](https://github.com/Rahmon), and [@mbanusic](https://github.com/mbanusic).
+
+= 1.0.0 =
+* Initial plugin release.
diff --git a/tests/phpunit/feature/TestBooleanSearchOperators.php b/tests/phpunit/feature/TestBooleanSearchOperators.php
new file mode 100644
index 0000000..5861eef
--- /dev/null
+++ b/tests/phpunit/feature/TestBooleanSearchOperators.php
@@ -0,0 +1,109 @@
+register_feature($instance);
+ }
+
+ /**
+ * Get Boolean Search Operators feature
+ *
+ * @since 1.2.0
+ * @return BooleanSearchOperators
+ */
+ protected function get_feature() {
+ return \ElasticPress\Features::factory()->get_registered_feature( 'boolean_search_operators' );
+ }
+
+ /**
+ * Test constrcut
+ *
+ * @since 1.2.0
+ */
+ public function testConstruct() {
+ $instance = $this->get_feature();
+
+ $this->assertEquals( 'boolean_search_operators', $instance->slug );
+ $this->assertEquals( 'Boolean Search Operators', $instance->title );
+ }
+
+ /**
+ * Test box summary
+ *
+ * @since 1.2.0
+ */
+ public function testBoxSummary() {
+ ob_start();
+ $this->get_feature()->output_feature_box_summary();
+ $output = ob_get_clean();
+
+ $this->assertContains( 'Allow boolean operators in search queries', $output );
+ }
+
+ /**
+ * Test box long text
+ *
+ * @since 1.2.0
+ */
+ public function testBoxLong() {
+ ob_start();
+ $this->get_feature()->output_feature_box_long();
+ $output = ob_get_clean();
+
+ $this->assertContains( 'Allows users to search using the following boolean operators:', $output );
+ }
+
+ /**
+ * Text query_uses_boolean_operators function
+ *
+ * @since 1.2.0
+ */
+ public function testQueryUsesBooleanOperators() {
+ $feature = $this->get_feature();
+
+ $this->assertTrue( $feature->query_uses_boolean_operators( '(museum (art))' ) );
+ $this->assertTrue( $feature->query_uses_boolean_operators( '"american museum"' ) );
+ $this->assertTrue( $feature->query_uses_boolean_operators( 'museum art*' ) );
+ $this->assertTrue( $feature->query_uses_boolean_operators( 'museum art~35' ) );
+ $this->assertTrue( $feature->query_uses_boolean_operators( 'museum | art' ) );
+ $this->assertTrue( $feature->query_uses_boolean_operators( 'museum +art' ) );
+ $this->assertTrue( $feature->query_uses_boolean_operators( 'museum -art' ) );
+ $this->assertTrue( $feature->query_uses_boolean_operators( 'museum OR art' ) );
+ $this->assertTrue( $feature->query_uses_boolean_operators( 'museum AND art' ) );
+ $this->assertTrue( $feature->query_uses_boolean_operators( 'museum NOT art' ) );
+
+ $this->assertNotTrue( $feature->query_uses_boolean_operators( 'museum art' ) );
+ $this->assertNotTrue( $feature->query_uses_boolean_operators( 'art ()' ) );
+ $this->assertNotTrue( $feature->query_uses_boolean_operators( 'museum art 1985' ) );
+ $this->assertNotTrue( $feature->query_uses_boolean_operators( '35 artists~' ) );
+ $this->assertNotTrue( $feature->query_uses_boolean_operators( 'museum or art' ) );
+ $this->assertNotTrue( $feature->query_uses_boolean_operators( 'museum and art' ) );
+ $this->assertNotTrue( $feature->query_uses_boolean_operators( 'museum not art' ) );
+ $this->assertNotTrue( $feature->query_uses_boolean_operators( '"museum' ) );
+ $this->assertNotTrue( $feature->query_uses_boolean_operators( '(museum' ) );
+ $this->assertNotTrue( $feature->query_uses_boolean_operators( 'museum)' ) );
+ $this->assertNotTrue( $feature->query_uses_boolean_operators( 'museum *art' ) );
+ }
+
+}