From 01e0473e316a0c11074c45eef374f8a0ec1a3650 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 6 Dec 2024 11:06:49 -0500 Subject: [PATCH 01/10] Upgrade alleyinteractive/wp-type-extensions to support 3.0, add matrix for testing split versions --- .github/workflows/all-pr-tests.yml | 26 ++++++++++++++++++++++++-- composer.json | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/all-pr-tests.yml b/.github/workflows/all-pr-tests.yml index 9b022a08..2e2fa4d2 100644 --- a/.github/workflows/all-pr-tests.yml +++ b/.github/workflows/all-pr-tests.yml @@ -16,6 +16,7 @@ jobs: strategy: fail-fast: false matrix: + dependencies: ["lowest", "highest"] php: [8.1, 8.2, 8.3] wordpress: ["latest"] multisite: [false, true] @@ -37,9 +38,30 @@ jobs: # See https://github.com/alleyinteractive/action-test-php for more options uses: alleyinteractive/action-test-php@develop with: + install-command: ${{ matrix.dependencies == 'lowest' && 'composer update --prefer-lowest --no-interaction --no-progress' || 'composer install --prefer-dist --no-interaction --no-progress' }} php-version: '${{ matrix.php }}' skip-audit: 'true' - wordpress-version: '${{ matrix.wordpress }}' - wordpress-multisite: '${{ matrix.multisite }}' skip-core-test-suite: 'true' skip-wordpress-install: 'true' + wordpress-multisite: '${{ matrix.multisite }}' + wordpress-version: '${{ matrix.wordpress }}' + # This required job ensures that all PR checks have passed before merging. + all-pr-checks-passed: + name: All PR checks passed + needs: + - pr-tests + runs-on: ubuntu-latest + if: always() + steps: + - name: Check job statuses + run: | + if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]]; then + echo "One or more jobs failed" + exit 1 + elif [[ "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then + echo "One or more jobs were cancelled" + exit 1 + else + echo "All jobs passed or were skipped" + exit 0 + fi diff --git a/composer.json b/composer.json index 30663733..483e04ea 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "require": { "php": "^8.1", "alleyinteractive/composer-wordpress-autoloader": "^1.0", - "alleyinteractive/wp-type-extensions": "^2.0", + "alleyinteractive/wp-type-extensions": "^2.0|^3.0", "symfony/http-foundation": "^v6.4.12" }, "require-dev": { From 7d6e85eba0b27be128f958f0d1e528f126762513 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 6 Dec 2024 11:09:25 -0500 Subject: [PATCH 02/10] Fix test, changelog --- CHANGELOG.md | 4 ++++ .../WP/Alleyvate/Features/DisableAppleNewsNonProdPushTest.php | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4894d91..68597453 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ This library adheres to [Semantic Versioning](https://semver.org/) and [Keep a C ## Unreleased +## 3.5.1 + +* Added support for `alleyinteractive/wp-type-extensions` v3. + ## 3.5.0 ### Added diff --git a/tests/Alley/WP/Alleyvate/Features/DisableAppleNewsNonProdPushTest.php b/tests/Alley/WP/Alleyvate/Features/DisableAppleNewsNonProdPushTest.php index 90508137..c9b53b3c 100644 --- a/tests/Alley/WP/Alleyvate/Features/DisableAppleNewsNonProdPushTest.php +++ b/tests/Alley/WP/Alleyvate/Features/DisableAppleNewsNonProdPushTest.php @@ -30,6 +30,8 @@ final class DisableAppleNewsNonProdPushTest extends Test_Case { * Setup before test. */ protected function setUp(): void { + parent::setUp(); + $this->feature = new Disable_Apple_News_Non_Prod_Push(); } From a091d3d87a4a59af482f620220bf520e35f97bd5 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 6 Dec 2024 11:10:34 -0500 Subject: [PATCH 03/10] Fix group name --- .github/workflows/all-pr-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/all-pr-tests.yml b/.github/workflows/all-pr-tests.yml index 2e2fa4d2..ecd95acd 100644 --- a/.github/workflows/all-pr-tests.yml +++ b/.github/workflows/all-pr-tests.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest # Cancel any existing runs of this workflow concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}-P${{ matrix.php }}-WP${{ matrix.wordpress }}-MS${{ matrix.multisite }} + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}-P${{ matrix.php }}-WP${{ matrix.wordpress }}-MS${{ matrix.multisite }}-${{ matrix.dependencies }} cancel-in-progress: true # Name the job in the matrix name: "PR Tests PHP ${{ matrix.php }} WordPress ${{ matrix.wordpress }} Multisite ${{ matrix.multisite }}" From 327680390df45c86373a756eb3006e80268d5e64 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 6 Dec 2024 11:13:28 -0500 Subject: [PATCH 04/10] Bump versions --- .github/workflows/all-pr-tests.yml | 2 +- composer.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/all-pr-tests.yml b/.github/workflows/all-pr-tests.yml index ecd95acd..87ce27a9 100644 --- a/.github/workflows/all-pr-tests.yml +++ b/.github/workflows/all-pr-tests.yml @@ -26,7 +26,7 @@ jobs: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}-P${{ matrix.php }}-WP${{ matrix.wordpress }}-MS${{ matrix.multisite }}-${{ matrix.dependencies }} cancel-in-progress: true # Name the job in the matrix - name: "PR Tests PHP ${{ matrix.php }} WordPress ${{ matrix.wordpress }} Multisite ${{ matrix.multisite }}" + name: "PR Tests PHP ${{ matrix.php }} WordPress ${{ matrix.wordpress }} Multisite ${{ matrix.multisite }} Dependencies ${{ matrix.dependencies }}" steps: - uses: actions/checkout@v4 diff --git a/composer.json b/composer.json index 483e04ea..1537dbcd 100644 --- a/composer.json +++ b/composer.json @@ -26,8 +26,8 @@ }, "require-dev": { "alleyinteractive/alley-coding-standards": "^2.0", - "friendsofphp/php-cs-fixer": "^3.8", - "mantle-framework/testkit": "^1.0", + "friendsofphp/php-cs-fixer": "^3.65", + "mantle-framework/testkit": "^1.3", "szepeviktor/phpstan-wordpress": "^1.3" }, "scripts": { From 614248d1cb6da4625d5090540109db4caa498115 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 6 Dec 2024 11:16:16 -0500 Subject: [PATCH 05/10] Version stubs --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1537dbcd..51be1768 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,8 @@ "alleyinteractive/alley-coding-standards": "^2.0", "friendsofphp/php-cs-fixer": "^3.65", "mantle-framework/testkit": "^1.3", - "szepeviktor/phpstan-wordpress": "^1.3" + "php-stubs/wordpress-stubs": "^6.0", + "szepeviktor/phpstan-wordpress": "^1.3.5" }, "scripts": { "fixer": "php-cs-fixer -v fix --allow-risky=yes", From bd611c6fdd8040b6855ed4831362633e18451ebe Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 6 Dec 2024 11:20:05 -0500 Subject: [PATCH 06/10] Bump php-stubs/wordpress-stubs --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 51be1768..3d2979d2 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "alleyinteractive/alley-coding-standards": "^2.0", "friendsofphp/php-cs-fixer": "^3.65", "mantle-framework/testkit": "^1.3", - "php-stubs/wordpress-stubs": "^6.0", + "php-stubs/wordpress-stubs": "^6.7.1", "szepeviktor/phpstan-wordpress": "^1.3.5" }, "scripts": { From 5e09deebd65978eee181ec906b0cf1b53d67fd23 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 6 Dec 2024 11:25:53 -0500 Subject: [PATCH 07/10] Adding phpunit --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 3d2979d2..3d92da04 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ "friendsofphp/php-cs-fixer": "^3.65", "mantle-framework/testkit": "^1.3", "php-stubs/wordpress-stubs": "^6.7.1", + "phpunit/phpunit": "^11.5", "szepeviktor/phpstan-wordpress": "^1.3.5" }, "scripts": { From 46bdc0ce1e1e6c369b61f78039317c2ed90cee41 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 6 Dec 2024 11:28:03 -0500 Subject: [PATCH 08/10] Adding phpunit --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3d92da04..9bba3a43 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "friendsofphp/php-cs-fixer": "^3.65", "mantle-framework/testkit": "^1.3", "php-stubs/wordpress-stubs": "^6.7.1", - "phpunit/phpunit": "^11.5", + "phpunit/phpunit": "^10.5", "szepeviktor/phpstan-wordpress": "^1.3.5" }, "scripts": { From 1886b234396dc549186b90123e18a91b0a824428 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 6 Dec 2024 11:30:09 -0500 Subject: [PATCH 09/10] Kill the split testing --- .github/workflows/all-pr-tests.yml | 6 ++---- composer.json | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/all-pr-tests.yml b/.github/workflows/all-pr-tests.yml index 87ce27a9..0e0eb484 100644 --- a/.github/workflows/all-pr-tests.yml +++ b/.github/workflows/all-pr-tests.yml @@ -16,17 +16,16 @@ jobs: strategy: fail-fast: false matrix: - dependencies: ["lowest", "highest"] php: [8.1, 8.2, 8.3] wordpress: ["latest"] multisite: [false, true] runs-on: ubuntu-latest # Cancel any existing runs of this workflow concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}-P${{ matrix.php }}-WP${{ matrix.wordpress }}-MS${{ matrix.multisite }}-${{ matrix.dependencies }} + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}-P${{ matrix.php }}-WP${{ matrix.wordpress }}-MS${{ matrix.multisite }} cancel-in-progress: true # Name the job in the matrix - name: "PR Tests PHP ${{ matrix.php }} WordPress ${{ matrix.wordpress }} Multisite ${{ matrix.multisite }} Dependencies ${{ matrix.dependencies }}" + name: "PR Tests PHP ${{ matrix.php }} WordPress ${{ matrix.wordpress }} Multisite ${{ matrix.multisite }}" steps: - uses: actions/checkout@v4 @@ -38,7 +37,6 @@ jobs: # See https://github.com/alleyinteractive/action-test-php for more options uses: alleyinteractive/action-test-php@develop with: - install-command: ${{ matrix.dependencies == 'lowest' && 'composer update --prefer-lowest --no-interaction --no-progress' || 'composer install --prefer-dist --no-interaction --no-progress' }} php-version: '${{ matrix.php }}' skip-audit: 'true' skip-core-test-suite: 'true' diff --git a/composer.json b/composer.json index 9bba3a43..aa1c2baf 100644 --- a/composer.json +++ b/composer.json @@ -28,8 +28,6 @@ "alleyinteractive/alley-coding-standards": "^2.0", "friendsofphp/php-cs-fixer": "^3.65", "mantle-framework/testkit": "^1.3", - "php-stubs/wordpress-stubs": "^6.7.1", - "phpunit/phpunit": "^10.5", "szepeviktor/phpstan-wordpress": "^1.3.5" }, "scripts": { From 1b706d9854cc52e734d4fe09082bb4f211476f8d Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 6 Dec 2024 11:33:23 -0500 Subject: [PATCH 10/10] Upgrading to 3.5.1 --- composer.json | 2 +- package.json | 5 ----- wp-alleyvate.php | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index aa1c2baf..36040505 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "phpcs": "phpcs", "phpstan": "phpstan --memory-limit=768M", "phpunit": "phpunit", - "scaffold": "npx npx @alleyinteractive/scaffolder@latest wp-alleyvate@feature", + "scaffold": "npx @alleyinteractive/scaffolder@latest wp-alleyvate@feature", "test": [ "@lint", "@phpunit" diff --git a/package.json b/package.json index ac4a92ed..f4d18153 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,6 @@ "npm": "10" }, "scripts": { - "preinstall": "check-node-version --package", - "prerelease": "check-node-version --package", "release": "npx @alleyinteractive/create-release@latest" - }, - "devDependencies": { - "check-node-version": "^4.2.1" } } diff --git a/wp-alleyvate.php b/wp-alleyvate.php index 12e14cf7..845b97bd 100644 --- a/wp-alleyvate.php +++ b/wp-alleyvate.php @@ -14,7 +14,7 @@ * Plugin Name: Alleyvate * Plugin URI: https://github.com/alleyinteractive/wp-alleyvate * Description: Defaults for WordPress sites by Alley - * Version: 3.5.0 + * Version: 3.5.1 * Author: Alley * Author URI: https://www.alley.com * Requires at least: 6.2