PHP version 7.2 brings a variety of improvements to the language. We are preparing to upgrade our platforms from PHP 7.0 to PHP 7.2, and in the coming weeks we’ll provide some details about how to prepare your VIP sites and the specific timing of the update.
Until then, please begin testing your theme and plugin code against PHP 7.2 as soon as possible. If there are parts of your theme or plugin code that are not compatible with PHP 7.2, there may be serious functionality problems with any sites using that code once this update is complete.
We have begun scanning VIP code for incompatibilities with PHP 7.2. One of the most significant changes we are seeing has to do with the incorrect number of arguments. Since PHP 7.1, these are fatal errors.
How to prepare
- Upgrade to PHP 7.2 in your local development environment.
- If you have PHP 7.2-incompatible errors in your theme code, you may have already heard from us about it. Please make sure your development team reviews and acts on any PHP 7.2 tickets from VIP.
- Use the latest version of the WordPress.com VIP coding standards.
- If you have questions, please open a ticket.
PHP migration guides for reference
- http://php.net/manual/en/migration71.deprecated.php
- http://php.net/manual/en/migration72.deprecated.php
- http://php.net/manual/en/migration72.incompatible.php
Hi,
only issue so far is vaultpress plugin. See message:
PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /srv/www/wordpress-default/public_html/wp-content/mu-plugins/vaultpress/cron-tasks.php on line 111
“`
list( $type, $current ) = each( $paths );
“`