Conditions and Actions APIs in core are not able to serve all pre-existing contrib use cases in their current state. Modules like Rules and Panels/CTools have some additional needs which the APIs do not satisfy yet. It's the goal to have a common actions and conditions API in drupal 8 in core, such that modules do not have to fork the APIs and developers can rely on a consistent API, while site-builders benefit from existing plugins to be better interoperable.
The impact of API additions/changes to actions and conditions in core is rather low as modules mostly implement them for CTools/Rules APIs use-cases anyway, which are still under development.
Document the known outstanding changes as todos in the code, so that the developers already implementing the APIs are aware of coming changes.
User interface changes
- (in referenced issues)
Original report by @fago
The conditions API does not meet the requirements for Rules yet, e.g. there is. Moreover, there there will be further missing features and or incompatibilities that the core API does not yet provide. The situation is similar for the action API, but a bit different as in contrast to the condition API the action API is already used.
Off the top of my head some missing features or incompatibilities are
- One problematic area is and how configuration forms are built, as Rules needs the possibility to override it by parameter/context
- Specifying options lists for a parameters
- Providing metadata assertions (should be doable as API addition)
- The definition of a context, i.e. the context class does not add any value compared to typed data definitions right now and is questionable whether its useful as it is.
- Handling of NULL values (allowed/disallowed) + a way to opt out
- Generation additional parameters/contexts depending on the values of others (should be doable as addition)
- The ability to process context values, mostly important for applying token replacements (important for actions, but applicable to conditions as well)
- Separating out entity saves from action implementations (applies to actions only)
The last two points apply to actions as well and are API changes to a lot of action implementations, so most problematic - not sure if changing them after beta is possible. The latter one would be hard to fix, but processing context values isn't that simple. If we cannot reach compatibility here it would mean that Rules would have to do its own actions API variant. But it would be great if we manage a common conditions API at least.
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 78,769 pass(es). View
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 78,633 pass(es). View
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 77,732 pass(es). View