You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code Modernization: Use "declare" in WP_List_Table magic methods deprecation message
Changes "define" to "declare" in the deprecation message in `WP_List_Table` magic methods.
Why is "declare" better?
It aligns well to:
* the topic of and published information about dynamic properties.
* the act of explicitly listing the variable as a property on the class.
The goal of this message is guide developers to change their code. Changing the term to "declare" hopefully will aid in the understanding of what is being asked of developers when this deprecation is thrown.
Follow-up [56349].
Props hellofromTonya, antonvlasenko.
Fixes #58896.
git-svn-id: https://develop.svn.wordpress.org/trunk@56356 602fd350-edb4-49c9-b593-d223f7449a82
'The property `undefined_property` is not defined. Checking `isset()` on a dynamic (undefined) property ' .
454
-
'is deprecated since version 6.4.0! Instead, define the property on the class.'
453
+
'The property `undeclared_property` is not declared. Checking `isset()` on a dynamic property ' .
454
+
'is deprecated since version 6.4.0! Instead, declare the property on the class.'
455
455
);
456
-
$this->assertFalse( isset( $this->list_table->undefined_property ), 'Checking a dyanmic property should return false from WP_List_Table::__isset()' );
456
+
$this->assertFalse( isset( $this->list_table->undeclared_property ), 'Checking a dynamic property should return false from WP_List_Table::__isset()' );
457
457
}
458
458
459
459
/**
@@ -477,10 +477,10 @@ public function test_should_unset_compat_fields_defined_property( $property_name
0 commit comments