Change the CiviCRM v3 / v4 API to only return active contacts by default. Currently will include deleted contacts
This is a straight forward request to simply change the CiviCRM v3 / v4 API to only return active contacts by default. Currently API calls will include deleted contacts in the results.
This is counter-intuitive and a constant source of bugs when testing new code. It is not always immediately obvious that deleted contacts are included in the result set, especially if you are testing on a CiviCRM site with no deleted contacts. Then when you move the code to production, BAM! What are all these other contacts in here? That's a big fail (and many sad faces).
The only reason I know of for deleted contacts to be included by default currently was quite eloquently described by @seamuslee in chat: "because we want to keep you on your toes @agileware_justin"
If you want to return deleted contacts in an API call, then this should be explicit via a parameter. eg. return deleted contacts = true.
Agileware Ref: CIVICRM-1241