From 5f66866fa822aa2e457cd9702d3095f2eb9315a4 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Tue, 8 Aug 2023 12:03:44 -0600 Subject: [PATCH 1/8] Prepare 1.4.2-dev --- README.md | 3 ++- package.json | 2 +- pantheon-advanced-page-cache.php | 2 +- readme.txt | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 432c8328..a1d5c855 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Tags:** pantheon, cdn, cache **Requires at least:** 4.7 **Tested up to:** 6.3 -**Stable tag:** 1.4.1 +**Stable tag:** 1.4.2-dev **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -320,6 +320,7 @@ Pantheon Advanced Page Cache integrates with WordPress plugins, including: See [CONTRIBUTING.md](https://github.com/pantheon-systems/pantheon-advanced-page-cache/blob/master/CONTRIBUTING.md) for information on contributing. ## Changelog ## +### 1.4.2-dev ### ### 1.4.1 ### * Send the REST API response header to the result and not the REST server [[#237](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/237)]. Props [@srtfisher](https://github.com/srtfisher) & [@felixarntz](https://github.com/felixarntz). diff --git a/package.json b/package.json index f77ab2b1..8fe09709 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pantheon-advanced-page-cache", - "version": "1.4.1", + "version": "1.4.2-dev", "main": "Gruntfile.js", "author": "Pantheon", "devDependencies": { diff --git a/pantheon-advanced-page-cache.php b/pantheon-advanced-page-cache.php index 3391396c..d72a93b8 100644 --- a/pantheon-advanced-page-cache.php +++ b/pantheon-advanced-page-cache.php @@ -7,7 +7,7 @@ * Author URI: https://pantheon.io * Text Domain: pantheon-advanced-page-cache * Domain Path: /languages - * Version: 1.4.1 + * Version: 1.4.2-dev * * @package Pantheon_Advanced_Page_Cache */ diff --git a/readme.txt b/readme.txt index a33e1aa7..cb9fbc24 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: getpantheon, danielbachhuber, kporras07, jspellman, jazzs3quence, Tags: pantheon, cdn, cache Requires at least: 4.7 Tested up to: 6.3 -Stable tag: 1.4.1 +Stable tag: 1.4.2-dev License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -313,6 +313,7 @@ Pantheon Advanced Page Cache integrates with WordPress plugins, including: See [CONTRIBUTING.md](https://github.com/pantheon-systems/wp-saml-auth/blob/master/CONTRIBUTING.md) for information on contributing. == Changelog == += 1.4.2-dev = = 1.4.1 = * Send the REST API response header to the result and not the REST server [[#237](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/237)]. Props [@srtfisher](https://github.com/srtfisher) & [@felixarntz](https://github.com/felixarntz). From 586a0c829fff1f1de43d10f65966913e1c403599 Mon Sep 17 00:00:00 2001 From: Phil Tyler Date: Mon, 14 Aug 2023 09:43:31 -0700 Subject: [PATCH 2/8] [CMSP-519] Update Behat tests to run against 6.3 (#248) --- .circleci/config.yml | 37 +----- .github/workflows/lint.yml | 22 +++- bin/behat-prepare.sh | 10 +- bin/validate-fixture-version.sh | 43 +++++++ composer.lock | 197 ++++++++++++++++---------------- 5 files changed, 168 insertions(+), 141 deletions(-) create mode 100755 bin/validate-fixture-version.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 747b25b4..2e1164c0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,29 +3,19 @@ workflows: version: 2 main: jobs: - - lint - - test-behat: - requires: - - lint + + - test-behat - test-phpunit: name: "Test with PHP 7.4" - requires: - - lint php_version: "7.4" - test-phpunit: name: "Test with PHP 8.0" - requires: - - lint php_version: "8.0" - test-phpunit: name: "Test with PHP 8.1" - requires: - - lint php_version: "8.1" - test-phpunit: name: "Test with PHP 8.2" - requires: - - lint php_version: "8.2" nightly: triggers: @@ -38,25 +28,8 @@ workflows: jobs: - test-behat jobs: - lint: - working_directory: ~/pantheon-systems/pantheon-advanced-page-cache - docker: - - image: quay.io/pantheon-public/build-tools-ci:8.x-php8.0 - steps: - - checkout - - restore_cache: - keys: - - test-lint-dependencies-{{ checksum "composer.json" }} - - run: composer install -n --prefer-dist - - save_cache: - key: test-lint-dependencies-{{ checksum "composer.json" }} - paths: - - vendor - - run: - name: "Run PHP Lint" - command: | - composer phpcs test-behat: + resource_class: small working_directory: ~/pantheon-systems/pantheon-advanced-page-cache parallelism: 1 docker: @@ -96,12 +69,14 @@ jobs: exit 0 fi terminus auth:login --machine-token=$TERMINUS_TOKEN + - run: ./bin/validate-fixture-version.sh - run: ./bin/behat-prepare.sh - run: ./bin/behat-test.sh --strict - run: command: ./bin/behat-cleanup.sh when: always test-phpunit: + resource_class: small parameters: php_version: type: enum @@ -113,7 +88,7 @@ jobs: working_directory: ~/pantheon-systems/pantheon-advanced-page-cache docker: - image: cimg/php:<< parameters.php_version >> - - image: circleci/mariadb:10.4 + - image: cimg/mariadb:10.4 environment: - WP_TESTS_DIR: "/tmp/wordpress-tests-lib" - WP_CORE_DIR: "/tmp/wordpress/" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 09538058..0cf30ba7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,4 +9,24 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - uses: pantheon-systems/validate-readme-spacing@v1 \ No newline at end of file + - uses: pantheon-systems/validate-readme-spacing@v1 + lint: + name: PHPCS Linting + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/vendor + key: test-lint-dependencies-{{ checksum "composer.json" }} + restore-keys: test-lint-dependencies-{{ checksum "composer.json" }} + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' + - name: Install dependencies + run: composer install -n --prefer-dist + - name: Run PHP Lint + run: composer phpcs \ No newline at end of file diff --git a/bin/behat-prepare.sh b/bin/behat-prepare.sh index c3b16d13..7365857c 100755 --- a/bin/behat-prepare.sh +++ b/bin/behat-prepare.sh @@ -53,12 +53,6 @@ cd $BASH_DIR/.. rsync -av --exclude='node_modules/' --exclude='vendor/' --exclude='tests/' ./* $PREPARE_DIR/wp-content/plugins/pantheon-advanced-page-cache rm -rf $PREPARE_DIR/wp-content/plugins/pantheon-advanced-page-cache/.git -# Download the latest Classic Editor release from WordPress.org -wget -O $PREPARE_DIR/classic-editor.zip https://downloads.wordpress.org/plugin/classic-editor.zip -unzip $PREPARE_DIR/classic-editor.zip -d $PREPARE_DIR -mv $PREPARE_DIR/classic-editor $PREPARE_DIR/wp-content/plugins/ -rm $PREPARE_DIR/classic-editor.zip - ### # Push files to the environment ### @@ -80,6 +74,6 @@ terminus build:workflow:wait $TERMINUS_SITE.$TERMINUS_ENV terminus wp $SITE_ENV -- core install --title=$TERMINUS_ENV-$TERMINUS_SITE --url=$PANTHEON_SITE_URL --admin_user=$WORDPRESS_ADMIN_USERNAME --admin_email=pantheon-advanced-page-cache@getpantheon.com --admin_password=$WORDPRESS_ADMIN_PASSWORD } &> /dev/null terminus wp $SITE_ENV -- cache flush -terminus wp $SITE_ENV -- plugin activate pantheon-advanced-page-cache classic-editor -terminus wp $SITE_ENV -- theme activate twentyseventeen +terminus wp $SITE_ENV -- plugin activate pantheon-advanced-page-cache +terminus wp $SITE_ENV -- theme activate twentytwentythree terminus wp $SITE_ENV -- rewrite structure '/%year%/%monthnum%/%day%/%postname%/' diff --git a/bin/validate-fixture-version.sh b/bin/validate-fixture-version.sh new file mode 100755 index 00000000..0b249fec --- /dev/null +++ b/bin/validate-fixture-version.sh @@ -0,0 +1,43 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +main(){ + export TERMINUS_HIDE_GIT_MODE_WARNING=1 + local DIRNAME=$(dirname "$0") + + if [ -z "${TERMINUS_SITE}" ]; then + echo "TERMINUS_SITE environment variable must be set" + exit 1 + fi + + if ! terminus whoami > /dev/null; then + if [ -z "${TERMINUS_TOKEN}" ]; then + echo "TERMINUS_TOKEN environment variable must be set or terminus already logged in." + exit 1 + fi + terminus auth:login --machine-token="${TERMINUS_TOKEN}" + fi + + # Use find to locate the file with a case-insensitive search + README_FILE_PATH=$(find ${DIRNAME}/.. -iname "readme.txt" -print -quit) + if [[ -z "$README_FILE_PATH" ]]; then + echo "readme.txt not found." + exit 1 + fi + + local TESTED_UP_TO + TESTED_UP_TO=$(grep -i "Tested up to:" "${README_FILE_PATH}" | tr -d '\r\n' | awk -F ': ' '{ print $2 }') + echo "Tested Up To: ${TESTED_UP_TO}" + local FIXTURE_VERSION + FIXTURE_VERSION=$(terminus wp "${TERMINUS_SITE}.dev" -- core version) + echo "Fixture Version: ${FIXTURE_VERSION}" + + if ! php -r "exit(version_compare('${TESTED_UP_TO}', '${FIXTURE_VERSION}'));"; then + echo "${FIXTURE_VERSION} is less than ${TESTED_UP_TO}" + echo "Please update ${TERMINUS_SITE} to at least WordPress ${TESTED_UP_TO}" + exit 1 + fi +} + +main diff --git a/composer.lock b/composer.lock index 5918718a..b3d76c83 100644 --- a/composer.lock +++ b/composer.lock @@ -455,6 +455,7 @@ "issues": "https://github.com/minkphp/MinkGoutteDriver/issues", "source": "https://github.com/minkphp/MinkGoutteDriver/tree/v1.3.0" }, + "abandoned": "behat/mink-browserkit-driver", "time": "2021-10-12T11:35:46+00:00" }, { @@ -884,16 +885,16 @@ }, { "name": "guzzlehttp/promises", - "version": "1.5.2", + "version": "1.5.3", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "b94b2807d85443f9719887892882d0329d1e2598" + "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", - "reference": "b94b2807d85443f9719887892882d0329d1e2598", + "url": "https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e", + "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e", "shasum": "" }, "require": { @@ -903,11 +904,6 @@ "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } - }, "autoload": { "files": [ "src/functions_include.php" @@ -948,7 +944,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.2" + "source": "https://github.com/guzzle/promises/tree/1.5.3" }, "funding": [ { @@ -964,7 +960,7 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:55:35+00:00" + "time": "2023-05-21T12:31:43+00:00" }, { "name": "guzzlehttp/psr7", @@ -1132,16 +1128,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.5", + "version": "v4.16.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", "shasum": "" }, "require": { @@ -1182,22 +1178,22 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" }, - "time": "2023-05-19T20:20:00+00:00" + "time": "2023-06-25T14:52:30+00:00" }, { "name": "pantheon-systems/pantheon-wordpress-upstream-tests", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/pantheon-systems/pantheon-wordpress-upstream-tests.git", - "reference": "1a0d50c12413b3643a24b578a23b819f11e35ebf" + "url": "git@github.com:pantheon-systems/pantheon-wordpress-upstream-tests.git", + "reference": "004fc97a604950aef4f62773417691d23b3d75b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pantheon-systems/pantheon-wordpress-upstream-tests/zipball/1a0d50c12413b3643a24b578a23b819f11e35ebf", - "reference": "1a0d50c12413b3643a24b578a23b819f11e35ebf", + "url": "https://api.github.com/repos/pantheon-systems/pantheon-wordpress-upstream-tests/zipball/004fc97a604950aef4f62773417691d23b3d75b0", + "reference": "004fc97a604950aef4f62773417691d23b3d75b0", "shasum": "" }, "require": { @@ -1219,11 +1215,7 @@ "email": "noreply@pantheon.io" } ], - "support": { - "issues": "https://github.com/pantheon-systems/pantheon-wordpress-upstream-tests/issues", - "source": "https://github.com/pantheon-systems/pantheon-wordpress-upstream-tests/tree/master" - }, - "time": "2020-04-17T11:46:11+00:00" + "time": "2023-08-11T17:05:44+00:00" }, { "name": "pantheon-systems/pantheon-wp-coding-standards", @@ -1554,22 +1546,24 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.20.4", + "version": "1.23.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd" + "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd", - "reference": "7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/846ae76eef31c6d7790fac9bc399ecee45160b26", + "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.5", @@ -1593,22 +1587,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.20.4" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.1" }, - "time": "2023-05-02T09:19:37+00:00" + "time": "2023-08-03T16:32:59+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.26", + "version": "9.2.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" }, "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/b0a88255cb70d52653d80c890bd7f38740ea50d1", + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", "shasum": "" }, "require": { @@ -1664,7 +1658,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.27" }, "funding": [ { @@ -1672,7 +1667,7 @@ "type": "github" } ], - "time": "2023-03-06T12:58:08+00:00" + "time": "2023-07-26T13:44:30+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1917,16 +1912,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.9", + "version": "9.6.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a9aceaf20a682aeacf28d582654a1670d8826778" + "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a9aceaf20a682aeacf28d582654a1670d8826778", - "reference": "a9aceaf20a682aeacf28d582654a1670d8826778", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328", + "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328", "shasum": "" }, "require": { @@ -2000,7 +1995,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.9" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.10" }, "funding": [ { @@ -2016,7 +2011,7 @@ "type": "tidelift" } ], - "time": "2023-06-11T06:13:56+00:00" + "time": "2023-07-10T04:04:23+00:00" }, { "name": "psr/container", @@ -2719,16 +2714,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": { @@ -2771,7 +2766,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": [ { @@ -2779,7 +2774,7 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-08-02T09:26:13+00:00" }, { "name": "sebastian/lines-of-code", @@ -3179,16 +3174,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": { @@ -3233,36 +3228,36 @@ "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": "slevomat/coding-standard", - "version": "8.11.1", + "version": "8.13.4", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "af87461316b257e46e15bb041dca6fca3796d822" + "reference": "4b2af2fb17773656d02fbfb5d18024ebd19fe322" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/af87461316b257e46e15bb041dca6fca3796d822", - "reference": "af87461316b257e46e15bb041dca6fca3796d822", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/4b2af2fb17773656d02fbfb5d18024ebd19fe322", + "reference": "4b2af2fb17773656d02fbfb5d18024ebd19fe322", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": ">=1.20.0 <1.21.0", + "phpstan/phpdoc-parser": "^1.23.0", "squizlabs/php_codesniffer": "^3.7.1" }, "require-dev": { "phing/phing": "2.17.4", "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.10.14", + "phpstan/phpstan": "1.10.26", "phpstan/phpstan-deprecation-rules": "1.1.3", - "phpstan/phpstan-phpunit": "1.3.11", + "phpstan/phpstan-phpunit": "1.3.13", "phpstan/phpstan-strict-rules": "1.5.1", - "phpunit/phpunit": "7.5.20|8.5.21|9.6.6|10.1.1" + "phpunit/phpunit": "7.5.20|8.5.21|9.6.8|10.2.6" }, "type": "phpcodesniffer-standard", "extra": { @@ -3286,7 +3281,7 @@ ], "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.11.1" + "source": "https://github.com/slevomat/coding-standard/tree/8.13.4" }, "funding": [ { @@ -3298,7 +3293,7 @@ "type": "tidelift" } ], - "time": "2023-04-24T08:19:01+00:00" + "time": "2023-07-25T10:28:55+00:00" }, { "name": "spryker/code-sniffer", @@ -3567,16 +3562,16 @@ }, { "name": "symfony/console", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3cd51fd2e6c461ca678f84d419461281bd87a0a8" + "reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3cd51fd2e6c461ca678f84d419461281bd87a0a8", - "reference": "3cd51fd2e6c461ca678f84d419461281bd87a0a8", + "url": "https://api.github.com/repos/symfony/console/zipball/b504a3d266ad2bb632f196c0936ef2af5ff6e273", + "reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273", "shasum": "" }, "require": { @@ -3646,7 +3641,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.22" + "source": "https://github.com/symfony/console/tree/v5.4.26" }, "funding": [ { @@ -3662,20 +3657,20 @@ "type": "tidelift" } ], - "time": "2023-03-25T09:27:28+00:00" + "time": "2023-07-19T20:11:33+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": { @@ -3712,7 +3707,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": [ { @@ -3728,7 +3723,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-07-07T06:10:25+00:00" }, { "name": "symfony/dependency-injection", @@ -3959,16 +3954,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f" + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1df20e45d56da29a4b1d8259dd6e950acbf1b13f", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac", "shasum": "" }, "require": { @@ -4024,7 +4019,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.22" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26" }, "funding": [ { @@ -4040,7 +4035,7 @@ "type": "tidelift" } ], - "time": "2023-03-17T11:31:58+00:00" + "time": "2023-07-06T06:34:20+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -4123,16 +4118,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.21", + "version": "v5.4.25", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f" + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/e75960b1bbfd2b8c9e483e0d74811d555ca3de9f", - "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", "shasum": "" }, "require": { @@ -4167,7 +4162,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.21" + "source": "https://github.com/symfony/filesystem/tree/v5.4.25" }, "funding": [ { @@ -4183,7 +4178,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-05-31T13:04:02+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5004,16 +4999,16 @@ }, { "name": "symfony/string", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62" + "reference": "1181fe9270e373537475e826873b5867b863883c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", + "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c", + "reference": "1181fe9270e373537475e826873b5867b863883c", "shasum": "" }, "require": { @@ -5070,7 +5065,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.22" + "source": "https://github.com/symfony/string/tree/v5.4.26" }, "funding": [ { @@ -5086,7 +5081,7 @@ "type": "tidelift" } ], - "time": "2023-03-14T06:11:53+00:00" + "time": "2023-06-28T12:46:07+00:00" }, { "name": "symfony/translation", @@ -5257,16 +5252,16 @@ }, { "name": "symfony/yaml", - "version": "v5.4.21", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "3713e20d93e46e681e51605d213027e48dab3469" + "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/3713e20d93e46e681e51605d213027e48dab3469", - "reference": "3713e20d93e46e681e51605d213027e48dab3469", + "url": "https://api.github.com/repos/symfony/yaml/zipball/4cd2e3ea301aadd76a4172756296fe552fb45b0b", + "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b", "shasum": "" }, "require": { @@ -5312,7 +5307,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.21" + "source": "https://github.com/symfony/yaml/tree/v5.4.23" }, "funding": [ { @@ -5328,7 +5323,7 @@ "type": "tidelift" } ], - "time": "2023-02-21T19:46:44+00:00" + "time": "2023-04-23T19:33:36+00:00" }, { "name": "theseer/tokenizer", From e6f98ac49c8b4de1da015670dade540415ca18f3 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Tue, 12 Sep 2023 15:18:32 -0600 Subject: [PATCH 3/8] [CMSP-663] Update linting for updated Pantheon WP Coding Standards (#249) * don't hard-code the standard use the included phpcs.xml.dist file * linting fixes * use Pantheon-WP instead of WP core and WP docs Pantheon-WP includes these * ignore unused parameter in class emitter this is used for rest-related stuff and those unused parameters might actually be needed * bump pantheon wp coding standards to 2.0 * update changelog --- README.md | 1 + composer.json | 6 +- composer.lock | 504 ++++++++++++++++++++----------- inc/class-cli.php | 1 - inc/class-emitter.php | 2 +- inc/class-purger.php | 1 - pantheon-advanced-page-cache.php | 2 +- phpcs.xml.dist | 7 +- readme.txt | 1 + 9 files changed, 336 insertions(+), 189 deletions(-) diff --git a/README.md b/README.md index a1d5c855..d2bc0c77 100644 --- a/README.md +++ b/README.md @@ -321,6 +321,7 @@ See [CONTRIBUTING.md](https://github.com/pantheon-systems/pantheon-advanced-page ## Changelog ## ### 1.4.2-dev ### +* Updates Pantheon WP Coding Standards to 2.0 [[#249](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/249)] ### 1.4.1 ### * Send the REST API response header to the result and not the REST server [[#237](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/237)]. Props [@srtfisher](https://github.com/srtfisher) & [@felixarntz](https://github.com/felixarntz). diff --git a/composer.json b/composer.json index 1f5b0e0f..91da71e9 100644 --- a/composer.json +++ b/composer.json @@ -15,12 +15,12 @@ "phpunit/phpunit": "^9", "phpcompatibility/php-compatibility": "^9.3", "yoast/phpunit-polyfills": "^2.0", - "pantheon-systems/pantheon-wp-coding-standards": "^1.0" + "pantheon-systems/pantheon-wp-coding-standards": "^2.0" }, "scripts": { "lint": "@phpcs", - "phpcs": "vendor/bin/phpcs --ignore=tests/* -s --standard=Pantheon-WP .", - "phpcbf": "vendor/bin/phpcbf --ignore=tests/* --standard=Pantheon-WP .", + "phpcs": "vendor/bin/phpcs --ignore=tests/* -s .", + "phpcbf": "vendor/bin/phpcbf --ignore=tests/* .", "phpunit": "vendor/bin/phpunit", "test": "@phpunit" }, diff --git a/composer.lock b/composer.lock index b3d76c83..a150516b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,33 +4,34 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "13106d9eebf9b6528bc88bece74aa7d2", + "content-hash": "98c30648786e5a12e8bacd9518e56594", "packages": [], "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" @@ -50,6 +51,7 @@ "keywords": [ "phpcs", "standards", + "static analysis", "wordpress" ], "support": { @@ -57,7 +59,7 @@ "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": "behat/behat", @@ -509,35 +511,38 @@ }, { "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/", @@ -553,7 +558,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", @@ -577,10 +582,10 @@ "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": "doctrine/instantiator", @@ -1128,16 +1133,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.16.0", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -1178,9 +1183,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-06-25T14:52:30+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "pantheon-systems/pantheon-wordpress-upstream-tests", @@ -1219,23 +1224,23 @@ }, { "name": "pantheon-systems/pantheon-wp-coding-standards", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/pantheon-systems/Pantheon-WP-Coding-Standards.git", - "reference": "1e8fb654d52b9274f548c46f89d98f4913307fdf" + "url": "git@github.com:pantheon-systems/Pantheon-WP-Coding-Standards.git", + "reference": "7262d7b3b489a3605a22db42d74962d81f1f08c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pantheon-systems/Pantheon-WP-Coding-Standards/zipball/1e8fb654d52b9274f548c46f89d98f4913307fdf", - "reference": "1e8fb654d52b9274f548c46f89d98f4913307fdf", + "url": "https://api.github.com/repos/pantheon-systems/Pantheon-WP-Coding-Standards/zipball/7262d7b3b489a3605a22db42d74962d81f1f08c8", + "reference": "7262d7b3b489a3605a22db42d74962d81f1f08c8", "shasum": "" }, "require": { - "automattic/vipwpcs": "^2.3", + "automattic/vipwpcs": "^3.0", "fig-r/psr2r-sniffer": "^1.5", "phpcompatibility/phpcompatibility-wp": "^2.1", - "wp-coding-standards/wpcs": "^2.3" + "wp-coding-standards/wpcs": "^3.0" }, "require-dev": { "phpunit/phpunit": "9.6.x-dev", @@ -1253,11 +1258,7 @@ } ], "description": "PHPCS Rulesets for WordPress projects on Pantheon.", - "support": { - "issues": "https://github.com/pantheon-systems/Pantheon-WP-Coding-Standards/issues", - "source": "https://github.com/pantheon-systems/Pantheon-WP-Coding-Standards/tree/1.0.1" - }, - "time": "2023-04-14T16:54:02+00:00" + "time": "2023-09-12T17:25:08+00:00" }, { "name": "phar-io/manifest", @@ -1544,18 +1545,154 @@ }, "time": "2022-10-24T09:00:36+00:00" }, + { + "name": "phpcsstandards/phpcsextra", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", + "reference": "98bcdbacbda14b1db85f710b1853125726795bbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/98bcdbacbda14b1db85f710b1853125726795bbc", + "reference": "98bcdbacbda14b1db85f710b1853125726795bbc", + "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-08-26T04:46:45+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": "phpstan/phpdoc-parser", - "version": "1.23.1", + "version": "1.24.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26" + "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/846ae76eef31c6d7790fac9bc399ecee45160b26", - "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/3510b0a6274cc42f7219367cb3abfc123ffa09d6", + "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6", "shasum": "" }, "require": { @@ -1587,22 +1724,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.0" }, - "time": "2023-08-03T16:32:59+00:00" + "time": "2023-09-07T20:46:32+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.27", + "version": "9.2.28", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" + "reference": "7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1", - "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef", + "reference": "7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef", "shasum": "" }, "require": { @@ -1659,7 +1796,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.28" }, "funding": [ { @@ -1667,7 +1804,7 @@ "type": "github" } ], - "time": "2023-07-26T13:44:30+00:00" + "time": "2023-09-12T14:36:20+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1912,16 +2049,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.10", + "version": "9.6.12", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328" + "reference": "a122c2ebd469b751d774aa0f613dc0d67697653f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328", - "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a122c2ebd469b751d774aa0f613dc0d67697653f", + "reference": "a122c2ebd469b751d774aa0f613dc0d67697653f", "shasum": "" }, "require": { @@ -1936,7 +2073,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", @@ -1995,7 +2132,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.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.12" }, "funding": [ { @@ -2011,7 +2148,7 @@ "type": "tidelift" } ], - "time": "2023-07-10T04:04:23+00:00" + "time": "2023-09-12T14:39:31+00:00" }, { "name": "psr/container", @@ -3562,16 +3699,16 @@ }, { "name": "symfony/console", - "version": "v5.4.26", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273" + "reference": "f4f71842f24c2023b91237c72a365306f3c58827" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/b504a3d266ad2bb632f196c0936ef2af5ff6e273", - "reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273", + "url": "https://api.github.com/repos/symfony/console/zipball/f4f71842f24c2023b91237c72a365306f3c58827", + "reference": "f4f71842f24c2023b91237c72a365306f3c58827", "shasum": "" }, "require": { @@ -3641,7 +3778,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.26" + "source": "https://github.com/symfony/console/tree/v5.4.28" }, "funding": [ { @@ -3657,7 +3794,7 @@ "type": "tidelift" } ], - "time": "2023-07-19T20:11:33+00:00" + "time": "2023-08-07T06:12:30+00:00" }, { "name": "symfony/css-selector", @@ -3813,25 +3950,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3860,7 +3997,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" }, "funding": [ { @@ -3876,7 +4013,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/dom-crawler", @@ -4039,20 +4176,20 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "psr/event-dispatcher": "^1" }, "suggest": { @@ -4061,7 +4198,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -4098,7 +4235,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" }, "funding": [ { @@ -4114,7 +4251,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/filesystem", @@ -4182,16 +4319,16 @@ }, { "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": { @@ -4206,7 +4343,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4244,7 +4381,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": [ { @@ -4260,20 +4397,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { @@ -4285,7 +4422,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4325,7 +4462,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -4341,20 +4478,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da" + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", "shasum": "" }, "require": { @@ -4368,7 +4505,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4412,7 +4549,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" }, "funding": [ { @@ -4428,20 +4565,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:30:37+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -4453,7 +4590,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4496,7 +4633,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -4512,20 +4649,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": { @@ -4540,7 +4677,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4579,7 +4716,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": [ { @@ -4595,20 +4732,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", "shasum": "" }, "require": { @@ -4617,7 +4754,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4655,7 +4792,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" }, "funding": [ { @@ -4671,20 +4808,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", "shasum": "" }, "require": { @@ -4693,7 +4830,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4734,7 +4871,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" }, "funding": [ { @@ -4750,20 +4887,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+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": { @@ -4772,7 +4909,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4817,7 +4954,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": [ { @@ -4833,20 +4970,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", "shasum": "" }, "require": { @@ -4855,7 +4992,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4896,7 +5033,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -4912,7 +5049,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/service-contracts", @@ -4999,34 +5136,33 @@ }, { "name": "symfony/string", - "version": "v5.4.26", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "1181fe9270e373537475e826873b5867b863883c" + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c", - "reference": "1181fe9270e373537475e826873b5867b863883c", + "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -5065,7 +5201,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.26" + "source": "https://github.com/symfony/string/tree/v6.0.19" }, "funding": [ { @@ -5081,7 +5217,7 @@ "type": "tidelift" } ], - "time": "2023-06-28T12:46:07+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/translation", @@ -5252,28 +5388,27 @@ }, { "name": "symfony/yaml", - "version": "v5.4.23", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b" + "reference": "deec3a812a0305a50db8ae689b183f43d915c884" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/4cd2e3ea301aadd76a4172756296fe552fb45b0b", - "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b", + "url": "https://api.github.com/repos/symfony/yaml/zipball/deec3a812a0305a50db8ae689b183f43d915c884", + "reference": "deec3a812a0305a50db8ae689b183f43d915c884", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.0.2", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<5.3" + "symfony/console": "<5.4" }, "require-dev": { - "symfony/console": "^5.3|^6.0" + "symfony/console": "^5.4|^6.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -5307,7 +5442,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.23" + "source": "https://github.com/symfony/yaml/tree/v6.0.19" }, "funding": [ { @@ -5323,7 +5458,7 @@ "type": "tidelift" } ], - "time": "2023-04-23T19:33:36+00:00" + "time": "2023-01-11T11:50:03+00:00" }, { "name": "theseer/tokenizer", @@ -5377,30 +5512,38 @@ }, { "name": "wp-coding-standards/wpcs", - "version": "2.3.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "7da1894633f168fe244afc6de00d141f27517b62" + "reference": "bb792cb331472b82c5d7f28fb9b8ec2d20f68826" }, "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/bb792cb331472b82c5d7f28fb9b8ec2d20f68826", + "reference": "bb792cb331472b82c5d7f28fb9b8ec2d20f68826", "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/", @@ -5417,6 +5560,7 @@ "keywords": [ "phpcs", "standards", + "static analysis", "wordpress" ], "support": { @@ -5424,7 +5568,7 @@ "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" + "time": "2023-08-21T14:28:38+00:00" }, { "name": "yoast/phpunit-polyfills", diff --git a/inc/class-cli.php b/inc/class-cli.php index 8c3433d8..64c49e07 100644 --- a/inc/class-cli.php +++ b/inc/class-cli.php @@ -101,5 +101,4 @@ public function purge_all( $_, $assoc_args ) { WP_CLI::success( 'Purged page cache.' ); } } - } diff --git a/inc/class-emitter.php b/inc/class-emitter.php index 64fdc69d..8d237b4d 100644 --- a/inc/class-emitter.php +++ b/inc/class-emitter.php @@ -368,7 +368,7 @@ public static function filter_huge_surrogate_keys_list( $keys ) { // Sort by the output length of the key category. uasort( $keycats, - function( $a, $b ) { + function ( $a, $b ) { $ca = strlen( implode( ' ', $a ) ); $cb = strlen( implode( ' ', $b ) ); if ( $ca === $cb ) { diff --git a/inc/class-purger.php b/inc/class-purger.php index 36838ef1..994d3a8c 100644 --- a/inc/class-purger.php +++ b/inc/class-purger.php @@ -355,5 +355,4 @@ public static function action_updated_option( $option ) { $keys = apply_filters( 'pantheon_purge_updated_option', $keys, $option ); pantheon_wp_clear_edge_keys( $keys ); } - } diff --git a/pantheon-advanced-page-cache.php b/pantheon-advanced-page-cache.php index d72a93b8..fe4908b5 100644 --- a/pantheon-advanced-page-cache.php +++ b/pantheon-advanced-page-cache.php @@ -104,7 +104,7 @@ function pantheon_wp_prefix_surrogate_keys_with_blog_id( $keys ) { * Registers the class autoloader. */ spl_autoload_register( - function( $class_autoloader ) { + function ( $class_autoloader ) { $class_autoloader = ltrim( $class_autoloader, '\\' ); if ( 0 !== stripos( $class_autoloader, 'Pantheon_Advanced_Page_Cache\\' ) ) { return; diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 8d88c05c..d1aa2419 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -9,9 +9,8 @@ - - + @@ -27,4 +26,8 @@ */inc/class-cli.php + + + */inc/class-emitter.php + diff --git a/readme.txt b/readme.txt index cb9fbc24..d2c62101 100644 --- a/readme.txt +++ b/readme.txt @@ -314,6 +314,7 @@ See [CONTRIBUTING.md](https://github.com/pantheon-systems/wp-saml-auth/blob/mast == Changelog == = 1.4.2-dev = +* Updates Pantheon WP Coding Standards to 2.0 [[#249](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/249)] = 1.4.1 = * Send the REST API response header to the result and not the REST server [[#237](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/237)]. Props [@srtfisher](https://github.com/srtfisher) & [@felixarntz](https://github.com/felixarntz). From 5bbefa9eb11960deed0b674a7c5644a7540b8ed4 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Tue, 10 Oct 2023 12:24:11 -0600 Subject: [PATCH 4/8] [CMSP-675] PHP 8.3 compatibility checks (#251) * add new scripts for unit tests * remove extra comma * rename lint.yml to lint-test.yml and move the unit tests into gh actions * remove circle-based unit tests moved to gha * add wporg plugin validation --- .circleci/config.yml | 55 -------------------- .github/workflows/lint-test.yml | 89 +++++++++++++++++++++++++++++++++ .github/workflows/lint.yml | 32 ------------ bin/install-local-tests.sh | 61 ++++++++++++++++++++++ bin/phpunit-test.sh | 18 +++++++ composer.json | 12 +++-- 6 files changed, 177 insertions(+), 90 deletions(-) create mode 100644 .github/workflows/lint-test.yml delete mode 100644 .github/workflows/lint.yml create mode 100755 bin/install-local-tests.sh create mode 100755 bin/phpunit-test.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 2e1164c0..62245c20 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,20 +3,7 @@ workflows: version: 2 main: jobs: - - test-behat - - test-phpunit: - name: "Test with PHP 7.4" - php_version: "7.4" - - test-phpunit: - name: "Test with PHP 8.0" - php_version: "8.0" - - test-phpunit: - name: "Test with PHP 8.1" - php_version: "8.1" - - test-phpunit: - name: "Test with PHP 8.2" - php_version: "8.2" nightly: triggers: - schedule: @@ -75,45 +62,3 @@ jobs: - run: command: ./bin/behat-cleanup.sh when: always - test-phpunit: - resource_class: small - parameters: - php_version: - type: enum - enum: - - "7.4" - - "8.2" - - "8.1" - - "8.0" - working_directory: ~/pantheon-systems/pantheon-advanced-page-cache - docker: - - image: cimg/php:<< parameters.php_version >> - - image: cimg/mariadb:10.4 - environment: - - WP_TESTS_DIR: "/tmp/wordpress-tests-lib" - - WP_CORE_DIR: "/tmp/wordpress/" - steps: - - checkout - - restore_cache: - keys: - - test-phpunit-dependencies-{{ checksum "composer.json" }} - - run: composer install -n --prefer-dist --ignore-platform-reqs - - save_cache: - key: test-phpunit-dependencies-{{ checksum "composer.json" }} - paths: - - vendor - - run: - name: "Install Extras" - command: | - sudo apt-get update - sudo apt-get install subversion - sudo apt-get install mariadb-client - - run: - name: "Run Tests" - command: | - bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest - composer phpunit - WP_MULTISITE=1 composer phpunit - rm -rf $WP_TESTS_DIR $WP_CORE_DIR - bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true - composer phpunit diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml new file mode 100644 index 00000000..8c676de0 --- /dev/null +++ b/.github/workflows/lint-test.yml @@ -0,0 +1,89 @@ +name: Lint and Test + +on: + schedule: + - cron: '0 0 * * *' + pull_request: + branches: + - '**' + +jobs: + validate-readme-spacing: + name: Validate README Spacing + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - uses: pantheon-systems/validate-readme-spacing@v1 + lint: + name: PHPCS Linting + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/vendor + key: test-lint-dependencies-{{ checksum "composer.json" }} + restore-keys: test-lint-dependencies-{{ checksum "composer.json" }} + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + - name: Install dependencies + run: composer install -n --prefer-dist + - name: Run PHPCS + run: composer lint + php8-compatibility: + name: PHP 8.x Compatibility + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - uses: pantheon-systems/phpcompatibility-action@dev + with: + paths: ${{ github.workspace }}/*.php ${{ github.workspace }}/inc/*.php + test-versions: 8.0- + wporg-validation: + name: WP.org Plugin Validation + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - uses: pantheon-systems/action-wporg-validator@1.0.0 + with: + type: 'plugin' + test: + needs: lint + name: Test + runs-on: ubuntu-latest + services: + mariadb: + image: mariadb:10.5 + strategy: + matrix: + php_version: [7.4, 8.3] + steps: + - uses: actions/checkout@v3 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php_version }} + extensions: mysqli, zip, imagick + - name: Start MySQL Service + run: sudo systemctl start mysql + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/vendor + key: test-dependencies-{{ checksum "composer.json" }} + restore-keys: test-dependencies-{{ checksum "composer.json" }} + - name: Install dependencies + run: | + if [ ${{ matrix.php_version }} = "7.4" ]; then + composer update + fi + composer install + - name: Run PHPUnit + run: bash ./bin/phpunit-test.sh diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 0cf30ba7..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Lint and Test - -on: push - -jobs: - validate-readme-spacing: - name: Validate README Spacing - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - uses: pantheon-systems/validate-readme-spacing@v1 - lint: - name: PHPCS Linting - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ~/vendor - key: test-lint-dependencies-{{ checksum "composer.json" }} - restore-keys: test-lint-dependencies-{{ checksum "composer.json" }} - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' - - name: Install dependencies - run: composer install -n --prefer-dist - - name: Run PHP Lint - run: composer phpcs \ No newline at end of file diff --git a/bin/install-local-tests.sh b/bin/install-local-tests.sh new file mode 100755 index 00000000..c1f8cc50 --- /dev/null +++ b/bin/install-local-tests.sh @@ -0,0 +1,61 @@ +#!/bin/bash +set -e + +# Initialize variables with default values +TMPDIR="/tmp" +DB_NAME="wordpress_test" +DB_USER="root" +DB_PASS="" +DB_HOST="127.0.0.1" +WP_VERSION="latest" +SKIP_DB="" + +# Display usage information +usage() { + echo "Usage:" + echo "./install-local-tests.sh [--dbname=wordpress_test] [--dbuser=root] [--dbpass=''] [--dbhost=127.0.0.1] [--wpversion=latest] [--no-db]" +} + +# Parse command-line arguments +for i in "$@" +do +case $i in + --dbname=*) + DB_NAME="${i#*=}" + shift + ;; + --dbuser=*) + DB_USER="${i#*=}" + shift + ;; + --dbpass=*) + DB_PASS="${i#*=}" + shift + ;; + --dbhost=*) + DB_HOST="${i#*=}" + shift + ;; + --wpversion=*) + WP_VERSION="${i#*=}" + shift + ;; + --no-db) + SKIP_DB="true" + shift + ;; + *) + # unknown option + usage + exit 1 + ;; +esac +done + +# Run install-wp-tests.sh +echo "Installing local tests into ${TMPDIR}" +bash "$(dirname "$0")/install-wp-tests.sh" "$DB_NAME" "$DB_USER" "$DB_PASS" "$DB_HOST" "$WP_VERSION" "$SKIP_DB" + +# Run PHPUnit +echo "Running PHPUnit" +composer phpunit diff --git a/bin/phpunit-test.sh b/bin/phpunit-test.sh new file mode 100755 index 00000000..f0030fa4 --- /dev/null +++ b/bin/phpunit-test.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +DIRNAME=$(dirname "$0") + +bash "${DIRNAME}/install-wp-tests.sh" wordpress_test root root 127.0.0.1 latest +echo "Running PHPUnit on Single Site" +composer phpunit +rm -rf $WP_TESTS_DIR $WP_CORE_DIR + +bash "${DIRNAME}/install-wp-tests.sh" wordpress_test root root 127.0.0.1 nightly true +echo "Running PHPUnit on Single Site (Nightly WordPress)" +composer phpunit + +bash "${DIRNAME}/install-wp-tests.sh" wordpress_test root root 127.0.0.1 latest true +echo "Running PHPUnit on Multisite" +WP_MULTISITE=1 composer phpunit diff --git a/composer.json b/composer.json index 91da71e9..98ec0ee9 100644 --- a/composer.json +++ b/composer.json @@ -18,11 +18,17 @@ "pantheon-systems/pantheon-wp-coding-standards": "^2.0" }, "scripts": { - "lint": "@phpcs", + "lint": [ + "@phpcs", + "@phplint" + ], "phpcs": "vendor/bin/phpcs --ignore=tests/* -s .", "phpcbf": "vendor/bin/phpcbf --ignore=tests/* .", - "phpunit": "vendor/bin/phpunit", - "test": "@phpunit" + "phplint": "find . -type f -name '*.php' -not -path './vendor/*' -not -path './tests/*' -exec php -l {} \\;", + "phpunit": "vendor/bin/phpunit --do-not-cache-result", + "test": "@phpunit", + "test:install": "bin/install-local-tests.sh --no-db", + "test:install:withdb": "bin/install-local-tests.sh" }, "config": { "allow-plugins": { From 7cfd68cdedeb60e216d84d55781cd4d8c4a0dfd3 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Fri, 13 Oct 2023 15:31:25 -0600 Subject: [PATCH 5/8] [BUGS-6934] Gracefully handle archive pages with multiple post types (#252) * handle archive pages with multiple post types * test archive pages with multiple post types * mock our own factory to avoid PHP 8 deprecation warnings * update changelog * add multisite tests * grammar ftw Co-authored-by: Phil Tyler * fix the post that was supposed to be a product * capture the post ids and ensure that those posts are in the query * DRY up the archive key checks * add the multisite blog id prefix --------- Co-authored-by: Phil Tyler --- README.md | 1 + inc/class-emitter.php | 10 +++- readme.txt | 1 + ...-pantheon-advanced-page-cache-testcase.php | 14 +++++ tests/phpunit/test-emitter.php | 56 +++++++++++++++++++ 5 files changed, 81 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d2bc0c77..d106d2dc 100644 --- a/README.md +++ b/README.md @@ -322,6 +322,7 @@ See [CONTRIBUTING.md](https://github.com/pantheon-systems/pantheon-advanced-page ## Changelog ## ### 1.4.2-dev ### * Updates Pantheon WP Coding Standards to 2.0 [[#249](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/249)] +* Fixes an issue where a PHP warning was thrown when surrogate keys were emitted from archive pages with multiple post types. [[#252](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/252)] ### 1.4.1 ### * Send the REST API response header to the result and not the REST server [[#237](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/237)]. Props [@srtfisher](https://github.com/srtfisher) & [@felixarntz](https://github.com/felixarntz). diff --git a/inc/class-emitter.php b/inc/class-emitter.php index 8d237b4d..4a06df06 100644 --- a/inc/class-emitter.php +++ b/inc/class-emitter.php @@ -281,7 +281,15 @@ public static function get_main_query_surrogate_keys() { $keys[] = 'archive'; if ( is_post_type_archive() ) { $keys[] = 'post-type-archive'; - $keys[] = get_query_var( 'post_type' ) . '-archive'; + $post_types = get_query_var( 'post_type' ); + // If multiple post types are queried, create a surrogate key for each. + if ( is_array( $post_types ) ) { + foreach ( $post_types as $post_type ) { + $keys[] = "$post_type-archive"; + } + } else { + $keys[] = "$post_types-archive"; + } } elseif ( is_author() ) { $user_id = get_queried_object_id(); if ( $user_id ) { diff --git a/readme.txt b/readme.txt index d2c62101..6a96f58c 100644 --- a/readme.txt +++ b/readme.txt @@ -315,6 +315,7 @@ See [CONTRIBUTING.md](https://github.com/pantheon-systems/wp-saml-auth/blob/mast == Changelog == = 1.4.2-dev = * Updates Pantheon WP Coding Standards to 2.0 [[#249](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/249)] +* Fixes an issue where a PHP warning was thrown when surrogate keys were emitted from archive pages with multiple post types. [[#252](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/252)] = 1.4.1 = * Send the REST API response header to the result and not the REST server [[#237](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/237)]. Props [@srtfisher](https://github.com/srtfisher) & [@felixarntz](https://github.com/felixarntz). diff --git a/tests/phpunit/class-pantheon-advanced-page-cache-testcase.php b/tests/phpunit/class-pantheon-advanced-page-cache-testcase.php index df8cb70d..c7b3969b 100644 --- a/tests/phpunit/class-pantheon-advanced-page-cache-testcase.php +++ b/tests/phpunit/class-pantheon-advanced-page-cache-testcase.php @@ -7,6 +7,18 @@ use Pantheon_Advanced_Page_Cache\Emitter; +/** + * Declare our own factory class to avoid a PHP 8.0 deprecation warning. + */ +class Pantheon_WP_UnitTest_Factory extends WP_UnitTest_Factory { + public $product_category; + + public function __construct() { + parent::__construct(); + $this->product_category = new WP_UnitTest_Factory_For_Term($this, 'product_category'); + } +} + /** * Class from which all tests inherit. */ @@ -32,6 +44,8 @@ class Pantheon_Advanced_Page_Cache_Testcase extends WP_UnitTestCase { */ public function setUp(): void { parent::setUp(); + // Use our own factory class to avoid a PHP 8.0 deprecation warning. + $this->factory = new Pantheon_WP_UnitTest_Factory(); $this->factory->product_category = new WP_UnitTest_Factory_For_Term( $this->factory, 'product_category' ); diff --git a/tests/phpunit/test-emitter.php b/tests/phpunit/test-emitter.php index 3c3e9f97..c10bc853 100644 --- a/tests/phpunit/test-emitter.php +++ b/tests/phpunit/test-emitter.php @@ -623,4 +623,60 @@ public function test_surrogate_keys_with_filter_override() { remove_all_filters("pantheon_should_add_terms"); } + /** + * Test that queries on archive pages with multiple post types don't throw an error. + * + * @see https://getpantheon.atlassian.net/browse/BUGS-6934 + */ + public function test_surrogate_keys_multiple_post_types() { + global $wp_query; + + // Set up posts of different post types. + $product_id = $this->factory->post->create( [ + 'post_type' => 'product', + 'post_title' => 'test product' + ] ); + $post_id = $this->factory->post->create( [ + 'post_type' => 'post', + 'post_title' => 'test post' + ] ); + + // Query the posts we just created. + $wp_query = new WP_Query( [ + 's' => 'test', + 'post_type' => [ 'post', 'product' ], + ] ); + $wp_query->is_archive = true; + $wp_query->is_post_type_archive = true; + + // Ensure that we don't get a WP Error from the surrogate key generator. This is a bit superfluous since if there was an error, we'd see it in the tests. + $this->assertTrue( ! is_wp_error( Emitter::get_main_query_surrogate_keys() ) ); + + // Test that we have surrogate keys for the post and product archives. + $wpms_prefix = ''; + if ( is_multisite() ) { + $wpms_prefix = 'blog-1-'; + } + $post_archive_key = $wpms_prefix . 'post-archive'; + $product_archive_key = $wpms_prefix . 'product-archive'; + $this->assertContains( + $post_archive_key, + Emitter::get_main_query_surrogate_keys() + ); + $this->assertContains( + $product_archive_key, + Emitter::get_main_query_surrogate_keys() + ); + + // Make sure our newly-created posts are in the list of surrogate keys. + $this->assertContains( + $wpms_prefix . "post-$post_id", + Emitter::get_main_query_surrogate_keys() + ); + $this->assertContains( + $wpms_prefix . "post-$product_id", + Emitter::get_main_query_surrogate_keys() + ); + wp_reset_query( $wp_query ); + } } From f82d277992faeb13dbec1fe3228687f870da1747 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Fri, 13 Oct 2023 15:42:42 -0600 Subject: [PATCH 6/8] 1.4.2 release --- README.md | 4 ++-- package.json | 2 +- pantheon-advanced-page-cache.php | 2 +- readme.txt | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d106d2dc..a0161c11 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Tags:** pantheon, cdn, cache **Requires at least:** 4.7 **Tested up to:** 6.3 -**Stable tag:** 1.4.2-dev +**Stable tag:** 1.4.2 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -320,7 +320,7 @@ Pantheon Advanced Page Cache integrates with WordPress plugins, including: See [CONTRIBUTING.md](https://github.com/pantheon-systems/pantheon-advanced-page-cache/blob/master/CONTRIBUTING.md) for information on contributing. ## Changelog ## -### 1.4.2-dev ### +### 1.4.2 ### * Updates Pantheon WP Coding Standards to 2.0 [[#249](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/249)] * Fixes an issue where a PHP warning was thrown when surrogate keys were emitted from archive pages with multiple post types. [[#252](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/252)] diff --git a/package.json b/package.json index 8fe09709..815dfe4f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pantheon-advanced-page-cache", - "version": "1.4.2-dev", + "version": "1.4.2", "main": "Gruntfile.js", "author": "Pantheon", "devDependencies": { diff --git a/pantheon-advanced-page-cache.php b/pantheon-advanced-page-cache.php index fe4908b5..e0c5e8c0 100644 --- a/pantheon-advanced-page-cache.php +++ b/pantheon-advanced-page-cache.php @@ -7,7 +7,7 @@ * Author URI: https://pantheon.io * Text Domain: pantheon-advanced-page-cache * Domain Path: /languages - * Version: 1.4.2-dev + * Version: 1.4.2 * * @package Pantheon_Advanced_Page_Cache */ diff --git a/readme.txt b/readme.txt index 6a96f58c..89c1517b 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: getpantheon, danielbachhuber, kporras07, jspellman, jazzs3quence, Tags: pantheon, cdn, cache Requires at least: 4.7 Tested up to: 6.3 -Stable tag: 1.4.2-dev +Stable tag: 1.4.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -313,7 +313,7 @@ Pantheon Advanced Page Cache integrates with WordPress plugins, including: See [CONTRIBUTING.md](https://github.com/pantheon-systems/wp-saml-auth/blob/master/CONTRIBUTING.md) for information on contributing. == Changelog == -= 1.4.2-dev = += 1.4.2 = * Updates Pantheon WP Coding Standards to 2.0 [[#249](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/249)] * Fixes an issue where a PHP warning was thrown when surrogate keys were emitted from archive pages with multiple post types. [[#252](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/252)] From f864f1d42e82c1aa0c79c6c970cfa273069a2fdb Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Mon, 16 Oct 2023 12:44:17 -0600 Subject: [PATCH 7/8] add release dates to changelog --- README.md | 18 +++++++++--------- readme.txt | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a0161c11..7a5b222b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Pantheon Advanced Page Cache # -**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber), [kporras07](https://profiles.wordpress.org/kporras07), [jspellman](https://profiles.wordpress.org/jspellman/), [jazzs3quence](https://profiles.wordpress.org/jazzs3quence/), [ryanshoover](https://profiles.wordpress.org/ryanshoover/), [rwagner00](https://profiles.wordpress.org/rwagner00/), [pwtyler](https://profiles.wordpress.org/pwtyler) -**Tags:** pantheon, cdn, cache -**Requires at least:** 4.7 -**Tested up to:** 6.3 -**Stable tag:** 1.4.2 -**License:** GPLv2 or later +**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber), [kporras07](https://profiles.wordpress.org/kporras07), [jspellman](https://profiles.wordpress.org/jspellman/), [jazzs3quence](https://profiles.wordpress.org/jazzs3quence/), [ryanshoover](https://profiles.wordpress.org/ryanshoover/), [rwagner00](https://profiles.wordpress.org/rwagner00/), [pwtyler](https://profiles.wordpress.org/pwtyler) +**Tags:** pantheon, cdn, cache +**Requires at least:** 4.7 +**Tested up to:** 6.3 +**Stable tag:** 1.4.2 +**License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html Automatically clear related pages from Pantheon's Edge when you update content. High TTL. Fresh content. Visitors never wait. @@ -320,14 +320,14 @@ Pantheon Advanced Page Cache integrates with WordPress plugins, including: See [CONTRIBUTING.md](https://github.com/pantheon-systems/pantheon-advanced-page-cache/blob/master/CONTRIBUTING.md) for information on contributing. ## Changelog ## -### 1.4.2 ### +### 1.4.2 (October 16, 2023) ### * Updates Pantheon WP Coding Standards to 2.0 [[#249](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/249)] * Fixes an issue where a PHP warning was thrown when surrogate keys were emitted from archive pages with multiple post types. [[#252](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/252)] -### 1.4.1 ### +### 1.4.1 (August 8, 2023) ### * Send the REST API response header to the result and not the REST server [[#237](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/237)]. Props [@srtfisher](https://github.com/srtfisher) & [@felixarntz](https://github.com/felixarntz). -### 1.4.0 ### +### 1.4.0 (August 1, 2023) ### * Bumped Dependencies [[236](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/236)] * Add filter `pantheon_should_add_terms` to allow disabling surrogate keys for posts' taxonomy terms [[239](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/239)] diff --git a/readme.txt b/readme.txt index 89c1517b..65cafa0c 100644 --- a/readme.txt +++ b/readme.txt @@ -313,18 +313,18 @@ Pantheon Advanced Page Cache integrates with WordPress plugins, including: See [CONTRIBUTING.md](https://github.com/pantheon-systems/wp-saml-auth/blob/master/CONTRIBUTING.md) for information on contributing. == Changelog == -= 1.4.2 = += 1.4.2 (October 16, 2023) = * Updates Pantheon WP Coding Standards to 2.0 [[#249](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/249)] * Fixes an issue where a PHP warning was thrown when surrogate keys were emitted from archive pages with multiple post types. [[#252](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/252)] -= 1.4.1 = += 1.4.1 (August 8, 2023) = * Send the REST API response header to the result and not the REST server [[#237](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/237)]. Props [@srtfisher](https://github.com/srtfisher) & [@felixarntz](https://github.com/felixarntz). -= 1.4.0 = += 1.4.0 (August 1, 2023) = * Bumped Dependencies [[236](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/236)] * Add filter `pantheon_should_add_terms` to allow disabling surrogate keys for posts' taxonomy terms [[239](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/239)] -= 1.3.0 = += 1.3.0 (April 19, 2023) = * Adds support for WordPress Multisite which resolves issue where editing a Post on one subsite clears the home page cache of other sites in the Multisite install if it has a Post containing the same ID [[#228](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/228)]. = 1.2.4 (April 13, 2023) = From e7bdda85f7324d48490b7a4665733e67fb155fee Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Mon, 16 Oct 2023 12:47:42 -0600 Subject: [PATCH 8/8] vscode strikes again --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7a5b222b..b6efa906 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Pantheon Advanced Page Cache # -**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber), [kporras07](https://profiles.wordpress.org/kporras07), [jspellman](https://profiles.wordpress.org/jspellman/), [jazzs3quence](https://profiles.wordpress.org/jazzs3quence/), [ryanshoover](https://profiles.wordpress.org/ryanshoover/), [rwagner00](https://profiles.wordpress.org/rwagner00/), [pwtyler](https://profiles.wordpress.org/pwtyler) -**Tags:** pantheon, cdn, cache -**Requires at least:** 4.7 -**Tested up to:** 6.3 -**Stable tag:** 1.4.2 -**License:** GPLv2 or later +**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber), [kporras07](https://profiles.wordpress.org/kporras07), [jspellman](https://profiles.wordpress.org/jspellman/), [jazzs3quence](https://profiles.wordpress.org/jazzs3quence/), [ryanshoover](https://profiles.wordpress.org/ryanshoover/), [rwagner00](https://profiles.wordpress.org/rwagner00/), [pwtyler](https://profiles.wordpress.org/pwtyler) +**Tags:** pantheon, cdn, cache +**Requires at least:** 4.7 +**Tested up to:** 6.3 +**Stable tag:** 1.4.2 +**License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html Automatically clear related pages from Pantheon's Edge when you update content. High TTL. Fresh content. Visitors never wait.