diff --git a/README.md b/README.md
index ed3d7e0e..cb127ce4 100644
--- a/README.md
+++ b/README.md
@@ -25,40 +25,39 @@ Other installation options, examples, and helpful filters for customizing the AP
## Table of contents
- [Installation](#installation)
- - [Install on WordPress VIP](#install-on-wordpress-vip)
- - [Install via `git subtree`](#install-via-git-subtree)
- - [Install via ZIP file](#install-via-zip-file)
- - [Plugin activation](#plugin-activation)
+ - [Install on WordPress VIP](#install-on-wordpress-vip)
+ - [Install via ZIP file](#install-via-zip-file)
+ - [Plugin activation](#plugin-activation)
- [Usage](#usage)
- - [Versioning](#versioning)
+ - [Versioning](#versioning)
- [Block Data API examples](#block-data-api-examples)
- - [Example: Basic text blocks: `core/heading` and `core/paragraph`](#example-basic-text-blocks-coreheading-and-coreparagraph)
- - [Example: Text attributes in `core/pullquote`](#example-text-attributes-in-corepullquote)
- - [Example: Nested blocks in `core/media-text`](#example-nested-blocks-in-coremedia-text)
+ - [Example: Basic text blocks: `core/heading` and `core/paragraph`](#example-basic-text-blocks-coreheading-and-coreparagraph)
+ - [Example: Text attributes in `core/pullquote`](#example-text-attributes-in-corepullquote)
+ - [Example: Nested blocks in `core/media-text`](#example-nested-blocks-in-coremedia-text)
- [Preact example](#preact-example)
- [Limitations](#limitations)
- - [Client-side blocks](#client-side-blocks)
- - [Client-side example](#client-side-example)
- - [Registering client-side blocks](#registering-client-side-blocks)
- - [Rich text support](#rich-text-support)
- - [Deprecated blocks](#deprecated-blocks)
+ - [Client-side blocks](#client-side-blocks)
+ - [Client-side example](#client-side-example)
+ - [Registering client-side blocks](#registering-client-side-blocks)
+ - [Rich text support](#rich-text-support)
+ - [Deprecated blocks](#deprecated-blocks)
- [Rest API Query Parameters](#rest-api-query-parameters)
- - [Example Post](#example-post)
- - [`include`](#include)
- - [`exclude`](#exclude)
+ - [Example Post](#example-post)
+ - [`include`](#include)
+ - [`exclude`](#exclude)
- [Code Filters](#code-filters)
- - [`vip_block_data_api__rest_validate_post_id`](#vip_block_data_api__rest_validate_post_id)
- - [`vip_block_data_api__rest_permission_callback`](#vip_block_data_api__rest_permission_callback)
- - [`vip_block_data_api__allow_block`](#vip_block_data_api__allow_block)
- - [`vip_block_data_api__sourced_block_result`](#vip_block_data_api__sourced_block_result)
+ - [`vip_block_data_api__rest_validate_post_id`](#vip_block_data_api__rest_validate_post_id)
+ - [`vip_block_data_api__rest_permission_callback`](#vip_block_data_api__rest_permission_callback)
+ - [`vip_block_data_api__allow_block`](#vip_block_data_api__allow_block)
+ - [`vip_block_data_api__sourced_block_result`](#vip_block_data_api__sourced_block_result)
- [Analytics](#analytics)
- [Caching on WPVIP](#caching-on-wpvip)
- [Errors and Warnings](#errors-and-warnings)
- - [Error: `vip-block-data-api-no-blocks`](#error-vip-block-data-api-no-blocks)
- - [Error: `vip-block-data-api-parser-error`](#error-vip-block-data-api-parser-error)
- - [Warning: Unregistered block type](#warning-unregistered-block-type)
+ - [Error: `vip-block-data-api-no-blocks`](#error-vip-block-data-api-no-blocks)
+ - [Error: `vip-block-data-api-parser-error`](#error-vip-block-data-api-parser-error)
+ - [Warning: Unregistered block type](#warning-unregistered-block-type)
- [Development](#development)
- - [Tests](#tests)
+ - [Tests](#tests)
## Installation
@@ -82,39 +81,11 @@ We plan to utilize API versioning to make automatic updates safe for consumer co
To use the Block Data API after activation, skip to [Usage](#usage).
-### Install via `git subtree`
-
-We recommend this method for non-[WordPress VIP][wpvip] customers.
-
-The latest version of the VIP Block Data API plugin is available in the default `trunk` branch of this repository.
-
-We recommend installing the latest plugin version [via `git subtree`][wpvip-plugin-subtrees] within your site's repository:
-
-```bash
-# Enter your project's root directory:
-cd my-site-repo/
-
-# Add a subtree for the trunk branch:
-git subtree add --prefix plugins/vip-block-data-api git@github.com:Automattic/vip-block-data-api.git trunk --squash
-```
-
-To deploy the plugin to a remote branch, `git push` the committed subtree.
-
-The `trunk` branch will stay up to date with the latest version of the plugin. Use this command to pull the latest `trunk` branch changes:
-
-```bash
-git subtree pull --prefix plugins/vip-block-data-api git@github.com:Automattic/vip-block-data-api.git trunk --squash
-```
-
-Ensure that the plugin is up-to-date by pulling changes often.
-
-Note: We **do not recommend** using `git submodule`. [Submodules on WPVIP that require authentication][wpvip-plugin-submodules] will fail to deploy.
-
### Install via ZIP file
The latest version of the plugin can be downloaded from the [repository's Releases page][repo-releases]. Unzip the downloaded plugin and add it to the `plugins/` directory of your site's GitHub repository.
-### Plugin activation
+#### Plugin activation
Usually VIP recommends [activating plugins with code][wpvip-plugin-activate]. In this case, we are recommending activating the plugin in the WordPress Admin dashboard. This will allow the plugin to be more easily enabled and disabled during testing.
diff --git a/composer.json b/composer.json
index ed8a8f9d..62eeda39 100644
--- a/composer.json
+++ b/composer.json
@@ -14,27 +14,25 @@
]
},
"require": {
- "masterminds/html5": "^2.7",
+ "masterminds/html5": "^2.8",
"symfony/dom-crawler": "^5.4",
"symfony/css-selector": "^5.4"
},
"require-dev": {
"php": ">=7.4",
"phpunit/phpunit": "^9.5",
- "wp-phpunit/wp-phpunit": "^6.1",
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
+ "wp-phpunit/wp-phpunit": "^6.3",
"phpcompatibility/phpcompatibility-wp": "^2.1",
- "wp-coding-standards/wpcs": "^2.3",
- "automattic/vipwpcs": "^2.3",
- "yoast/phpunit-polyfills": "^1.0",
- "dms/phpunit-arraysubset-asserts": "^0.4.0"
+ "automattic/vipwpcs": "^3.0",
+ "yoast/phpunit-polyfills": "^2.0",
+ "dms/phpunit-arraysubset-asserts": "^0.5.0"
+
},
"config": {
- "platform": {
- "php": "7.4"
- },
"allow-plugins": {
- "dealerdirect/phpcodesniffer-composer-installer": true
- }
+ "dealerdirect/phpcodesniffer-composer-installer": true,
+ "mnsami/composer-custom-directory-installer": false
+ },
+ "sort-packages": true
}
-}
\ No newline at end of file
+}
diff --git a/composer.lock b/composer.lock
index 75eff2a5..fb0b25f2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,30 +4,28 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "8af40fa8b6b13d5cc1569ce72064d62f",
+ "content-hash": "43d42df92b5367ad610b09ebcfe8b948",
"packages": [
{
"name": "masterminds/html5",
- "version": "2.7.6",
+ "version": "2.8.1",
"source": {
"type": "git",
"url": "https://github.com/Masterminds/html5-php.git",
- "reference": "897eb517a343a2281f11bc5556d6548db7d93947"
+ "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/897eb517a343a2281f11bc5556d6548db7d93947",
- "reference": "897eb517a343a2281f11bc5556d6548db7d93947",
+ "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f47dcf3c70c584de14f21143c55d9939631bc6cf",
+ "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf",
"shasum": ""
},
"require": {
- "ext-ctype": "*",
"ext-dom": "*",
- "ext-libxml": "*",
"php": ">=5.3.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7"
+ "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8"
},
"type": "library",
"extra": {
@@ -71,22 +69,22 @@
],
"support": {
"issues": "https://github.com/Masterminds/html5-php/issues",
- "source": "https://github.com/Masterminds/html5-php/tree/2.7.6"
+ "source": "https://github.com/Masterminds/html5-php/tree/2.8.1"
},
- "time": "2022-08-18T16:18:26+00:00"
+ "time": "2023-05-10T11:58:31+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v5.4.21",
+ "version": "v5.4.26",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "95f3c7468db1da8cc360b24fa2a26e7cefcb355d"
+ "reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/95f3c7468db1da8cc360b24fa2a26e7cefcb355d",
- "reference": "95f3c7468db1da8cc360b24fa2a26e7cefcb355d",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a",
+ "reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a",
"shasum": ""
},
"require": {
@@ -123,7 +121,7 @@
"description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/css-selector/tree/v5.4.21"
+ "source": "https://github.com/symfony/css-selector/tree/v5.4.26"
},
"funding": [
{
@@ -139,7 +137,7 @@
"type": "tidelift"
}
],
- "time": "2023-02-14T08:03:56+00:00"
+ "time": "2023-07-07T06:10:25+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -210,16 +208,16 @@
},
{
"name": "symfony/dom-crawler",
- "version": "v5.4.22",
+ "version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "4c633facee8da59998e0c90e337a586cf07a21e7"
+ "reference": "d2aefa5a7acc5511422792931d14d1be96fe9fea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/4c633facee8da59998e0c90e337a586cf07a21e7",
- "reference": "4c633facee8da59998e0c90e337a586cf07a21e7",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/d2aefa5a7acc5511422792931d14d1be96fe9fea",
+ "reference": "d2aefa5a7acc5511422792931d14d1be96fe9fea",
"shasum": ""
},
"require": {
@@ -265,7 +263,7 @@
"description": "Eases DOM navigation for HTML and XML documents",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/dom-crawler/tree/v5.4.22"
+ "source": "https://github.com/symfony/dom-crawler/tree/v5.4.25"
},
"funding": [
{
@@ -281,20 +279,20 @@
"type": "tidelift"
}
],
- "time": "2023-03-06T21:29:33+00:00"
+ "time": "2023-06-05T08:05:41+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
+ "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
+ "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
"shasum": ""
},
"require": {
@@ -309,7 +307,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -347,7 +345,7 @@
"portable"
],
"support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0"
},
"funding": [
{
@@ -363,20 +361,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
+ "reference": "42292d99c55abe617799667f454222c54c60e229"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
+ "reference": "42292d99c55abe617799667f454222c54c60e229",
"shasum": ""
},
"require": {
@@ -391,7 +389,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -430,7 +428,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0"
},
"funding": [
{
@@ -446,20 +444,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-07-28T09:04:16+00:00"
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
"shasum": ""
},
"require": {
@@ -468,7 +466,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -513,7 +511,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0"
},
"funding": [
{
@@ -529,34 +527,35 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
}
],
"packages-dev": [
{
"name": "automattic/vipwpcs",
- "version": "2.3.3",
+ "version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/VIP-Coding-Standards.git",
- "reference": "6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b"
+ "reference": "1b8960ebff9ea3eb482258a906ece4d1ee1e25fd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b",
- "reference": "6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b",
+ "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/1b8960ebff9ea3eb482258a906ece4d1ee1e25fd",
+ "reference": "1b8960ebff9ea3eb482258a906ece4d1ee1e25fd",
"shasum": ""
},
"require": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7",
"php": ">=5.4",
- "sirbrillig/phpcs-variable-analysis": "^2.11.1",
- "squizlabs/php_codesniffer": "^3.5.5",
- "wp-coding-standards/wpcs": "^2.3"
+ "phpcsstandards/phpcsextra": "^1.1.0",
+ "phpcsstandards/phpcsutils": "^1.0.8",
+ "sirbrillig/phpcs-variable-analysis": "^2.11.17",
+ "squizlabs/php_codesniffer": "^3.7.2",
+ "wp-coding-standards/wpcs": "^3.0"
},
"require-dev": {
- "php-parallel-lint/php-console-highlighter": "^0.5",
- "php-parallel-lint/php-parallel-lint": "^1.0",
+ "php-parallel-lint/php-console-highlighter": "^1.0.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3.2",
"phpcompatibility/php-compatibility": "^9",
"phpcsstandards/phpcsdevtools": "^1.0",
"phpunit/phpunit": "^4 || ^5 || ^6 || ^7"
@@ -576,6 +575,7 @@
"keywords": [
"phpcs",
"standards",
+ "static analysis",
"wordpress"
],
"support": {
@@ -583,39 +583,42 @@
"source": "https://github.com/Automattic/VIP-Coding-Standards",
"wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki"
},
- "time": "2021-09-29T16:20:23+00:00"
+ "time": "2023-09-05T11:01:05+00:00"
},
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
- "version": "v0.7.2",
+ "version": "v1.0.0",
"source": {
"type": "git",
- "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
- "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db"
+ "url": "https://github.com/PHPCSStandards/composer-installer.git",
+ "reference": "4be43904336affa5c2f70744a348312336afd0da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db",
- "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db",
+ "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da",
+ "reference": "4be43904336affa5c2f70744a348312336afd0da",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0 || ^2.0",
- "php": ">=5.3",
+ "php": ">=5.4",
"squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0"
},
"require-dev": {
"composer/composer": "*",
+ "ext-json": "*",
+ "ext-zip": "*",
"php-parallel-lint/php-parallel-lint": "^1.3.1",
- "phpcompatibility/php-compatibility": "^9.0"
+ "phpcompatibility/php-compatibility": "^9.0",
+ "yoast/phpunit-polyfills": "^1.0"
},
"type": "composer-plugin",
"extra": {
- "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
+ "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
},
"autoload": {
"psr-4": {
- "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
+ "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -631,7 +634,7 @@
},
{
"name": "Contributors",
- "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors"
+ "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors"
}
],
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
@@ -655,32 +658,31 @@
"tests"
],
"support": {
- "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues",
- "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer"
+ "issues": "https://github.com/PHPCSStandards/composer-installer/issues",
+ "source": "https://github.com/PHPCSStandards/composer-installer"
},
- "time": "2022-02-04T12:51:07+00:00"
+ "time": "2023-01-05T11:28:13+00:00"
},
{
"name": "dms/phpunit-arraysubset-asserts",
- "version": "v0.4.0",
+ "version": "v0.5.0",
"source": {
"type": "git",
"url": "https://github.com/rdohms/phpunit-arraysubset-asserts.git",
- "reference": "428293c2a00eceefbad71a2dbdfb913febb35de2"
+ "reference": "aa6b9e858414e91cca361cac3b2035ee57d212e0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/rdohms/phpunit-arraysubset-asserts/zipball/428293c2a00eceefbad71a2dbdfb913febb35de2",
- "reference": "428293c2a00eceefbad71a2dbdfb913febb35de2",
+ "url": "https://api.github.com/repos/rdohms/phpunit-arraysubset-asserts/zipball/aa6b9e858414e91cca361cac3b2035ee57d212e0",
+ "reference": "aa6b9e858414e91cca361cac3b2035ee57d212e0",
"shasum": ""
},
"require": {
"php": "^5.4 || ^7.0 || ^8.0",
- "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
+ "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0"
},
"require-dev": {
- "dms/coding-standard": "^9",
- "squizlabs/php_codesniffer": "^3.4"
+ "dms/coding-standard": "^9"
},
"type": "library",
"autoload": {
@@ -701,9 +703,9 @@
"description": "This package provides ArraySubset and related asserts once deprecated in PHPUnit 8",
"support": {
"issues": "https://github.com/rdohms/phpunit-arraysubset-asserts/issues",
- "source": "https://github.com/rdohms/phpunit-arraysubset-asserts/tree/v0.4.0"
+ "source": "https://github.com/rdohms/phpunit-arraysubset-asserts/tree/v0.5.0"
},
- "time": "2022-02-13T15:00:28+00:00"
+ "time": "2023-06-02T17:33:53+00:00"
},
{
"name": "doctrine/instantiator",
@@ -836,16 +838,16 @@
},
{
"name": "nikic/php-parser",
- "version": "v4.15.4",
+ "version": "v4.17.1",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290"
+ "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
- "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
+ "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
"shasum": ""
},
"require": {
@@ -886,9 +888,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1"
},
- "time": "2023-03-05T19:49:14+00:00"
+ "time": "2023-08-13T19:53:39+00:00"
},
{
"name": "phar-io/manifest",
@@ -1175,18 +1177,154 @@
},
"time": "2022-10-24T09:00:36+00:00"
},
+ {
+ "name": "phpcsstandards/phpcsextra",
+ "version": "1.1.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPCSStandards/PHPCSExtra.git",
+ "reference": "746c3190ba8eb2f212087c947ba75f4f5b9a58d5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/746c3190ba8eb2f212087c947ba75f4f5b9a58d5",
+ "reference": "746c3190ba8eb2f212087c947ba75f4f5b9a58d5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4",
+ "phpcsstandards/phpcsutils": "^1.0.8",
+ "squizlabs/php_codesniffer": "^3.7.1"
+ },
+ "require-dev": {
+ "php-parallel-lint/php-console-highlighter": "^1.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3.2",
+ "phpcsstandards/phpcsdevcs": "^1.1.6",
+ "phpcsstandards/phpcsdevtools": "^1.2.1",
+ "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0"
+ },
+ "type": "phpcodesniffer-standard",
+ "extra": {
+ "branch-alias": {
+ "dev-stable": "1.x-dev",
+ "dev-develop": "1.x-dev"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "LGPL-3.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Juliette Reinders Folmer",
+ "homepage": "https://github.com/jrfnl",
+ "role": "lead"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors"
+ }
+ ],
+ "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.",
+ "keywords": [
+ "PHP_CodeSniffer",
+ "phpcbf",
+ "phpcodesniffer-standard",
+ "phpcs",
+ "standards",
+ "static analysis"
+ ],
+ "support": {
+ "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues",
+ "source": "https://github.com/PHPCSStandards/PHPCSExtra"
+ },
+ "time": "2023-09-20T22:06:18+00:00"
+ },
+ {
+ "name": "phpcsstandards/phpcsutils",
+ "version": "1.0.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPCSStandards/PHPCSUtils.git",
+ "reference": "69465cab9d12454e5e7767b9041af0cd8cd13be7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/69465cab9d12454e5e7767b9041af0cd8cd13be7",
+ "reference": "69465cab9d12454e5e7767b9041af0cd8cd13be7",
+ "shasum": ""
+ },
+ "require": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0",
+ "php": ">=5.4",
+ "squizlabs/php_codesniffer": "^3.7.1 || 4.0.x-dev@dev"
+ },
+ "require-dev": {
+ "ext-filter": "*",
+ "php-parallel-lint/php-console-highlighter": "^1.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3.2",
+ "phpcsstandards/phpcsdevcs": "^1.1.6",
+ "yoast/phpunit-polyfills": "^1.0.5 || ^2.0.0"
+ },
+ "type": "phpcodesniffer-standard",
+ "extra": {
+ "branch-alias": {
+ "dev-stable": "1.x-dev",
+ "dev-develop": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "PHPCSUtils/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "LGPL-3.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Juliette Reinders Folmer",
+ "homepage": "https://github.com/jrfnl",
+ "role": "lead"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors"
+ }
+ ],
+ "description": "A suite of utility functions for use with PHP_CodeSniffer",
+ "homepage": "https://phpcsutils.com/",
+ "keywords": [
+ "PHP_CodeSniffer",
+ "phpcbf",
+ "phpcodesniffer-standard",
+ "phpcs",
+ "phpcs3",
+ "standards",
+ "static analysis",
+ "tokens",
+ "utility"
+ ],
+ "support": {
+ "docs": "https://phpcsutils.com/",
+ "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues",
+ "source": "https://github.com/PHPCSStandards/PHPCSUtils"
+ },
+ "time": "2023-07-16T21:39:41+00:00"
+ },
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.26",
+ "version": "9.2.29",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1"
+ "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
- "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76",
+ "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76",
"shasum": ""
},
"require": {
@@ -1242,7 +1380,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26"
+ "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29"
},
"funding": [
{
@@ -1250,7 +1389,7 @@
"type": "github"
}
],
- "time": "2023-03-06T12:58:08+00:00"
+ "time": "2023-09-19T04:57:46+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -1495,16 +1634,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "9.6.7",
+ "version": "9.6.13",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2"
+ "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c993f0d3b0489ffc42ee2fe0bd645af1538a63b2",
- "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be",
+ "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be",
"shasum": ""
},
"require": {
@@ -1519,7 +1658,7 @@
"phar-io/manifest": "^2.0.3",
"phar-io/version": "^3.0.2",
"php": ">=7.3",
- "phpunit/php-code-coverage": "^9.2.13",
+ "phpunit/php-code-coverage": "^9.2.28",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-invoker": "^3.1.1",
"phpunit/php-text-template": "^2.0.3",
@@ -1578,7 +1717,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.7"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13"
},
"funding": [
{
@@ -1594,7 +1733,7 @@
"type": "tidelift"
}
],
- "time": "2023-04-14T08:58:40+00:00"
+ "time": "2023-09-19T05:39:22+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -1896,16 +2035,16 @@
},
{
"name": "sebastian/diff",
- "version": "4.0.4",
+ "version": "4.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
+ "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
- "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
+ "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
"shasum": ""
},
"require": {
@@ -1950,7 +2089,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
+ "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5"
},
"funding": [
{
@@ -1958,7 +2097,7 @@
"type": "github"
}
],
- "time": "2020-10-26T13:10:38+00:00"
+ "time": "2023-05-07T05:35:17+00:00"
},
{
"name": "sebastian/environment",
@@ -2102,16 +2241,16 @@
},
{
"name": "sebastian/global-state",
- "version": "5.0.5",
+ "version": "5.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
+ "reference": "bde739e7565280bda77be70044ac1047bc007e34"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
- "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34",
+ "reference": "bde739e7565280bda77be70044ac1047bc007e34",
"shasum": ""
},
"require": {
@@ -2154,7 +2293,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5"
+ "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6"
},
"funding": [
{
@@ -2162,7 +2301,7 @@
"type": "github"
}
],
- "time": "2022-02-14T08:28:10+00:00"
+ "time": "2023-08-02T09:26:13+00:00"
},
{
"name": "sebastian/lines-of-code",
@@ -2562,16 +2701,16 @@
},
{
"name": "sirbrillig/phpcs-variable-analysis",
- "version": "v2.11.16",
+ "version": "v2.11.17",
"source": {
"type": "git",
"url": "https://github.com/sirbrillig/phpcs-variable-analysis.git",
- "reference": "dc5582dc5a93a235557af73e523c389aac9a8e88"
+ "reference": "3b71162a6bf0cde2bff1752e40a1788d8273d049"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/dc5582dc5a93a235557af73e523c389aac9a8e88",
- "reference": "dc5582dc5a93a235557af73e523c389aac9a8e88",
+ "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/3b71162a6bf0cde2bff1752e40a1788d8273d049",
+ "reference": "3b71162a6bf0cde2bff1752e40a1788d8273d049",
"shasum": ""
},
"require": {
@@ -2616,7 +2755,7 @@
"source": "https://github.com/sirbrillig/phpcs-variable-analysis",
"wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki"
},
- "time": "2023-03-31T16:46:32+00:00"
+ "time": "2023-08-05T23:46:11+00:00"
},
{
"name": "squizlabs/php_codesniffer",
@@ -2727,30 +2866,38 @@
},
{
"name": "wp-coding-standards/wpcs",
- "version": "2.3.0",
+ "version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
- "reference": "7da1894633f168fe244afc6de00d141f27517b62"
+ "reference": "b4caf9689f1a0e4a4c632679a44e638c1c67aff1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62",
- "reference": "7da1894633f168fe244afc6de00d141f27517b62",
+ "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/b4caf9689f1a0e4a4c632679a44e638c1c67aff1",
+ "reference": "b4caf9689f1a0e4a4c632679a44e638c1c67aff1",
"shasum": ""
},
"require": {
+ "ext-filter": "*",
+ "ext-libxml": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlreader": "*",
"php": ">=5.4",
- "squizlabs/php_codesniffer": "^3.3.1"
+ "phpcsstandards/phpcsextra": "^1.1.0",
+ "phpcsstandards/phpcsutils": "^1.0.8",
+ "squizlabs/php_codesniffer": "^3.7.2"
},
"require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6",
+ "php-parallel-lint/php-console-highlighter": "^1.0.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3.2",
"phpcompatibility/php-compatibility": "^9.0",
- "phpcsstandards/phpcsdevtools": "^1.0",
+ "phpcsstandards/phpcsdevtools": "^1.2.0",
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"suggest": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
+ "ext-iconv": "For improved results",
+ "ext-mbstring": "For improved results"
},
"type": "phpcodesniffer-standard",
"notification-url": "https://packagist.org/downloads/",
@@ -2767,6 +2914,7 @@
"keywords": [
"phpcs",
"standards",
+ "static analysis",
"wordpress"
],
"support": {
@@ -2774,20 +2922,26 @@
"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"
+ "funding": [
+ {
+ "url": "https://opencollective.com/thewpcc/contribute/wp-php-63406",
+ "type": "custom"
+ }
+ ],
+ "time": "2023-09-14T07:06:09+00:00"
},
{
"name": "wp-phpunit/wp-phpunit",
- "version": "6.2.0",
+ "version": "6.3.1",
"source": {
"type": "git",
"url": "https://github.com/wp-phpunit/wp-phpunit.git",
- "reference": "3b7ab767dde017dec9327cc024e9f26fd776a57b"
+ "reference": "4797791a311c41d213027333e4fcc48073f77df0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/wp-phpunit/wp-phpunit/zipball/3b7ab767dde017dec9327cc024e9f26fd776a57b",
- "reference": "3b7ab767dde017dec9327cc024e9f26fd776a57b",
+ "url": "https://api.github.com/repos/wp-phpunit/wp-phpunit/zipball/4797791a311c41d213027333e4fcc48073f77df0",
+ "reference": "4797791a311c41d213027333e4fcc48073f77df0",
"shasum": ""
},
"type": "library",
@@ -2822,25 +2976,25 @@
"issues": "https://github.com/wp-phpunit/issues",
"source": "https://github.com/wp-phpunit/wp-phpunit"
},
- "time": "2023-03-30T01:15:51+00:00"
+ "time": "2023-08-09T01:26:57+00:00"
},
{
"name": "yoast/phpunit-polyfills",
- "version": "1.0.5",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/Yoast/PHPUnit-Polyfills.git",
- "reference": "3b59adeef77fb1c03ff5381dbb9d68b0aaff3171"
+ "reference": "c758753e8f9dac251fed396a73c8305af3f17922"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/3b59adeef77fb1c03ff5381dbb9d68b0aaff3171",
- "reference": "3b59adeef77fb1c03ff5381dbb9d68b0aaff3171",
+ "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/c758753e8f9dac251fed396a73c8305af3f17922",
+ "reference": "c758753e8f9dac251fed396a73c8305af3f17922",
"shasum": ""
},
"require": {
- "php": ">=5.4",
- "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
+ "php": ">=5.6",
+ "phpunit/phpunit": "^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0"
},
"require-dev": {
"yoast/yoastcs": "^2.3.0"
@@ -2882,7 +3036,7 @@
"issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues",
"source": "https://github.com/Yoast/PHPUnit-Polyfills"
},
- "time": "2023-03-30T23:39:05+00:00"
+ "time": "2023-06-06T20:28:24+00:00"
}
],
"aliases": [],
@@ -2894,8 +3048,5 @@
"platform-dev": {
"php": ">=7.4"
},
- "platform-overrides": {
- "php": "7.4"
- },
- "plugin-api-version": "2.2.0"
+ "plugin-api-version": "2.3.0"
}
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index 25e55c91..01119deb 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -1,47 +1,61 @@
Content
' ); - $exception_causing_parser_function = function( $sourced_block, $block_name, $post_id, $block ) { + $exception_causing_parser_function = function ( $sourced_block, $block_name, $post_id, $block ) { throw new Exception( 'Exception in parser' ); }; @@ -493,6 +493,7 @@ private function convert_next_error_to_exception() { set_error_handler( static function ( int $errno, string $errstr ): never { restore_error_handler(); + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- Not necessary just for tests. throw new \Exception( $errstr, $errno ); }, E_USER_WARNING diff --git a/vendor/autoload.php b/vendor/autoload.php index 4343180e..14c7b319 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -2,6 +2,24 @@ // autoload.php @generated by Composer +if (PHP_VERSION_ID < 50600) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, $err); + } elseif (!headers_sent()) { + echo $err; + } + } + trigger_error( + $err, + E_USER_ERROR + ); +} + require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInit5a91735b735b03b013d5e95913d80f8f::getLoader(); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index afef3fa2..7824d8f7 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -42,35 +42,37 @@ */ class ClassLoader { - /** @var ?string */ + /** @var \Closure(string):void */ + private static $includeFile; + + /** @var string|null */ private $vendorDir; // PSR-4 /** - * @var array[] - * @psalm-var array