Skip to content

Release 1.2.1#105

Merged
jrfnl merged 66 commits intomainfrom
develop
Feb 5, 2026
Merged

Release 1.2.1#105
jrfnl merged 66 commits intomainfrom
develop

Conversation

@jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Feb 5, 2026

No description provided.

jrfnl and others added 30 commits November 23, 2023 05:05
... as the old URLs are no longer valid.
* Builds against PHP 8.3 are no longer allowed to fail.
* Update PHP version on which code coverage is run (high should now be 8.3).
* Add _allowed to fail_ build against PHP 8.4.
GH Actions: update a few links in inline comments
…ased

GH Actions/test: PHP 8.3 has been released
This is a new feature available since Composer 2.6.0, which was released a few weeks ago.

When this key is added, it will also show a link to the security policy on Packagist.

Refs:
* https://github.com/composer/composer/releases/tag/2.6.0
* composer/composer#11271
* composer/packagist#1353
Simplify the code coverage workflow by removing the dependency on the `php-coveralls/php-coveralls` package and switching to the `coverallsapp/github-action` action runner, which, as of the release of the [0.6.5 version of the Coverage Reporter](https://github.com/coverallsapp/coverage-reporter/releases/tag/v0.6.5) now natively supports the Clover format.

The `COVERALLS_TOKEN` can now be removed from Settings -> Secrets.
Composer.json: add link to security policy
…eporter

GH Actions: switch to Coveralls action runner to upload reports
CS: minor tweaks to comply with WordPressCS 3.0
YoastCS 3.0.0 has been released and is based on WordPressCS 3.0.0.

This commit makes the necessary updates for that:
* Composer: update the requirements.
* PHPCS ruleset:
    - Exclude new (and more) WP specific rules which don't apply to this package.
    - Exclude code modernization sniffs which can't be applied to this package yet.
    - Enforce strict PSR-4 for both src and tests.
    - Update a few property names for new names in WordPressCS 3.0.
    - Remove a few exclusions which are no longer needed.
    - Add a few selective exclusions for specific situations.
* GHA CS workflow: run the CS check on the latest PHP version.
    No need to run on PHP 7.4 any more as the deprecations previously encountered were all fixed.

While YoastCS 3.0.0 contains lots of goodies, it also has a downside: a minimum PHP requirement of PHP 7.2, which conflicts with the minimum supported PHP version of this package.

This causes two issues:
1. A plain `composer install` will no longer work on PHP < 7.2.
    This means the YoastCS package will need to be removed for the CI test workfows.
2. As the (Parallel) linting packages are "inherited" from YoastCS, removing YoastCS would break the linting command in CI, so we need to `require-dev` the Parallel Lint packages in PHPUnit Polyfills itself to allow the workflow to continue to work.

With those two work-arounds in place, everything should work again.

Refs:
* https://github.com/Yoast/yoastcs/releases/tag/3.0.0
* https://github.com/WordPress/WordPress-Coding-Standards/releases/tag/3.0.0
…-3.0.0

Composer/PHPCS: update to YoastCS 3.0.0
Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 2 to 3.
- [Release notes](https://github.com/ramsey/composer-install/releases)
- [Commits](ramsey/composer-install@v2...v3)

---
updated-dependencies:
- dependency-name: ramsey/composer-install
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…mposer-install-3

GH Actions: Bump ramsey/composer-install from 2 to 3
Nearly all dev dependencies have had new releases. This commit updates the plugin to use the new versions.

For linting, the upgrade will get us preliminary PHP 8.4 support.
For CS, the upgrades will get us improved syntax support for PHP 8.3, improved information related to the WP 6.5 release, more documentation and a range of bug fixes.
This upgrade will get us continued support for running the tests via a PHAR file after the latest PHPUnit releases, as well as preliminary PHP 8.4 support.
Set the minimum supported BrainMonkey version to the release which adds compatibility with PHP 8.4.

Refs:
* https://github.com/Brain-WP/BrainMonkey/releases/tag/2.6.2
* Builds against PHP 8.4 are no longer allowed to fail.
* Update PHP version on which code coverage is run (high should now be 8.4).
* Add _allowed to fail_ build against PHP 8.5.
GH Actions/test: anticipate PHP 8.4 release
Composer 1.10.0 introduced a `lock` config option, which, when set to `false` will prevent a `composer.lock` file from being created and will ignore it when one exists.

This is a useful option for libraries such as this where the `lock` file has no meaning.

It also makes life easier for contributors as they don't have to remember that for this repo they should use `composer update` instead of `composer install`. Both will now work the same.

Refs:
https://getcomposer.org/doc/06-config.md#lock
Composer: prevent a lock file from being created
This job checks the GH Actions workflows against syntax errors and other problems.
This commit adds a new workflow which runs on pushes (merges) to any of the long-running branches and whenever the contents of a pull requests changes.

It will check whether any open PRs are in a "conflict state" (after the push) and if so, will add a "merge conflict" label and leave a comment on the PR asking the OP to solve the conflict.
The workflow will automatically remove the label again when the conflict is resolved.

This workflow uses a reusable action stored in the `.github` repository which takes care of the default settings, though a number of settings can still be overruled for an individual repo.

For now, it has not been deemed necessary to overrule these though.
Hmm... this is an awkward one and may need fixing in PHPCS 4.0, but in the mean time, let's fix it here.

The base `Yoast` ruleset includes select sniffs from the `WordPressVIPMinimum` ruleset. These sniff do not apply to the WP TestUtils package.

Now, when an `<exclude name="..."/>` rule references a ruleset name to _exclude_ those sniffs, that whole standard is read and included, after which the individual sniffs from the ruleset are excluded again.

This also means that if such a ruleset _also_ includes sniffs from other standards and/or customizations (changes in severity/excludes/messaging/properties etc) to sniffs from other standards, those sniffs from other standards will still be included and the customizations still be applied.

This will often silently lead to unexpected side-effects, like in the case of the exclusion of the `WordPressVIPMinimum` ruleset, which meant that certain rules we _do_ want applied, like "no superfluous whitespace at the end of a line", got unintentionally excluded.

Fixed now by excluding the individual sniffs from the `WordPressVIPMinimum` standard which were included by the `Yoast` ruleset, instead of excluding the whole `WordPressVIPMinimum` standard.
jrfnl and others added 26 commits November 24, 2025 10:26
…heckout-6

GH Actions: Bump actions/checkout from 5 to 6
The `poser.pugx.org` site isn't working half the time and broken badges do not look good.
…name

GH Actions/test: ensure all jobs have a name
Recently there has been more and more focus on securing GH Actions workflows - in part due to some incidents.

The problem with "unpinned" action runners is as follows:
* Tags are mutable, which means that a tag could point to a safe commit today, but to a malicious commit tomorrow.
    Note that GitHub is currently beta-testing a new "immutable releases" feature (= tags and release artifacts can not be changed anymore once the release is published), but whether that has much effect depends on the ecosystem of the packages using the feature.
    Aside from that, it will likely take years before all projects adopt _immutable releases_.
* Action runners often don't even point to a tag, but to a branch, making the used action runner a moving target.
    _Note: this type of "floating major" for action runners used to be promoted as good practice when the ecosystem was "young". Insights have since changed._

While it is convenient to use "floating majors" of action runners, as this means you only need to update the workflows on a new major release of the action runner, the price is higher risk of malicious code being executed in workflows.

Dependabot, by now, can automatically submit PRs to update pinned action runners too, as long as the commit-hash pinned runner is followed by a comment listing the released version the commit is pointing to.

So, what with Dependabot being capable of updating workflows with pinned action runners, I believe it is time to update the workflows to the _current_ best practice of using commit-hash pinned action runners.

The downside of this change is that there will be more frequent Dependabot PRs.

If this would become a burden/irritating, the following mitigations can be implemented:
1. Updating the Dependabot config to group updates instead of sending individual PRs per action runner.
2. A workflow to automatically merge Dependabot PRs as long as CI passes.

Ref: https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions
👉 Important: this is for **version** updates only, not for security updates, which are handled separately and don't depend on this configuration.

---

This commit makes the following changes to the Dependabot config to reduce the number of Dependabot PRs, while still keeping the workflows up to date with a reasonable frequency:
* It introduces a "group".
    By default Dependabot raises individual PRs for each update. Now, it will group updates to new minor or patch release for all action runners into a single PR.
    Updates to new major releases of action runners will still be raised as individual PRs.
* It changes the schedule from `weekly` (on Monday, at whatever time this repo reaches the front of the HUGE queue which it will always have on Monday) to twice a month at a specific time which is not midnight.
    Aside from making the PRs less frequent, it should also make the arrival time more predictable as the queue created at 22:10 (in whatever timezone Dependabot runs in) will be next to nothing as it would need more repos to use this exact configuration.

Refs:
* https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/optimizing-pr-creation-version-updates
* https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference
> By default, using `actions/checkout` causes a credential to be persisted in the checked-out repo's `.git/config`, so that subsequent `git` operations can be authenticated.
>
> Subsequent steps may accidentally publicly persist `.git/config`, e.g. by including it in a publicly accessible artifact via `actions/upload-artifact`.
>
> However, even without this, persisting the credential in the `.git/config` is non-ideal unless actually needed.
>
> **Remediation**
>
> Unless needed for `git` operations, `actions/checkout` should be used with `persist-credentials: false`.
>
> If the persisted credential is needed, it should be made explicit with `persist-credentials: true`.

This has now been addressed in all workflows.

Refs:
* https://unit42.paloaltonetworks.com/github-repo-artifacts-leak-tokens/
* https://docs.zizmor.sh/audits/#artipacked
…tials

GH Actions: do not persist credentials
Setup-PHP will normally "gracefully" show a warning and not the build when an extension or tool failed to install.

This is not particularly useful as that means that either there will be a failure later on in the build due to the extension or tool missing, or the build will not be representative of what is supposed to be tested.

This commit changes this behaviour to fail the build at the `setup-php` step, which also makes debugging these type of build failures much more straight-forward.

Ref: https://github.com/shivammathur/setup-php?tab=readme-ov-file#fail-fast-optional
GH Actions: update PHP ini configuration
GH Actions: fail "setup-php" if requested tooling could not be installed
…led [2]

Follow up on 98, which missed one instance of `setup-php`.

---

Setup-PHP will normally "gracefully" show a warning and not the build when an extension or tool failed to install.

This is not particularly useful as that means that either there will be a failure later on in the build due to the extension or tool missing, or the build will not be representative of what is supposed to be tested.

This commit changes this behaviour to fail the build at the `setup-php` step, which also makes debugging these type of build failures much more straight-forward.

Ref: https://github.com/shivammathur/setup-php?tab=readme-ov-file#fail-fast-optional
GH Actions: fail "setup-php" if requested tooling could not be installed [2]
This upgrade will get us improved compatibility with PHP 8.5.
BrainMonkey 2.7.0 has just been released and adds improved compatibility with WP 6.9 for select functions, as well as confirms compatibility with PHP 8.4 and 8.5.

Ref: https://github.com/Brain-WP/BrainMonkey/releases/tag/2.7.0
Composer: update the version constraint for BrainMonkey to `^2.7.0`
... as a straight-forward reminder of the steps to release.
@jrfnl jrfnl added this to the 1.x Next Release milestone Feb 5, 2026
@coveralls
Copy link

Coverage Status

coverage: 99.167% (+0.07%) from 99.099%
when pulling 98aa23a on develop
into 2e0f62e on main.

@jrfnl jrfnl merged commit e1c316f into main Feb 5, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants