From 6d7d935e8ca12c5b8e8105ee73cfbd464bb4aba9 Mon Sep 17 00:00:00 2001 From: Jon McPartland Date: Wed, 6 Jul 2022 13:55:09 +0100 Subject: [PATCH 01/10] Update Travis build matrix - Bump node version to resolve build issue - Add PHP 7.4 and 8.0 to build matrix --- .travis.yml | 10 +++++++++- bin/build.sh | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c0b1791..8e7b620 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,8 +24,16 @@ jobs: php: 7.3 script: - "./bin/lint.sh" + - stage: lint + php: 7.4 + script: + - "./bin/lint.sh" + - stage: lint + php: 8.0 + script: + - "./bin/lint.sh" - stage: deploy - php: 7.2 + php: 7.4 script: - "./bin/build.sh" if: branch = master diff --git a/bin/build.sh b/bin/build.sh index a4f5429..3da5f25 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -1,5 +1,7 @@ #!/usr/bin/env sh +nvm use 10 + yarn \ && yarn build \ && yarn lang \ From dc857c9e639559c301ebd1ebb53607a7dea2be22 Mon Sep 17 00:00:00 2001 From: Jon McPartland Date: Wed, 6 Jul 2022 15:20:24 +0100 Subject: [PATCH 02/10] Use node 10 in linter --- bin/lint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/lint.sh b/bin/lint.sh index 2725b2f..c3aa5e1 100755 --- a/bin/lint.sh +++ b/bin/lint.sh @@ -1,4 +1,7 @@ #!/usr/bin/env sh + +nvm use 10 + composer global require \ dealerdirect/phpcodesniffer-composer-installer:0.5.0 \ wp-coding-standards/wpcs:1.2.1 \ From 56af1ad6ac8a67b83d4d28d9187cde65115200fc Mon Sep 17 00:00:00 2001 From: Jon McPartland Date: Wed, 6 Jul 2022 16:37:01 +0100 Subject: [PATCH 03/10] Move node version setting to .travis.yml --- .travis.yml | 1 + bin/build.sh | 2 -- bin/lint.sh | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8e7b620..eebce99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ cache: - "$HOME/.yarn" - "./node_modules" before_install: +- nvm use 10 - travis_retry yarn jobs: include: diff --git a/bin/build.sh b/bin/build.sh index 3da5f25..a4f5429 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -1,7 +1,5 @@ #!/usr/bin/env sh -nvm use 10 - yarn \ && yarn build \ && yarn lang \ diff --git a/bin/lint.sh b/bin/lint.sh index c3aa5e1..225743f 100755 --- a/bin/lint.sh +++ b/bin/lint.sh @@ -1,7 +1,5 @@ #!/usr/bin/env sh -nvm use 10 - composer global require \ dealerdirect/phpcodesniffer-composer-installer:0.5.0 \ wp-coding-standards/wpcs:1.2.1 \ From aa796b095223967faf0677022f51c1a734e6f8ca Mon Sep 17 00:00:00 2001 From: Jon McPartland Date: Wed, 6 Jul 2022 16:42:38 +0100 Subject: [PATCH 04/10] Install node 10 before using it --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index eebce99..5b2b6fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ cache: - "$HOME/.yarn" - "./node_modules" before_install: +- nvm install 10 - nvm use 10 - travis_retry yarn jobs: From 0cf4bda343a6e0b06a7e656a1dbc256f051c10f7 Mon Sep 17 00:00:00 2001 From: Jon McPartland Date: Wed, 6 Jul 2022 16:47:40 +0100 Subject: [PATCH 05/10] Use node 12 instead of 10 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5b2b6fe..5d82b2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,8 @@ cache: - "$HOME/.yarn" - "./node_modules" before_install: -- nvm install 10 -- nvm use 10 +- nvm install 12 +- nvm use 12 - travis_retry yarn jobs: include: From fc227c524ea60c70d13bffb9df4e928473fd476f Mon Sep 17 00:00:00 2001 From: Jon McPartland Date: Wed, 6 Jul 2022 16:53:50 +0100 Subject: [PATCH 06/10] Revert to composer v1 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5d82b2f..81c7d36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ cache: - "$HOME/.yarn" - "./node_modules" before_install: +- composer self-update --rollback - nvm install 12 - nvm use 12 - travis_retry yarn From 830d8025916a37daade26a86dfae783dcf35544b Mon Sep 17 00:00:00 2001 From: Jon McPartland Date: Wed, 6 Jul 2022 16:59:09 +0100 Subject: [PATCH 07/10] Install specific version of composer v1 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 81c7d36..8e6c418 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ cache: - "$HOME/.yarn" - "./node_modules" before_install: -- composer self-update --rollback +- composer self-update 1.10.26 - nvm install 12 - nvm use 12 - travis_retry yarn From be89a9bd59ab5bb80dd2bd29aaeb0d9b9f07e780 Mon Sep 17 00:00:00 2001 From: Jon McPartland Date: Thu, 7 Jul 2022 09:17:45 +0100 Subject: [PATCH 08/10] Bump PHP linter versions && resolve errors The versions of the linter packages we were using are incompatible with PHP 7.4 & 8.0, for some reason. --- author.php | 2 +- bin/lint.sh | 6 +++--- footer.php | 2 +- header.php | 10 +++++----- includes/analytics-output.php | 2 +- includes/disable-rest-api.php | 4 ++++ includes/theme-options.php | 10 +++++----- partials/archive-categories.php | 4 ++-- partials/archive-header.php | 2 +- partials/article-share.php | 2 +- partials/pagination.php | 4 ++-- partials/post/post-content.php | 4 ++-- partials/post/post-search.php | 6 +++--- phpcs.xml | 10 +++++++--- searchform.php | 2 +- single.php | 13 +++++++------ 16 files changed, 46 insertions(+), 37 deletions(-) diff --git a/author.php b/author.php index 0a94aed..10c92a6 100644 --- a/author.php +++ b/author.php @@ -20,7 +20,7 @@

- Photo of <?php echo esc_html( $author_name ); ?> + Photo of <?php echo esc_attr( $author_name ); ?>
diff --git a/bin/lint.sh b/bin/lint.sh index 225743f..7c49563 100755 --- a/bin/lint.sh +++ b/bin/lint.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh composer global require \ - dealerdirect/phpcodesniffer-composer-installer:0.5.0 \ - wp-coding-standards/wpcs:1.2.1 \ - automattic/vipwpcs:0.4.0 \ + dealerdirect/phpcodesniffer-composer-installer:0.7.2 \ + wp-coding-standards/wpcs:2.3.0 \ + automattic/vipwpcs:2.3.0 \ && yarn lint diff --git a/footer.php b/footer.php index ab582fc..1e138dc 100644 --- a/footer.php +++ b/footer.php @@ -23,7 +23,7 @@
  • - + diff --git a/header.php b/header.php index b49feca..42e3237 100644 --- a/header.php +++ b/header.php @@ -71,7 +71,7 @@ - + @@ -84,14 +84,14 @@ - @@ -99,7 +99,7 @@
    - +
    diff --git a/partials/archive-categories.php b/partials/archive-categories.php index 4740375..2552bec 100644 --- a/partials/archive-categories.php +++ b/partials/archive-categories.php @@ -42,7 +42,7 @@ ?>
  • >
  • @@ -58,7 +58,7 @@ } ?> -