{"action":"created","issue":{"url":"https://api.github.com/repos/winzou/StateMachineBundle/issues/21","repository_url":"https://api.github.com/repos/winzou/StateMachineBundle","labels_url":"https://api.github.com/repos/winzou/StateMachineBundle/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/winzou/StateMachineBundle/issues/21/comments","events_url":"https://api.github.com/repos/winzou/StateMachineBundle/issues/21/events","html_url":"https://github.com/winzou/StateMachineBundle/issues/21","id":141262155,"number":21,"title":"Disabling callbacks based on Expression language","user":{"login":"tristanbes","id":346010,"avatar_url":"https://avatars.githubusercontent.com/u/346010?v=3","gravatar_id":"","url":"https://api.github.com/users/tristanbes","html_url":"https://github.com/tristanbes","followers_url":"https://api.github.com/users/tristanbes/followers","following_url":"https://api.github.com/users/tristanbes/following{/other_user}","gists_url":"https://api.github.com/users/tristanbes/gists{/gist_id}","starred_url":"https://api.github.com/users/tristanbes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tristanbes/subscriptions","organizations_url":"https://api.github.com/users/tristanbes/orgs","repos_url":"https://api.github.com/users/tristanbes/repos","events_url":"https://api.github.com/users/tristanbes/events{/privacy}","received_events_url":"https://api.github.com/users/tristanbes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-16T12:45:12Z","updated_at":"2016-03-17T08:58:17Z","closed_at":null,"body":"Hello,\r\n\r\nRight now we can disable a callback via `enabled: false`.\r\nWouldn't be awesome if we could put `Expressions` using the [ExpressionEngine](http://symfony.com/doc/current/components/expression_language/index.html) instead of a boolean ?\r\n\r\nUse case: feature flags\r\nThis way we could enable/disable callbacks with **business logic** instead of adding the logic itself inside the callback code wenever possible.\r\n\r\n```yml\r\ncallbacks:\r\n    my_callback:\r\n        ...\r\n        enabled: \"object.getSettings().hasFeature('email_enabled')\"\r\n``` "},"comment":{"url":"https://api.github.com/repos/winzou/StateMachineBundle/issues/comments/197771871","html_url":"https://github.com/winzou/StateMachineBundle/issues/21#issuecomment-197771871","issue_url":"https://api.github.com/repos/winzou/StateMachineBundle/issues/21","id":197771871,"user":{"login":"tristanbes","id":346010,"avatar_url":"https://avatars.githubusercontent.com/u/346010?v=3","gravatar_id":"","url":"https://api.github.com/users/tristanbes","html_url":"https://github.com/tristanbes","followers_url":"https://api.github.com/users/tristanbes/followers","following_url":"https://api.github.com/users/tristanbes/following{/other_user}","gists_url":"https://api.github.com/users/tristanbes/gists{/gist_id}","starred_url":"https://api.github.com/users/tristanbes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tristanbes/subscriptions","organizations_url":"https://api.github.com/users/tristanbes/orgs","repos_url":"https://api.github.com/users/tristanbes/repos","events_url":"https://api.github.com/users/tristanbes/events{/privacy}","received_events_url":"https://api.github.com/users/tristanbes/received_events","type":"User","site_admin":false},"created_at":"2016-03-17T08:58:16Z","updated_at":"2016-03-17T08:58:16Z","body":"Because we have multi-tenant application (for example X shops running on the same database and codebase). So each X stores has different configuration/features"}}