Make WordPress Core

Opened 20 months ago

Closed 15 months ago

Last modified 14 months ago

#56793 closed task (blessed) (fixed)

Test tool and unit test improvements for 6.2

Reported by: desrosj's profile desrosj Owned by:
Milestone: 6.2 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

Previously:

This ticket is for various fixes and improvements in PHPUnit tests that don't have a more specific ticket, as well as general improvements to the GitHub Actions workflows that run automated testing.

Change History (105)

#1 @desrosj
20 months ago

In 54651:

Build/Test Tools: Update third-party welcome Action.

This updates the third-party action used to post a welcome message to pull requests opened by first time contributors.

This release updates the action to use Node.js version 16 instead of 12, the latter of which support has been deprecated for in GitHub Action runners.

The action has also changed from bukboo/welcome-action to wow-action/welcome.

See #56793.

This ticket was mentioned in PR #3498 on WordPress/wordpress-develop by @desrosj.


20 months ago
#2

  • Keywords has-patch added

#3 @SergeyBiryukov
19 months ago

In 54666:

Tests: Move padding-* test data in KSES tests into its own test case.

This creates separate test cases for safecss_filter_attr() with margin-* and padding-* logical properties for additional clarity.

Follow-up to [54102].

See #56793.

#4 @SergeyBiryukov
19 months ago

In 54667:

Tests: Add a test case for safecss_filter_attr() with object-position property.

Follow-up to [50634].

See #56793.

#5 @jrf
19 months ago

I've opened PR GH#3516 with a follow-up on GH#3368 which was merged to WP 6.1.
Not sure if this PR should still go into 6.1 or 6.2, but 6.2 would be absolutely fine IMO.

#6 @SergeyBiryukov
19 months ago

In 54668:

Tests: Make the message for skipping some tests with an external object cache more consistent.

Follow-up to [33702], [34767], [49857], [53821].

See #56793.

#7 @SergeyBiryukov
19 months ago

In 54701:

Tests: Move wp_handle_comment_submission() tests to the comment directory.

This aims to bring some consistency with other comment function tests.

Includes moving the @covers tags from individual test methods to the class DocBlock.

Follow-up to [34799], [34801], [53863].

See #56793.

#8 @SergeyBiryukov
19 months ago

In 54702:

Tests: Move wp_mail() tests to the pluggable directory.

This aims to bring some consistency with other pluggable function tests.

Includes moving the @covers tag from a single test method to the class DocBlock.

Follow-up to [221/tests], [909/tests], [54529].

See #56793.

#10 @SergeyBiryukov
19 months ago

In 54710:

Tests: Move the tests for WP class methods to the wp directory.

This aims to bring some consistency to the location of the tests for this class.

Includes adding the missing @covers tags.

Follow-up to [36177], [51622], [54250].

Props pbearne, SergeyBiryukov.
See #56793, #56782.

#11 @SergeyBiryukov
19 months ago

In 54711:

Tests: Move dbDelta() tests to the db directory.

This aims to bring some consistency with other database-related tests.

Includes adding a missing @covers tag to the class DocBlock.

Follow-up to [30345], [32108], [32770], [51798].

Props pbearne, SergeyBiryukov.
See #56793, #56782.

#12 @SergeyBiryukov
19 months ago

In 54716:

Tests: Move the tests for pluggable function signatures to the pluggable directory.

This aims to bring some consistency to the location of pluggable function tests.

Includes:

  • Renaming the test class to better reflect the intention of the tests.
  • Adding a @coversNothing tag to the class DocBlock.

Follow-up to [34126], [53478], [54702].

Props pbearne, SergeyBiryukov.
See #56793, #56782.

#13 @SergeyBiryukov
19 months ago

In 54717:

Tests: Split the tests from category.php into individual test classes.

This aims to bring some consistency to the location of category function tests, as well as to make the tests more discoverable and easier to expand.

Follow-up to [28438], [28566], [31006], [31025], [37464], [28438], [31299], [36988], [42364], [42367], [42368], [46413], [53684].

See #56793.

#14 @SergeyBiryukov
19 months ago

In 54718:

Tests: Remove skipWithMultisite() from an Ajax test for attachments.

This was previously removed in [51870] and appears to be accidentally readded in [53561].

As the test belongs to the ms-excluded group, the skipping is unnecessary and does not affect anything in practice.

Follow-up to [46693], [49835], [51870], [53561].

See #56793.

#15 @SergeyBiryukov
19 months ago

In 54719:

Tests: Remove skipWithMultisite() and skipWithoutMultisite() from get_user_count() tests.

As the tests belong to either the ms-excluded or the ms-required group, the skipping should not be necessary.

While these methods were initially intended to be used in conjunction with the respective group, the PHPUnit configuration files for single site and multisite exclude these groups as appropriate, so calling these methods explicitly is no longer required.

Follow-up to [40520], [40543], [40564], [43005], [46683], [53011].

See #56793.

#16 @SergeyBiryukov
19 months ago

In 54720:

Tests: Remove unused $user_ids property in Tests_Ajax_Autosave class.

This was previously used to delete the users created during wpSetUpBeforeClass(), however that now happens automatically in WP_UnitTestCase_Base::tear_down_after_class() via _delete_all_data().

Follow-up to [35311], [37404], [38398].

See #56793.

#17 @SergeyBiryukov
19 months ago

In 54721:

Coding Standards: Correct alignment in Tests_Ajax_Autosave::wpSetUpBeforeClass().

This fixes an Equals sign not aligned with surrounding assignments WPCS warning.

Follow-up to [54720].

See #56793.

#18 @SergeyBiryukov
19 months ago

In 54722:

Tests: Rename classes in phpunit/tests/ajax/ per the naming conventions.

This updates the test classes to match the names of the functions being tested.

Includes moving the @covers tags from individual test methods to the class DocBlocks.

Reference: Writing PHP Tests: Naming and Organization.

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493], [51623], [51639], [51646], [51650], [51651], [51860], [52264], [52265], [53489], [53561], [54704].

See #56793.

#19 @SergeyBiryukov
19 months ago

In 54723:

Tests: Correctly restore the wp_installing() status in Ajax tests.

In the tests for updating a plugin or theme via Ajax, wp_installing( true ) was called to prevent wp_update_plugins() or wp_update_themes() from running.

Since the subsequent wp_installing( false ) call was in the same try { ... } block, it could not be executed if an exception was thrown, affecting other tests.

In this case, after rearranging the Ajax tests in [54722], this started affecting the get_site_option() calls in the tests for wp_ajax_wp_compression_test().

By moving both wp_installing() calls out of the try/catch block, we can ensure the status is correctly restored.

Follow-up to [734/tests], [37150], [38168], [38710], [54722].

See #56793.

#20 @SergeyBiryukov
19 months ago

In 54725:

Tests: Prevent wp_update_themes() from running in wp_ajax_update_theme() tests.

In the tests for updating a theme via Ajax, wp_installing( true ) is called to prevent wp_update_themes() from running.

This worked as expected in test_update_theme(), however, it was missed in test_uppercase_theme_slug(), which was accidentally relying on the wp_installing() status not being properly restored in the previous test.

Now that the wp_installing() status was corrected in [54723], the latter test started throwing an error on PHP 8.2:

1) Tests_Ajax_wpAjaxUpdateTheme::test_uppercase_theme_slug
http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated

/var/www/src/wp-includes/Requests/Transport/cURL.php:345
/var/www/src/wp-includes/Requests/Transport/cURL.php:135
/var/www/src/wp-includes/class-requests.php:381
/var/www/src/wp-includes/class-wp-http.php:395
/var/www/src/wp-includes/class-wp-http.php:615
/var/www/src/wp-includes/http.php:179
/var/www/src/wp-includes/update.php:719
/var/www/src/wp-admin/includes/ajax-actions.php:4292
/var/www/src/wp-includes/class-wp-hook.php:308
/var/www/src/wp-includes/class-wp-hook.php:332
/var/www/src/wp-includes/plugin.php:517
/var/www/tests/phpunit/includes/testcase-ajax.php:265
/var/www/tests/phpunit/tests/ajax/wpAjaxUpdateTheme.php:157

Replicating the wp_installing() status changes in this test too resolves the error.

Follow-up to [38168], [38710], [54722], [54723].

See #56793.

#21 @SergeyBiryukov
19 months ago

In 54726:

Tests: Split the tests from multisite.php into individual test classes.

This aims to bring some consistency to the location of multisite function tests, as well as to make the tests more discoverable and easier to expand.

Follow-up to [29916], [32638], [46251], [54717].

See #56793.

#22 @SergeyBiryukov
19 months ago

In 54728:

Tests: Move some @covers tags in the formatting group to the class DocBlock.

This aims to bring more consistency, as these test classes typically cover a single function, unless noted otherwise.

Follow-up to [53562], [53571], [54051].

See #56793.

#23 @desrosj
19 months ago

In 54750:

Build/Test Tools: Fix more set-output deprecated warnings.

This updates the ramsey/composer-install and shivammathur/setup-php actions to their latest versions.

These updates include fixes for the deprecated warnings output when using set-output and save-state commands.

Props jrf, desrosj.
See #56820, #56882, #56793.

#24 @SergeyBiryukov
19 months ago

In 54756:

Tests: Remove a custom callback for checking action call count in multisite tests.

Use MockAction::get_call_count() instead, for consistency with the rest of the test suite.

Follow-up to [24/tests], [99/tests], [1078/tests], [1089/tests], [29916], [30784], [30785], [33253].

See #56793.

#25 @SergeyBiryukov
19 months ago

In 54757:

Tests: Move update_blog_status() tests to their own file.

Reduce some of the clutter in tests/multisite/site.php and introduce tests/multisite/updateBlogStatus.php. Tests moved over are verbatim at this point.

Follow-up to [1078/tests], [29916], [30784], [30785], [33253].

See #56793.

#26 @SergeyBiryukov
19 months ago

In 54760:

Tests: Combine duplicate update_posts_count() tests.

This combines the newer test for update_posts_count() located in its own file with the pre-existing one from tests/multisite/site.php, which was essentially testing the same thing in a similar way.

Includes:

  • Renaming the test class per the naming conventions.
  • Adjusting comments per the documentation standards.
  • Updating @covers tags for accuracy.
  • Removing unnecessary blog switching.
  • Using assertSame() to check the value type.

Follow-up to [28835], [29667], [52207].

See #57023, #56793.

#27 @SergeyBiryukov
19 months ago

In 54791:

Tests: Correct the test for get_blogaddress_by_id() with a non-existing ID.

Due to auto-increment, when running various test groups or classes separately, in this case running all of the tests under phpunit/tests/multisite/ by including the --filter Tests_Multisite parameter, it is entirely possible for the blog ID 42 to actually exist, making the test's assumption incorrect.

By using PHP_INT_MAX instead, we can avoid a collision with a fixture of another test.

Follow-up to [31157].

See #56793.

This ticket was mentioned in PR #3638 on WordPress/wordpress-develop by @desrosj.


19 months ago
#28

This extracts various inline documentation corrections, removal of unnecessary or repetitive debugging output, and organizational improvements from #3460 that were unrelated to the goal of that PR.

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

#29 @desrosj
19 months ago

In 54851:

Build/Test Tools: Various minor GitHub Action improvements.

This applies several types of improvements to GitHub Action workflows:

  • Updates to inline documentation to ensure accuracy.
  • Removal of repetitive or unnecessary debug logging.
  • Reorganization of some steps to have configuration steps towards the beginning of jobs.
  • Step name updates for consistency across workflows.

Props desrosj, jrf.
See #56793.

#30 @desrosj
19 months ago

In 54852:

Build/Test Tools: Add additional details why MacOS jobs are separate.

This adds additional inline context as to why the MacOS job is separate from the Windows and Ubuntu ones in the Test npm workflow.

While it is preferable to combine all of these to avoid repeated code, there is currently no way to determine the runner’s OS within the if workflow key.

MacOS jobs use GitHub Action minutes at by a multiple of 10. Being more strict about when to run these jobs ensures minutes are not unintentionally consumed within private forks and mirrors.

See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability for more details.

See #56793.

#32 @SergeyBiryukov
18 months ago

In 54864:

Tests: Clean up test file in wpmu_delete_blog() tests.

This makes sure there are no leftover files after the tests from the multisite directory are run separately.

Follow-up to [30404].

See #56793.

#33 @SergeyBiryukov
18 months ago

In 54865:

Tests: Correct references to set_up() and tear_down() in various DocBlocks.

The setUp() and tearDown() methods were renamed to set_up() and tear_down(), respectively, as part of implementing the void return type solution for PHPUnit 8.0.

Follow-up to [29120], [29251], [30277], [32173], [32806], [38829], [42379], [50450], [51276], [51568].

See #56793.

#34 @SergeyBiryukov
18 months ago

In 54949:

Tests: Use more descriptive name for a wp_new_comment() test.

Includes:

  • Correcting the order of expected and actual values.
  • Adding a missing @covers tag for another test next to it.

Follow-up to [32299], [53863], [54489].

See #56793.

#35 @peterwilsoncc
18 months ago

In 54968:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

This ticket was mentioned in PR #3745 on WordPress/wordpress-develop by @costdev.


18 months ago
#36

  • Keywords has-unit-tests added

This PR:

  • [x] Renames the test class to be compliant with standards.
  • [x] Adds a @covers annotation.
  • [x] Removes unnecessary remove_filter() calls.
  • [x] Moves an unrelated test, test_should_enqueue_stored_styles() to its own file.
  • [x] Converts private properties to private static.
  • [x] Optimizes set_up() and tear_down() to make use of set_up_before_class() and tear_down_after_class().
  • [x] Documents the filter_set_theme_root() callback method.
  • [x] Implements a data provider for the tests to reduce code repetition.

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

#37 @peterwilsoncc
18 months ago

In 54974:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 6.1 branch.
Fixes #57306.
See #56793.

#38 @peterwilsoncc
18 months ago

In 54975:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 6.0 branch.
Fixes #57306.
See #56793.

#39 @peterwilsoncc
18 months ago

In 54976:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.9 branch.
Fixes #57306.
See #56793.

#40 @peterwilsoncc
18 months ago

In 54977:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.8 branch.
Fixes #57306.
See #56793.

#41 @peterwilsoncc
18 months ago

In 54978:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.7 branch.
Fixes #57306.
See #56793.

#42 @peterwilsoncc
18 months ago

In 54979:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.6 branch.
Fixes #57306.
See #56793.

#43 @peterwilsoncc
18 months ago

In 54980:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.5 branch.
Fixes #57306.
See #56793.

#44 @peterwilsoncc
18 months ago

In 54981:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.4 branch.
Fixes #57306.
See #56793.

#45 @peterwilsoncc
18 months ago

In 54982:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.3 branch.
Fixes #57306.
See #56793.

#46 @peterwilsoncc
18 months ago

In 54983:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.2 branch.
Fixes #57306.
See #56793.

#47 @peterwilsoncc
18 months ago

In 54984:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.1 branch.
Fixes #57306.
See #56793.

#48 @peterwilsoncc
18 months ago

In 54985:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.0 branch.
Fixes #57306.
See #56793.

#49 @peterwilsoncc
18 months ago

In 54986:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.9 branch.
Fixes #57306.
See #56793.

#50 @peterwilsoncc
18 months ago

In 54987:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.8 branch.
Fixes #57306.
See #56793.

#51 @peterwilsoncc
18 months ago

In 54988:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.7 branch.
Fixes #57306.
See #56793.

#52 @peterwilsoncc
18 months ago

In 54989:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.6 branch.
Fixes #57306.
See #56793.

#53 @peterwilsoncc
18 months ago

In 54990:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.5 branch.
Fixes #57306.
See #56793.

#54 @peterwilsoncc
18 months ago

In 54991:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.4 branch.
Fixes #57306.
See #56793.

#55 @peterwilsoncc
18 months ago

In 54992:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.3 branch.
Fixes #57306.
See #56793.

#56 @peterwilsoncc
18 months ago

In 54993:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.2 branch.
Fixes #57306.
See #56793.

#57 @peterwilsoncc
18 months ago

In 54994:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.1 branch.
Fixes #57306.
See #56793.

#58 @SergeyBiryukov
17 months ago

In 55006:

Tests: Correct a flaky wp_nonce_field() test.

The test for wp_nonce_field() with a custom action name verifies that the nonce value matches the one returned by wp_create_nonce() with the same action name.

The created nonce, in turn, depends on wp_nonce_tick(), which returns a different result in the first and the second half of the nonce's lifespan, one day by default:

  • 00:00:01 to 12:00:00 — First tick
  • 12:00:01 to 00:00:00 — Second tick

In practice, due to a delay between initializing data providers and running the actual tests, it is possible for the nonce tick to change in the process, for example if the test suite run starts at 11:59:30, and the affected test runs at 12:00:30, causing a test failure.

This commit reduces the chance of a race condition by moving the wp_create_nonce() call from the data provider into the test itself.

Includes wrapping long lines with the expected results for better readability.

Follow-up to [54420].

Props NekoJonez, SergeyBiryukov.
See #56793.

#59 @SergeyBiryukov
17 months ago

In 55019:

Tests: Bring some consistency to creating and updating objects in factory classes.

In various unit test factory classes, some of the create_object() and update_object() methods returned a WP_Error object on failure, while a few others were documented to do so, but did not in practice, instead returning the value 0 or false, or not accounting for a failure at all.

This commit aims to handle this in a consistent way by updating the methods to always return the object ID on success and a WP_Error object on failure.

Includes:

  • Updating and correcting the relevant documentation parts.
  • Adding missing documentation and @since tags in some classes.
  • Renaming some variables to clarify that it is the object ID which is passed around, not the object itself.

Follow-up to [760/tests], [838/tests], [922/tests], [948/tests], [985/tests], [27178], [32659], [34855], [37563], [40968], [44497], [46262].

See #56793.

#60 @SergeyBiryukov
17 months ago

In 55025:

Tests: Update the terminology used for filter names in tests_add_filter().

This commit renames the $tag and $function_to_add parameters to match the add_filter() function signature.

Includes:

  • Renaming the $tag parameter to $hook_name.
  • Renaming the $function_to_add parameter to $callback.
  • Synchronizing documentation for:
    • tests_add_filter() and add_filter()
    • _test_filter_build_unique_id() and _wp_filter_build_unique_id()

Follow-up to [760/tests], [38582], [43555], [46801], [50807], [52300], [53804], [53805], [55023].

See #56793.

#61 @SergeyBiryukov
17 months ago

In 55029:

Tests: Bring some consistency to mocking HTTP requests in unit tests.

Includes:

  • Renaming the $preempt parameter to $response in the pre_http_request filter to better match the context used in callbacks (returning the original value if the conditions are not met rather than preempting the request).
  • Synchronizing parameter names and types in various pre_http_request callbacks in unit tests.

Follow-up to [34509], [37907], [40628], [40629], [45667], [46175], [48242], [48462], [49904], [51021], [51973], [52146], [52382], [54043], [54968].

See #56793, #56792.

#62 @SergeyBiryukov
17 months ago

In 55031:

Tests: Use correct variable in _fake_download_url_non_200_response_code().

Follow-up to [55029].

See #56793.

#63 @SergeyBiryukov
17 months ago

In 55066:

Tests: Move the test for wp_save_image_file() with a GD resource to a more appropriate place.

When passed a GD resource as $image, wp_save_image_file() should throw a deprecated argument notice:

Function wp_save_image_file was called with an argument that is deprecated since version 3.5.0!
$image needs to be a WP_Image_Editor object.

The test verifies that the notice is thrown as expected.

Includes:

  • Removing the Tests_Functions_Deprecated class. It appears to be initially intended for testing deprecated functions or arguments, but this was later superseded by the @expectedDeprecated annotation.
  • Removing a redundant test for wp_save_image_file() not throwing a deprecation notice when passed a WP_Image_Editor instance. This is already covered by test_wp_save_image_file(), which would fail if there is an unexpected deprecation notice.

Follow-up to [1061/tests], [25408], [25409], [53529].

See #56793.

#64 @SergeyBiryukov
17 months ago

In 55070:

Tests: Use more specific assertions in image saving tests.

When passed a WP_Image_Editor instance as the $image parameter, wp_save_image_file() returns an array on success, so we can specifically check for an array instead of any non-empty result.

Likewise, in PDF tests, when creating an attachment is expected to return an integer ID and not a WP_Error object, we can specifically check for that.

Follow-up to [1061/tests], [38949], [39617], [42792], [53529], [53530], [53531], [55019], [55066].

See #56793.

#65 @SergeyBiryukov
16 months ago

In 55102:

Tests: Correct additional_field_get_callback() parameters in some REST API tests.

The second parameter passed to get_callback in WP_REST_Controller::add_additional_fields_to_object() is the field name, not the request details.

Includes moving the get_callback and update_callback helper functions next to the tests they are used in.

Follow-up to [38832], [43768].

See #56793.

#66 @SergeyBiryukov
16 months ago

In 55118:

Tests: Use wp_recursive_ksort() in WP_Theme_JSON_Resolver tests.

This replaces a helper method in Tests_Theme_wpThemeJsonResolver with the wp_recursive_ksort() function that was introduced later for the same purpose.

Follow-up to [52049], [53129], [55117].

See #56793.

#68 @desrosj
16 months ago

I've created #57572 to split out any GitHub Actions changes. We've mostly grouped those in with this ticket release to release, but now that Actions are doing more than just testing, it's worth having a separate ticket.

#69 @davidbaumwald
16 months ago

In 55153:

Tests: Resolve some line endings issues in blocks/renderCommentTemplate.php on Windows machines.

This change resolves a unit test failure in Tests_Blocks_RenderReusableCommentTemplate::test_rendering_comment_template_nested() on systems using \r\n line endings.

Props SergeyBiryukov.
See #56793.

#71 @peterwilsoncc
16 months ago

In 55208:

Posts, Post Types: Add test coverage for _truncate_post_slug().

Props xknown, mukesh27, costdev, audrasjb.
Fixes #56868.
See #56793.

#72 @SergeyBiryukov
16 months ago

In 55315:

Tests: Rename the html tests directory to html-api.

This matches the WP_HTML_Tag_Processor class location in wp-includes and the @group name used in the tests.

Follow-up to [55203].

See #56793.

#73 @SergeyBiryukov
16 months ago

In 55319:

Tests: Move wp_comments_personal_data_eraser() tests to their own file.

This aims to make the tests more discoverable and easier to expand.

Follow-up to [42994].

See #56793.

#74 @SergeyBiryukov
16 months ago

In 55320:

Tests: Add missing @covers tag for a wp_update_comment() test.

Follow-up to [37609], [53863].

See #56793.

#75 @SergeyBiryukov
16 months ago

In 55321:

Tests: Move wp_comments_personal_data_exporter() tests to their own file.

This aims to make the tests more discoverable and easier to expand.

Follow-up to [42987], [55319].

See #56793.

#76 @SergeyBiryukov
16 months ago

In 55322:

Tests: Declare the $post_id property in wp_comments_personal_data_exporter() tests.

Use the same approach in wp_comments_personal_data_eraser() for consistency and to minimize the number of fixtures created in each individual test.

Follow-up to [55319], [55321].

Props hellofromTonya.
See #56793.

#77 @hellofromTonya
15 months ago

#57841 is now open for the ongoing improvement work into the 6.3 cycle.

This ticket was mentioned in Slack in #core by costdev. View the logs.


15 months ago

#80 @SergeyBiryukov
15 months ago

In 55464:

Tests: Move some data providers in Tests_Functions next to the tests they are used in.

Includes renaming some data provider methods to use the data_ prefix for consistency.

Follow-up to [36832], [40124], [40397], [50810], [53457].

See #56793.

This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.


15 months ago

#82 @desrosj
15 months ago

In 55488:

Build/Test Tools: Update third-party welcome Action.

This updates the third-party action used to post a welcome message to pull requests opened by first time contributors.

This release updates the action to use Node.js version 16 instead of 12, the latter of which support has been deprecated for in GitHub Action runners.

The action has also changed from bukboo/welcome-action to wow-action/welcome.

Merges [54651] to the 6.1 branch.
See #56793.

#83 @desrosj
15 months ago

In 55490:

Build/Test Tools: Update several GitHub Actions.

This updates three GitHub Actions to their latest versions:

  • shivammathur/setup-php
  • actions/cache
  • wow-actions/welcome

The welcome action now uses the GITHUB_TOKEN by default, so it no longer needs to be passed manually.

Merges [54651] and [55487] to the 6.0 branch.
See #56793, #57572.

This ticket was mentioned in Slack in #core by costdev. View the logs.


15 months ago

#85 @costdev
15 months ago

  • Resolution set to fixed
  • Status changed from new to closed

As we're about to enter RC, closing this ticket out for 6.2.

#86 @desrosj
15 months ago

In 55516:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.

Merges [53736], [53737], [53940], [53947], [54039], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54649], [54650], [54651], [54674], [54750], [54852], [55152], [55487] to the 5.9 branch.
See #55652, #56407, #54695, #56820, #56816, #56793, #56820, #57572.

#87 @desrosj
15 months ago

In 55517:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54649], [54650], [54651], [54674], [54750], [54852], [55152], [55487] to the 5.8 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#88 @desrosj
15 months ago

In 55518:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54649], [54650], [54651], [54674], [54750], [54852], [55152], [55487] to the 5.8 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#89 @desrosj
15 months ago

In 55519:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54649], [54650], [54651], [54674], [54750], [54852], [55152], [55487] to the 5.6 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#90 @desrosj
15 months ago

In 55520:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54649], [54650], [54651], [54674], [54750], [54852], [55152], [55487] to the 5.5 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#91 @desrosj
15 months ago

In 55521:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54649], [54650], [54651], [54674], [54750], [54852], [55152], [55487] to the 5.4 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#92 @desrosj
15 months ago

In 55522:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54649], [54650], [54651], [54674], [54750], [54852], [55152], [55487] to the 5.3 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#93 @desrosj
15 months ago

In 55523:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54649], [54650], [54651], [54674], [54750], [54852], [55152], [55487] to the 5.2 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#94 @desrosj
15 months ago

In 55524:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 5.1 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#95 @desrosj
15 months ago

In 55525:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 5.0 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#96 @desrosj
15 months ago

In 55527:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 4.9 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#97 @desrosj
15 months ago

In 55528:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 4.8 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#98 @desrosj
15 months ago

In 55529:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 4.7 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#99 @desrosj
15 months ago

In 55530:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 4.6 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#100 @desrosj
15 months ago

In 55531:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 4.5 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#101 @desrosj
15 months ago

In 55532:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 4.4 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#102 @desrosj
15 months ago

In 55533:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 4.3 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#103 @desrosj
15 months ago

In 55534:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 4.2 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

#104 @desrosj
15 months ago

In 55535:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 4.1 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

Note: See TracTickets for help on using tickets.