{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony/pulls/comments/84737967","pull_request_review_id":5496695,"id":84737967,"diff_hunk":"@@ -0,0 +1,58 @@\n+<?php\n+\n+namespace Symfony\\Component\\Workflow\\Exception;\n+\n+use Symfony\\Component\\Workflow\\Definition;\n+\n+/**\n+ * @author Tobias Nyholm <tobias.nyholm@gmail.com>\n+ */\n+class StateMachineValidator implements DefinitionValidator\n+{\n+    public function validate(Definition $definition, $name)\n+    {\n+        $transitionFromNames = array();\n+        foreach ($definition->getTransitions() as $transition) {\n+            // Make sure that each transition has exactly one TO\n+            if (1 !== count($transition->getTos())) {\n+                throw new InvalidDefinitionException(","path":"src/Symfony/Component/Workflow/Validator/StateMachineValidator.php","position":18,"original_position":18,"commit_id":"e330c736e2d332dee5beefa25b9593532f8f0f1b","original_commit_id":"e330c736e2d332dee5beefa25b9593532f8f0f1b","user":{"login":"Nyholm","id":1275206,"avatar_url":"https://avatars.githubusercontent.com/u/1275206?v=3","gravatar_id":"","url":"https://api.github.com/users/Nyholm","html_url":"https://github.com/Nyholm","followers_url":"https://api.github.com/users/Nyholm/followers","following_url":"https://api.github.com/users/Nyholm/following{/other_user}","gists_url":"https://api.github.com/users/Nyholm/gists{/gist_id}","starred_url":"https://api.github.com/users/Nyholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nyholm/subscriptions","organizations_url":"https://api.github.com/users/Nyholm/orgs","repos_url":"https://api.github.com/users/Nyholm/repos","events_url":"https://api.github.com/users/Nyholm/events{/privacy}","received_events_url":"https://api.github.com/users/Nyholm/received_events","type":"User","site_admin":false},"body":"I do not understand. What do you mean?","created_at":"2016-10-24T17:24:25Z","updated_at":"2016-10-24T17:24:25Z","html_url":"https://github.com/symfony/symfony/pull/19629#discussion_r84737967","pull_request_url":"https://api.github.com/repos/symfony/symfony/pulls/19629","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments/84737967"},"html":{"href":"https://github.com/symfony/symfony/pull/19629#discussion_r84737967"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19629"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/19629","id":81455324,"html_url":"https://github.com/symfony/symfony/pull/19629","diff_url":"https://github.com/symfony/symfony/pull/19629.diff","patch_url":"https://github.com/symfony/symfony/pull/19629.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/19629","number":19629,"state":"open","locked":false,"title":"[Workflow] Make the Workflow support State Machines","user":{"login":"Nyholm","id":1275206,"avatar_url":"https://avatars.githubusercontent.com/u/1275206?v=3","gravatar_id":"","url":"https://api.github.com/users/Nyholm","html_url":"https://github.com/Nyholm","followers_url":"https://api.github.com/users/Nyholm/followers","following_url":"https://api.github.com/users/Nyholm/following{/other_user}","gists_url":"https://api.github.com/users/Nyholm/gists{/gist_id}","starred_url":"https://api.github.com/users/Nyholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nyholm/subscriptions","organizations_url":"https://api.github.com/users/Nyholm/orgs","repos_url":"https://api.github.com/users/Nyholm/repos","events_url":"https://api.github.com/users/Nyholm/events{/privacy}","received_events_url":"https://api.github.com/users/Nyholm/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | \"master\" \r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | yes, getEnabledTransistions does not return an assoc array.\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | Fixes #19605, Closes #19607\r\n| License       | MIT\r\n| Doc PR        | https://github.com/symfony/symfony-docs/pull/6871\r\n\r\nWhile researching for the docs of the component I've found that: \r\n* A Workflow is a subclass of a Petri net\r\n* A state machine is subclass of a Workflow\r\n* A state machine must not be in many places simultaneously. \r\n\r\nThis PR adds a new interface to the marking store that allow us to validate the transition to true if ANY *input* (froms) place matches the *tokens* (marking). The default behavior is that ALL input places must match the tokens. \r\n\r\n","created_at":"2016-08-16T11:26:05Z","updated_at":"2016-10-24T17:24:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a77f1717daa0344126afd8520a8f27a7bdada3d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/19629/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/19629/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/19629/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/e330c736e2d332dee5beefa25b9593532f8f0f1b","head":{"label":"Nyholm:state-machine","ref":"state-machine","sha":"e330c736e2d332dee5beefa25b9593532f8f0f1b","user":{"login":"Nyholm","id":1275206,"avatar_url":"https://avatars.githubusercontent.com/u/1275206?v=3","gravatar_id":"","url":"https://api.github.com/users/Nyholm","html_url":"https://github.com/Nyholm","followers_url":"https://api.github.com/users/Nyholm/followers","following_url":"https://api.github.com/users/Nyholm/following{/other_user}","gists_url":"https://api.github.com/users/Nyholm/gists{/gist_id}","starred_url":"https://api.github.com/users/Nyholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nyholm/subscriptions","organizations_url":"https://api.github.com/users/Nyholm/orgs","repos_url":"https://api.github.com/users/Nyholm/repos","events_url":"https://api.github.com/users/Nyholm/events{/privacy}","received_events_url":"https://api.github.com/users/Nyholm/received_events","type":"User","site_admin":false},"repo":{"id":21617818,"name":"symfony","full_name":"Nyholm/symfony","owner":{"login":"Nyholm","id":1275206,"avatar_url":"https://avatars.githubusercontent.com/u/1275206?v=3","gravatar_id":"","url":"https://api.github.com/users/Nyholm","html_url":"https://github.com/Nyholm","followers_url":"https://api.github.com/users/Nyholm/followers","following_url":"https://api.github.com/users/Nyholm/following{/other_user}","gists_url":"https://api.github.com/users/Nyholm/gists{/gist_id}","starred_url":"https://api.github.com/users/Nyholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nyholm/subscriptions","organizations_url":"https://api.github.com/users/Nyholm/orgs","repos_url":"https://api.github.com/users/Nyholm/repos","events_url":"https://api.github.com/users/Nyholm/events{/privacy}","received_events_url":"https://api.github.com/users/Nyholm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nyholm/symfony","description":"The Symfony PHP framework","fork":true,"url":"https://api.github.com/repos/Nyholm/symfony","forks_url":"https://api.github.com/repos/Nyholm/symfony/forks","keys_url":"https://api.github.com/repos/Nyholm/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nyholm/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nyholm/symfony/teams","hooks_url":"https://api.github.com/repos/Nyholm/symfony/hooks","issue_events_url":"https://api.github.com/repos/Nyholm/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/Nyholm/symfony/events","assignees_url":"https://api.github.com/repos/Nyholm/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/Nyholm/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/Nyholm/symfony/tags","blobs_url":"https://api.github.com/repos/Nyholm/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nyholm/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nyholm/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nyholm/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nyholm/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/Nyholm/symfony/languages","stargazers_url":"https://api.github.com/repos/Nyholm/symfony/stargazers","contributors_url":"https://api.github.com/repos/Nyholm/symfony/contributors","subscribers_url":"https://api.github.com/repos/Nyholm/symfony/subscribers","subscription_url":"https://api.github.com/repos/Nyholm/symfony/subscription","commits_url":"https://api.github.com/repos/Nyholm/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nyholm/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nyholm/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nyholm/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nyholm/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/Nyholm/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nyholm/symfony/merges","archive_url":"https://api.github.com/repos/Nyholm/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nyholm/symfony/downloads","issues_url":"https://api.github.com/repos/Nyholm/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/Nyholm/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/Nyholm/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/Nyholm/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nyholm/symfony/labels{/name}","releases_url":"https://api.github.com/repos/Nyholm/symfony/releases{/id}","deployments_url":"https://api.github.com/repos/Nyholm/symfony/deployments","created_at":"2014-07-08T15:18:43Z","updated_at":"2016-04-20T10:33:36Z","pushed_at":"2016-09-28T15:18:59Z","git_url":"git://github.com/Nyholm/symfony.git","ssh_url":"git@github.com:Nyholm/symfony.git","clone_url":"https://github.com/Nyholm/symfony.git","svn_url":"https://github.com/Nyholm/symfony","homepage":"symfony.com","size":71381,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"symfony:master","ref":"master","sha":"5cc9ed2048e8a73a31d681fcc23d4997fe83e7a0","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":458058,"name":"symfony","full_name":"symfony/symfony","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony","description":"The Symfony PHP framework","fork":false,"url":"https://api.github.com/repos/symfony/symfony","forks_url":"https://api.github.com/repos/symfony/symfony/forks","keys_url":"https://api.github.com/repos/symfony/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony/teams","hooks_url":"https://api.github.com/repos/symfony/symfony/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony/events","assignees_url":"https://api.github.com/repos/symfony/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony/tags","blobs_url":"https://api.github.com/repos/symfony/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony/subscription","commits_url":"https://api.github.com/repos/symfony/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony/merges","archive_url":"https://api.github.com/repos/symfony/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony/downloads","issues_url":"https://api.github.com/repos/symfony/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony/releases{/id}","deployments_url":"https://api.github.com/repos/symfony/symfony/deployments","created_at":"2010-01-04T14:21:21Z","updated_at":"2016-10-24T16:55:17Z","pushed_at":"2016-10-24T15:57:18Z","git_url":"git://github.com/symfony/symfony.git","ssh_url":"git@github.com:symfony/symfony.git","clone_url":"https://github.com/symfony/symfony.git","svn_url":"https://github.com/symfony/symfony","homepage":"symfony.com","size":138586,"stargazers_count":13171,"watchers_count":13171,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":5089,"mirror_url":null,"open_issues_count":751,"forks":5089,"open_issues":751,"watchers":13171,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19629"},"html":{"href":"https://github.com/symfony/symfony/pull/19629"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/19629"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/19629/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19629/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19629/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/e330c736e2d332dee5beefa25b9593532f8f0f1b"}}}}
{"actor":{"display_login":"Nyholm"}}