Thanks Will, in my use case I'm after a custom action builder that others can mix in with their controllers, which could involve other custom actions and any base controller.
Extending ActionBuilderImpl and implementing "invokeBlock" results in an action builder that can be used directly on its own, but not composed with other Actions.
For example:
def method1 = myAction {
Ok("hello")
}
But not:
def method2 = myAction {
Action {
Ok("hello")
}
}
Adding an explicit apply(Action[A]) method to my action builder allows composition like above, but is that correct? Is there a way to use "ActionFunction.compose(..)" that I'm missing perhaps?
The latest docs you linked to still include using a case class to wrap the deprecated Action - I assume this is really a deprecated approach (and of no use when you need dependency injection, which I do in this scenario).