From f2cf281065a03662158a0103bbcb629acd95cf3d Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 22 Jun 2023 14:36:51 -0600 Subject: [PATCH 1/6] add wporg validator action --- .github/workflows/wporg-validator.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/workflows/wporg-validator.yml diff --git a/.github/workflows/wporg-validator.yml b/.github/workflows/wporg-validator.yml new file mode 100644 index 0000000..02dfd5f --- /dev/null +++ b/.github/workflows/wporg-validator.yml @@ -0,0 +1,8 @@ +# On push, run the action-wporg-validator workflow. +name: WP.org Validator +on: [push] +jobs: + wporg-validation: + uses: pantheon-systems/action-wporg-validator@1.0.0 + with: + type: plugin From 3d5fac69a6b2ba0eb5dfc617ef542b3482cc83fd Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 22 Jun 2023 14:40:36 -0600 Subject: [PATCH 2/6] fix wporg validation steps --- .github/workflows/wporg-validator.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wporg-validator.yml b/.github/workflows/wporg-validator.yml index 02dfd5f..e1dd30f 100644 --- a/.github/workflows/wporg-validator.yml +++ b/.github/workflows/wporg-validator.yml @@ -3,6 +3,11 @@ name: WP.org Validator on: [push] jobs: wporg-validation: - uses: pantheon-systems/action-wporg-validator@1.0.0 - with: - type: plugin + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: WP.org Validator + uses: pantheon-systems/action-wporg-validator@1.0.0 + with: + type: plugin From cb52ba7f6b9c6bfac0d9ca216cbc0967e66992f9 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 22 Jun 2023 14:43:42 -0600 Subject: [PATCH 3/6] ignore unescaped echo --- object-cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object-cache.php b/object-cache.php index 73f1ebb..80275d0 100644 --- a/object-cache.php +++ b/object-cache.php @@ -986,7 +986,7 @@ public function stats() { $out[] = '
  • Group: ' . esc_html( $group ) . ' - ( ' . number_format( strlen( serialize( $cache ) ) / 1024, 2 ) . 'k )
  • '; } $out[] = ''; - echo implode( PHP_EOL, $out ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + echo implode( PHP_EOL, $out ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped WordPressDotOrg.sniffs.OutputEscaping.UnescapedOutputParameter } /** From 47f5d67a7f99fb75574ca9566b9b5174ddab9a18 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 22 Jun 2023 14:45:26 -0600 Subject: [PATCH 4/6] separate multiple rules with comma --- object-cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object-cache.php b/object-cache.php index 80275d0..78b04fb 100644 --- a/object-cache.php +++ b/object-cache.php @@ -986,7 +986,7 @@ public function stats() { $out[] = '
  • Group: ' . esc_html( $group ) . ' - ( ' . number_format( strlen( serialize( $cache ) ) / 1024, 2 ) . 'k )
  • '; } $out[] = ''; - echo implode( PHP_EOL, $out ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped WordPressDotOrg.sniffs.OutputEscaping.UnescapedOutputParameter + echo implode( PHP_EOL, $out ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped,WordPressDotOrg.sniffs.OutputEscaping.UnescapedOutputParameter } /** From 5a03346e2c5d63a18eedb2fa516cf05ef5e10888 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 22 Jun 2023 14:48:21 -0600 Subject: [PATCH 5/6] ignore unescaped exit output --- cli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.php b/cli.php index bfb2e03..a183635 100644 --- a/cli.php +++ b/cli.php @@ -41,7 +41,7 @@ public function cli() { $cmd = WP_CLI\Utils\esc_cmd( 'redis-cli -h %s -p %s -a %s -n %s', $redis_server['host'], $redis_server['port'], $redis_server['auth'], $redis_server['database'] ); $process = WP_CLI\Utils\proc_open_compat( $cmd, [ STDIN, STDOUT, STDERR ], $pipes ); $r = proc_close( $process ); - exit( (int) $r ); + exit( (int) $r ); // phpcs:ignore WordPressDotOrg.sniffs.OutputEscaping.UnescapedOutputParameter } /** From 92aa217961cf44c9031995e5ec3fd5491ae98dc1 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 22 Jun 2023 14:52:23 -0600 Subject: [PATCH 6/6] update changelog --- README.md | 1 + readme.txt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 820297a..e25712a 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a ### 1.4.3-dev ### * 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)] ### 1.4.2 (May 15, 2023) ### * Bug fix: Removes exception loop caused by `esc_html` in `_exception_handler()` [[421](https://github.com/pantheon-systems/wp-redis/pull/421)] diff --git a/readme.txt b/readme.txt index 2779580..08fcb5b 100644 --- a/readme.txt +++ b/readme.txt @@ -104,6 +104,7 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a = 1.4.3-dev = * Bug fix: Fixes assumption that CACHE_PORT & CACHE_PASSWORD are Set. [[428](https://github.com/pantheon-systems/wp-redis/pull/428)] (props @tnolte) +* Adds WP.org validation GitHub action [[#435](https://github.com/pantheon-systems/wp-redis/pull/435)] = 1.4.2 (May 15, 2023) = * Bug fix: Removes exception loop caused by `esc_html` in `_exception_handler()` [[421](https://github.com/pantheon-systems/wp-redis/pull/421)] @@ -240,4 +241,4 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a == Upgrade Notice == = 1.4.0 = -WP Redis 1.4.0 adds support for the `flush_runtime` and `flush_group` functions. If you've copied `object-cache.php` and made your own changes, be sure to copy these additions over as well. \ No newline at end of file +WP Redis 1.4.0 adds support for the `flush_runtime` and `flush_group` functions. If you've copied `object-cache.php` and made your own changes, be sure to copy these additions over as well.