From 982aabed802056474e6ed82716099e7f3da739a3 Mon Sep 17 00:00:00 2001 From: Filip Ilic Date: Tue, 6 Oct 2026 20:54:17 +0200 Subject: [PATCH 1/2] Update PHPStan to 2.3 PHPStan 2.3 knows get_comments() with count => true returns an int, so the @phpstan-ignore-line on that comparison no longer suppresses anything and is reported as unmatched; removed. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Filip Ilic --- composer.lock | 24 +++++++++++++-------- inc/progress-planner/comment-moderation.php | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/composer.lock b/composer.lock index 5055a39..a085197 100644 --- a/composer.lock +++ b/composer.lock @@ -2055,16 +2055,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.23", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "a34502adbbd5c2366b5a97679848a5ace4f6f2f5" - }, + "version": "2.3.0", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a34502adbbd5c2366b5a97679848a5ace4f6f2f5", - "reference": "a34502adbbd5c2366b5a97679848a5ace4f6f2f5", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b1f9890d9af53a25c58129e78f0aadd31f90d7f4", + "reference": "b1f9890d9af53a25c58129e78f0aadd31f90d7f4", "shasum": "" }, "require": { @@ -2087,6 +2082,17 @@ "license": [ "MIT" ], + "authors": [ + { + "name": "Ondřej Mirtes" + }, + { + "name": "Markus Staab" + }, + { + "name": "Vincent Langlet" + } + ], "description": "PHPStan - PHP Static Analysis Tool", "keywords": [ "dev", @@ -2109,7 +2115,7 @@ "type": "github" } ], - "time": "2025-09-10T11:42:22+00:00" + "time": "2026-10-06T06:15:36+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/inc/progress-planner/comment-moderation.php b/inc/progress-planner/comment-moderation.php index 7904c27..371cae9 100644 --- a/inc/progress-planner/comment-moderation.php +++ b/inc/progress-planner/comment-moderation.php @@ -90,7 +90,7 @@ public function should_add_task() { ] ); - return $comments > 0; // @phpstan-ignore-line + return $comments > 0; } /** From 8c0f9faadd8bcd5b6604642adcd8e351d9be95f4 Mon Sep 17 00:00:00 2001 From: Joost de Valk Date: Tue, 17 Nov 2026 11:45:38 +0100 Subject: [PATCH 2/2] Fix Playground CI for Dependabot and fork pull requests --- .github/dependabot.yml | 1 - .github/workflows/playground.yml | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 50e0ff7..74ea876 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,4 +15,3 @@ updates: prefix: "GH Actions:" labels: - "changelog: non-user-facing" - - "yoast cs/qa" diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml index 5e6cdc8..1929a28 100644 --- a/.github/workflows/playground.yml +++ b/.github/workflows/playground.yml @@ -6,6 +6,8 @@ on: jobs: playground: runs-on: ubuntu-latest + env: + PLUGIN_SLUG: yoast-comment-hacks permissions: contents: read pull-requests: write @@ -77,14 +79,14 @@ jobs: id: blueprint run: | set -euxo pipefail - ARTIFACT_URL="https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ secrets.DOT_ORG_SLUG }}.zip" + ARTIFACT_URL="https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ env.PLUGIN_SLUG }}.zip" # Use Node.js to parse, modify, and stringify the JSON BLUEPRINT=$(node -e " const fs = require('fs'); const blueprint = JSON.parse(fs.readFileSync('.wordpress-org/blueprints/playground.json', 'utf8')); blueprint.plugins = blueprint.plugins.map(plugin => - plugin === '${{ secrets.DOT_ORG_SLUG }}' ? '$ARTIFACT_URL' : plugin + plugin === '${{ env.PLUGIN_SLUG }}' ? '$ARTIFACT_URL' : plugin ); console.log(JSON.stringify(blueprint)); ") @@ -99,15 +101,17 @@ jobs: - name: Upload plugin artifact uses: actions/upload-artifact@v6 with: - name: ${{ secrets.DOT_ORG_SLUG }} + name: ${{ env.PLUGIN_SLUG }} path: ${{ steps.prep.outputs.PKG_DIR }} # Optional: faster uploads for already-compressed assets compression-level: 0 # Comment with a Playground link that installs from the artifact ZIP - uses: mshick/add-pr-comment@v2 + # Fork and Dependabot runs can build artifacts but cannot write PR comments. + if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' && github.event.pull_request.user.login != 'dependabot[bot]' with: message: | **Test on Playground** [Test this pull request on the Playground](https://playground.wordpress.net/#${{ steps.blueprint.outputs.blueprint }}) - or [download the zip](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ secrets.DOT_ORG_SLUG }}.zip) + or [download the zip](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ env.PLUGIN_SLUG }}.zip)