Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Jul 22, 2025

⚠️ DO NOT MERGE (YET) ⚠️

Please do add approvals if you agree as otherwise we won't be able to release.

PR for tracking changes for the 3.2.0 release. Target release date: Thursday July 24, 2025.


Release checklist

General

Release prep

Release

  • Merge this PR.
  • Make sure all CI builds are green.
  • Tag and create a release against main (careful, GH defaults to develop!) & copy & paste the changelog to it.
    ✏️ Check if anything from the link collection at the bottom of the changelog needs to be copied in!
    • Remove square brackets from all ticket links or make them proper full links (as GH markdown parser doesn't parse these correctly).
    • Change all contributor links to full inline links (as GH markdown parser on the Releases page doesn't parse these correctly).
  • Make sure all CI builds are green.
  • Close the milestone.
  • Open a new milestone for the next release.
  • If any open PRs/issues which were milestoned for this release did not make it into the release, update their milestone.
  • Fast-forward develop to be equal to main.

After release

  • Open a Trac ticket for WordPress Core to update.

Publicize

  • [Major releases only] Publish post about the release on Make WordPress.
  • Tweet, toot, etc about the release.
  • Post about it in Slack.
  • Submit for "Month in WordPress".
  • Submit for the "Monthy Dev Roundup".

dependabot bot and others added 30 commits April 24, 2024 19:28
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
…ecov/codecov-action-4

GH Actions: Bump codecov/codecov-action from 3 to 4
Okay, so apparently, there is a long-standing bug in the Microsoft package deploy process which caused `apt-get update` to fail in the first half hour after Microsoft has deployed a package.

The failure looks like this:
```
E: Failed to fetch https://packages.microsoft.com/ubuntu/22.04/prod/dists/jammy/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
```

As this only happens intermittently (after a MS package deploy), the chance of running into this bug are slim, but guess what: today I ran into it.

This change to the workflow is intended to prevent the next person running into this issue from having to waste time on figuring this out.

By splitting the "Install xmllint" step into two steps: one doing the `apt-get update` and one doing the actual install and making the first step one which is allowed to `continue-on-error`, this issue should hopefully not crop up anymore.

Any errors in the `apt-get update` step will now be ignored and as most errors which could potentially come from that step are irrelevant for the rest of the job anyway, this is fine.
If a relevant error would be surfaced, the next step (the xmllint install), will fail the job anyway.

Refs:
* actions/runner-images#3410
* dotnet/core#4167
…ass-apt-get-update

GH Actions: work around intermittent apt-get errors
* Composer: avoid writing a lock file

* Allow creation of composer.lock during some tests
…ns_ValidFunctionName_Documentation

Add documentation for WordPress.NamingConventions.ValidFunctionName
* Double checked that all existing XML docs have the `xsi` attributes and schema reference of the `<documentation>` element.
* Verified that the contents of `<standard>` elements is consistently indented (with four spaces).
* Verified that all `<code>` `title` attributes use proper punctuation.
* Docs: add documentation for WordPress.DB.PreparedSQL

---------

Co-authored-by: Juliette <[email protected]>
…eaks

Documentation: various consistency fixes
Follow up on 2468

Darn! Looks like I forgot to push an update to the commit. Sorry about that.

This adds the capitalization consistency fixes for the `<code>` `title` attributes.

Co-authored-by: jrfnl <[email protected]>
* ✨ New WordPress.WP.GetMetaSingle sniff
  * This sniff warns when get_*_meta() and get_metadata*() functions are used with the $meta_key/$key param, but without the $single parameter. This could lead to unexpected behavior as an array will be returned, but a string might be expected.

---------

Co-authored-by: Juliette <[email protected]>
)

This commit fixes the test failure seen in PR 2499.

The test failure was surfaced due to a new exception in PHPCS (see: PHPCSStandards/PHP_CodeSniffer 524), which will be included in PHPCS 3.11.0.

The test failure highlighted that the above mentioned PHPCS PR needs a follow-up with some extra defensive coding, however, that defensive coding is needed in a part in PHPCS which does the error handling for PHP notices being encountered, i.e. the throwing of `Internal.Exception` errors.

This implied there was also an underlying issue in WPCS causing the `Internal.Exception`, which apparently was only triggered when the fixer was being run.

> Note: the fact that `Internal.Exception`s during a PHPCBF run are being suppressed is a known issue, but fixing that is not that easy, so that definitely won't happen before PHPCS 4.0 (and may not even make it into 4.0). See: squizlabs/PHP_CodeSniffer 2871

Either way, I've looked into the `Internal.Exception` now.
The error was as follows:
```
An error occurred during processing; checking has been aborted. The error message was: PHPCSUtils\Utils\GetTokensAsString::getString(): Argument #2 ($start) must be a stack pointer which exists in the $phpcsFile object, 8 given.
The error originated in the AbstractClassRestrictionsSniff.php sniff on line 131.
```

The additional defensive coding added in this commit, fixes the issue.

Co-authored-by: jrfnl <[email protected]>
... to make sure this is checked a little more regularly.
... to satisfy shellcheck rule SC2086: "Double quote to prevent globbing and word splitting".

Ref: https://www.shellcheck.net/wiki/SC2086
This commit updates various sniffs to use `return $phpcsFile->numTokens` instead of `return ($phpcsFile->numTokens + 1)`.

If a sniff file contains 50 tokens, the last `$stackPtr` will be 49, so returning `50` will already get us passed the end of the token stack and the `+ 1` is redundant.

Includes changing a few plain `return` statements to `return $phpcsFile->numTokens` for efficiency.
This Monday, [PHPStan 2.0 will be released](https://phpc.social/@OndrejMirtes/113441109253809720).

I've done some preliminary scans with PHPStan 2.0-dev to check if this would have an impact on this codebase and as things are, this would mean the build would start to fail.

For now, I'm proposing to make a small change in the GH Actions workflow to explicitly use PHPStan 1.x.

This buys us some time to evaluate PHPStan 2.0 properly and to make any changes needed to make the codebase compatible with PHPStan 2.x when we're ready for it.
Even though PR 2507 ensured we didn't automatically move onto PHPStan 2.0, the build is still failing as PHPStan 1.12.9 contained a change which causes a new error to show up.

This commit fixes [the newly flagged issue](https://github.com/WordPress/WordPress-Coding-Standards/actions/runs/11775908547/job/32797254994) to allow builds to pass again.

Ref: https://github.com/phpstan/phpstan/releases/tag/1.12.9
* Builds against PHP 8.4 are no longer allowed to fail.
* Add _allowed to fail_ build against PHP 8.5.
* Update the "tested against" badge in the README.

Ref: https://www.php.net/releases/8.4/en.php
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
GaryJones and others added 9 commits July 21, 2025 15:37
The minimum version should be three versions behind the latest WP release, so what with 6.8.2 being the latest release, it should now become 6.5.

Includes updating the tests to match.

Previous: 2121, 2321. 2436
…2544)

... but pass them to a dedicated `process_first_class_callable()` method instead to allow sniffs to decide whether to flag these or not.

Typical use-case for why first class callables should not be ignored by default:
A sniff which ALWAYS flags the use of a certain function, but has different error messages depending on whether parameters are passed or not.

In that situation, I believe first class callables should be treated the same as other uses of the target function.
First class callables are basically syntax sugar for closures (example: https://3v4l.org/cra8s)  and if the sniff would flag the use of the target function within a closure, it is only reasonable to also flag the use of the target function as a first class callable.

This commit implements this.

The commit does not include tests as there are no sniffs in WPCS for which the above would apply. However, I have manually tested this change via a sniff in an external standard for which this change is relevant.
…sion

Update the `minimum_wp_version` to WP 6.5
Release date tentatively set to this Thursday July 24th.

Note: I've added the tickets links as per the suggestion in 2535 and added a note about this in the release checklist.
If it's too early for this, I can still remove them.

Co-authored-by: Rodrigo Primo <[email protected]>
Indentation in markdown should always be spaces, not tabs.
Changelog for the release of WordPressCS 3.2.0
@jrfnl jrfnl marked this pull request as ready for review July 24, 2025 06:12
@jrfnl
Copy link
Member Author

jrfnl commented Jul 24, 2025

@dingo-d I've saved the release as draft. When you're ready to approve this, please finish off the release.

@dingo-d
Copy link
Member

dingo-d commented Jul 24, 2025

I've approved this, I'm on a workshop the whole day, so don't have much time to do releases.

@jrfnl jrfnl merged commit d2421de into main Jul 24, 2025
51 checks passed
@jrfnl
Copy link
Member Author

jrfnl commented Jul 24, 2025

Okay, finished the release now. If anyone wants to pick up the "After release" and "Publicize" actions, please do.

@rodrigoprimo
Copy link
Collaborator

I will create the Trac ticket and look into the Publicize items.

@rodrigoprimo
Copy link
Collaborator

rodrigoprimo commented Jul 28, 2025

I don't have permission to update the checklist on the issue description, so I will document here what I did:

After release

Publicize

Since this is not a major release, I did not prepare a Make WordPress post. I don't typically use Twitter or other social media, so I don't plan to announce the release on those platforms.

I'm not sure where on Slack to post about the release. I can see that a message about the release is automatically posted to #core-coding-standards (https://wordpress.slack.com/archives/C5VCTJGH3/p1753387904026019). Should I post a message somewhere else? On a quick search, I was not able to find examples of similar messages for previous releases.

"Month in WordPress" is no longer taking submissions, but they do point to a new way to ask the marketing team to amplify a story, and I submitted an issue about the WPCS release.

@jrfnl
Copy link
Member Author

jrfnl commented Jul 28, 2025

I don't have permission to update the checklist on the issue description, so I will document here what I did:

Thanks @rodrigoprimo !

I'm not sure where on Slack to post about the release. I can see that a message about the release is automatically posted to #core-coding-standards (https://wordpress.slack.com/archives/C5VCTJGH3/p1753387904026019). Should I post a message somewhere else? On a quick search, I was not able to find examples of similar messages for previous releases.

I seem to recall I often also posted in the generic #core channel.

"Month in WordPress" is no longer taking submissions, but they do point to a new way to ask the marketing team to amplify a story, and I submitted an issue about the WPCS release.

Thanks for that. Would like to submit a PR to update the release-checklist to document the new process ?

@rodrigoprimo
Copy link
Collaborator

I seem to recall I often also posted in the generic #core channel.

Now I found a few examples of the messages that you posted and left a message there as well: https://wordpress.slack.com/archives/C02RQBWTW/p1753797063033419

Thanks for that. Would like to submit a PR to update the release-checklist to document the new process ?

Yes, I will do that. I will also clarify to which channel on the WP Slack to post about the release.

@rodrigoprimo
Copy link
Collaborator

Before I make the suggestions, I will wait to hear back from the Marketing team regarding the amplification request that I made to see if it makes sense to update the "Month in WordPress" item or to remove it.

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.