[wp-trac] [WordPress Trac] #41121: Consistency of the _deprecated_function() calls and related documentation.

WordPress Trac noreply at wordpress.org
Sun Jun 25 01:23:30 UTC 2017


#41121: Consistency of the _deprecated_function() calls and related documentation.
----------------------------+---------------------------
 Reporter:  jrf             |       Owner:  DrewAPicture
     Type:  task (blessed)  |      Status:  reviewing
 Priority:  normal          |   Milestone:  4.9
Component:  General         |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  docs
----------------------------+---------------------------

Comment (by jrf):

 @DrewAPicture

 > (though, realistically, if the class is deprecated, do we really need to
 also mark the individual methods as deprecated?).

 IMHO, we should.

 As the (deprecated) class is not marked as `final`, it could be extended
 and the parent methods could be used without calling the parent
 `_construct()`.
 A dev will in that case not be informed of the class deprecation as things
 stand at this moment.

 {{{#!php
 <?php
 class My_User_Search extends WP_User_Search {
         public function __construct() {
                 // Set things up differently from the parent.
         }

         public function prepare_query() {
                 parent::prepare_query();
                 $this->query_where = 'something else';
         }
 }
 }}}

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


More information about the wp-trac mailing list