[buddypress-trac] [BuddyPress Trac] #8687: Deprecated code is never loaded

buddypress-trac noreply at wordpress.org
Tue Jul 12 22:14:04 UTC 2022


#8687: Deprecated code is never loaded
------------------------------------+---------------------
 Reporter:  imath                   |       Owner:  (none)
     Type:  defect (bug)            |      Status:  new
 Priority:  high                    |   Milestone:  11.0.0
Component:  Core                    |     Version:  2.7
 Severity:  major                   |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+---------------------

Comment (by imath):

 I've just improved the patch (see
 [https://buddypress.trac.wordpress.org/attachment/ticket/8687/8687.2.patch
 8687.2.patch]:

 - If the previous version is current version - 1, it will load only the
 previous version deprecated functions.
 - If the previous version is <= current version - 2, it will load only the
 the last 2 versions deprecated functions.
 - In new installs or when `define( 'BP_IGNORE_DEPRECATED', true );`, no
 deprecated functions are loaded.
 - if `define( 'BP_IGNORE_DEPRECATED', false );`, all versions deprecated
 functions are loaded.

 I've also included a PHPUnit test which also performs a check for us in
 case we forget to update the list of versions with deprecated functions
 checking the existing files inside `src/bp-core/deprecated`.

 I believe this is the right way of dealing with this.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8687#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list