Skip to content

CSS API: Add CSS token processor foundations - #92

Draft
sirreal wants to merge 487 commits into
trunkfrom
css-api/css-token-processor-foundations
Draft

sirreal wants to merge 487 commits into
trunkfrom
css-api/css-token-processor-foundations

Conversation

@sirreal

@sirreal sirreal commented Jul 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add WP_CSS_Token_Processor as the low-level CSS Syntax tokenization foundation
  • add WP_CSS_Builder, used to serialize token values safely
  • support safe, repeatable updates to URL and string token values
  • load both classes during WordPress bootstrap
  • add focused unit coverage and the synchronized PHP Toolkit CSS corpus

This is intentionally extracted from css-api/add-css-token-processor without its adjacent stylesheet parser, font normalization, selector, and custom test-harness explorations. It provides a small base for follow-up CSS API work, including the style-attribute processor in #78.

Validation

  • WP_TESTS_SKIP_INSTALL=1 vendor/bin/phpunit tests/phpunit/tests/css-api/wpCssBuilder.php — 46 tests, 200 assertions
  • WP_TESTS_SKIP_INSTALL=1 vendor/bin/phpunit tests/phpunit/tests/css-api/wpCssTokenProcessor.php — 266 tests, 385 assertions
  • vendor/bin/phpcs --standard=phpcs.xml.dist on the four PHP files
  • git diff --check

Trac ticket: https://core.trac.wordpress.org/ticket/62653

Use of AI Tools

AI assistance: Yes
Tool(s): ChatGPT/Codex
Model(s): GPT-5
Used for: extracting the CSS foundations from the broader API exploration, refining the implementation and tests, adversarial review, and updating this PR description.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@sirreal
sirreal force-pushed the css-api/css-token-processor-foundations branch from b7e1df7 to 2a146f7 Compare July 23, 2026 10:31
@sirreal
sirreal force-pushed the css-api/css-token-processor-foundations branch from 2a146f7 to 7c1178c Compare August 26, 2026 09:57
Comment on lines +120 to +156
public static function string( string $value ): string {
$value = wp_scrub_utf8( $value );
$escaped = strtr(
$value,
array(
// Escape existing backslashes to prevent unintentional escapes in result.
'\\' => '\\5C ',

// Pre-processing replaces NULLs and some newlines. Replace and escape as necessary.
"\0" => "\u{FFFD}",

// Normalize and replace newlines. https://www.w3.org/TR/css-syntax-3/#input-preprocessing
"\r\n" => '\\A ',
"\r" => '\\A ',
"\f" => '\\A ',

// Newlines must be escaped in CSS strings.
"\n" => '\\A ',

// Arbitrary characters for Unicode escaping:

// HTML syntax may be problematic.
'<' => '\\3C ',
'>' => '\\3E ',
'&' => '\\26 ',

// CSS syntax may be problematic.
',' => '\\2C ',
';' => '\\3B ',
'{' => '\\7B ',
'}' => '\\7D ',
'"' => '\\22 ',
"'" => '\\27 ',
)
);
return "\"{$escaped}\"";
}

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This form of escaping is problematic because there are places in Core that use sanitize_text_field() for CSS. In the space-terminated escape sequences, the terminating whitespace character is significant, so the first space is consumed by the escape sequence. This means that 1 space becomes 0, 2 becomes 1, etc. If the adjacent 2 spaces are collapsed to 1, it breaks that input.

https://github.com/WordPress/wordpress-develop/blob/36d425e7bbd177507f0df6d543b1cb8d8a5da41a/src/wp-includes/fonts/class-wp-font-utils.php#L65

https://github.com/WordPress/wordpress-develop/blob/36d425e7bbd177507f0df6d543b1cb8d8a5da41a/src/wp-includes/formatting.php#L5751-L5754

That function seems unsuitable for the CSS escaping and should probably be replaced with the CSS functions in this PR, but in the interest of being defensive it may be best to always use the 6 character form of the escapes: \00003C instead of \3C . This may be less confusing and less likely to break downstream expectations, although either is a valid CSS Unicode escape sequence.

@sirreal
sirreal force-pushed the css-api/css-token-processor-foundations branch from 2ed7203 to 7711c31 Compare September 25, 2026 07:07
@sirreal
sirreal force-pushed the css-api/css-token-processor-foundations branch from 7711c31 to a9d4b5d Compare October 9, 2026 08:13
lancewillett and others added 23 commits November 3, 2026 17:16
Add E2E tests that the admin bar shows on the front page for a logged-in user and is absent for a logged-out visitor. The logged-out test starts without cookies, so it leaves the shared admin session intact.

Developed in: WordPress#9023

Props sukhendu2002, hideokamoto, justinahinon, talldanwp, isabel_brison, sirlouen, wildworks.
Fixes #48978.


git-svn-id: https://develop.svn.wordpress.org/trunk@65241 602fd350-edb4-49c9-b593-d223f7449a82
Add an E2E regression test for the Gutenberg 10.7 bug that cleared `stylesheet` and `template` when General Settings were saved. The test saves a new tagline through the settings form, checks both theme options are unchanged, and restores the tagline.

Developed in: WordPress#8301

Props abcd95, fullofcaffeine.
Fixes #53520.


git-svn-id: https://develop.svn.wordpress.org/trunk@65242 602fd350-edb4-49c9-b593-d223f7449a82
Verify that a title containing `%10` keeps the octet in its slug, and that the resulting permalink resolves to the post.

Developed in: WordPress#8250

Props abcd95, mte90.
Fixes WordPress#3329.


git-svn-id: https://develop.svn.wordpress.org/trunk@65243 602fd350-edb4-49c9-b593-d223f7449a82
…s absence.

Two `Tests_Dependencies_Styles` tests assumed the active theme does not support `wp-block-styles`. Remove that support in each test instead of relying on earlier tests leaving it unset.

Developed in: WordPress#14688

Props devmuhib, huzaifaalmesbah.
See #65893.


git-svn-id: https://develop.svn.wordpress.org/trunk@65244 602fd350-edb4-49c9-b593-d223f7449a82
… test.

Use `assertEqualHTML()` instead of `assertSame()` when checking that `WP_HTML_Processor::serialize_token()` reflects enqueued attribute updates, so the test no longer depends on the order of serialized attributes.

Developed in: WordPress#15373

Props motylanogha, dmsnell.
See #64567.


git-svn-id: https://develop.svn.wordpress.org/trunk@65245 602fd350-edb4-49c9-b593-d223f7449a82
This fixes the level-10 PHPStan errors that predate the hash notation visitor's recent changes, along with a few PhpStorm inspection warnings, without changing the `@phpstan-*` tags the visitor derives across `src/`.

Most of the errors came from one limit: an entry in a hash can open a hash of its own, and an array shape cannot refer to itself, so every nested entry was `mixed`. Entries are therefore read into a new `HashEntry` class, whose children are typed as entries in turn. The rest came from writes through a list offset, which PHPStan reads as adding an incomplete element, so a tag or entry is now completed before it is added to its list. String types are also narrowed where possible, though an entry's type and key are only non-empty strings, since `0` is valid as either.

Developed in WordPress#15384.
Follow-up to r63420, r63789, r65217.

Props westonruter, lancewillett.
See #65817.


git-svn-id: https://develop.svn.wordpress.org/trunk@65246 602fd350-edb4-49c9-b593-d223f7449a82
In r62719 an inline `@var` was added after the `apply_filters()` call in `get_oembed_response_data()`, narrowing the filtered widths for `clamp()`. A type declared below the assignment it describes is confusing to read, but it could not go above, since the filter's docblock must immediately precede `apply_filters()` or the hook is reported as undocumented. The shape is now declared once, as a `@phpstan-param` in the filter docblock next to the `@param` hash it refines.

The `min` and `max` keys are also marked `Required.` in the hash. Since r65217 that marker makes a key required, where the keys of a `@param` hash are otherwise read as optional because a caller may pass a subset of them. That does not fit a filtered value: core always passes both keys, and a callback must return both, since they are read unconditionally. The documented defaults therefore describe the values core supplies, not a fallback for an omitted key. The `@phpstan-param` is kept regardless, because the hash only says `int`, while the shape narrows the widths to `positive-int`.

Developed in WordPress#15264.
Follow-up to r62719, r65217.

Props westonruter, dmsnell.
See #65817.


git-svn-id: https://develop.svn.wordpress.org/trunk@65247 602fd350-edb4-49c9-b593-d223f7449a82
PHP 8.6 has deprecated passing an object to `ReflectionMethod::invoke()` and `ReflectionMethodL::invokeArgs()` when the target method is static.

This addresses this within two PHPUnit-related files.

Props westonruter.
Fixes #66457.


git-svn-id: https://develop.svn.wordpress.org/trunk@65248 602fd350-edb4-49c9-b593-d223f7449a82
…head_ref`.

The current standard across all GitHub Actions workflows is to configure `concurrency` to use the `github.head_ref` value in the `group` name for a given PR. Because `head_ref` only includes the branch name, workflow runs can be inadvertantly cancelled when two PRs are open from different forks with identical branch names.

This switches to using the `github.event.pull_request.number` instead of `github.head_ref` to ensure that runs are properly grouped only with runs from the same pull request. A similar change has been made to `props-bot.yml`, which can be triggered by an `issue_comment` event. In this case, the `github.event.issue.number` will be used. In the context of GitHub, `issues == pull_requests` for the data returned by a number of request types.

Props lancewillett.
See #65845.



git-svn-id: https://develop.svn.wordpress.org/trunk@65249 602fd350-edb4-49c9-b593-d223f7449a82
`wp_random_content_flush_rewrite_rules_for_post()` runs on the `wp_after_insert_post` and `after_delete_post` actions, which third-party code may fire with a missing or incorrectly typed `$post`. Also make the `$post` parameter of `_update_posts_count_on_delete()` optional for the same single-argument `after_delete_post` calls.

Developed in: WordPress#14356

Follow-up to r64402.

Props jorbin, bradshawtm, therssoftware.
Fixes #64498.


git-svn-id: https://develop.svn.wordpress.org/trunk@65250 602fd350-edb4-49c9-b593-d223f7449a82
…-exclude-group`.

Passing `--exclude-group` replaces the group exclusions in the PHPUnit XML config, and the test bootstrap also cleared its own list of skipped groups. So any `--exclude-group` run also ran the groups excluded by default, such as `ajax`, `ms-files` and `external-http`.

A new test listener now removes default-excluded tests from every suite, including nested ones, before class fixtures run. A group requested with `--group` still runs.

Developed in: WordPress#11801

Props arkaprabhachowdhury, netweb, isabel_brison, johnbillion.
Fixes #34185.


git-svn-id: https://develop.svn.wordpress.org/trunk@65251 602fd350-edb4-49c9-b593-d223f7449a82
The `format_for_editor()` test was not part of that change. It will land with its own ticket.

See #34185, #65819.


git-svn-id: https://develop.svn.wordpress.org/trunk@65252 602fd350-edb4-49c9-b593-d223f7449a82
Add tests that `find_core_update()` returns false without update data, returns the update that matches both version and locale, and returns false when either the locale or the version does not match.

Developed in: WordPress#15378

Props shailu25.
Fixes #66470.


git-svn-id: https://develop.svn.wordpress.org/trunk@65253 602fd350-edb4-49c9-b593-d223f7449a82
Add tests that `get_taxonomies_for_attachments()` returns taxonomies registered for attachments and for attachment subtypes such as `attachment:image`, as names or as objects, and leaves out taxonomies for other post types.

Developed in: WordPress#15377

Props shailu25.
Fixes #66471.


git-svn-id: https://develop.svn.wordpress.org/trunk@65254 602fd350-edb4-49c9-b593-d223f7449a82
Add a test that a callback on the `post_mime_types` filter can change the labels `get_post_mime_types()` returns.

Developed in: WordPress#15376

Props shailu25.
Fixes #66472.


git-svn-id: https://develop.svn.wordpress.org/trunk@65255 602fd350-edb4-49c9-b593-d223f7449a82
…alink_rss()`.

Add a test that the `the_permalink_rss` filter receives the post permalink, and that the filtered URL is escaped in the feed output.

Developed in: WordPress#15371

Props shailu25.
Fixes #66473.


git-svn-id: https://develop.svn.wordpress.org/trunk@65256 602fd350-edb4-49c9-b593-d223f7449a82
Add a test that a callback on the `get_wp_title_rss` filter receives the document title and can change the feed title that `get_wp_title_rss()` returns.

Developed in: WordPress#15370

Props shailu25.
Fixes #66474.


git-svn-id: https://develop.svn.wordpress.org/trunk@65257 602fd350-edb4-49c9-b593-d223f7449a82
The three client-side media upload specs each kept their own copies of the same constants and helpers. Move them into `tests/e2e/utils/media-pipeline.js`, and import them in each spec.

`countUploadRequests()` had two versions. The shared one returns all five counters, so every existing assertion still applies.

Developed in: WordPress#15429

Props adrianmoldovanwp.
See #66455.


git-svn-id: https://develop.svn.wordpress.org/trunk@65258 602fd350-edb4-49c9-b593-d223f7449a82
`WP_Automatic_Updater::is_vcs_checkout()` looks for `.git` with `is_dir()`, but in a Git worktree or submodule `.git` is a plain file that points to the real repository. When there's no `.git` directory higher up, the site is treated as not under version control and automatic updates run. The Site Health VCS test has its own copy of the same check.

**What changes**

- `is_vcs_checkout()` and `WP_Site_Health_Auto_Updates::test_vcs_abspath()` use `file_exists()` instead of `is_dir()`, so a `.git` file counts as a checkout.
- The `.git` file isn't read to see where it points. In case of a Docker site running from a worktree, the path may be on the host and may not exist inside the container.
- The `automatic_updates_is_vcs_checkout` filter still decides the result.

Follow-up to r47835, r64586.

Props dlocc.
Fixes #66460.

git-svn-id: https://develop.svn.wordpress.org/trunk@65259 602fd350-edb4-49c9-b593-d223f7449a82
Replace waits followed by one-time reads with Playwright assertions that retry until they pass. Each test keeps the same checks.

The edit-posts spec now waits for the post title instead of any element in the editor iframe. The media-upload spec drops a `waitForLoadState( 'load' )` call, since `visitAdminPage()` already waits for the page to load.

Developed in: WordPress#15463

Props adrianmoldovanwp.
See #66455.


git-svn-id: https://develop.svn.wordpress.org/trunk@65260 602fd350-edb4-49c9-b593-d223f7449a82
E2E global setup activated Twenty Twenty-One at the same time as it deleted posts and blocks and reset preferences. `switch_theme()` saves `template` and `stylesheet` one after the other, so a request that loads between the two writes sees Ipsum as a child of Twenty Twenty-One. Ipsum then requires `inc/abilities.php` from the parent theme, which does not exist, and the request fails with a PHP fatal error that global setup cannot parse as JSON.

Activate the theme first, then run the other resets in parallel.

Follow-up to [65224].

Developed in: WordPress#15471

Props adrianmoldovanwp.
See #66455.


git-svn-id: https://develop.svn.wordpress.org/trunk@65261 602fd350-edb4-49c9-b593-d223f7449a82
The PHPStan baseline held eight `argument.type` errors for `WP_Date_Query`, caused by docblocks narrower than the input the methods actually handle and by an unused parameter. Since `build_value()` was introduced it has been documented as taking a string or an array, yet `build_time_query()` has always passed it integers or null. And when nested queries were added, `get_sql_for_subquery()` passed an empty string for the `$parent_query` array that `get_sql_for_clause()` never reads.

No path of `build_mysql_datetime()` returns false, though its `@return` tag said otherwise. An unparseable string has always resulted in the Unix epoch, obtained by passing false as the timestamp to `gmdate()`. That fallback now passes 0 and is documented, and its test asserts the fixed value instead of computing it, which also corrects a comment claiming the test was time-dependent.

The PHPStan types also go further than the published `@param` tags in describing valid input. The comparison operator is limited to the ten accepted by `get_compare()`, which are put directly into SQL. Date values are limited to non-negative integers or numeric strings, because `absint()` would silently turn a negative value positive. Non-numeric values are still filtered out at runtime, so there is no change in behavior.

Developed in WordPress#15469.
Follow-up to r25139, r29923, r45876.

Props pwtyler, westonruter.
See #65817.


git-svn-id: https://develop.svn.wordpress.org/trunk@65262 602fd350-edb4-49c9-b593-d223f7449a82
Both `get_comment_date()` and `get_comment_time()` return the result of `mysql2date()`, which is an integer for the 'U' and 'G' formats and false on failure, yet they were documented as returning only a string. Callers such as the Comment Date block therefore had to cast `get_comment_date( 'U', $comment )` before passing it to `human_time_diff()`. They now declare the same conditional return on `$format` as `mysql2date()` and the post date functions, and the `get_comment_date` and `get_comment_time` filters document false as well, since the return type of `apply_filters()` is derived from them.

A nonexistent comment no longer causes `get_comment_date()` to read a property on null. For back-compat, false is still passed through the `get_comment_date` filter, as is done in `get_the_modified_date()` and `get_the_modified_time()`, so the filter's `$comment` parameter is now documented as possibly null. Since r55284, `get_comment_time()` has returned an empty string for a nonexistent comment without applying its filter, and this is left unchanged.

Developed in WordPress#15473.
Follow-up to r37866, r55284, r63941.

See #65817.


git-svn-id: https://develop.svn.wordpress.org/trunk@65263 602fd350-edb4-49c9-b593-d223f7449a82
lancewillett and others added 30 commits November 17, 2026 21:33
Replace duplicated upload and attachment setup with `create_upload_object()` in MIME type, template, and AJAX crop tests. Remove the unused custom-logo URL fixture.

Follow-up to r65522, r65523.

Developed in: WordPress#15994, WordPress#15995, WordPress#15998

Props shailu25, huzaifaalmesbah, desrosj.
See #42990.


git-svn-id: https://develop.svn.wordpress.org/trunk@65562 602fd350-edb4-49c9-b593-d223f7449a82
Declare the four `wp_list_pages()` data providers static for compatibility with newer PHPUnit versions.

Developed in: WordPress#16057

Props shailu25.
See #66211.


git-svn-id: https://develop.svn.wordpress.org/trunk@65563 602fd350-edb4-49c9-b593-d223f7449a82
Extract common admin locators into a shared helper and update the affected browser tests. Document its use and normalize the E2E README to LF line endings.

Developed in: WordPress#16030

Props adrianmoldovanwp, lucatume, mukesh27.
See #66455.


git-svn-id: https://develop.svn.wordpress.org/trunk@65564 602fd350-edb4-49c9-b593-d223f7449a82
Rename the existing GET tests to satisfy the required `test_get_item()` and `test_get_items()` methods. Remove the empty placeholders while preserving their behavioral coverage.

Developed in: WordPress#15919

Props rejaulalomkhan, rcwpdev.
See #40538.


git-svn-id: https://develop.svn.wordpress.org/trunk@65565 602fd350-edb4-49c9-b593-d223f7449a82
The per-identifier baselines were listed one by one in `phpstan.neon.dist`, between markers that `composer phpstan:baselines` rewrote whenever a baseline was added or deleted, so every change that retired a baseline edited the same lines and two such changes conflicted. They are now included through `tests/phpstan/baselines/loader.php`, a PHP configuration that returns the baselines found in its directory, since NEON can only include files by name. A baseline takes effect when it is added and stops when it is deleted, with no edit of the configuration.

When regenerating, only the baselines being rewritten are suppressed: the generator passes their directory in the `WP_PHPSTAN_GENERATING_BASELINES` environment variable, and the loader there returns nothing. This works even when the configuration is included by another, such as a local `phpstan.neon`, which previously left every baseline in force and got them deleted. Baselines in other directories stay in force, so a stricter configuration with baselines of its own records only the errors the default ones do not cover.

Developed in WordPress#16049.
Follow-up to r63019, r63294, r65372.

Props westonruter, apermo.
See #65817.


git-svn-id: https://develop.svn.wordpress.org/trunk@65566 602fd350-edb4-49c9-b593-d223f7449a82
Props xknown, dmsnell, jonsurrell, jeremyfelt.


git-svn-id: https://develop.svn.wordpress.org/trunk@65567 602fd350-edb4-49c9-b593-d223f7449a82
…ewing.

Props westonruter, lancewillett, johnbillion, xknown.


git-svn-id: https://develop.svn.wordpress.org/trunk@65568 602fd350-edb4-49c9-b593-d223f7449a82
Props batmoo, xknown, jonsurrell.


git-svn-id: https://develop.svn.wordpress.org/trunk@65569 602fd350-edb4-49c9-b593-d223f7449a82
Props xknown, jonsurrell, andrewserong.


git-svn-id: https://develop.svn.wordpress.org/trunk@65570 602fd350-edb4-49c9-b593-d223f7449a82
Props villanovachile, peterwilsoncc, westonruter, johnbillion, jonsurrell, jeremyfelt.


git-svn-id: https://develop.svn.wordpress.org/trunk@65571 602fd350-edb4-49c9-b593-d223f7449a82
Props jonsurrell, jsnajdr, jeryj.


git-svn-id: https://develop.svn.wordpress.org/trunk@65572 602fd350-edb4-49c9-b593-d223f7449a82
Props jonsurrell, ntsekouras, westonruter, xknown, rfaile313, jorbin, jeremyfelt, ehtis.


git-svn-id: https://develop.svn.wordpress.org/trunk@65573 602fd350-edb4-49c9-b593-d223f7449a82
Props xknown, westonruter, jeremyfelt.


git-svn-id: https://develop.svn.wordpress.org/trunk@65574 602fd350-edb4-49c9-b593-d223f7449a82
Props xknown, jonsurrell, jeremyfelt.


git-svn-id: https://develop.svn.wordpress.org/trunk@65575 602fd350-edb4-49c9-b593-d223f7449a82
Props rfaile313, westonruter, tyxla, lancewillett, xknown, jeremyfelt.


git-svn-id: https://develop.svn.wordpress.org/trunk@65576 602fd350-edb4-49c9-b593-d223f7449a82
Props xknown, jonsurrell, jeremyfelt.


git-svn-id: https://develop.svn.wordpress.org/trunk@65577 602fd350-edb4-49c9-b593-d223f7449a82
…n the admin.

Props jorbin, ramonopoly, westonruter, adamsilverstein, jeremyfelt, rfaile313.


git-svn-id: https://develop.svn.wordpress.org/trunk@65578 602fd350-edb4-49c9-b593-d223f7449a82
Props johnbillion, batmoo, jonsurrell, jeremyfelt, jorbin, xknown, rfaile313.


git-svn-id: https://develop.svn.wordpress.org/trunk@65579 602fd350-edb4-49c9-b593-d223f7449a82
…ta_wp_context()`.

Props jrf, gziolo, luisherranz, jonsurrell, lancewillett.


git-svn-id: https://develop.svn.wordpress.org/trunk@65580 602fd350-edb4-49c9-b593-d223f7449a82
Props jsnajdr, johnbillion, jeryj, xknown.


git-svn-id: https://develop.svn.wordpress.org/trunk@65581 602fd350-edb4-49c9-b593-d223f7449a82
Follow-up to [65570].

Props jeremyfelt.


git-svn-id: https://develop.svn.wordpress.org/trunk@65582 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned commit hash of the Gutenberg repository from `61aba5422836aeed76a794f98d3fe0da3eb5f5d1` to `efd7722f89ebb8abfc3607fffdd86f5e34afbd9c`.

A full list of changes included in this commit can be found on GitHub:
WordPress/gutenberg@61aba54...efd7722.


git-svn-id: https://develop.svn.wordpress.org/trunk@65583 602fd350-edb4-49c9-b593-d223f7449a82
git-svn-id: https://develop.svn.wordpress.org/trunk@65604 602fd350-edb4-49c9-b593-d223f7449a82
Verify the expected output of `<meta name='referrer' content='strict-origin-when-cross-origin' />` tag.

Developed in WordPress#15355.

Props devmuhib, huzaifaalmesbah, lancewillett.
See #65819.

git-svn-id: https://develop.svn.wordpress.org/trunk@65667 602fd350-edb4-49c9-b593-d223f7449a82
PHPStan analyzes all of core at rule level 5, but much of the code added in recent releases, such as the Abilities API and the AI client, already meets or nearly meets level 10. A second analysis now holds a selected set of paths to level 10, so that they cannot regress, and so that the set can grow as more files are brought up to that level, without raising the level for the entire project.

PHPStan has no per-path rule levels, so the strict paths have a configuration of their own, `phpstan-strict.neon.dist`, which includes `phpstan.neon.dist`, replaces its paths with the strict ones, and scans the rest of core so that its symbols are known. Its baselines in `tests/phpstan/baselines-strict/` hold only what level 10 adds in the strict paths, since it includes the default baselines too. The two analyses are named "default" and "strict" rather than after their levels, since either level can be raised. The narrowed analysis relies on PHPStan 2.3.6, which no longer reports an ignored error as unmatched when its file is not analyzed.

`composer phpstan` now runs both analyses. Also, `composer phpstan:baselines` and `composer phpstan:fix` handle both baseline directories. In CI, the two analyses run as parallel jobs, whose results are merged into the pull request comment. The headers of the default baselines change only to name the configuration they are regenerated with.

Developed in WordPress#16021.
Follow-up to r61699, r64539, r65372, r65537, r65566.

Props westonruter, apermo.
See #65817.


git-svn-id: https://develop.svn.wordpress.org/trunk@65668 602fd350-edb4-49c9-b593-d223f7449a82
Give each test plugin a unique filename and limit its effects to requests carrying the test’s query parameter. Publish each plugin with an atomic rename and remove test plugins during global setup.

Move the fatal error handler and login script localization specs to the parallel Playwright project.

Developed in: WordPress#16037

Props adrianmoldovanwp, lucatume.
See #66392.


git-svn-id: https://develop.svn.wordpress.org/trunk@65669 602fd350-edb4-49c9-b593-d223f7449a82
Use `REST_TESTS_IMPOSSIBLY_HIGH_NUMBER` for the missing attachment in the audio and video widget tests. The test fixture itself can receive ID `777` and render media where the tests expect empty output.

Developed in: WordPress#16092

Props johnbillion.
See #66736.


git-svn-id: https://develop.svn.wordpress.org/trunk@65670 602fd350-edb4-49c9-b593-d223f7449a82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.