From fe941574c364eed4880305d4e25cf4c6376eba07 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 23 Jun 2022 15:03:15 +0000 Subject: [PATCH] Code Modernization: Remove dynamic properties in `Tests_Media`. Dynamic (non-explicitly declared) properties are deprecated as of PHP 8.2 and are expected to become a fatal error in PHP 9.0. In this particular case, the test class contains a `set_up()` method that sets a group of properties, which are ''used'' by the tests, but never ''changed'' by the tests. In other words, setting these properties in the `set_up()` is an unnecessary overhead and the properties should be changed to class constants. Notes: * As the `$img_html` property, which was previously being set, is not actually used in any of the tests, that property has not been converted to a constant. * The values which were previously being set using a heredoc, now use a nowdoc (supported since PHP 5.3), as they don't contain any interpolation. * The use of constant scalar expressions (`IMG_URL`) and constant arrays (`IMG_META`) in class constants is supported since PHP 5.6. Follow-up to [711/tests], [1260/tests], [34855], [41724], [53557]. Props jrf. See #56033. Built from https://develop.svn.wordpress.org/trunk@53558 git-svn-id: http://core.svn.wordpress.org/trunk@53147 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 3f48fffce0..d089f372e9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53557'; +$wp_version = '6.1-alpha-53558'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.