A Week in Core – August 9, 2021

Welcome back to a new issue of Week in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Let’s take a look at what changed on TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. between August 2 and August 9, 2021.

  • 58 commits
  • 22 contributors
  • 48 tickets created
  • 8 tickets reopened
  • 23 tickets closed

Pending the appointment of the WordPress 5.9 team, a number of tickets have been fixed, waiting for the next minor releaseMinor Release A set of releases or versions having the same minor version number may be collectively referred to as .x , for example version 5.2.x to refer to versions 5.2, 5.2.1, 5.2.3, and all other versions in the 5.2 (five dot two) branch of that software. Minor Releases often make improvements to existing features and functionality.(s). This week was also partly dedicated to PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 8.1 compatibility.

Ticketticket Created for both bug reports and feature development on the bug tracker. numbers are based on the Trac timeline for the period above. The following is a summary of commits, organized by component and/or focus.

Code changes

Build/Test Tools

  • Add Composer dependency on the PHPUnit Polyfills package – #46149
  • Add branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". filtering for SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. notifications workflow – #52644
  • Add schema reference to PHPUnit config files – #53363
  • Alias the Getopt class conditionally, as the class no longer exists in PHPUnit 9.x – #46149
  • Change the inheritance order of the abstract test classes – #46149
  • Correct invalidinvalid A resolution on the bug tracker (and generally common in software development, sometimes also notabug) that indicates the ticket is not a bug, is a support request, or is generally invalid. JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. in Slack payload – #52644
  • Correctly check for the trigger event when running the Slack notifications workflow – #52644
  • Declare two TestCase classes as abstract – #53363
  • Enable running the tests on PHP 8.1 – #53891, #53635
  • Expand Slack notifications for GitHubGitHub GitHub is a website that offers online implementation of git repositories that can can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ Actions – #52644
  • Fix message display in test bootstrap – #53363
  • Handle removal of TestCase::getAnnotations()#46149
  • Implement use of the void solution – #46149
  • Loosen the PHPUnit restriction – #46149
  • Remove SpeedTrapListener – #46149
  • Remove Unicode character from PHPUnit version check message – #53363
  • Remove the Composer lock file from version controlversion control A version control system keeps track of the source code and revisions to the source code. WordPress uses Subversion (SVN) for version control, with Git mirrors for most repositories.#47381
  • Remove the copied-in PHPUnit 9.x MockObject files – #46149
  • Revert changes only included for testing purposes – #52644
  • Simplify redundant PHPUnit shim for setExpectedException()#46149
  • Switch to always running the tests via Composer – #47381
  • Unify the PHPUnit adapter TestCases – #46149
  • Use a custom autoloader for the PHPUnit 9.x mock object classes – #47381
  • Use the PHPUnit Polyfill TestCase as void workaround – #46149
  • Fix tests failing due to assertContains() using strict checking – #46149
  • Remove redundant @requires tags – #46149
  • Remove use of assertArraySubset() in Test_WP_Widget_Media::test_constructor()#46149
  • Replace assertFileNotExists() with assertFileDoesNotExist()#46149
  • Replace assertNotRegExp() with assertDoesNotMatchRegularExpression()#46149
  • Replace assertRegExp() with assertMatchesRegularExpression()#46149
  • Replace expectException() for PHP native errors with calls to the dedicated PHPUnit 8.4+ methods – #46149
  • Replace expectException() for PHP native errors with calls to the dedicated PHPUnit 8.4+ methods – #46149
  • Use more appropriate assertions in get_themes() tests – #53363
  • Use more appropriate assertions in get_themes() tests – #53363

Bundled Themes

  • Add / character to tags – #53870
  • Remove redundant semicolons after closing curly brackets – #53359
  • Twenty Thirteen: Correct indentation in image.php template – #53359
  • Twenty Thirteen: Remove wrapping HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) from translatable string – #53359

Code Modernization

  • Pass correct default value to new DateTime() in wp_default_packages_inline_scripts()#53635
  • Rename the readonly() function to wp_readonly()#53858
  • Replace strftime() and gmstrftime() usage in unit tests – #53897
  • Set the MySQLi error reporting off for PHP 8.1 – #52825
  • Silence the deprecation warnings for missing return type in WP_Block_List#53635
  • Silence the deprecation warnings for missing return type in WP_Hook#53635
  • Silence the deprecation warnings for missing return type in WP_REST_Request#53635
  • Silence the deprecation warnings for missing return type in WP_Theme#53635

Coding Standards

  • Correct DateTimeZone class name in WP_Customize_Date_Time_Control::get_timezone_info()#53359
  • Fix incorrect alignment in two comment blocks – #53359
  • Fix incorrect comment indent in safecss_filter_attr()#53359
  • Remove redundant semicolons after closing curly brackets – #53359
  • Silence a WPCSWPCS The collection of PHP_CodeSniffer rules (sniffs) used to format and validate PHP code developed for WordPress according to the WordPress Coding Standards. May also be an acronym referring to the Accessibility, PHP, JavaScript, CSS, HTML, etc. coding standards as published in the WordPress Coding Standards Handbook. warning in date_i18n()#53359
  • Use strict comparisons in wp-admin/options-discussion.php#53359
  • Use strict comparisons in wp-admin/upload.php#53359

Editor

  • Prevent blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience.-editor JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. loading in other editors – #53696
  • Block Editor: Add missing border setting on button block – #53702

Media

  • Add / character to <img> tag in wp_print_media_templates()#53870
  • Hide bulk-select on new menu page – #53654

Themes

  • Correct the documented types for theme mod values – #53399

Props

Thanks to the 22 people who contributed to WordPress Core on Trac last week: @jrf (43), @SergeyBiryukov (8), @hellofromTonya (6), @johnbillion (6), @netweb (5), @desrosj (4), @ayeshrajans (3), @akabarikalpesh (2), @swissspidy (2), @shital-patel (2), @priethor (1), @daisyo (1), @Mamaduka (1), @sabernhardt (1), @dlh (1), @Clorith (1), @aristath (1), @pputzer (1), @dd32 (1), @knutsp (1), @haosun (1), and @mikeschroder (1).

Congrats and welcome to our new contributor of the week! @haosun ♥️

Core committers: @sergeybiryukov (47), @desrosj (5), @peterwilsoncc (4), @johnbillion (1), and @jorgefilipecosta (1).

#5-9, #core, #week-in-core