Continuing the transition to GitHub Actions for automated testing

Two months ago, the configuration files needed to run automated tests using 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 were added to WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress..

GitHub Actions allows us to automate software workflows directly in GitHub, triggered by GitHub events. By switching, we are able to take advantage of a unified interface, inline annotations for linting issues in pull requests, the broader open sourceOpen Source Open Source denotes software for which the original source code is made freely available and may be redistributed and modified. Open Source **must be** delivered via a licensing model, see GPL. ecosystem building and using Actions including existing work in Gutenberg, and free availability for public repositories. Note that private repositories do use the monthly bucket of included minutes.

Introducing GitHub Actions for Automated Testing

During this transition process, the workflows have been running smoothly with only small issues coming up (which have been fixed). The workflows are also performing better or identically to those run in TravisCI.

With the branching of 5.6, the workflows have been running for both trunk and the 5.6 branches. This has allowed them to be tested successfully in both the primary and non-primary branches.

Since [49162], an additional workflow that generates a code coverage report has also been introduced. Currently, this workflow generates coverage reports for both single and multisite installs and uploads the reports as artifacts to the workflow run. For now, this workflow runs weekly on Sunday at 00:00 UTC. #52141 has been opened to explore submitting the reports to an external service

Additionally, TravisCI has made further changes to their pricing models. As a result, no builds for the WordPress organization have run since the first week of December. When this happened, efforts to transition all repositories under the WordPress GitHub organization from TravisCI to GitHub Actions were accelerated.

As of today, all repositories have been fully transitioned to GitHub Actions except the WordPress Coding Standards (which has an open PR being actively refined), and the ones noted below. These are lower priority repositories because they are updated much less frequently than others. Here they are ranked in order of priority highest to lowest:

Pull requests are very much welcome!

The Appveyor build configuration (which has been replaced with the Test NPM on Windows workflow) was removed from Core in [49779,49809-49814], and the TravisCI configuration was removed in [49876-49898].

Forked repositories

To avoid workflows from running unnecessarily, conditional checks have been added to prevent all workflows from running in forked repositories. There are two exceptions to this:

  • When a pull request is opened to the official wordpress-develop repository from a fork.
  • When a pull request is opened to a forked repository from within a fork.

Known next steps (updated)

  1. Add and configure 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. In addition to sending the results of the whole build of a core commit into #core, we may also want to consider a firehose channel for PRs. This may require all workflows to be combined into a single workflow if needed middleware cannot be found.
  2. Backportbackport A port is when code from one branch (or trunk) is merged into another branch or trunk. Some changes in WordPress point releases are the result of backporting code from trunk to the release branch. the workflow files to actively maintained older branches.
  3. Finish backporting the local Docker environment to branches 3.7-4.5. This is blocked by:
    • wpdev-docker-images#46, which aims to fix the PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 5.2 PHPUnit image to include the requred version of PHPUnit (3.6).
    • WP branches <= 4.5 are running a version of NodeJS that is too old for the needed NPM packages required to run the local Docker environment.
  4. Move to GitHub badges for build status indicators – note that these are per-workflow, which is different from the single badge for the entire Travis build for a given commit. However, GitHub does report an overall status for a commit/PR, so we may be able to use that information as well. It seems that the expectation in the greater developer community is that projects report status with a singular badge. Like the Slack notifications, this may require the workflows to be combined in the absence of middleware.
  5. Report test results to the Host Test Results page. The MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. version being tested is not currently being reported (see phpunit-test-runner#135).
  6. Switch to ESLint from JSHint, as the latter does not appear to easily support inline annotations, and the former is in broader usage including in core for docs, GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ and many community projects. See #31823 for more – volunteers very much appreciated here.

Committers: Until the Slack notifications are configured, please monitor the workflow runs associated with your commits to ensure they pass.

The goal is for the remaining repositories and items 1-3 above to be completed in January 2021.

Props @helen for peer reviewing this post.

#build-test-tools, #github, #github-actions

A Week in Core – December 21, 2020

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 December 14 and December 21, 2020.

  • 41 commits
  • 57 contributors
  • 81 tickets created
  • 12 tickets reopened
  • 90 tickets closed

Now that WordPress 5.6 « Simone » was smoothly delivered to millions of people, the WordPress Core Team is quietly moving to WordPress 5.7.

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.

Code changes

Build/Test Tools

  • Build/Test Tools: Support the use of MariaDB in the local Docker environment – #51744
  • Build/Test Tools: Run the Ajax test group for multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site#46567
  • Build/Test Tools: Generate a code coverage report using 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 – #52034

Bundled Themes

  • Twenty Twenty-One: Do not specify `loading=“eager”` for single post thumbnails – #52139
  • Twenty Twenty-One: Allow local anchor links to be used in primary navigation – #52006
  • Twenty Ten: Correct `$post_title` variable name in `loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop.-attachment.php` – #52121
  • Twenty Twenty-One: Clarify a sentence in `readme.txt` – #52120
  • Twenty Nineteen: Add “Continue reading” link for post excerpts – #46177
  • Twenty Twenty-One: Correct `since` inline documentation tags – #51958
  • Twenty Twenty-One: Make text within code blocks readable in Dark Mode – #51985
  • Twenty Twenty-One: Prevent `iframeiframe iFrame is an acronym for an inline frame. An iFrame is used inside a webpage to load another HTML document and render it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the user’s browser.` embeds from being too narrow – #52004
  • Twenty Twenty-One: Fix typos in some inline comments – #52071XML-RPC: Emit an appropriate HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. status code when an error is returned in response to an XML-RPC request – #48213

Docs

  • Use a canonical form of “knowledgeable” in `readme.htmlHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers.` – #52125
  • Fix typo in `getCursorMarkerSpan()` DocBlockdocblock (phpdoc, xref, inline docs) in `js/_enqueues/wp/editor/base.js` – #52128

Editor

  • Fix improper triggering of the “Are you sure” prompt when navigating away from the old, “classic” Edit Post screen and there are no changes. Was
  • Blocks: Align with GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ the name of generated asset handle for core blocks – #50328

Feed

  • Replace `join()` with `implode()` for safety – #51056
  • Merge multiple headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. values to avoid fatal error – #51056

Mail

  • Introduce a `pre_wp_mail` filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. to allow short-circuiting the `wp_mail()` function without having to override the pluggable function – #35069

Media

  • Editor: Fix improper triggering of the “Are you sure” prompt when navigating away from the old, “classic” Edit Post screen and there are no changes. Was triggered when there is an instance of TinyMCE in the ExcerptExcerpt An excerpt is the description of the blog post or page that will by default show on the blog archive page, in search results (SERPs), and on social media. With an SEO plugin, the excerpt may also be in that plugin’s metabox. postbox – #52038
  • Enable lazy-loading of iframes by adding the `loading=”lazy”` attribute to iframe tags on the front-end – #50756
  • Uploads: Introduce the `{$action}_overrides` filter that allows the overrides parameter for file uploads and file sideloads to be filtered – #16849
  • Fix the template for the “Align” and “Link To” fields in the media modal when inserting an image from URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org

Query

  • Respect post-type specific capabilities when querying for multiple post types – #13509, #48968, #48556
  • Ensure the author archive title always shows the name of the queried author, regardless of whether there are results – #44183

Props

Thanks to everyone who contributed to WordPress Core on Trac last week:

@mukesh27 (5), @poena (5), @SergeyBiryukov (4), @audrasjb (2), @johnbillion (2), @Mte90 (2), @azaozz (2), @sabernhardt (2), @flixos90 (2), @westonruter (1), @justinahinon (1), @slaFFik (1), @leogermani (1), @helen (1), @thorlentz (1), @laurelfulford (1), @ericmann (1), @kevin940726 (1), @rodrigosprimo (1), @jonathanstegall (1), @alex27 (1), @noisysocks (1), @david.binda (1), @litemotiv (1), @inc2734 (1), @NicolasKulka (1), @hellofromTonya (1), @mbabker (1), @skithund (1), @desrosj (1), @timothyblynjacobs (1), @mdrockwell (1), @davidbaumwald (1), @metalandcoffee (1), @swissspidy (1), @ryelle (1), @macmanx (1), @t-p (1), @aristath (1), @iandunn (1), @jakub.tyrcha (1), @nacin (1), @wonderboymusic (1), @DvanKooten (1), @jtsternberg (1), @ocean90 (1), @ericlewis (1), @birgire (1), @ayeshrajans (1), @Tkama (1), @subrataemfluence (1), @shahinsid07 (1), @voboghure (1), @gkibria69 (1), @garrett-eclipse (1), @netweb (1) and @manzurahammed (1).

Core committers: @desrosj (8), @sergeybiryukov (5), @johnbillion (4), @azaozz (2), @iandunn (2), @gziolo (1), @boonebgorges (1) and @flixos90 (1).

Thanks @annezazu for proofreading this post.

#5-7, #week-in-core

A Week in Core – December 7, 2020

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 November 30 and December 7, 2020.

  • 17 commits
  • 54 contributors
  • 61 tickets created
  • 13 tickets reopened
  • 61 tickets closed

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

Code changes

Administration

  • Make sure row actions for recent comments in Activity dashboard widgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. stay visible when a single row gets focus – #51886

Application Passwords

  • Prevent conflicts when Basic Auth is already used by the site – #51939
  • Ensure the Created At and Last Used dates are properly translated – #51918
  • Return true when rate limiting a password’s last used time – #51922
  • Ensure REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. responses are properly translated – #51871

Bundled Themes

  • Twenty Twenty-One: Fix the nesting of the main element – #51944
  • Twenty Twenty-One: Sync the latest changes for 5.6 RC2 – #51526
  • Twenty Twenty-One: Use consistent HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. comments after closing HTML tags – #51950
  • Twenty Twenty-One: Use esc_url() for the WordPress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ link in footer.php – #51954

Editor

  • Update components package for WordPress 5.6 RC3 – #51923
  • Don’t unnecessarily split a translatable string in 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. templates – #51893

Help/About

  • Move trailing punctuation in the jQuery Migrate Helper pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party link outside of the HTML 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.)#51813

Media

  • Return WP_Error when cropping with bad input to avoid fatal – #51937
  • Revert [49567]: This addresses a regressionregression A software bug that breaks or degrades something that previously worked. Regressions are often treated as critical bugs or blockers. Recent regressions may be given higher priorities. A "3.6 regression" would be a bug in 3.6 that worked as intended in 3.5. with the pagination section in Media Library no longer taking additional query filtering into account – #39968

Multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site

  • Cache absolute dirsize paths to avoid PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 8 fatal – #51913

Upgrade/Install

  • Check $wp_version global for displaying “You are using a development version” message in the adminadmin (and super admin) footer – #51892
  • Update sodium_compat to v1.14.0 – #51925

Props

Thanks to everyone who contributed to WordPress Core on Trac last week:

@SergeyBiryukov (4), @audrasjb (4), @kebbet (4), @TimothyBlynJacobs (3), @pbiron (3), @poena (3), @hellofromtonya (3), @Clorith (3), @helen (2), @adamsilverstein (2), @ocean90 (2), @tobifjellner (2), @peterwilsoncc (2), @mukesh27 (2), @allancole (1), @melchoyce (1), @ryelle (1), @felipeelia (1), @aljullu (1), @chaton666 (1), @albertomake (1), @mkaz (1), @ingereck (1), @paaljoachim (1), @luminuu (1), @sabernhardt (1), @hareesh-pillai (1), @oglekler (1), @hellofromTonya (1), @azaozz (1), @iCaleb (1), @kjellr (1), @alexstine (1), @markscottrobson (1), @janthiel (1), @chexwarrior (1), @georgestephanis (1), @marybaum (1), @Boniu91 (1), @metalandcoffee (1), @pedromendonca (1), @antpb (1), @francina (1), @fierevere (1), @afragen (1), @jrf (1), @dlh (1), @isabel_brison (1), @sarahricker (1), @kevin940726 (1), @talldanwp (1), @psmits1567 (1), @arcangelini (1) and @trepmal (1).

Core committers: @sergeybiryukov (10), @iandunn (2), @peterwilsoncc (1), @helen (1) and @desrosj (1).

#week-in-core

A Week in Core – November 23, 2020

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 November 16 and November 23, 2020.

  • 29 commits
  • 76 contributors
  • 72 tickets created
  • 13 tickets reopened
  • 129 tickets closed

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

Code changes

Application Passwords

  • Regenerate the .htaccess file to add a new rule – #51723
  • Unify availability language – #51513

Build/Test Tools

  • Update the package.json engines to point to the new LTS versions of Node/NPM – #51749

Bundled Themes

  • Twenty Twenty-One: Sync the latest changes for 5.6 RC1 – #51526

CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings.

  • Temporary fix for autosave restore notice not being removed
  • #51425
  • Ensure multiple CSSCSS Cascading Style Sheets. classes are passed to nav_menu_link_attributes as an array
  • #43113

Documentation

  • Add documentation for the $type and $mime_type properties in WP_Customize_Image_Control#44411
  • Add documentation for the $type, $mime_type, and $button_labels properties in WP_Customize_Upload_Control#44411
  • Use more specific type in parameter descriptions for in_category() and is_object_in_term()#51825

Editor

  • Update WordPress packages for RC1 – #51793

Embeds

  • Document $args in wp_oembed_get() – #51269

External libraries

  • Update jQuery Migrate to 3.3.2 – #50564

Feeds

  • Add an early exit when calling RSS functions directly – #35835

General

  • Rename the wp_error_checked action to is_wp_error_instance for clarity – #40568
  • Code Modernization: Only call libxml_disable_entity_loader() in PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher < 8 – #50898

Help/About

  • Move trailing punctuation in the jQuery Migrate Helper pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party link outside of the 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.)#51813
  • Correct placeholder for the accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) statement feature pluginFeature Plugin A plugin that was created with the intention of eventually being proposed for inclusion in WordPress Core. See Features as Plugins. link – #51415
  • Clarify accessibility features. Captions are uploaded in the 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, and not created in the editor. Avoid making an 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. claim of WCAGWCAG WCAG is an acronym for Web Content Accessibility Guidelines. These guidelines are helping make sure the internet is accessible to all people no matter how they would need to access the internet (screen-reader, keyboard only, etc) https://www.w3.org/TR/WCAG21/. 2.1 conformance or trivialize the efforts still required to build an accessible and compliant site – #51415

Internationalization

  • Avoid PHP notices for relative URLs in load_script_textdomain()#49145

Multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site

  • More consistency for clean_dirsize_cache()#19879

Permalinks

Plugins

  • Check if _error_nonce is set before attempting to verify it – #43876
  • Make sure the HTML ID attributes for plugin checkboxes are unique – #51256

Site Health

  • Check if $core_updates is an array before iterating on it – #51818
  • Add missing i18ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill. for the App Passwords documentation link – #51815

Upgrade/Install

  • Replace the conditionals that check the AUTOMATIC_UPDATER_DISABLED constant and the automatic_updater_disabled filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. in update-core.php with a call to WP_Automatic_Updater::is_disabled(). This prevents a PHP warning, the logic, and considers wp_is_file_mod_allowed( 'automatic_updater' ) when determining the UIUI User interface state – #51827
  • Consistent layout and accurate messages on the update screen – #51742

Users

  • Use do_action_ref_array() for pre_get_users and pre_get_terms actions – #50961

Props

Thanks to everyone who contributed to WordPress Core last week:

@SergeyBiryukov (8), @audrasjb (6), @helen (5), @hellofromTonya (4), @pbiron (3), @sabernhardt (2), @dlh (2), @poena (2), @hellofromtonya (2), @isabel_brison (2), @johnbillion (2), @ryelle (2), @TimothyBlynJacobs (2), @subrataemfluence (2), @joedolson (2), @azaozz (2), @peterwilsoncc (1), @thib3113 (1), @williampatton (1), @zodiac1978 (1), @andy (1), @flymike (1), @adamsilverstein (1), @desrosj (1), @TheGP (1), @dd32 (1), @mkaz (1), @jorbin (1), @johnjamesjacoby (1), @Toro_Unit (1), @Mte90 (1), @alexstandiford (1), @jnylen0 (1), @luminuu (1), @kjellr (1), @aristath (1), @nourma (1), @kishanjasani (1), @mukesh27 (1), @hareesh-pillai (1), @karthikbhatb (1), @jrf (1), @justinahinon (1), @psmits1567 (1), @archon810 (1), @marybaum (1), @tobifjellner (1), @fierevere (1), @markscottrobson (1), @wponlinesupport (1), @jamesros161 (1), @paulschreiber (1), @princeahmed (1), @tai (1), @mgol (1), @elmastudio (1), @melchoyce (1), @karmatosed (1), @webcommsat (1), @meher (1), @SeBsZ (1), @OGlekler (1), @lmurillom (1), @vimes1984 (1), @sabrinazeidan (1), @nalininonstopnewsuk (1), @afshanadiya (1), @michelleames (1), @bmcdede (1), @yvettesonneveld (1), @sarahricker (1), @chanthaboune (1), @cbringmann (1), @garrett-eclipse (1), @marks99 (1) and @ocean90 (1).

Core committers: @sergeybiryukov (13), @helen (3), @desrosj (3), @noisysocks (3), @azaozz (2), @ryelle (2), @peterwilsoncc (1), @whyisjake (1) and @timothyblynjacobs (1).

#week-in-core

WordPress and PHP 8.0


Update on November 24, 2020: Added a call out in the “Strict type/value validations for internal functions” section that there are still scenarios where WP CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. could potentially pass 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. types to PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher core functions, especially where values are passed through filters. Props @hellofromtonya.


PHP 8.0 is in the final stages of its release cycle. As of the publish date of this post, version 8.0 RC5 has been released, and the final release of PHP 8.0.0 is scheduled for November 26, 2020.

As the expected changes in PHP 8 were made known earlier this year, WordPress Core contributorsCore Contributors Core contributors are those who have worked on a release of WordPress, by creating the functions or finding and patching bugs. These contributions are done through Trac. https://core.trac.wordpress.org. worked to identify potential compatibility issues within the code base. This includes a call to test earlier in the release cycle.

WordPress Core aims to be compatible with PHP 8.0 in the 5.6 release (currently scheduled for December 8, 2020).

However, PHP 8.0 is a major version update with a large number of changes that break backwards compatibility, and many features that were deprecated within the PHP 7.x feature releases have been officially removed.

What does compatibility mean here?

Significant effort has been put towards making WordPress 5.6 compatible with PHP 8 on its own, but it is very likely that there are still undiscovered issues remaining.

Because of the nature of WordPress usage and the commitment to our user base, compatibility is to be considered in the eyes of those users. The goal is to elevate the broader ecosystem to a state that is compatible with PHP 8. That requires that the Core software not just be compatible on its own, but also provides defenses against common problems seen in the transition to PHP 8, while continuing to function on older versions of PHP.

It also should be acknowledged that WordPress is never used in isolation (without any theme or plugins), so WordPress itself being able to run on PHP 8 does not indicate “full” compatibility.

The state of PHP 8 support within the broader ecosystem (plugins, themes, etc.) is impossible to know. For that reason, WordPress 5.6 should be considered “betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. compatible” with PHP 8.

“Beta compatibility”

Calling WordPress 5.6 “beta compatible” is a good first step. Doing so acknowledges the hard work that has been done to get WordPress running on PHP 8 without major issues and achieve passing PHPUnit tests. It also honors the project’s commitment to being compatible with the new versions of PHP when they are released.

At the same time Core cannot claim “full compatibility” because the process to achieve that state takes a larger amount of time within the greater ecosystem. That’s where WordPress Core needs help.

All pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party and theme developers, as well as hosting communities, are called on to make their code compatible with PHP 8. This will allow WordPress to attain truly “full compatibility” sooner, and without end users having to carry the burden.

It’s also worth noting that all known compatibility issues that were identified through automated testing or static analysis have been addressed, except those detailed further down in this post. Automated test coverage of WordPress Core needs much improvement, and some problems will require manual testing of WordPress on PHP 8 under varying conditions to discover.

For the reasons above, it is highly recommended that you thoroughly test your site before upgrading to PHP 8.


Below is a breakdown of why the PHP 8 update is a bit different than other more recent PHP updates, and the changes that directly affect WordPress in PHP 8.0 that developers need to be aware of.

PHP release types

The release process that the PHP project currently follows was proposed and established back in 2010. This process outlines strict guidelines around when certain types of changes can be made. The process is structured around the idea of “major releases”, and follows semantic versioning.

The current major release of PHP is 7. Over the last 5 years, there have been 4 feature releases for the PHP 7 major releasemajor release A release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope. (7.1, 7.2, 7.3, and 7.4), and over 130 security/bug fix releases to these feature releases.

Feature releases

Though new features and bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. fixes are allowed in feature releases, backwards compatibility and APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. compatibility must be maintained. These rules dictating what types of changes are allowed, lower the likelihood that sites will break when upgrading to new feature releases within the same major release of PHP.

When older features are deprecated within these releases, they remain functional. It’s common practice for deprecated features to trigger errors (usually E_WARNING, E_NOTICE, or E_DEPRECATED level), informing developers that the feature is deprecated. Deprecated features can only be removed in a future major release.

Major releases

Like feature releases, bug fixes and new features can be added in major releases. However, old features can be removed entirely, maintaining backwards compatibility and API compatibility is not required.

As of PHP 8 RC4, there are 48 changes to core PHP that break backwards compatibility, and 166 throughout PHP 8 overall (extensions, libraries, etc.).

What this means for developers

Sites that are consistently updating to the latest versions of PHP and addressing issues with each feature release are usually less likely to experience problems when updating to a new major version.

New features in PHP 8 are not compatible with PHP 7 or PHP 5 and usually cause fatal errors.

While making your plugin or theme PHP 8 compatible is strongly encouraged, using features added in PHP 8 is not recommended in distributed plugins and themes unless Requires PHP is set to 8.0 in the headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. section of the main file (plugins) or style.css file (themes).

Changes in PHP 8

Below is a non-exhaustive breakdown of select changes in PHP 8.0 that plugin and theme developers need to be aware of and should accommodate in their code.

Named parameters

PHP 8 introduces the ability to pass arguments to a function by the parameter name instead of the parameter position. This is advantageous in several ways, but to name a few:

  • The argument’s meaning becomes self documenting.
  • The arguments become order-independent.
  • Default values can be skipped arbitrarily.

As an example, let’s take a look at retrieving a term as an associative array using get_term().

<?php
// PHP < 8.0
$my_term = get_term( 1, '', ARRAY_A );

// PHP >= 8.0
$my_term = get_term( output: ARRAY_A, term: 1 );

Note that the arguments in the second example are defined out of order, and because the arguments are not processed in order, the optional parameters using the default value, are no longer required.

Named parameters also work with PHP’s internal functions.

<?php
// Using positional arguments:
array_fill( 0, 100, 50 );

// Using named arguments:
array_fill( start_index: 0, count: 100, value: 50 );

This is a very simplistic overview of the named parameters feature. Please read the full Request for Comments (RFC) on the PHP website for a complete breakdown, which details the impact on variadic functions, func_get_args() and related functions, as well as call_user_func_array() and related functions.

Named parameters and WordPress

The named parameter feature introduces a significant backwards compatibility consideration for all PHP code going forward. With the introduction of this feature, parameter names become a part of the API contract and any changes to their names in future WordPress releases will break backwards compatibility, causing a fatal error when code is invoking a function using an outdated parameter name.

An active review of the function signatures throughout WordPress Core has been proposed to ensure that all parameter names are descriptive, accurate, and do not use reserved keywords to avoid any potential for confusion, but it will not be a part of WordPress 5.6.

Using named parameters when calling WordPress functions and class methods is explicitly not supported and highly discouraged until this audit can be completed, as during the audit, parameter names are subject to change without notice. When this audit has been completed, it will be announced in a future developer note.

If you choose to take advantage of named parameters when using WordPress Core functions and classes before that time, you do so at your own risk.

Additionally, PHP Core has been reviewing their own parameter names in anticipation of the PHP 8 release. Because the PHP documentation has not yet been updated to reflect PHP 8 changes, some of the parameter names currently detailed in the documentation may also change.

To follow or contribute to this review, see #51553, and #50531 on TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress..

Strict type/value validations for internal functions

When support for scalar type declarations was added in PHP 7.0, a new (optional) per-file directive to enforce strict type checking was also added. Including declare( strict_types = 1 ); at the top of a file would ensure that strict type checking is performed on all arguments and return values where scalar types were declared.

When configured, strict type checking also extends to extensions and internal PHP functions invoked within the file. In strict mode, when the type of a value passed does not match the type expected, a Fatal error: Uncaught TypeError is triggered.

However, when strict type checking was not enabled, the behavior of internal functions when receiving an unexpected type was very inconsistent. Some threw a warning and returned NULL, some returned false and threw a TypeError with strict types on, and others generated a TypeError (even if strict_types was not declared).

Starting in PHP 8, a TypeError will be consistently thrown for all internal PHP functions when invalid parameter types are passed, even when strict type checking is not declared.

Additionally, some PHP core functions which did not have type declarations previously, now do. It’s likely that some TypeErrors will be thrown for functions which didn’t even give a warning in older PHP versions.

Type checking for user-defined functions will remain the same. Including declare( strict_types = 1 ); at the top of files is required to enforce strict type checking throughout the file. No WordPress Core code uses strict mode.

An effort to ensure defensive code practices are in place to avoid any potential for invalid types to be passed to WordPress Core function is underway in #51423. Until this is completed, it is possible that some code within WordPress could trigger a TypeError, especially if a value’s type is incorrectly changed through code hooked to a filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output..

Please read the full RFC on the PHP wiki for a complete breakdown of these changes. For more information on this as it relates to WordPress Core, see #51525 on Trac.

Stricter type checks for arithmetic and bitwise operators

In past versions of PHP, applying arithmetic and bitwise operators to arrays, non-overloaded objects, and resources was allowed. However, the behavior was sometimes inconsistent in different scenarios.

Starting in PHP 8, all arithmetic and bitwise operators will throw a TypeError when one of the operands is an array, non-overloaded object, or resource. An exception to this is array + array, which will remain unchanged.

Please read the full RFC on the PHP wiki for a complete breakdown of these changes. For more information on this as it relates to WordPress Core, see #51525 on Trac.

Saner numeric strings

Numeric string handling has been altered to be more intuitive and less
error-prone. Trailing white space is now allowed in numeric strings for
consistency with how leading white space is treated. This mostly affects:

  • The is_numeric() function
  • String-to-string comparisons
  • Type declarations
  • Increment and decrement operations

The concept of a “leading-numeric string” has been mostly dropped; the cases where this remains exist in order to ease migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies.. Strings which emitted an E_NOTICE “A non well-formed numeric value encountered” will now emit an E_WARNING “A non-numeric value encountered” and all strings which emitted an E_WARNING “A non-numeric value encountered” will now throw a TypeError. This mostly affects:

  • Arithmetic operations
  • Bitwise operations

This E_WARNING to TypeError change also affects the E_WARNING “Illegal string offset ‘string'” for illegal string offsets. The behavior of explicit casts to int/float from strings has not been changed.

Please read the full RFC on the PHP wiki for a complete breakdown of these changes.

Non-strict comparisons between numbers and non-numeric strings

Non-strict comparisons between numbers and non-numeric strings now work by casting the number to string and comparing the strings. Comparisons between numbers and numeric strings continue to work as before. Notably, this means that 0 == "not-a-number" is considered false now.

A few other code patterns that may be common in plugins and themes that will be affected:

  • '' < 0 is now considered true (see [48960]).
  • 'not-a-number' > 0 is also now considered true (see [49043]).

Error, warning, and notice changes

A large handful of preexisting errors have been reclassified. Here’s are some that may be commonly encountered:

Warnings converted to error exceptions

  • Attempting to write to a property of a non-object. Previously this
    implicitly created a stdClass object for null, false and empty strings.
  • Attempting to append an element to an array for which the PHP_INT_MAX key is already used.
  • Attempting to use an invalid type (array or object) as an array key or
    string offset.
  • Attempting to write to an array index of a scalar value.
  • Attempting to unpack a non-array/Traversable.

Please read the full RFC on the PHP wiki for more information on these changes.

Notices converted to warnings

  • Attempting to read an undefined variable.
  • Attempting to read an undefined property.
  • Attempting to read an undefined array key.
  • Attempting to read a property of a non-object.
  • Attempting to access an array index of a non-array.
  • Attempting to convert an array to string.
  • Attempting to use a resource as an array key.
  • Attempting to use null, a boolean, or a float as a string offset.
  • Attempting to read an out-of-bounds string offset.
  • Attempting to assign an empty string to a string offset.

Read the full RFC on the PHP wiki for more information.

Build & Test Tool Related Changes

Because WordPress supports PHP 5.6.20 or higher, running the WordPress Core PHPUnit test suite on PHP 8 is not straightforward.

  • PHPUnit >= 9.3 is the only version of PHPUnit that currently supports PHP 8.
  • PHPunit 5.7.x is the last version to include support for PHP 5.6.
  • PHPUnit 8.x changed several methods that do not return values to specify a void return type declaration. However, this return type is not available in PHP < 7.1.

In order to maintain the ability to run the test suite on PHP 5.6 while also allowing the tests to run on PHP 8, the changes to PHPUnit required have been backported into the WordPress Core test suite and Composer is used to manipulate the autoload process for PHPUnit 7.x.

To run the WordPress Core PHPUnit test suite on PHP 8, it is required to use Composer for installation and running.

To help make this easier, a new NPM script has been added to run the test suite within the local Docker environment using the Composer installed version of PHPUnit.

// Run within the local Docker container using version of
// PHPUnit installed within the container.
npm run test:php

// Run within the local Docker container using version of
// PHPUnit installed via Composer.
npm run test:php-composer

For more information on this new command, see #51456. For more information on making the test suite compatible with PHP 8/PHPUnit >= 8, see #46149, #50902, and #50913.

External Libraries

Several external libraries bundled with WordPress Core have been updated to fix PHP 8 compatibility issues. Pull requests have been opened where appropriate to ensure these changes are included in future releases of these libraries.

  • SimplePie has been updated from version 1.5.5 to 1.5.6 (see #51521). Additionally, the WP_Feed_Cache class has been deprecated and will only be loaded for backwards compatibility if SimplePie < 3 is loaded within a plugin (see #51629 and #29204).
  • sodium_compat was updated to avoid an error when attempting to access the MB_OVERLOAD_STRING constant, which has been removed in PHP 8 (see #51399).
  • Text_Diff was updated to fix a “Non-static method cannot be called statically” fatal error (see #51559).

Additional notes

  • create_function() has been removed. The final instance of this function in WordPress has been removed (see #50899).
  • The @ operator will no longer silence fatal errors. Care should be taken that error messages are not displayed in production environments, which can result in information leaks.
  • Following the hash comment operator # immediately with an opening bracket is not supported as a comment anymore since this syntax is now used for attributes.
  • libxml_disable_entity_loader() has been deprecated (see #50898).
  • Resource to object return type changes, including the introduction of the is_gd_image() function.
  • Changes to sorting: if any code relied on a certain sort order based on previous behavior, this may now fail.
  • The parameter/return types for various PHP functions have changed and may have an impact. Subtle changes like that substr() will now always return a string. Previously, this returned string|false.

Summary

As always, reading through the complete upgrade document is highly recommended.

Even as WordPress Core continues to expand its support for new versions of PHP, support for old versions will remain as is for the time being, staying at PHP 5.6.20 and higher until usage numbers show that the impact on users will be minimal.

There is a separate initiative to decrease the usage numbers for older versions of PHP being guided by the Core PHP team through the servehappy initiative. If you wish to help with this effort, please join the #core-php room in the Making WordPress Core Slack instance.

WordPress continues to encourage all users to run the latest and greatest versions of PHP. This includes PHP 8.0 upon its official release.

A full list of tickets related to PHP 8.0 support can be found on Trac.

Props @helen, @jrf, @jeffpaul, @sergeybiryukov, @andraganescu, @omarreiss, @hellofromtonya, and @chanthaboune for peer reviewing.

#5-6, #dev-notes, #php-8-0

A Week in Core – November 16, 2020

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 November 9 and November 16, 2020.

  • 30 commits
  • 114 contributors
  • 39 tickets created
  • 8 tickets reopened
  • 46 tickets closed

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

Code changes

Administration

  • Make sure auto-update counts properly update when bulk deleting plugins or themes – #50870

Application Passwords

  • Unify availability language – #51513
  • Further accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) improvements – #51580
  • Include authorization rewrite rule in default multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site htaccess – #51772
  • MOAR accessibility improvements – #51580

Build/Test Tools

  • Only enforce PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher extension requirements when running core tests – #50640
  • Tests QUnit: Remove restriction on running the TinyMCE Textpattern WP pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party tests in PhantomJS – #42009
  • Clean up the new contributor welcome message – #50401

Bundled Themes

  • Introduce 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. patterns for Twenty Seventeen – #51100
  • Introduce block patterns for Twenty Sixteen – #51101
  • Twenty Nineteen: Remove unnecessary references to some variables in twentynineteen_hsl_hex() before they are defined – #49052
  • Twenty Twenty-One: Merge the latest changes changes from 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/ for BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 4 – #51526

Canonical

  • Prevent ID enumeration of private post slugs – #5272

Customize

  • Temporary fix for autosave restore notice not being removed – #51425
  • Ensure multiple CSSCSS Cascading Style Sheets. classes are passed to nav_menu_link_attributes as an array – #43113
  • Exclude widgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. ID attributes from search – #46456

Database

  • Clean up the post_category column removed from DB schema for new installations in WordPress 28 – #51288

Documentation

  • For clarity, add some information about the return types of get_option()#51278
  • Add missing descriptions for _WP_List_Table_Compat methods – #46842
  • Add missing descriptions for Automatic_Upgrader_Skin methods – #44546
  • Clarify that get_pages() returns an array of pages, not an HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. list – #39049
  • Correct the Chocolatey package name for Node in the local environment setup instructions – #51414
  • Add missing full stop for a comment in create_initial_rest_routes()#51788

Editor

  • Update WordPress packages for RC1 – #51793
  • Move pre_render_block, render_block_data, render_block_context#51612
  • Update packages – #51696
  • Display short description from block directory in results – #51212

Embeds

  • Document $args in wp_oembed_get()#51269

Feeds

  • Don’t treat media URLs with fragments as unique for enclosures – #47421
  • Add an early exit when calling RSS functions directly – #35835
  • Register transient feed cache handler using the recommended method for SimplePie 13 or later – #29204

General

  • Convert wp_array_get() to a “private” function and add tests – #51720
  • Code Modernization: Only call libxml_disable_entity_loader() in PHP < 8 – #50898

Help/About

  • Add Site Health Status dashboard widget to the Help → Content tab – #51745

Internationalization

  • Remove HTML tags from translatable strings on WordPress Updates screen – #51742

Media

  • Avoid fatal error in wp_prepare_attachment_for_js()#51791
  • Allow users to switch from media grid to list mode in media library – #51396
  • Adjust box-sizing for audio players – #51685
  • Adjusts alignment of file name text in browser uploader – #41648
  • Improve count in Media Library pagination – #39968

Multisite

  • More consistency for clean_dirsize_cache()#19879

Permalinks

Plugins

  • Make sure the HTML ID attributes for plugin checkboxes are unique – #51256

Upgrade/Install

  • Account for the automatic_updater_disabled filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. in core auto-update settings UIUI User interface#51742
  • Better UI for auto-update settings on update screen – #51742
  • Enable all core autoupdates for new installs – #51743

Widgets

  • Do not use wrapping container in the adminadmin (and super admin) – #19709

Props

Thanks to everyone who contributed to WordPress Core last week:

@audrasjb (8), @SergeyBiryukov (8), @dd32 (5), @sabernhardt (5), @helen (4), @hellofromTonya (4), @TimothyBlynJacobs (4), @desrosj (4), @johannadevos (4), @ryelle (3), @kjellr (3), @poena (3), @dlh (3), @bridgetwillard (2), @beafialho (2), @pbiron (2), @melchoyce (2), @justinahinon (2), @noisysocks (2), @afercia (2), @azaozz (2), @karmatosed (2), @alexstine (2), @mista-flo (2), @onemaggie (2), @nacin (2), @peterwilsoncc (2), @isabel_brison (2), @ocean90 (2), @mukesh27 (2), @rogerlos (1), @kburgoine (1), @archduck (1), @dossy (1), @mopsyd (1), @Mte90 (1), @dshanske (1), @whyisjake (1), @subscriptiongroup (1), @andystitt829 (1), @thefarlilacfield (1), @jfoulquier (1), @fabifott (1), @joedolson (1), @NathanAtmoz (1), @HoaSi (1), @l3rady (1), @ravipatel (1), @samful (1), @Viper007Bond (1), @OptimizingMatters (1), @lpointet (1), @tzafrir (1), @pishmishy (1), @nlpro (1), @donmhico (1), @Denis-de-Bernardy (1), @Ipstenu (1), @bph (1), @joostdevalk (1), @andraganescu (1), @justlevine (1), @roikles (1), @krupajnanda (1), @mikeschroder (1), @MadtownLems (1), @stulab (1), @aaroncampbell (1), @lucagrandicelli (1), @ayeshrajans (1), @Pillai (1), @useStrict (1), @flymike (1), @ReneHermi (1), @ankitmaru (1), @gziolo (1), @gaambo (1), @david.binda (1), @rebasaurus (1), @williampatton (1), @zodiac1978 (1), @TheGP (1), @swissspidy (1), @thib3113 (1), @hellofromtonya (1), @jrf (1), @johnbillion (1), @Toro_Unit (1), @karthikbhatb (1), @hareesh-pillai (1), @kishanjasani (1), @SaeedFard (1), @dilipbheda (1), @ComputerGuru (1), @luminuu (1), @markoheijnen (1), @Senning (1), @afragen (1), @donsony (1), @jamescollins (1), @davidbaumwald (1), @leogermani (1), @aristath (1), @Hareesh (1), @ben.meredith@gmail.com (1), @jorgefilipecosta (1), @jffng (1), @marybaum (1), @hedgefield (1), @fierevere (1), @markparnell (1), @pbearne (1), @ovenall (1) and @jeffpaul (1).

Core committers: @sergeybiryukov (17), @helen (8), @noisysocks (4), @timothyblynjacobs (4), @antpb (4), @desrosj (3), @johnbillion (3), @peterwilsoncc (2), @whyisjake (1) and @azaozz (1).

#core-editor, #week-in-core

Dev Chat Summary: November 11 2020

Hello! Here’s what happened in the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. dev chat on November 11, 2020 at 0500 UTC and November 11, 2020 at 2000 UTC, following this agenda.

05:00 UTC core dev chat

@peterwilsoncc facilitated the meeting and @mikeschroder took notes. Find the full Slack archive here.

20:00 UTC core dev chat

@laurora facilitated the meeting and @thewebprincess took notes. The full Slack archive can be viewed here.

Announcements

The WP 5.6 BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 4 has been delayed and will now be released around November 12, 2020 at 2000 UTC.

Highlighted Posts

And recent posts on the Make/Core blogblog (versus network, site) to highlight are:

Updates from Component Maintainers/Focus Leads

General: PHP8 is scheduled for November 26th, please see the PHP 8 call for testing to ensure we are ready before RC 1 scheduled for launch on November 17th. @desrosj is working on the dev notesdev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include: a description of the change; the decision that led to this change a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase..

Site Health: Most remaining patches complete for 5.6. Dev notes remaining.

Open Floor

@mikeschroder asked for help with getting PHP8 working with the automated hosting tests, as it’d be great to have hosts running the core tests with PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 8 before 5.6 is released. Logs from that discussion found here.

@joostdevalk sparked a lively discussion with the following statement “If we enable auto-updates for core, we should default to it for all plugins too.” It is worth reviewing the conversation.

Finally, @helen put the call out for people to leave their thoughts/comments regarding Dark Mode in Twenty Twenty-One on the recent post.

Next Dev Chat meetings

The next meetings will take place on November 18, 2020 at 0500 UTC and November 18, 2020 at 2000 UTC in the #core 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/. channel. Please feel free to drop in with any updates or questions.

Props to @thewebprincess helping to compile these notes, @hellofromtonya for proofing, and @davidbaumwald for final review.

#5-6, #dev-chat, #summary

Upgrade/Install Component meeting summary – November 10, 2020

These are the weekly notes for the Updates/Install component meeting that happened on Tuesday November 10, 2020. You can read the full transcript on the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.-auto-updates 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/. channel.

The meeting was focused on the component’s major project for 5.6: an UIUI User interface for opting in to core auto-updates. The feature was merged into core at the end of the alpha cycle of WordPress 5.6, when ticketticket Created for both bug reports and feature development on the bug tracker. #50907 was committed.

As per the post previously published by @chanthaboune on Make/Core, there will be some changes in core auto-updates scope for WordPress 5.6.

Here is our goals for WP 5.6:

  • Provide some updates to the design of the UI.
  • For existing installations, the behavior will remain the same as it is today: opted-in to minor updates by default, but a user must opt-in to major updates (constants and filters that are already in use by hosts or agencies will still take precedence).
  • For new installations, default behavior will change: opted-in to minor updates by default and opted-in to major updates by default.

On Monday 9, @audrasjb opened two tickets/patchs to handle those changes:

  • #51742: Make sure constants and filters are disabling the major auto-updates option
  • #51743: Auto-updates for major version is set by default to true for fresh installations

Both tickets can be merged independently. For the moment, ticket #51742 doesn’t address any UI change.

During the last devchat, @helen shared some concerns about the UI overload caused by the changes introduced in #50907. @karmatosed worked on some mockups to simplify the current interface. The intention is to get rid of the auto-updates section and to replace it with an action link when auto-updates are already activated:

After discussing those changes, the team agreed to consider using action links for both enable and disable actions, for better consistency. Indeed, it wouldn’t be great to have a full auto-updates section with a checkbox for enabling the feature, and a simple action link moved to the top of the screen to disable it. Replacing the section with a simple action link could also eases the burden caused by the multiple buttons on this screen.

Next steps until WP 5.6 BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 4 scheduled on Thursday:

  • Enabling auto-updates by default for fresh installs is a small patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing., and it’s ready to be committed in ticket #51743
  • Taking into account constants/filters was already done in ticket #51743, but not committed yet.
  • [TODO] UI changes:
    • @audrasjb to update the patch in ticket #51743 to transform the form/checkbox interface to action links located in the main section on the top of the update-core screen.
    • @helen and @karmatosed to iterate on the design/copy.

@pbiron also raised ticket #50870 and @hellofromtonya provided some feedback after the office hour to help this ticket to move forward. The ticket is now marked as ready for commit.

#auto-updates, #core-auto-updates, #upgrade-install

Editor chat summary: Wednesday, 4 November 2020

This post summarizes the latest weekly Editor meeting (agenda, slack transcript), held in the #core-editor 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/. channel, on Wednesday, November 4, 2020, 14:00 UTC.

Thank you to all of the contributors who tested the BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. releases and gave feedback. Testing for bugs is a critical part of polishing every release and a great way to contribute to WordPress.

WordPress 5.6 Beta 3

WordPress 5.6 Beta 3 is now available to be tested. Released on 2nd novemebr.

WordPress 5.6

Project board to track issues for inclusion in WordPress 5.6.

GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ 9.3

Gutenberg 9.3 was released on 4th november

Monthly Plan

November Monthly Priorities.

Updates on the key projects

@youknowriad

  • The pace is increasing on the Full Site Editing related work, now FSE themes don’t need the experimental flag to work properly. A warning message about the experimental state is shown in the adminadmin (and super admin).
  • I expect some of us to focus more on template parts and templates auto-draft behavior (how to load theme templates and templates parts in the site editor).
  • I believe other folks are also working on the UIUI User interface and the Query 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..

@vindl

Full Site Editing – Navigation milestone update:

  • The PR for detaching blocks from Template Parts shipped.
  • Bunch of fixes and tweaks for some minor issues related to the navigation sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme. and template parts.
  • PR for adding incorporating search for templates and template parts is now open
  • Here is an attempt to create wp_templates entries on theme updates instead of on each APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. request
  • We started a new and simplified version of framework PR for introducing a custom status for templates provided by themes (or plugins) as HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. files, which haven’t been customized by the user yet

@ntsekouras
FSE: Query block

@jorgefilipecosta

Global Styles:

  • We now support other units and fluid typography on font size presets.
  • We now use the block settings on each global styles panel.
  • We now reference the preset variables on global styles so if for example global background color is set set to color X, and later we change color X, the background color also changes.
  • The UI is improved and we don’t show block panels without content.
  • We should have font family picker in the next few minutes (just finishing a last round of tests)

@nosolosw

  • For Global Styles the current focus is on tighten up things and fixing the flows, specially by testing what we have with the TwentyTwentyOne blocks theme.

Task Coordination

Note: Anyone reading this summary outside of the meeting, please drop a comment in the post summary, if you can/want to help with something.

@zieladam

Took a deep dive in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. data:

  • Propose an update to useSelect to address every key stroke in the editor re-running all registered selectors.
  • Merged two fixes related to saveEntityRecord ending up with outdated state.
  • Proposed lock mechanism for core-data to ultimately fix all the timing issues.
  • I am also playing with taking screenshots of all e2e failures on 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/ CI.

@youknowriad

  • I’m focusing on FSE efforts as raised above
  • I’m also thinking about dev notesdev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include: a description of the change; the decision that led to this change a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. for the APIs introduced on WP 5.6 and hoping to find time to write these next week.  I believe we should start publishing some of the block editor dev notes.

@karmatosed

  • Navigation drop down improvements.
  • Link iterations again this one grew from improvments to link UI.
  • I’m trying to do some PR trashTrash Trash in WordPress is like the Recycle Bin on your PC or Trash in your Macintosh computer. Users with the proper permission level (administrators and editors) have the ability to delete a post, page, and/or comments. When you delete the item, it is moved to the trash folder where it will remain for 30 days. pickups as go and level up my skills there, thank you to everyone that has supported me (special calls to @itsjonq and @joen) Also continuing to work on options and going to post some flow updates to that this week.
  • Release continues, so I’m also navigation around that.

@annezazu

  • Quieter week for me, Working with others on communication for 5.6.
  • some light triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. for unlabeled items, and some quick FSE focused testing.
  • Excited to take 9.3 for a spin!

@ntsekouras

  •  Query block: Expose initial templates as block variations.
  • Fix double alignment controls in toolbar of Heading block.
  • Allow editing of extracted excerptExcerpt An excerpt is the description of the blog post or page that will by default show on the blog archive page, in search results (SERPs), and on social media. With an SEO plugin, the excerpt may also be in that plugin’s metabox. in Post Excerpt block

@itsjonq

@paaljoachim

@retrofox

@bph

  • Thanks to  @afragen I am  almost ready for Gutenberg-Nightly version for non-dev testers.

@jorgefilipecosta

  • Iterated and merged support for other units and fluid typography on font size presets.
  • Iterated and merged PR to use the block settings on each global styles panel.
  • Iterated and merged PR to reference the preset variables on global styles so if for example global background color is set set to color X, and later we change color X, the background color also changes.
  • Submitted and merged PR to don’t show block panels without conten
  • Rebased and Iterated on font family picker in the next few minutes (just finishing a last round of tests).
  • Reviewed multiple PR including the moment removal PR.
  • Submitted multiple small fixes/enhancements to Global styles

For the next week, I plan on testing 2021 blocks deeply with global styles and submit fixes either for the theme or to Gutenberg. I plan to continue the typography work with font weight and  recheck a possible font loading global styles API.

@kjellr

  • I’ll be focused on Twenty Twenty-One Blocks.

Open Floor

@tomjn

  • Asked what’s the best way to register block for particular post type.
  • Current option is to loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. through blocks and unregister undesored blocks for the posttype.
  • Some discussion around defining posttype via block.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. but no decision.

@meszarosrob

#meeting-notes, #core-editor, #editor, #gutenberg, #core-editor-summary

WP5.6 | Auto-Update Implementation Change

Hey Core contributorsCore Contributors Core contributors are those who have worked on a release of WordPress, by creating the functions or finding and patching bugs. These contributions are done through Trac. https://core.trac.wordpress.org.! Last week in 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/. there was a lively (and lengthy) discussion on the auto-updates UIUI User interface (transcript). This post summarizes the discussion and most reasonable options for moving forward, considering timing, availability, and level of effort for suggested changes.

Summarized Concerns

  • Is this implementation aligned with our long term goals: to have auto-updates widely available in order to increase the collective health of all WordPress sites, minimize the maintenance burden for users, and have greater security across the entire ecosystem.
  • Is this implementation aligned with our short term goals: to continue our existing progress around auto-updates for minor releases, plugins, and themes.
  • A desire to avoid reverting elements of the UI and auto-updates after the release.
  • There were a vast array of concerns around the implementation.

Path Forward

One of the clearest things that came up in the conversation during coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. chat is that this is a complex technical task, and there will be a need for some long term, dedicated time to keep driving this work forward. Specifically, there is a shared concern that there is a technically non-trivial combination of reassurance and repair features that need to be defined and executed on and will need a dedicated product owner (transcript).

This Release and Next

  • WP5.6: Provide some updates to the design of the UI.
  • WP5.6: For existing installations, the behavior will remain the same as it is today: opted-in to minor updates by default, but a user must opt-in to major updates (constants and filters that are already in use by hosts or agencies will still take precedence).
  • WP5.6: For new installations, default behavior will change: opted-in to minor updates by default and opted-in to major updates by default.
  • WP5.6.1: Revisit the UI to revise based on feedback.
  • WP5.7Add a nudge on the Site Health screen for anyone opted out of major updates.
  • WP5.7Add auto-updates opt-in to installation flow.

Future Release Suggestions

  1. WP5.x: Add a nudge to opt-in on the updates page and a path to opt-out on Site Health.
  2. WP5.x: In a future release, have a renewal flow after a certain period of time.

Planning for the Future

The subject of auto-updates has resulted in many complicated discussions. As I reminded the release squad, decisions like these require us to remember that we’re contributing to over 30% of the web, and we have to balance our immediate needs with long term planning.

It’s important that whatever we implement isn’t taking us further away from our long term goals of having seamless, auto-updates across the project. Auto-updates can help us have a more secure WordPress ecosystem, and in turn can help change the public perception of WordPress being an unsecure choice for users of any skill level.

To provide some clarification on the nine project goals set out in 2019, the wording there is specific about implementing “opt-in to automatic updates of major Core releases”. However, the long term goal (for Matt as well as many of the contributors to WP3.7) was to have all installations opted-in to auto-updates of WordPress core by default, and that is still the long term goal.

Props to the WordPress 5.6 release squad for bringing such care to this discussion, and to @helen for helping me on the implementation wording. Special thanks to @audrasjb and @davidbaumwald for editing, and @andreamiddleton, @daisyo, and @cbringmann for proofreading!

#5-6, #auto-updates