Community Summit Discussion Notes: PHP version support

Title of Session: PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. version support

Facilitator: @mikeschroder

Notetaker 1: @flixos90

Notetaker 2: @courane01

From the session schedule:

Currently, WordPress does not officially fully support PHP 8.0+. This discussion will focus on how WordPress can support and align with modern PHP versions, and how to drop support for PHP versions that are end-of-life (“EoL”). There is urgency to this as PHP 8.0 will be EoL in November, and PHP 7.4 reached EoL last November.

Raw Notes

  • Several hosting providers expressing support for running automated tests for PHP version support across hosting providers
  • Is WordPress 6.3 fully supporting PHP 8? – Basically yes (PHP 8.0 and 8.1 compatible with known exceptions, TracTrac Trac is the place where contributors create issues for bugs or feature requests much like GitHub. tickets available for all exceptions) 
  • PHP 8 “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.” tag was removed after WP 6.3 release 
  • Encourage/support plugins supporting it
  • Attention was raised for Juliette’s published post asking for support on 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. which is critical to facilitate PHP version support in the future 
  • Hosting team’s PHP test runner project (running coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. unit tests on several hosts) has issues with PHP 8 – who can help fix/maintain this project? 
  • PHP 5.6 support being dropped in WP 6.3 hopefully encourages hosting providers to jump up to supporting more recent PHP versions including 8+
  • PHP version usage of WP sites
  • Big push on GoDaddy to get sites on PHP 8+, vast majority of migrations (>70%) has gone smoothly (~18% marked as “high risk” updates)
  • Bluehost checking factors like closing body tags, document size changing etc.
  • Is there room to open-source tooling for checking that PHP update was successful or is causing errors on the site?
  • While there’s a desire in collaborating on tools across hosting providers, historically differences between platforms has hindered that → knowledge sharing rather than actual tooling
  • Users don’t care what version of PHP they are on, managed hosts manage that for them
  • Can we use WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is for supporting updates? Useful by hosts
  • Min/max for PHP for the plugins/themes
    • Max version hasn’t been needed before
    • List of deprecations that would cause PHP incompatibility, run a scanner. 
    • Max version puts the work on 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 Plugin Directory or can be cost-based plugin from a third-party/theme maintainers, and less useful. 
  • Implement automated scanner in plugin and theme directories to detect PHP version issues → responsibility of metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. team
  • Paid plugins have another issue: many sites no longer have active licenses and therefore don’t receive the updates that would add PHP 8+ support
  • WP plugin repository is not able to force-update premium plugins, particularly if they use the new upgrade URI 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. introduced a while ago (which bypasses completely)
  • Steps to encourage plugin support
    • email plugin authors prompting to update, but anticipate plugins to end 
    • display info on plugin page
    • integrate into Plugin 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., health check could warn them 
  • Security plugins could tackle Tide scores and compatibility – WP Scan mentioned as a possible option
  • Resources:
  • For the bulk of sites, ensuring PHP support of ~50 most popular plugins will be enough, then the long tail of 100s or 1000s of plugins only applies to a relatively smaller amount
  • What educational resources can LearnWP create to help educate on what/why/how to update?
    • How to start contributing to PHP areas 
  • Speed at which we drop older versions of PHP – can we correlate versions of WP with PHP?
    • Who can update the PHP? Often hosts deployDeploy Launching code from a local development environment to the production web server, so that it's available to visitors. it
  • Current 5% rule is based on overall WP sites’ PHP version usage, could we make it based on only recent WP version sites’ PHP version usage? – That would not make a notable difference, there is not a real correlation between using old WP versions and PHP versions, which makes sense since the hosting provider controls PHP support regardless of WP. internally has that data available, and it’s only ~0.1% different from overall PHP version usage.
  • Extender ecosystem is waiting on Core
  • Bottleneck of keeping up 
  • How can we keep support financially or with labor long-term maintenance of the WPCS / PHP compatibility tooling?
    • Long-term additional contributors would be great, but short-term the barrier of entry to this work is so high that support of the existing contributors is essential
    • Generally, the WP project is focused on getting more contributors, but sometimes there may be more value in identifying and funding already experienced contributors, or attract specific contributors with specific expertise needed
    • mentorship for PHP niche areas, separated out from the rest of Core new contributor table 
  • Conclusion
    • Find funding for contributors and tooling, also mentoring
    • repo plugins to WP users
    • Hosting companies working together to find common versions encounter errors

#summit, #summit-2023