[wp-trac] [WordPress Trac] #58298: Deprecated errors on /wp-admin/revision.php?revision=2895&gutenberg=true

WordPress Trac noreply at wordpress.org
Thu May 11 23:34:09 UTC 2023


#58298: Deprecated errors on /wp-admin/revision.php?revision=2895&gutenberg=true
-----------------------------+---------------------
 Reporter:  thomask          |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  6.3
Component:  Editor           |     Version:  6.2
 Severity:  normal           |  Resolution:
 Keywords:  php82 has-patch  |     Focuses:
-----------------------------+---------------------
Changes (by jrf):

 * keywords:  php82 => php82 has-patch


Comment:

 Thank you @thomask for reporting this.

 The `Text_Diff` library is an external dependency, however, AFAIK it is no
 longer externally maintained.

 I have done a code search within all the files in the `wp-includes/Text`
 subdirectory and the `Text_Diff_Engine_native` class looks to be the only
 one with undeclared properties.

 I have attached a patch fixing the above reported notices, as well as some
 additional undeclared properties.


 The fact that these were not discovered earlier highlights that there are
 no tests at all within the WP test suite which run the code in this class
 in any way.

 As this dependency is no longer externally maintained, IMO we should open
 a follow-up ticket to, at the very least, add cursory tests which run the
 code to allow for discovering PHP deprecations/notices/warnings on recent
 PHP versions, though preferably a full test suite should be added.

 I wonder if it may be prudent to create a repo to maintain this code as a
 package within the WP organisation ?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58298#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list