[buddypress-trac] [BuddyPress Trac] #6977: Audit all DB fetch methods to return integers where appropriate

buddypress-trac noreply at wordpress.org
Sun Apr 17 02:56:44 UTC 2016


#6977: Audit all DB fetch methods to return integers where appropriate
------------------------------------+-----------------------------
 Reporter:  r-a-y                   |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Component - Any/All     |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+-----------------------------

Comment (by boonebgorges):

 {{{
 // Omitting 'group_id' due to unit test failures.
 // Omitting 'parent_id' for safety.
 }}}

 This set off warning bells for me. If casting `group_id` to an int makes
 unit tests fail, that doesn't mean we should skip it, it means we should
 fix the unit tests. If we had 100% coverage for return types, each one of
 the changes proposed in this patch would cause a unit test to fail. This
 demonstrates how the change we are making has the potential to break
 backward compatibility in some cases. I still think we can go ahead with
 the changes, but this is the reason why, after it's done, we need to put a
 post on bpdevel - there are probably plugins that will fail in the same
 way that our unit tests are.

 What does "omitting 'parent_id' for safety" mean? It sounds scary :)

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


More information about the buddypress-trac mailing list