From c45366a8ce6ce9ada349ee703997bf538d454441 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 24 Aug 2022 14:05:13 +0000 Subject: [PATCH] Code Modernization: Remove dynamic properties in `Tests_Comment_Walker`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 test file, the `Tests_Comment_Walker::set_up()` method created a dynamic `$post_id` property, which should have been explicitly declared. Along the same lines, the `Comment_Callback_Test::__construct()` method also assigned values to two undeclared properties. This is now fixed by explicitly declaring the properties in both classes. Includes renaming the `Comment_Callback_Test` class to `Comment_Callback_Test_Helper` as it does not contain any test methods and its only purpose is as a “helper” class for the `Tests_Comment_Walker::test_has_children()` test. Follow-up to [28824], [53557], [53558], [53850], [53851], [53852], [53853], [53854], [53856], [53916], [53935], [53936], [53937]. Props jrf. See #56033. Built from https://develop.svn.wordpress.org/trunk@53938 git-svn-id: http://core.svn.wordpress.org/trunk@53497 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 b0f5f84aeb..70bc365ea2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53937'; +$wp_version = '6.1-alpha-53938'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.