I'm trying to do something like this https://github.com/brikou/AcmePizzaBundle/blob/master/Entity/Factory/... in symfony2 beta1, but it simply does not trigger my validation callback.
When I try this http://symfony.com/doc/current/book/validation.html#getters
/**
* @assert:True(message = "The token is invalid")
*/
public function isTokenValid()
{
// return true or false
}
it works, but i want callback validation with ExecutionContext. I hope that I can access DI container from here and retreive my services.
Any idea why @assert:callback(methods={"isValidFoo"}) is not working?