- TDD - tests come first; writing the tests will inform design decisions.
- Clean - leave all the legacy cruft in v3 and start with a clean slate.
- Consistent - uniformity between all entities as much as possible, minimize oddities.
- Strict - ditch the aliases, unique names, camelCase conversions, and alternate syntaxes. Params will only be accepted in one format.
- OOP - use classes in the \Civi namespace - minimize boilerplate via class inheritance/traits.
- Discoverable - params are self-documenting through fluent style and api reflection; no undocumented params
- Doable - prioritize new features based on impact and keep scope proportionate to developer capacity.
$params array will be organized into categories, expanding on the "options" convention in v3:
The php binding returns an arrayObject. This gives immediate access to the results, plus allows returning additional properties.
- Get Action
- OR as well as AND in select queries.
- Ability to add a field to a query more than once e.g. "sort_name LIKE 'bob' OR sort_name LIKE 'robert'".
- Joins across all FKs and pseudo FKs.
- Delete Action
- Delete multiple items at once.
- Search by any field, not just ID
- Error Handling
- Ability to simulate an api call
- Report on all errors, not just the first one to be thrown
To contribute, you can submit a pull-request to civicrm/api4 or request push-access from Coleman.
The JIRA issue number is CRM-17867