Repository navigation
Comments: Introduce a register_comment_type() API - #59
Draft
adamsilverstein wants to merge 2318 commits into
Draft
adamsilverstein wants to merge 2318 commits into
adamsilverstein wants to merge 2318 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueFinishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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
Removes PHPUnit tests introduced in r63983 to ensure the jQuery and jQuery Migrate files are present. These tests are causing false failures if the test suite is run without running the build step. Follow-up to r63983. Developed in WordPress#15435. Props sergeybiryukov. Fixes #66203. git-svn-id: https://develop.svn.wordpress.org/trunk@65264 602fd350-edb4-49c9-b593-d223f7449a82
This adds `phpstan/phpstan-strict-rules` as a development dependency so that its rules can be enabled in a local `phpstan.neon` to work toward compliance, and it enables by default the rules which core already complies with or which enforce the WordPress Coding Standards: * Disallow the backtick operator. * Disallow short ternaries (the one remaining instance is replaced). * Disallow `$this` in closures. * Require inherited method names to match in case. The rules are registered individually rather than by including the package's `rules.neon`, because that file also makes several PHPStan parameters stricter even when its rules are disabled, and because a local config including it would otherwise fail on the duplicate include. The README documents how to opt into the other rules locally, and the roles of `base.neon` and `phpstan.neon.dist` are clarified so that local configs include the latter rather than copying it. Developed in WordPress#15399. Follow-up to r61699, r63420. Props westonruter, apermo. See #65817. git-svn-id: https://develop.svn.wordpress.org/trunk@65265 602fd350-edb4-49c9-b593-d223f7449a82
From October 15 to 28, 13 of 523 trunk Performance Tests runs needed a rerun because a setup step failed, and three Playwright installs hung for six hours. Add two composite actions. `download-with-retry` downloads with curl, retrying on any error and on stalled transfers. `run-with-retry` runs a command up to three times. Use them for the Gutenberg download in E2E tests and the WordPress Importer and mock data downloads in performance tests. Also use them for the WordPress downloads in the installation, upgrade, and performance baseline steps. Retry the global npm install in the `setup-npm` action. Also cap the Playwright browser install and the mock data import at 15 minutes each, and skip archiving performance artifacts when the tests never ran. Developed in: WordPress#15210 Props lucatume, johnbillion. See #65845. git-svn-id: https://develop.svn.wordpress.org/trunk@65266 602fd350-edb4-49c9-b593-d223f7449a82
Add tests for `wp_ajax_imgedit_preview()`, `wp_ajax_get_community_events()`, `wp_ajax_hidden_columns()`, `wp_ajax_save_widget()`, and `wp_ajax_save_user_color_scheme()`. Each test dispatches the action core registers through `get_ajax_response()` and checks the response and the resulting state. The community events tests mock the Events API, so they make no network requests. The save-widget tests use a per-test Text widget and restore the widget globals afterward. This consolidates five earlier handler test proposals. Developed in: WordPress#15421 Props mindctrl, pbearne. See #65252. git-svn-id: https://develop.svn.wordpress.org/trunk@65267 602fd350-edb4-49c9-b593-d223f7449a82
`valid_unicode()` follows the XML `Char` production rather than checking whether a code point is valid Unicode. It rejects C0 controls other than tab, line feed, and carriage return, along with surrogates and U+FFFE and U+FFFF. Update its docblock to say so, and point callers to the newer Unicode and UTF-8 helpers, such as `wp_is_valid_utf8()`. Add rejected test cases for U+000B and U+001F, which guard the boundary below U+0020, and rename the test and its data provider to describe XML `Char` acceptance. Follow-up to [64770]. Developed in: WordPress#15105 Props shailu25, dmsnell. Fixes #66483. See #65819. git-svn-id: https://develop.svn.wordpress.org/trunk@65268 602fd350-edb4-49c9-b593-d223f7449a82
The `wp_checkdate()` and `*_metadata_by_mid()` functions already validate their numeric arguments with `is_numeric()` and cast them to integers, and core callers pass strings: date parts cut from a date string, and meta IDs read with `$wpdb->get_col()`. Their docblocks still documented `int` only, which caused 17 PHPStan `argument.type` errors. The arguments are now documented as `int|string`, with PHPStan narrowing them to `int|numeric-string`. The `checkdate()` ranges are deliberately not applied to `wp_checkdate()`, since the function's purpose is to validate input that may be out of range. Developed in WordPress#15472. Follow-up to r18494, r20435, r38699, r61172. Props pwtyler, westonruter. See #65817. git-svn-id: https://develop.svn.wordpress.org/trunk@65269 602fd350-edb4-49c9-b593-d223f7449a82
Core's PHPUnit tests now run with the `/%year%/%monthnum%/%day%/%postname%/` permalink structure by default, which matches most real sites. Before this, the suite defaulted to plain permalinks, and many tests called `set_permalink_structure()` only to turn pretty permalinks on. The default applies only when `WP_RUN_CORE_TESTS` is set, so plugin test suites that use the core test library keep plain permalinks. `set_permalink_structure()` with no argument still sets plain permalinks. Tests that assert plain permalink URLs now set that structure explicitly, and calls that only set the default structure are removed. Developed in: WordPress#15010 Props huzaifaalmesbah, johnbillion, mindctrl. Fixes #41451. git-svn-id: https://develop.svn.wordpress.org/trunk@65270 602fd350-edb4-49c9-b593-d223f7449a82
`test_quality_with_avif_conversion_file_sizes()` used whichever editor `_wp_image_editor_choose()` picked first, so it could run with GD when it was meant to cover Imagick. It was also skipped on PHP 8.3 and later, where Imagick in the test containers reports AVIF support but cannot encode it. The test now runs once per editor through a data provider. It saves a probe AVIF first and skips when that editor cannot encode one, so a failure to write sub-sizes still fails the test. Follow-up to [59247], [60736]. Developed in: WordPress#9965 Props adamsilverstein, desrosj. Fixes #63990. See #63932. git-svn-id: https://develop.svn.wordpress.org/trunk@65271 602fd350-edb4-49c9-b593-d223f7449a82
Brings the Secrets API tests in line with the PHPUnit test-writing guidelines and tidies the inline documentation. Documentation: * Remove references to the feature plugin, its proposal and its decision records, including in the `_doing_it_wrong()` notice for unnamespaced names. * Add `@global` annotations for the drop-in globals, rewrite the Site Health test summaries as statements, and correct the `WP_Secret::__debugInfo()` description, which also applies to `print_r()`. * Use `/* */` for multi-line comments, "ID" rather than "id", and `@subpackage Secrets` in the test files. Tests: * Add `@ticket 66187` to each test class, a summary and `@covers` annotation to each test, and order annotations consistently. * Move `@covers` targets in the conformance suites from the interfaces to the implementations under test, declared on the concrete test classes, so coverage is attributed to the code that runs. The base suites no longer filter coverage for extending classes. * Add a unique failure message to every assertion within each test, including a new `$message` parameter for `assertRecordSlotDecryptsTo()`. * Assert the result of every setup write. This exposed two separate-process tests that passed without testing anything because no usable key was available; both now define a test key and check the specific error returned. * Remove duplicated tests, rename tests whose names did not match what they check, and name single-use data providers after their test. * Add tests for a store that cannot list its secrets, for every `WP_SECRETS_ERROR_*` constant being pinned, and for a valid but different `WP_SECRETS_KEY`. * Strengthen assertions that could pass without checking their stated behavior, such as missing error codes, counts and the salt-derived key. * Use the `ms-required` and `multisite` groups with `skipWithoutMultisite()` for multisite-only tests, and `skipWithMultisite()` for the `ms-excluded` test, instead of skipping with `markTestSkipped()`. Developed in WordPress#15481. Follow-up to r64337, r64344, r64345, r64674. See #66187, #66353. git-svn-id: https://develop.svn.wordpress.org/trunk@65272 602fd350-edb4-49c9-b593-d223f7449a82
…r fields. Turns on the panel layout's `showPlaceholderIfEmpty` option in `view-config.php` for the fields that render nothing when empty, so their row in the editor's summary panel shows the field's placeholder instead of only its label, which gave users no hint the row could be edited until they hovered it: - `excerpt`, in the default post type form and in the `wp_block` form. - `description`, in the `wp_template` form. - `author`, in the default post type form and in the `attachment` form, for a post or media item without a known author, as the post summary did before it moved to the form. DataViews lists are not affected, since the placeholder only shows in the panel summary. Backports the changes from WordPress/gutenberg#85842. Props oandregal, jorgefilipecosta, 0mirka00. Fixes #65981. git-svn-id: https://develop.svn.wordpress.org/trunk@65273 602fd350-edb4-49c9-b593-d223f7449a82
Playwright copies the config's `use` options, including `storageState`, into every `browser.newContext()` call that does not set them. The cache-control specs' logged-out pages were therefore logged in. A new `loggedOutPage` fixture in `tests/e2e/fixtures` opens a page in a context with no cookies, and the cache-control specs use it. The logged-out cache-control check now fails when the header contains `no-cache`, `no-store` or `private`. Before, it failed only on an exact match, so it passed for the logged-in header too. A new `wpCli()` helper runs WP-CLI with `--path` set from `LOCAL_DIR`, so WP-CLI loads the same copy of WordPress as the site under test. The install and invalid-timezone specs now use it. The E2E README describes both ways to run a test logged out. Developed in: WordPress#15410 Props adrianmoldovanwp. See #66455. git-svn-id: https://develop.svn.wordpress.org/trunk@65274 602fd350-edb4-49c9-b593-d223f7449a82
Many E2E specs found elements by CSS class, by position with `.first()`, or by counting Tab presses. After a markup change, a test could act on the wrong element or fail far from the real problem. Most of these now use role, label and text locators. The media grid specs find tiles by attachment name, so they check that the uploaded file is there rather than any finished tile. Upload errors are found by file name. The Quick Edit test keeps its keyboard path but checks that the Quick Edit button has focus before pressing Enter. The bulk-action and Save Menu controls use their IDs, since the top and bottom controls share an accessible name. Developed in: WordPress#15513 Props adrianmoldovanwp. See #66455. git-svn-id: https://develop.svn.wordpress.org/trunk@65275 602fd350-edb4-49c9-b593-d223f7449a82
… has test listeners. [65251] declared `WP_PHPUnit_Default_Group_Filter` as a `PHPUnit\Framework\TestListener` for every PHPUnit version from 6.0. PHPUnit 10 removed that interface, so loading the test bootstrap with PHPUnit 10 or later failed before any test ran. This broke test suites that load the core test library with newer PHPUnit versions, such as the WordPress.org unit tests. The listener is now declared only when the interface exists. PHPUnit 9 and earlier are unchanged. PHPUnit 10 and later do not support listeners. Follow-up to [65251]. Developed in: WordPress#15508 Props ekamran. See #34185. git-svn-id: https://develop.svn.wordpress.org/trunk@65276 602fd350-edb4-49c9-b593-d223f7449a82
`test_should_update_should_skip_deferred_translation_updates()` calls `WP_Automatic_Updater::should_update()`, which creates an `Automatic_Upgrader_Skin`. The test class loaded only `class-wp-automatic-updater.php`, so the test errored when its file ran on its own. The full suite passed only because earlier tests had already loaded `class-wp-upgrader.php`. Follow-up to [65226]. Developed in: WordPress#15506 Props ravipatel. See #42281. git-svn-id: https://develop.svn.wordpress.org/trunk@65277 602fd350-edb4-49c9-b593-d223f7449a82
As of PHP 8.6, `fclose()`, `file_put_contents()`, and `copy()` return `false` when flushing or closing a stream fails. Before 8.6, these failures were silently ignored. A stream wrapper that does not implement `stream_flush()` is treated as failing to flush, so every write to `WP_Test_Stream` was reported as a failure on PHP 8.6, even though the data was written. This caused `Tests_Image_Editor_Imagick::test_streams` to fail. Writes to `WP_Test_Stream` are stored directly in memory, so `stream_flush()` has nothing to do and returns `true`. `WP_Test_Stream_Http_Mock` extends this class and inherits the fix. This also moves the `assertNotWPError()` assertion in `test_streams()` ahead of the first use of `$saved['path']`, so a failed save reports the actual error instead of `Cannot use object of type WP_Error as array`. Developed in WordPress#15476. Props desrosj, lancewillett. Fixes #66487. git-svn-id: https://develop.svn.wordpress.org/trunk@65278 602fd350-edb4-49c9-b593-d223f7449a82
This adds MySQL 26.10, the latest innovation release, to the relevant testing strategies. Because MySQL 9.7 is an LTS release, some of the configurations specific to innovation releases were removed when it was added in [62407]. These are now restored for `26.10`: - The PHPUnit workflow tests `26.10` in the innovation release jobs. - The upgrade testing workflow tests `26.10` alongside the LTS versions for the two most recent releases and the oldest WordPress version still receiving security updates. - The installation and local Docker environment workflows test `26.10` through the `7-2` entry in `.version-support-mysql.json`. PHP 7.2 and 7.3 are excluded with 26.10 because MySQL 9.0+ does not work on them. MySQL 26.7 is also listed as supported for 7.2. It is excluded from the test matrices because only the most recent innovation release is tested. MySQL 9.7 remains the default database version for the local Docker environment and in the non-innovation PHPUnit jobs. Props desrosj. See #65845, #65819. git-svn-id: https://develop.svn.wordpress.org/trunk@65279 602fd350-edb4-49c9-b593-d223f7449a82
This adds MariaDB 12.3, the latest LTS release, to the MariaDB testing strategy. It also replaces 11.8 as the MariaDB version used for the memcached jobs, the limited matrix for forks, and the PHP 8.6 pre-release jobs. MariaDB 12.1 is no longer supported, so the innovation release jobs now test 13.0 instead. This is the most recent innovation release with a stable Docker image available. The outdated note stating that MariaDB does not have a supported innovation release has also been removed. See #65845, #65819. git-svn-id: https://develop.svn.wordpress.org/trunk@65280 602fd350-edb4-49c9-b593-d223f7449a82
Since `WP_Query::$max_num_pages` is never `null`, the `?? 1` fallback in `paginate_links()` never applied, so the property is now read directly. The property is also documented as a non-negative integer. This exposed that `WP_Query::set_found_posts()` could compute a negative page count when a `found_posts` filter returns a negative number, or when a filter injects a `LIMIT` into a query with a `posts_per_page` of `-1`, so that result is now clamped to zero. For the same reason the unreachable `isset()` fallback in `WP_Sitemaps_Posts::get_max_num_pages()` is removed, retiring its baseline entry. Developed in WordPress#15475. Follow-up to r48476, r57648, r61454, r65192. Props bgturner, westonruter. See #65817. git-svn-id: https://develop.svn.wordpress.org/trunk@65281 602fd350-edb4-49c9-b593-d223f7449a82
In `themes.php`, PHPStan only knew `$parent_file` as the `'themes.php'` literal assigned earlier in the file, so it reported the `empty( $parent_file )` clause of the Appearance submenu condition as never true. That is a false positive: `wp-admin/menu-header.php`, loaded via `admin-header.php`, passes `$parent_file` through the `parent_file` filter, and it also sets `$self`, while `$submenu` comes from `wp-admin/menu.php`. None of these are visible to PHPStan across the `require` chain. The condition is therefore left unchanged, and the globals are instead declared with a file-scope `global` statement and `@global` tags. An inline `@var` would not suffice, since with `treatPhpDocTypesAsCertain` disabled the always-true and always-false rules use the native type, which only the `global` statement resets. This retires the `booleanAnd.alwaysFalse` baseline along with the remaining baseline entries for `themes.php`, and the `$submenu` array shape also resolves the `mixed` errors in the submenu loop at higher rule levels. Developed in WordPress#15478. Follow-up to r63019, r63023. Props bgturner, westonruter. See #65817. git-svn-id: https://develop.svn.wordpress.org/trunk@65282 602fd350-edb4-49c9-b593-d223f7449a82
…age. The no-argument call already passes the default `null` value, so the explicit `null` invocation in that method adds no distinct protection. Explicit `null` with a customized `default_feed` remains covered by `test_null_feed_type_uses_default_feed()`. Follow-up to r65198. Props shailu25, lancewillett. Fixes #66475. git-svn-id: https://develop.svn.wordpress.org/trunk@65283 602fd350-edb4-49c9-b593-d223f7449a82
`WP_UnitTestCase_Base::set_up()` resets post types, taxonomies, and non-built-in post statuses before each test. Per-test unregister calls added to these post, query, comment, and user tests repeated that reset, so remove them. Keep scenario-specific unregister calls and the class-level callbacks in the query fields and post status tests. Follow-up to [64839], [64840], [64842], [64861], [64864], [64865], [64975], [65016], [65017], [65019], [65025], [65026]. Developed in: WordPress#15189 Props peterwilsoncc. See #65893. git-svn-id: https://develop.svn.wordpress.org/trunk@65284 602fd350-edb4-49c9-b593-d223f7449a82
…ests. `WP_UnitTestCase_Base::set_up()` resets post types, taxonomies, and non-built-in post statuses before each test. Per-test unregister calls added to these term, category, and taxonomy tests repeated that reset, so remove them. Also remove the class-level taxonomy cleanup in the `get_tag_link()` and `get_term_link()` tests. Keep scenario-specific unregister calls. Follow-up to [64844], [64845], [64846], [64856], [64862], [65014], [65015], [65016], [65017], [65018], [65019], [65020], [65024], [65025], [65026]. Developed in: WordPress#15188 Props peterwilsoncc. See #65893. git-svn-id: https://develop.svn.wordpress.org/trunk@65285 602fd350-edb4-49c9-b593-d223f7449a82
…n tests. `WP_UnitTestCase_Base::set_up()` resets post types, taxonomies, and non-built-in post statuses before each test. Per-test unregister calls added to these REST API, XML-RPC, admin, AJAX, and core registration tests repeated that reset, so remove them. Keep scenario-specific unregister calls. Follow-up to [64848], [64849], [64850], [64852], [64853], [64854], [64855], [64857], [65019], [65020], [65024]. Developed in: WordPress#15190 Props peterwilsoncc. See #65893. git-svn-id: https://develop.svn.wordpress.org/trunk@65286 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
git-svn-id: https://develop.svn.wordpress.org/trunk@65606 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
Check the CSS and JavaScript directories in `wp-admin` and `wp-includes` for misplaced files. Allow the admin color scheme SCSS sources and the generated files under `wp-includes/build/`. Developed in: WordPress#13684 Props adrianmoldovanwp, mohamedahamed, lucatume, jorbin. See #65279. git-svn-id: https://develop.svn.wordpress.org/trunk@65673 602fd350-edb4-49c9-b593-d223f7449a82
Props kimclow. See #65860. git-svn-id: https://develop.svn.wordpress.org/trunk@65691 602fd350-edb4-49c9-b593-d223f7449a82
See #65860 git-svn-id: https://develop.svn.wordpress.org/trunk@65692 602fd350-edb4-49c9-b593-d223f7449a82
The 7.0 and 7.1 branches call `reusable-phpstan-static-analysis-v1.yml` from `trunk`. In r65668, that workflow began running `composer phpstan:default` and `composer phpstan:strict`, which only exist in `trunk`'s `composer.json`. Because of this, both of its jobs now fail immediately on those branches. This copies the current version of the workflow to `reusable-phpstan-static-analysis-v2.yml`, which `trunk` now calls, and restores `reusable-phpstan-static-analysis-v1.yml` to its state before r65668 for those branches. Follow-up to r65668. Reviewed by westonruter. Props desrosj, westonruter. Fixes #65817. git-svn-id: https://develop.svn.wordpress.org/trunk@65693 602fd350-edb4-49c9-b593-d223f7449a82
As of version 4.4.0, `src/jquery.form.js` in the `jquery-form` package is an ES module. Because `jquery-form` is registered as a classic script, browsers reject the file with a syntax error and `ajaxForm()` and `ajaxSubmit()` are not defined. This updates the relevant build scripts to copy `dist/jquery.form.js` instead, which is the package's UMD build and matches the format shipped before 4.4.0. Follow-up to r65541. Reviewed by davidbaumwald. Props prosenjitbarman. Fixes #66711. git-svn-id: https://develop.svn.wordpress.org/trunk@65694 602fd350-edb4-49c9-b593-d223f7449a82
Verify the expected output of `EditURI` RSD link element with the site XML-RPC endpoint URL. Developed in WordPress#15356. Props devmuhib, huzaifaalmesbah, lancewillett. See #65819. git-svn-id: https://develop.svn.wordpress.org/trunk@65695 602fd350-edb4-49c9-b593-d223f7449a82
Developed in: WordPress#15830 Reviewed by jonsurrell. Props therssoftware, jonsurrell, nathanrice, courane01. Fixes #66456. git-svn-id: https://develop.svn.wordpress.org/trunk@65716 602fd350-edb4-49c9-b593-d223f7449a82
Wait for a verified release ZIP before starting the installation and upgrade jobs. Keep it available for failed-job reruns. Developed in: WordPress#16106 Props adrianmoldovanwp. Fixes #66744. git-svn-id: https://develop.svn.wordpress.org/trunk@65722 602fd350-edb4-49c9-b593-d223f7449a82
Use the `PLUGINS` lock so tests that share a plugin can run alongside other specs without changing the plugin at the same time. Developed in: WordPress#16128 Props adrianmoldovanwp. See #66392. git-svn-id: https://develop.svn.wordpress.org/trunk@65723 602fd350-edb4-49c9-b593-d223f7449a82
…e/content-query`. The post permalink in the `link` output was a plain string, while the `link` output of `core/users-query` declares the `uri` format. Declare the same format for the post permalink, so clients that check formats treat both links the same. The value is unchanged. Developed in WordPress#15987. Follow-up to [64388]. Props jorgefilipecosta, gziolo. Fixes #66268. git-svn-id: https://develop.svn.wordpress.org/trunk@65724 602fd350-edb4-49c9-b593-d223f7449a82
The entity fields API lacked two input checks that the entity actions API has: - `WP_Entity_Fields_Registry::get_registered()` and `::get_registered_field_modules()` did not validate the entity kind and name, so an array caused a fatal `TypeError`. They now return an empty list with a `_doing_it_wrong()` notice. - The `kind` and `name` arguments of `/wp/v2/entity-fields` had no `minLength`, so empty values returned a 200 response. They now return a 400 error, like `/wp/v2/entity-actions`. The entity actions endpoint no longer skips registering its route when a post type or taxonomy uses `entity-actions` as its REST base. No other core endpoint with a fixed base, such as `/wp/v2/settings` or `/wp/v2/search`, has this check. Developed in WordPress#16067. Follow-up to [64517], [64528]. Props mukesh27, oandregal, jorgefilipecosta. Fixes #66229. git-svn-id: https://develop.svn.wordpress.org/trunk@65725 602fd350-edb4-49c9-b593-d223f7449a82
The items of the `slugs` and `usernames` filters now require at least one character, like the `slugs` filter of `core/content-query`, so a list holding an empty string fails schema validation instead of returning an empty list. A slug or username made only of whitespace names no user, so it is dropped before the query, and a list holding only such a value fails with `users_invalid_filter`. Developed in WordPress#15986. Follow-up to [64346]. Props jorgefilipecosta, gziolo. Fixes #64657. git-svn-id: https://develop.svn.wordpress.org/trunk@65726 602fd350-edb4-49c9-b593-d223f7449a82
Skip the rewrite flushes in the term link tests and unregister the `random` post type before teardown replaces the request. Developed in: WordPress#16111, WordPress#16112 Props faisalahammad. See #66755. git-svn-id: https://develop.svn.wordpress.org/trunk@65727 602fd350-edb4-49c9-b593-d223f7449a82
Load `nav-menu.php` before each test so the searches can run independently. Developed in: WordPress#16130 Props ekamran. See #66755. git-svn-id: https://develop.svn.wordpress.org/trunk@65728 602fd350-edb4-49c9-b593-d223f7449a82
Restore the registered theme features, allow the saved script modules instance to be `null`, and clear the post password cookie after the header tests. Developed in: WordPress#16131, WordPress#16132, WordPress#16134 Props ekamran. See #66755. git-svn-id: https://develop.svn.wordpress.org/trunk@65729 602fd350-edb4-49c9-b593-d223f7449a82
Reconnect the shared test helper alongside `$wpdb` so later field-processing tests have a working connection. Developed in: WordPress#16133 Props ekamran. See #66755. git-svn-id: https://develop.svn.wordpress.org/trunk@65730 602fd350-edb4-49c9-b593-d223f7449a82
Add `xfn.js`, `language-chooser.js`, and `sanitize.js` to the TypeScript compiler inputs. Developed in: WordPress#16117 Props faisalahammad. See #66751. git-svn-id: https://develop.svn.wordpress.org/trunk@65731 602fd350-edb4-49c9-b593-d223f7449a82
The On This Day section of the Activity widget has been removed from the WordPress 7.2 release. This restores the Recent Comments section to the Activity widget and removes the dedicated Recent Comments dashboard widget. This reverts r64593. Reviewed by audrasjb. Props annezazu. See #65116. git-svn-id: https://develop.svn.wordpress.org/trunk@65732 602fd350-edb4-49c9-b593-d223f7449a82
Verify that ampersands are not entity-encoded in database context and custom protocols are accepted. Developed in WordPress#15360. Props devmuhib, huzaifaalmesbah, lancewillett. See #65819. git-svn-id: https://develop.svn.wordpress.org/trunk@65733 602fd350-edb4-49c9-b593-d223f7449a82
| # Contributors need the floor; CI stays on that major's newest release. | ||
| # The registry can reset the connection mid-download (ECONNRESET), so retry. | ||
| for (( attempt = 1; attempt <= NPM_INSTALL_MAX_ATTEMPTS; attempt++ )); do | ||
| if npm install --global "npm@${NPM_VERSION/>=/^}"; then |
|
|
||
| slack-notifications: | ||
| name: Slack Notifications | ||
| uses: ./.github/workflows/slack-notifications.yml |
| phpstan: | ||
| name: PHP static analysis | ||
| uses: ./.github/workflows/reusable-phpstan-static-analysis-v1.yml | ||
| uses: ./.github/workflows/reusable-phpstan-static-analysis-v2.yml |
| # Required by the called workflow's recovery job, which is skipped on PR events. | ||
| actions: write | ||
| contents: read | ||
| uses: ./.github/workflows/phpunit-tests.yml |
| # Single site only. Asset tests must not also belong to groups excluded by phpunit.xml.dist. | ||
| test-assets: | ||
| name: Core assets | ||
| uses: ./.github/workflows/reusable-phpunit-tests-v3.yml |
| - name: Set up npm | ||
| # Release branches run this workflow from trunk, but some older branches may lack the action. | ||
| if: ${{ hashFiles('.github/actions/setup-npm/action.yml') != '' }} | ||
| uses: ./.github/actions/setup-npm |
| - name: Set up npm | ||
| # Release branches run this workflow from trunk, but some older branches may lack the action. | ||
| if: ${{ hashFiles('.github/actions/setup-npm/action.yml') != '' }} | ||
| uses: ./.github/actions/setup-npm |
| - name: Set up npm | ||
| # A workflow_dispatch run can check out a release branch, which lacks the action. | ||
| if: ${{ steps.theme-exists.outputs.exists == 'true' && hashFiles('.github/actions/setup-npm/action.yml') != '' }} | ||
| uses: ./.github/actions/setup-npm |
| - name: Set up npm | ||
| # A workflow_dispatch run can check out a release branch, which lacks the action. | ||
| if: ${{ steps.theme-exists.outputs.exists == 'true' && ( matrix.theme == 'twentytwentytwo' || matrix.theme == 'twentytwentyfive' || matrix.theme == 'ipsum' ) && hashFiles('.github/actions/setup-npm/action.yml') != '' }} | ||
| uses: ./.github/actions/setup-npm |
| # Downloads and verifies the Gutenberg build once for all coverage jobs. | ||
| prepare-gutenberg: | ||
| name: Prepare Gutenberg Assets | ||
| uses: ./.github/workflows/reusable-prepare-gutenberg.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add register_comment_type(), unregister_comment_type(), get_comment_type_object(),
get_comment_types(), comment_type_exists(), a WP_Comment_Type object, the four
built-in types (comment, pingback, trackback, note), label support, and a
label-aware comment_type() template tag.
Rebuilt from WordPress#12311 as the
bottom of a stacked-PR trial.
Trac ticket: https://core.trac.wordpress.org/ticket/35214
Stack created with GitHub Stacks CLI • Give Feedback 💬