Skip to content

Commit

Permalink
[CMSP-771] Release 1.4.4 (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence authored Nov 27, 2023
2 parents 43def9d + e17e7a5 commit ec6ddd9
Show file tree
Hide file tree
Showing 18 changed files with 696 additions and 634 deletions.
154 changes: 2 additions & 152 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ version: 2.1
workflows:
main:
jobs:
- lint
- 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:
Expand All @@ -19,65 +14,9 @@ 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:
lint:
working_directory: ~/pantheon-systems/wp-redis
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/wp-redis
parallelism: 1
docker:
Expand Down Expand Up @@ -117,98 +56,9 @@ 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-redis-disabled-74:
working_directory: ~/pantheon-systems/wp-redis
docker:
- image: circleci/php:7.4-node-browsers
- image: circleci/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:
working_directory: ~/pantheon-systems/wp-redis
docker:
- image: circleci/php:7.4-node-browsers
- image: circleci/mariadb:10.3
- image: circleci/redis:latest
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:
working_directory: ~/pantheon-systems/wp-redis
docker:
- image: cimg/php:8.2.0
- image: circleci/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:
working_directory: ~/pantheon-systems/wp-redis
docker:
- image: cimg/php:8.2.0
- image: circleci/mariadb:10.3
- image: circleci/redis:latest
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
100 changes: 100 additions & 0 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# On push, run the action-wporg-validator workflow.
name: Linting & 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.3
- name: Install dependencies
run: composer install -n --prefer-dist
- name: Run PHP Lint
run: composer phpcs
wporg-validation:
name: WP.org Validator
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: WP.org Validator
uses: pantheon-systems/[email protected]
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
13 changes: 0 additions & 13 deletions .github/workflows/wporg-validator.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ Pull requests and issues are welcome!

## Workflow

Development and releases are structured around two branches, `default` and `release`. The `default` branch is the default branch for the repository, and is the source and destination for feature branches.
Development and releases are structured around two branches, `main` and `release`. The `main` branch is the default branch for the repository, and is the source and destination for feature branches.

We prefer to squash commits (i.e. avoid merge PRs) from a feature branch into `default` when merging, and to include the PR # in the commit message. PRs to `default` should also include any relevent updates to the changelog in readme.txt. For example, if a feature constitutes a minor or major version bump, that version update should be discussed and made as part of approving and merging the feature into `default`.
We prefer to squash commits (i.e. avoid merge PRs) from a feature branch into `main` when merging, and to include the PR # in the commit message. PRs to `main` should also include any relevent updates to the changelog in readme.txt. For example, if a feature constitutes a minor or major version bump, that version update should be discussed and made as part of approving and merging the feature into `main`.

`default` should be stable and usable, though possibly a few commits ahead of the public release on wp.org.
`main` should be stable and usable, though possibly a few commits ahead of the public release on wp.org.

The `release` branch matches the latest stable release deployed to [wp.org](https://wordpress.org/).

Expand All @@ -31,14 +31,14 @@ The behat tests require a Pantheon site with Redis enabled. Once you've created

## Release Process

1. From `default`, checkout a new branch `release_X.Y.Z`.
1. From `main`, checkout a new branch `release_X.Y.Z`.
1. Make a release commit:
* In `README.md`, `readme.txt`, and `wp-redis.php`, remove the `-dev` from the version number. For the README files. the version number must be updated both at the top of the document as well as the changelog.
* Add the date to the `** X.Y.X **` heading in the changelogs in README.md, readme.txt, and any other appropriate location.
* Commit these changes with the message `Release X.Y.Z`
* Push the release branch up.
1. Open a Pull Request to merge `release_X.Y.Z` into `release`. Your PR should consist of all commits to `default` since the last release, and one commit to update the version number. The PR name should also be `Release X.Y.Z`.
1. After all tests pass and you have received approval from a [CODEOWNER](./CODEOWNERS), merge the PR into `release`. "Rebase and merge" is preferred in this case. _Never_ squash to `release`.
1. Open a Pull Request to merge `release_X.Y.Z` into `release`. Your PR should consist of all commits to `main` since the last release, and one commit to update the version number. The PR name should also be `Release X.Y.Z`.
1. After all tests pass and you have received approval from a [CODEOWNER](./CODEOWNERS), merge the PR into `release`. A merge commit is preferred in this case. _Never_ squash to `release`.
1. Locally, pull the `release` branch, create a new tag (based on version number from previous steps), and push up. The tag should _only_ be the version number. It _should not_ be prefixed `v` (i.e. `X.Y.Z`, not `vX.Y.X`).
* `git tag X.Y.Z`
* `git push --tags`
Expand All @@ -49,10 +49,10 @@ The behat tests require a Pantheon site with Redis enabled. Once you've created
1. Following the release, prepare the next dev version with the following steps:
* `git checkout release`
* `git pull origin release`
* `git checkout default`
* `git checkout main`
* `git rebase release`
* Update the version number in all locations, incrementing the version by one patch version, and add the `-dev` flag (e.g. after releasing `1.2.3`, the new verison will be `1.2.4-dev`)
* Add a new `** X.Y.X-dev **` heading to the changelog
* `git add -A .`
* `git commit -m "Prepare X.Y.X-dev"`
* `git push origin default`
* `git push origin main`
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# WP Redis #
[![Actively Maintained](https://img.shields.io/badge/Pantheon-Actively_Maintained-yellow?logo=pantheon&color=FFDC28)](https://pantheon.io/docs/oss-support-levels#actively-maintained)

**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber), [mboynes](https://profiles.wordpress.org/mboynes), [Outlandish Josh](https://profiles.wordpress.org/outlandish-josh) [jspellman](https://profiles.wordpress.org/jspellman/) [jazzs3quence](https://profiles.wordpress.org/jazzs3quence/)
**Tags:** cache, plugin, redis
**Requires at least:** 3.0.1
**Tested up to:** 6.2
**Stable tag:** 1.4.3
**License:** GPLv2 or later
**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber), [mboynes](https://profiles.wordpress.org/mboynes), [Outlandish Josh](https://profiles.wordpress.org/outlandish-josh) [jspellman](https://profiles.wordpress.org/jspellman/) [jazzs3quence](https://profiles.wordpress.org/jazzs3quence/)
**Tags:** cache, plugin, redis
**Requires at least:** 3.0.1
**Tested up to:** 6.4.1
**Stable tag:** 1.4.4
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Back your WP Object Cache with Redis, a high-performance in-memory storage backend.
Expand Down Expand Up @@ -80,6 +80,10 @@ Use `wp help redis <command>` to learn more about each command.

See [CONTRIBUTING.md](https://github.com/pantheon-systems/wp-redis/blob/default/CONTRIBUTING.md) for information on contributing.

## Security Policy ##
### Reporting Security Bugs
Please report security bugs found in the WP Redis plugin's source code through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/wp-redis). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin.

## Frequently Asked Questions ##

### Why would I want to use this plugin? ###
Expand All @@ -104,6 +108,10 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a

## Changelog ##

### 1.4.4 (November 27, 2023) ###
* Updates Pantheon WP Coding Standards to 2.0 [[#445](https://github.com/pantheon-systems/wp-redis/pull/445)]
* Handle duplicate keys in `get_multiple` function [[#448](https://github.com/pantheon-systems/wp-redis/pull/448)] (props @Souptik2001)

### 1.4.3 (June 26, 2023) ###
* Bug fix: Fixes assumption that CACHE_PORT & CACHE_PASSWORD are Set. [[428](https://github.com/pantheon-systems/wp-redis/pull/428)] (props @timnolte)
* Adds WP.org validation GitHub action [[#435](https://github.com/pantheon-systems/wp-redis/pull/435)]
Expand Down
Loading

0 comments on commit ec6ddd9

Please sign in to comment.