[wp-trac] [WordPress Trac] #56009: Prepare for PHP 8.2
WordPress Trac
noreply at wordpress.org
Sun Jun 19 23:09:04 UTC 2022
#56009: Prepare for PHP 8.2
----------------------------+--------------------
Reporter: jrf | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 6.1
Component: General | Version: trunk
Severity: normal | Keywords: php82
Focuses: |
----------------------------+--------------------
This is a meta ticket to track the efforts to prepare for PHP 8.2.
For PHP 8.0/PHP 8.1 specific fixes, please refer to the generic WP 6.1 PHP
8.x ticket: #55656
Please link patches related to a specific PHP 8.2 related task to the
appropriate dedicated issue, if there is one (see the links in the
description below).
Generic/one-off PHP 8.2 related patches can be linked to this ticket.
----
== PHP 8.2: Important dates
PHP 8.2 is [https://wiki.php.net/todo/php82 expected to be released on
November 24 2022].
Other note-worthy dates:
* The first alpha was released on June 9th 2022.
* Feature freeze will be on July 19, 2022.
**Note**:
The below represents the status per June 20, 2022. As PHP 8.2 is not yet
in feature freeze, these statuses can still deteriorate based on
additional RFCs being accepted/implemented.
== Readiness of essential tooling
=== [https://github.com/composer/composer Composer]
Current status:
* CI for Composer itself is being run against PHP 8.2.
* No known issues in the last release (2.3.7).
=== [https://github.com/sebastianbergmann/phpunit PHPUnit]
Current status:
* CI for PHPUnit itself is being run against PHP 8.2.
* No known issues in the last release (9.5.21).
=== [https://github.com/Yoast/PHPUnit-Polyfills PHPUnit Polyfills]
Current status:
* CI for PHPUnit Polyfills itself is being run against PHP 8.2.
* No known issues in the last release (1.0.3).
=== [https://github.com/wp-cli/wp-cli WP-CLI]
Current status:
* CI for WP-CLI is NOT (yet) being run against PHP 8.2.
* **''Status unknown''**.
=== Other tooling
Other tooling doesn't necessarily have to run against PHP 8.2 (yet), so
has not been evaluated.
== Initial DevOps Tasks
Typical tasks which need to be executed to allow WordPress to prepare for
PHP 8.2:
=== [https://github.com/WordPress/wpdev-docker-images Docker]
* Add PHP 8.2 to the Docker images. A [https://github.com/WordPress/wpdev-
docker-images/pull/87 PR for this is currently open].
=== GitHub Actions
**TODO:**
* Add PHP 8.2 to the GitHub Actions `phpunit-tests.yml` configuration.
Notes:
- Test failures on PHP 8.2 should not (yet) fail the build.
- The `composer install` will most likely need to run with `--ignore-
platform-req=php` as not all dependencies of PHPUnit 9.x have declared
compatibility with PHP 8.2 yet.
== PHP 8.2 changes for which WordPress will need to prepare
Similar to the rest of this ticket, this list is based on the current
status of PHP 8.2 and still subject to change.
=== [https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
Deprecation of ${} string interpolation]
Only two small issues + one in the tests.
This is being tracked in #55787 and there is a PR open on GitHub with a
patch: https://github.com/WordPress/wordpress-develop/pull/2738
=== [https://wiki.php.net/rfc/remove_utf8_decode_and_utf8_encode
Deprecation of utf8_encode and utf8_decode]
The issue will not affect WordPress Core much, but **will** have a
significant impact on plugins/themes.
The recommendation is to make the MbString extension a requirement for WP
Core to help plugins/themes mitigate this.
This is being tracked in #55603.
=== [https://wiki.php.net/rfc/deprecate_partially_supported_callables
Deprecation of partially supported callables]
No significant problems expected in WP Core.
WordPress does use callables extensively, but the particular type of
callables being deprecated are not typically used within WordPress.
=== [https://wiki.php.net/rfc/deprecate_dynamic_properties Deprecate
dynamic properties]
This is the big one and I expect a HUGE amount of problems due to this.
In my opinion two groups of patches are needed to at least try and
mitigate this. I intend to write up the details for this in two separate
tickets over the next week or so.
Ticket #55357 is related to this, but should not be actioned in isolation.
=== [https://wiki.php.net/rfc/strtolower-ascii Locale-independent case
conversion]
Needs investigation if and if so, how extensive the impact will be on
WordPress.
If there is any impact, making the MbString extension a requirement for WP
Core would likely go a long way to mitigate this.
=== [https://wiki.php.net/rfc/mysqli_support_for_libmysql Remove support
for libmysql from mysqli]
This is primarily an issue which may impact webhosts.
No direct impact on WordPress itself is expected.
== Status of External Dependencies
=== [https://github.com/JamesHeinrich/getID3 GetID3]
Current status:
* A [https://github.com/JamesHeinrich/getID3/pull/385 PR has been merged]
to enable linting against PHP 8.2. The build passes without finding any
PHP 8.2 related issues.
* **Important**: the project has no test suite, so the linting passing on
PHP 8.2 is only a small comfort and does not provide any real security.
* In other words: **''status unknown''**.
* WordPress is using the latest version (1.9.21), see #54162
=== [https://github.com/PHPMailer/PHPMailer PHPMailer]
Current status:
* Linting and tests are being run against PHP 8.2.
* No known issues in the last release (6.6.2).
* WordPress is using the latest version, see #55976
=== [https://github.com/paragonie/random_compat Random Compat]
Current status:
* A [https://github.com/paragonie/random_compat/pull/180 PR has been
merged] to enable running of the tests against PHP 8.2. The build passes
without finding any PHP 8.2 related issues.
* No known issues in the last release (2.0.21).
* WordPress is using the latest version, see #55181
=== [https://github.com/WordPress/Requests Requests]
Current status:
* A [https://github.com/WordPress/Requests/pull/751 PR is open] to enable
running of linting and tests against PHP 8.2. The PR build found one,
test-only, issue in Requests for PHP 8.2, which has no impact on the
production code.
* No known issues in the last release (2.0.3).
* WordPress is behind and is still using version `1.8.1`, while the latest
release is `2.0.3`, see #54504
I've done a test run of Requests 1.8.1 against PHP 8.2 and based on the
tests and aside from the already known PHP 8.1 deprecations, there are no
relevant PHP 8.2 issues known at this moment.
=== [https://github.com/simplepie/simplepie SimplePie]
Current status:
* A [https://github.com/simplepie/simplepie/pull/739 PR is open] to enable
running of the tests against PHP 8.2. The PR build passes without finding
any PHP 8.2 related issues.
* No known issues in the last release (1.6.0).
* WordPress is behind and is still using version `1.5.8`, while the latest
release is `1.6.0`, see #55604
I've done a test run of SimplePie 1.5.8 against PHP 8.2 and based on the
tests, there are no relevant PHP 8.2 issues known at this moment.
=== [https://github.com/paragonie/sodium_compat Sodium Compat]
Current status:
* A [https://github.com/paragonie/sodium_compat/pull/146 PR has been
merged] to enable running of the tests against PHP 8.2. The build passes
without finding any PHP 8.2 related issues.
* No known issues in the last release (1.17.1).
* WordPress is using the latest version, see #55453
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56009>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list