diff --git a/.circleci/config.yml b/.circleci/config.yml index e0e1edd..169898a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,10 +3,6 @@ workflows: main: jobs: - test-behat - - test-phpunit-redis-disabled-74 - - test-phpunit-redis-enabled-74 - - test-phpunit-redis-disabled-82 - - test-phpunit-redis-enabled-82 nightly: triggers: - schedule: @@ -18,44 +14,6 @@ workflows: jobs: - test-behat -commands: - install-extras: - steps: - - run: - name: "Install Extra Dependencies" - command: | - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B - sudo apt-get update - sudo apt-get install subversion - sudo apt-get install -y libmagickwand-dev --no-install-recommends - yes '' | sudo pecl install imagick || true - sudo docker-php-ext-enable imagick - sudo docker-php-ext-install mysqli - install-mariadb-10-5: - steps: - - run: sudo apt-get install mariadb-client-10.5 - install-mariadb-10-6: - steps: - - run: sudo apt-get install mariadb-client-10.6 - install-redis-extras: - steps: - - run: - name: "Install Redis Extras" - command: | - yes '' | sudo pecl install redis || true - sudo docker-php-ext-enable redis - run-phpunit-tests: - steps: - - 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 - WP_REDIS_USE_CACHE_GROUPS=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 jobs: test-behat: resource_class: small @@ -104,97 +62,3 @@ jobs: - run: command: ./bin/behat-cleanup.sh when: always - test-phpunit-redis-disabled-74: - resource_class: small - working_directory: ~/pantheon-systems/wp-redis - docker: - - image: circleci/php:7.4-node-browsers - - image: cimg/mariadb:10.3 - environment: - - WP_TESTS_DIR: "/tmp/wordpress-tests-lib" - - WP_CORE_DIR: "/tmp/wordpress/" - steps: - - checkout - - restore_cache: - keys: - - test-phpunit-74-dependencies-{{ checksum "composer.json" }} - - run: composer update - - run: composer install -n --prefer-dist - - save_cache: - key: test-phpunit-74-dependencies-{{ checksum "composer.json" }} - paths: - - vendor - - install-extras - - install-mariadb-10-5 - - run-phpunit-tests - test-phpunit-redis-enabled-74: - resource_class: small - working_directory: ~/pantheon-systems/wp-redis - docker: - - image: circleci/php:7.4-node-browsers - - image: cimg/mariadb:10.3 - - image: cimg/redis:6.2 - environment: - - WP_TESTS_DIR: "/tmp/wordpress-tests-lib" - - WP_CORE_DIR: "/tmp/wordpress/" - steps: - - checkout - - restore_cache: - keys: - - test-phpunit-74-dependencies-{{ checksum "composer.json" }} - - run: composer update - - run: composer install -n --prefer-dist - - save_cache: - key: test-phpunit-74-dependencies-{{ checksum "composer.json" }} - paths: - - vendor - - install-extras - - install-mariadb-10-5 - - install-redis-extras - - run-phpunit-tests - test-phpunit-redis-disabled-82: - resource_class: small - working_directory: ~/pantheon-systems/wp-redis - docker: - - image: cimg/php:8.2.0 - - image: cimg/mariadb:10.3 - environment: - - WP_TESTS_DIR: "/tmp/wordpress-tests-lib" - - WP_CORE_DIR: "/tmp/wordpress/" - steps: - - checkout - - restore_cache: - keys: - - test-phpunit-82-dependencies-{{ checksum "composer.json" }} - - run: composer install -n --prefer-dist - - save_cache: - key: test-phpunit-82-dependencies-{{ checksum "composer.json" }} - paths: - - vendor - - install-extras - - install-mariadb-10-6 - - run-phpunit-tests - test-phpunit-redis-enabled-82: - resource_class: small - working_directory: ~/pantheon-systems/wp-redis - docker: - - image: cimg/php:8.2.0 - - image: cimg/mariadb:10.3 - - image: cimg/redis:6.2 - environment: - - WP_TESTS_DIR: "/tmp/wordpress-tests-lib" - - WP_CORE_DIR: "/tmp/wordpress/" - steps: - - checkout - - restore_cache: - keys: - - test-phpunit-82-dependencies-{{ checksum "composer.json" }} - - run: composer install -n --prefer-dist - - save_cache: - key: test-phpunit-82-dependencies-{{ checksum "composer.json" }} - paths: - - vendor - - install-extras - - install-mariadb-10-6 - - install-redis-extras - - run-phpunit-tests diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index 6799e2e..f556ac9 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -24,7 +24,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.0' + php-version: 8.3 - name: Install dependencies run: composer install -n --prefer-dist - name: Run PHP Lint @@ -39,3 +39,62 @@ jobs: uses: pantheon-systems/action-wporg-validator@1.0.0 with: type: plugin + 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 + test-versions: 8.0- + test: + needs: lint + name: Test + runs-on: ubuntu-latest + strategy: + matrix: + php_version: [7.4, 8.2, 8.3] + redis_enabled: [true, false] + services: + mariadb: + image: mariadb:${{ (matrix.php_version == '7.4') && '10.5' || '10.6' }} + redis: + image: redis:6.2 + ports: + - 6379:6379 + steps: + - uses: actions/checkout@v3 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php_version }} + extensions: mysqli, zip, imagick, redis + - name: Start MySQL Service + run: sudo systemctl start mysql + - name: Test Redis + run: | + sudo apt-get install -y redis-tools + redis-cli -h localhost ping + - 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: | + if [ ${{ matrix.redis_enabled }} = 'true' ]; then + export WP_REDIS_USE_CACHE_GROUPS=1 + echo -e "🔋 Testing with Redis enabled" + else + echo -e "🪫 Testing with Redis disabled" + fi + bash ./bin/phpunit-test.sh diff --git a/.gitignore b/.gitignore index a9608ce..ef93495 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ vendor/ phpredis pantheon-wordpress-upstream-master tests/pantheon-wordpress-upstream +bin/install-local-tests.sh +bin/install-wp-tests.sh +bin/phpunit-test.sh diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh deleted file mode 100755 index 675dd97..0000000 --- a/bin/install-wp-tests.sh +++ /dev/null @@ -1,151 +0,0 @@ -#!/usr/bin/env bash - -if [ $# -lt 3 ]; then - echo "usage: $0 [db-host] [wp-version] [skip-database-creation]" - exit 1 -fi - -DB_NAME=$1 -DB_USER=$2 -DB_PASS=$3 -DB_HOST=${4-localhost} -WP_VERSION=${5-latest} -SKIP_DB_CREATE=${6-false} - -TMPDIR=${TMPDIR-/tmp} -WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR/wordpress-tests-lib} -WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress/} - -download() { - if [ `which curl` ]; then - curl -s "$1" > "$2"; - elif [ `which wget` ]; then - wget -nv -O "$2" "$1" - fi -} - -if [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then - WP_TESTS_TAG="branches/$WP_VERSION" -elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then - if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then - # version x.x.0 means the first release of the major version, so strip off the .0 and download version x.x - WP_TESTS_TAG="tags/${WP_VERSION%??}" - else - WP_TESTS_TAG="tags/$WP_VERSION" - fi -elif [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then - WP_TESTS_TAG="trunk" -else - # http serves a single offer, whereas https serves multiple. we only want one - download http://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json - grep '[0-9]+\.[0-9]+(\.[0-9]+)?' /tmp/wp-latest.json - LATEST_VERSION=$(grep -o '"version":"[^"]*' /tmp/wp-latest.json | sed 's/"version":"//') - if [[ -z "$LATEST_VERSION" ]]; then - echo "Latest WordPress version could not be found" - exit 1 - fi - WP_TESTS_TAG="tags/$LATEST_VERSION" -fi - -set -e - -install_wp() { - - if [ -d $WP_CORE_DIR ]; then - return; - fi - - mkdir -p $WP_CORE_DIR - - if [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then - mkdir -p $TMPDIR/wordpress-nightly - download https://wordpress.org/nightly-builds/wordpress-latest.zip $TMPDIR/wordpress-nightly/wordpress-nightly.zip - unzip -q $TMPDIR/wordpress-nightly/wordpress-nightly.zip -d $TMPDIR/wordpress-nightly/ - mv $TMPDIR/wordpress-nightly/wordpress/* $WP_CORE_DIR - else - if [ $WP_VERSION == 'latest' ]; then - local ARCHIVE_NAME='latest' - elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+ ]]; then - # https serves multiple offers, whereas http serves single. - download https://api.wordpress.org/core/version-check/1.7/ $TMPDIR/wp-latest.json - if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then - # version x.x.0 means the first release of the major version, so strip off the .0 and download version x.x - LATEST_VERSION=${WP_VERSION%??} - else - # otherwise, scan the releases and get the most up to date minor version of the major release - local VERSION_ESCAPED=`echo $WP_VERSION | sed 's/\./\\\\./g'` - LATEST_VERSION=$(grep -o '"version":"'$VERSION_ESCAPED'[^"]*' $TMPDIR/wp-latest.json | sed 's/"version":"//' | head -1) - fi - if [[ -z "$LATEST_VERSION" ]]; then - local ARCHIVE_NAME="wordpress-$WP_VERSION" - else - local ARCHIVE_NAME="wordpress-$LATEST_VERSION" - fi - else - local ARCHIVE_NAME="wordpress-$WP_VERSION" - fi - download https://wordpress.org/${ARCHIVE_NAME}.tar.gz $TMPDIR/wordpress.tar.gz - tar --strip-components=1 -zxmf $TMPDIR/wordpress.tar.gz -C $WP_CORE_DIR - fi - - download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php -} - -install_test_suite() { - # portable in-place argument for both GNU sed and Mac OSX sed - if [[ $(uname -s) == 'Darwin' ]]; then - local ioption='-i .bak' - else - local ioption='-i' - fi - - # set up testing suite if it doesn't yet exist - if [ ! -d $WP_TESTS_DIR ]; then - # set up testing suite - mkdir -p $WP_TESTS_DIR - svn co --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes - svn co --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data - fi - - if [ ! -f wp-tests-config.php ]; then - download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php - # remove all forward slashes in the end - WP_CORE_DIR=$(echo $WP_CORE_DIR | sed "s:/\+$::") - sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php - sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php - sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php - sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php - sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php - fi - -} - -install_db() { - - if [ ${SKIP_DB_CREATE} = "true" ]; then - return 0 - fi - - # parse DB_HOST for port or socket references - local PARTS=(${DB_HOST//\:/ }) - local DB_HOSTNAME=${PARTS[0]}; - local DB_SOCK_OR_PORT=${PARTS[1]}; - local EXTRA="" - - if ! [ -z $DB_HOSTNAME ] ; then - if [ $(echo $DB_SOCK_OR_PORT | grep -e '^[0-9]\{1,\}$') ]; then - EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp" - elif ! [ -z $DB_SOCK_OR_PORT ] ; then - EXTRA=" --socket=$DB_SOCK_OR_PORT" - elif ! [ -z $DB_HOSTNAME ] ; then - EXTRA=" --host=$DB_HOSTNAME --protocol=tcp" - fi - fi - - # create database - mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"$EXTRA -} - -install_wp -install_test_suite -install_db diff --git a/composer.json b/composer.json index 2787fe1..56edaca 100644 --- a/composer.json +++ b/composer.json @@ -15,18 +15,26 @@ "pantheon-systems/pantheon-wp-coding-standards": "^2.0", "pantheon-systems/pantheon-wordpress-upstream-tests": "dev-master", "phpunit/phpunit": "^9", - "yoast/phpunit-polyfills": "^1.0" + "yoast/phpunit-polyfills": "^1.0", + "pantheon-systems/wpunit-helpers": "^1.0" }, "scripts": { - "lint": "@phpcs", + "lint": [ + "@phpcs", + "@phplint" + ], "phpcs": "vendor/bin/phpcs", "phpcbf": "vendor/bin/phpcbf", - "phpunit": "vendor/bin/phpunit", - "test": "@phpunit" + "phplint": "find . -name '*.php' -type f -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 --nodb", + "test:install:withdb": "bin/install-local-tests.sh" }, "config": { "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "pantheon-systems/wpunit-helpers": true } }, "autoload": { diff --git a/composer.lock b/composer.lock index bc1ad98..ee1fb76 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ea743ee487296f5dd10b9f2037acd96e", + "content-hash": "d04680fc278eacf0f3b53fa875de4ac7", "packages": [], "packages-dev": [ { @@ -589,30 +589,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.5.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -639,7 +639,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -655,7 +655,7 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:15:36+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { "name": "fabpot/goutte", @@ -719,16 +719,16 @@ }, { "name": "fig-r/psr2r-sniffer", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/php-fig-rectified/psr2r-sniffer.git", - "reference": "53ca1ecd62b0dc2ab8ea48635f583cb361c5e8f2" + "reference": "c950b88ed7ad8ae115e11896bbe36d5896aa4f36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig-rectified/psr2r-sniffer/zipball/53ca1ecd62b0dc2ab8ea48635f583cb361c5e8f2", - "reference": "53ca1ecd62b0dc2ab8ea48635f583cb361c5e8f2", + "url": "https://api.github.com/repos/php-fig-rectified/psr2r-sniffer/zipball/c950b88ed7ad8ae115e11896bbe36d5896aa4f36", + "reference": "c950b88ed7ad8ae115e11896bbe36d5896aa4f36", "shasum": "" }, "require": { @@ -769,9 +769,9 @@ ], "support": { "issues": "https://github.com/php-fig-rectified/psr2r-sniffer/issues", - "source": "https://github.com/php-fig-rectified/psr2r-sniffer/tree/1.5.0" + "source": "https://github.com/php-fig-rectified/psr2r-sniffer/tree/1.5.1" }, - "time": "2023-01-01T15:31:05+00:00" + "time": "2023-09-23T19:16:19+00:00" }, { "name": "guzzlehttp/guzzle", @@ -1260,6 +1260,52 @@ "description": "PHPCS Rulesets for WordPress projects on Pantheon.", "time": "2023-09-12T17:25:08+00:00" }, + { + "name": "pantheon-systems/wpunit-helpers", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/pantheon-systems/wpunit-helpers.git", + "reference": "683c9eb83a76c5229a40eef2ec1b19162f162a50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pantheon-systems/wpunit-helpers/zipball/683c9eb83a76c5229a40eef2ec1b19162f162a50", + "reference": "683c9eb83a76c5229a40eef2ec1b19162f162a50", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0" + }, + "require-dev": { + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "composer-plugin", + "extra": { + "class": "Pantheon\\WPUnitHelpers\\Plugin" + }, + "autoload": { + "psr-4": { + "Pantheon\\WPUnitHelpers\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Pantheon", + "email": "noreply@pantheon.io" + } + ], + "description": "Unified scripts for installing and running automated WP Unit Tests.", + "support": { + "issues": "https://github.com/pantheon-systems/wpunit-helpers/issues", + "source": "https://github.com/pantheon-systems/wpunit-helpers/tree/v1.0.1" + }, + "time": "2023-10-12T20:08:14+00:00" + }, { "name": "phar-io/manifest", "version": "2.0.3", @@ -1547,16 +1593,16 @@ }, { "name": "phpcsstandards/phpcsextra", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", - "reference": "98bcdbacbda14b1db85f710b1853125726795bbc" + "reference": "746c3190ba8eb2f212087c947ba75f4f5b9a58d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/98bcdbacbda14b1db85f710b1853125726795bbc", - "reference": "98bcdbacbda14b1db85f710b1853125726795bbc", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/746c3190ba8eb2f212087c947ba75f4f5b9a58d5", + "reference": "746c3190ba8eb2f212087c947ba75f4f5b9a58d5", "shasum": "" }, "require": { @@ -1606,7 +1652,7 @@ "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", "source": "https://github.com/PHPCSStandards/PHPCSExtra" }, - "time": "2023-08-26T04:46:45+00:00" + "time": "2023-09-20T22:06:18+00:00" }, { "name": "phpcsstandards/phpcsutils", @@ -1683,16 +1729,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.0", + "version": "1.24.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6" + "reference": "bcad8d995980440892759db0c32acae7c8e79442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/3510b0a6274cc42f7219367cb3abfc123ffa09d6", - "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442", + "reference": "bcad8d995980440892759db0c32acae7c8e79442", "shasum": "" }, "require": { @@ -1724,22 +1770,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.24.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2" }, - "time": "2023-09-07T20:46:32+00:00" + "time": "2023-09-26T12:28:12+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.28", + "version": "9.2.29", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef" + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef", - "reference": "7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", "shasum": "" }, "require": { @@ -1796,7 +1842,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.28" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" }, "funding": [ { @@ -1804,7 +1850,7 @@ "type": "github" } ], - "time": "2023-09-12T14:36:20+00:00" + "time": "2023-09-19T04:57:46+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2049,16 +2095,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.12", + "version": "9.6.13", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a122c2ebd469b751d774aa0f613dc0d67697653f" + "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a122c2ebd469b751d774aa0f613dc0d67697653f", - "reference": "a122c2ebd469b751d774aa0f613dc0d67697653f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", + "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", "shasum": "" }, "require": { @@ -2132,7 +2178,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.12" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" }, "funding": [ { @@ -2148,7 +2194,7 @@ "type": "tidelift" } ], - "time": "2023-09-12T14:39:31+00:00" + "time": "2023-09-19T05:39:22+00:00" }, { "name": "psr/container", @@ -3369,32 +3415,32 @@ }, { "name": "slevomat/coding-standard", - "version": "8.13.4", + "version": "8.14.1", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "4b2af2fb17773656d02fbfb5d18024ebd19fe322" + "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/4b2af2fb17773656d02fbfb5d18024ebd19fe322", - "reference": "4b2af2fb17773656d02fbfb5d18024ebd19fe322", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/fea1fd6f137cc84f9cba0ae30d549615dbc6a926", + "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": "^1.23.0", + "phpstan/phpdoc-parser": "^1.23.1", "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.26", - "phpstan/phpstan-deprecation-rules": "1.1.3", - "phpstan/phpstan-phpunit": "1.3.13", + "phpstan/phpstan": "1.10.37", + "phpstan/phpstan-deprecation-rules": "1.1.4", + "phpstan/phpstan-phpunit": "1.3.14", "phpstan/phpstan-strict-rules": "1.5.1", - "phpunit/phpunit": "7.5.20|8.5.21|9.6.8|10.2.6" + "phpunit/phpunit": "8.5.21|9.6.8|10.3.5" }, "type": "phpcodesniffer-standard", "extra": { @@ -3418,7 +3464,7 @@ ], "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.13.4" + "source": "https://github.com/slevomat/coding-standard/tree/8.14.1" }, "funding": [ { @@ -3430,7 +3476,7 @@ "type": "tidelift" } ], - "time": "2023-07-25T10:28:55+00:00" + "time": "2023-10-08T07:28:08+00:00" }, { "name": "spryker/code-sniffer", @@ -3950,25 +3996,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.2", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -3997,7 +4043,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" }, "funding": [ { @@ -4013,7 +4059,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/dom-crawler", @@ -4176,29 +4222,26 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.0.2", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/event-dispatcher": "^1" }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -4235,7 +4278,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0" }, "funding": [ { @@ -4251,7 +4294,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/filesystem", @@ -5136,32 +5179,33 @@ }, { "name": "symfony/string", - "version": "v6.0.19", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" + "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", - "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", + "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", + "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": "<2.0" + "symfony/translation-contracts": "<2.5" }, "require-dev": { "symfony/error-handler": "^5.4|^6.0", "symfony/http-client": "^5.4|^6.0", - "symfony/translation-contracts": "^2.0|^3.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.5|^3.0", "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", @@ -5201,7 +5245,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.19" + "source": "https://github.com/symfony/string/tree/v6.3.5" }, "funding": [ { @@ -5217,7 +5261,7 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-09-18T10:38:32+00:00" }, { "name": "symfony/translation", @@ -5388,20 +5432,21 @@ }, { "name": "symfony/yaml", - "version": "v6.0.19", + "version": "v6.3.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "deec3a812a0305a50db8ae689b183f43d915c884" + "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/deec3a812a0305a50db8ae689b183f43d915c884", - "reference": "deec3a812a0305a50db8ae689b183f43d915c884", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e23292e8c07c85b971b44c1c4b87af52133e2add", + "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -5410,9 +5455,6 @@ "require-dev": { "symfony/console": "^5.4|^6.0" }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, "bin": [ "Resources/bin/yaml-lint" ], @@ -5442,7 +5484,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.0.19" + "source": "https://github.com/symfony/yaml/tree/v6.3.3" }, "funding": [ { @@ -5458,7 +5500,7 @@ "type": "tidelift" } ], - "time": "2023-01-11T11:50:03+00:00" + "time": "2023-07-31T07:08:24+00:00" }, { "name": "theseer/tokenizer", @@ -5512,16 +5554,16 @@ }, { "name": "wp-coding-standards/wpcs", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "bb792cb331472b82c5d7f28fb9b8ec2d20f68826" + "reference": "b4caf9689f1a0e4a4c632679a44e638c1c67aff1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/bb792cb331472b82c5d7f28fb9b8ec2d20f68826", - "reference": "bb792cb331472b82c5d7f28fb9b8ec2d20f68826", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/b4caf9689f1a0e4a4c632679a44e638c1c67aff1", + "reference": "b4caf9689f1a0e4a4c632679a44e638c1c67aff1", "shasum": "" }, "require": { @@ -5568,7 +5610,13 @@ "source": "https://github.com/WordPress/WordPress-Coding-Standards", "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" }, - "time": "2023-08-21T14:28:38+00:00" + "funding": [ + { + "url": "https://opencollective.com/thewpcc/contribute/wp-php-63406", + "type": "custom" + } + ], + "time": "2023-09-14T07:06:09+00:00" }, { "name": "yoast/phpunit-polyfills", @@ -5640,5 +5688,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/object-cache.php b/object-cache.php index e8c828b..5b7bc12 100644 --- a/object-cache.php +++ b/object-cache.php @@ -1329,7 +1329,7 @@ public function perform_client_connection( $redis, $client_parameters, $keys_met // PhpRedis throws an Exception when it fails a server call. // To prevent WordPress from fataling, we catch the Exception. - throw new Exception( $e->getMessage(), $e->getCode(), $e ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + throw new Exception( $e->getMessage(), $e->getCode(), $e ); // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped } } return true;