{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/15092","labels_url":"https://api.github.com/repos/symfony/symfony/issues/15092/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/15092/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/15092/events","html_url":"https://github.com/symfony/symfony/issues/15092","id":90768723,"number":15092,"title":"[Validation] payload inaccessible in Callback validator","user":{"login":"apfelbox","id":1032411,"avatar_url":"https://avatars.githubusercontent.com/u/1032411?v=3","gravatar_id":"","url":"https://api.github.com/users/apfelbox","html_url":"https://github.com/apfelbox","followers_url":"https://api.github.com/users/apfelbox/followers","following_url":"https://api.github.com/users/apfelbox/following{/other_user}","gists_url":"https://api.github.com/users/apfelbox/gists{/gist_id}","starred_url":"https://api.github.com/users/apfelbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apfelbox/subscriptions","organizations_url":"https://api.github.com/users/apfelbox/orgs","repos_url":"https://api.github.com/users/apfelbox/repos","events_url":"https://api.github.com/users/apfelbox/events{/privacy}","received_events_url":"https://api.github.com/users/apfelbox/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony/labels/Enhancement","name":"Enhancement","color":"02d7e1"},{"url":"https://api.github.com/repos/symfony/symfony/labels/Validator","name":"Validator","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-24T20:01:56Z","updated_at":"2015-06-29T07:17:40Z","closed_at":null,"body":"The `payload` element was added to attach arbitrary data to any constraint.\r\n\r\nIf I now write a constraint and the related validator, I can access the constraint in the validator and therefore the payload from it.\r\n\r\nThe `Callback` validator is something special: it executes custom validation code, but is limited in that it has no access to the constraint object itself – and so no access to the payload.\r\n\r\nQuesiton: should we pass the `payload` (or even the complete `Callback` constraint to be forward-compatible for future additional fields) into the validation method?"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/116491085","html_url":"https://github.com/symfony/symfony/issues/15092#issuecomment-116491085","issue_url":"https://api.github.com/repos/symfony/symfony/issues/15092","id":116491085,"user":{"login":"xabbuh","id":1957048,"avatar_url":"https://avatars.githubusercontent.com/u/1957048?v=3","gravatar_id":"","url":"https://api.github.com/users/xabbuh","html_url":"https://github.com/xabbuh","followers_url":"https://api.github.com/users/xabbuh/followers","following_url":"https://api.github.com/users/xabbuh/following{/other_user}","gists_url":"https://api.github.com/users/xabbuh/gists{/gist_id}","starred_url":"https://api.github.com/users/xabbuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xabbuh/subscriptions","organizations_url":"https://api.github.com/users/xabbuh/orgs","repos_url":"https://api.github.com/users/xabbuh/repos","events_url":"https://api.github.com/users/xabbuh/events{/privacy}","received_events_url":"https://api.github.com/users/xabbuh/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T07:17:40Z","updated_at":"2015-06-29T07:17:40Z","body":"Passing the constraint to the callback sounds like a good idea to me."}}