{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony/pulls/comments/91840350","pull_request_review_id":12352850,"id":91840350,"diff_hunk":"@@ -23,19 +24,34 @@ class Registry\n \n     /**\n      * @param Workflow $workflow","path":"src/Symfony/Component/Workflow/Registry.php","position":11,"original_position":11,"commit_id":"c0cbc85ab8b5098e1382a2a496b2eb130972fbce","original_commit_id":"c0cbc85ab8b5098e1382a2a496b2eb130972fbce","user":{"login":"andesk","id":176607,"avatar_url":"https://avatars.githubusercontent.com/u/176607?v=3","gravatar_id":"","url":"https://api.github.com/users/andesk","html_url":"https://github.com/andesk","followers_url":"https://api.github.com/users/andesk/followers","following_url":"https://api.github.com/users/andesk/following{/other_user}","gists_url":"https://api.github.com/users/andesk/gists{/gist_id}","starred_url":"https://api.github.com/users/andesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andesk/subscriptions","organizations_url":"https://api.github.com/users/andesk/orgs","repos_url":"https://api.github.com/users/andesk/repos","events_url":"https://api.github.com/users/andesk/events{/privacy}","received_events_url":"https://api.github.com/users/andesk/received_events","type":"User","site_admin":false},"body":"Sorry, don't get your point. What do you mean?","created_at":"2016-12-10T19:03:48Z","updated_at":"2016-12-10T19:03:48Z","html_url":"https://github.com/symfony/symfony/pull/20751#discussion_r91840350","pull_request_url":"https://api.github.com/repos/symfony/symfony/pulls/20751","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments/91840350"},"html":{"href":"https://github.com/symfony/symfony/pull/20751#discussion_r91840350"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony/pulls/20751"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/20751","id":96449597,"html_url":"https://github.com/symfony/symfony/pull/20751","diff_url":"https://github.com/symfony/symfony/pull/20751.diff","patch_url":"https://github.com/symfony/symfony/pull/20751.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/20751","number":20751,"state":"open","locked":false,"title":"[Workflow] Introduce concept of SupportStrategyInterface","user":{"login":"andesk","id":176607,"avatar_url":"https://avatars.githubusercontent.com/u/176607?v=3","gravatar_id":"","url":"https://api.github.com/users/andesk","html_url":"https://github.com/andesk","followers_url":"https://api.github.com/users/andesk/followers","following_url":"https://api.github.com/users/andesk/following{/other_user}","gists_url":"https://api.github.com/users/andesk/gists{/gist_id}","starred_url":"https://api.github.com/users/andesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andesk/subscriptions","organizations_url":"https://api.github.com/users/andesk/orgs","repos_url":"https://api.github.com/users/andesk/repos","events_url":"https://api.github.com/users/andesk/events{/privacy}","received_events_url":"https://api.github.com/users/andesk/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | 3.2\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | no\r\n| Deprecations? | yes\r\n| Tests pass?   | yes\r\n| Fixed tickets | -\r\n| License       | MIT\r\n| Doc PR        | -\r\n\r\nAs discussed during #symfonycon with @Nyholm and @xabbuh , in it's first implementation, the Workflow component's Registry class is checking on a subject's class instance to decide, if it is supported or not. In our current project we are using a CMS which uses a generic class to hold content of any content type. But we would want to be able to use the registry to identify the supported workflow for a content by checking the class's content type. As this is a very propriatary use case, but I believe similar requirements might be coming for other projects, I decided to introduce a strategy pattern to generalize it.\r\n\r\nDisclaimer: Current state is PoC to indicate the need, feel free to find/suggest a different approach or give me directions to adjust/change it.\r\n\r\nAs the Registry:add() method expected a $className (string) attribute and I changed it to accept any SupportStrategyInterface instead, this PR introduces a BC break. As the component is quite fresh and the Registry is kind of a helper construct, we *might* be ok to introduce this BC nevertheless? I tried to keep the \"supports\" configuration key as it is to avoid conflicts with existing workflow service definitions and keep the changes as local as possible. Other ideas to avoid this are welcome of course :)\r\n\r\nWhile adjusting the existing tests for FrameworkBundle I realized that probably not every Workflow related code is covered by tests yet. I decided to skip adding more tests (at least for now) as we first need to agree on if we introduce a generalized approach at all and if the current one is acceptable to others.","created_at":"2016-12-04T22:24:55Z","updated_at":"2016-12-10T19:03:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0820eb8e894f0313ea1930a9bcd0dff6ba0662d5","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/symfony/symfony/milestones/10","html_url":"https://github.com/symfony/symfony/milestone/10","labels_url":"https://api.github.com/repos/symfony/symfony/milestones/10/labels","id":2117464,"number":10,"title":"3.x","description":"New features and deprecations go here. Since Symfony versions are time based, this milestone has no due date.","creator":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"open_issues":157,"closed_issues":12,"state":"open","created_at":"2016-11-06T20:24:23Z","updated_at":"2016-12-09T18:26:54Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/20751/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/20751/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/20751/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/c0cbc85ab8b5098e1382a2a496b2eb130972fbce","head":{"label":"andesk:3.2","ref":"3.2","sha":"c0cbc85ab8b5098e1382a2a496b2eb130972fbce","user":{"login":"andesk","id":176607,"avatar_url":"https://avatars.githubusercontent.com/u/176607?v=3","gravatar_id":"","url":"https://api.github.com/users/andesk","html_url":"https://github.com/andesk","followers_url":"https://api.github.com/users/andesk/followers","following_url":"https://api.github.com/users/andesk/following{/other_user}","gists_url":"https://api.github.com/users/andesk/gists{/gist_id}","starred_url":"https://api.github.com/users/andesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andesk/subscriptions","organizations_url":"https://api.github.com/users/andesk/orgs","repos_url":"https://api.github.com/users/andesk/repos","events_url":"https://api.github.com/users/andesk/events{/privacy}","received_events_url":"https://api.github.com/users/andesk/received_events","type":"User","site_admin":false},"repo":{"id":75563041,"name":"symfony","full_name":"andesk/symfony","owner":{"login":"andesk","id":176607,"avatar_url":"https://avatars.githubusercontent.com/u/176607?v=3","gravatar_id":"","url":"https://api.github.com/users/andesk","html_url":"https://github.com/andesk","followers_url":"https://api.github.com/users/andesk/followers","following_url":"https://api.github.com/users/andesk/following{/other_user}","gists_url":"https://api.github.com/users/andesk/gists{/gist_id}","starred_url":"https://api.github.com/users/andesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andesk/subscriptions","organizations_url":"https://api.github.com/users/andesk/orgs","repos_url":"https://api.github.com/users/andesk/repos","events_url":"https://api.github.com/users/andesk/events{/privacy}","received_events_url":"https://api.github.com/users/andesk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andesk/symfony","description":"The Symfony PHP framework","fork":true,"url":"https://api.github.com/repos/andesk/symfony","forks_url":"https://api.github.com/repos/andesk/symfony/forks","keys_url":"https://api.github.com/repos/andesk/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andesk/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andesk/symfony/teams","hooks_url":"https://api.github.com/repos/andesk/symfony/hooks","issue_events_url":"https://api.github.com/repos/andesk/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/andesk/symfony/events","assignees_url":"https://api.github.com/repos/andesk/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/andesk/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/andesk/symfony/tags","blobs_url":"https://api.github.com/repos/andesk/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andesk/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andesk/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/andesk/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andesk/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/andesk/symfony/languages","stargazers_url":"https://api.github.com/repos/andesk/symfony/stargazers","contributors_url":"https://api.github.com/repos/andesk/symfony/contributors","subscribers_url":"https://api.github.com/repos/andesk/symfony/subscribers","subscription_url":"https://api.github.com/repos/andesk/symfony/subscription","commits_url":"https://api.github.com/repos/andesk/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/andesk/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/andesk/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/andesk/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/andesk/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/andesk/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andesk/symfony/merges","archive_url":"https://api.github.com/repos/andesk/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andesk/symfony/downloads","issues_url":"https://api.github.com/repos/andesk/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/andesk/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/andesk/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/andesk/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andesk/symfony/labels{/name}","releases_url":"https://api.github.com/repos/andesk/symfony/releases{/id}","deployments_url":"https://api.github.com/repos/andesk/symfony/deployments","created_at":"2016-12-04T20:38:24Z","updated_at":"2016-12-04T20:38:41Z","pushed_at":"2016-12-06T11:45:56Z","git_url":"git://github.com/andesk/symfony.git","ssh_url":"git@github.com:andesk/symfony.git","clone_url":"https://github.com/andesk/symfony.git","svn_url":"https://github.com/andesk/symfony","homepage":"symfony.com","size":77063,"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:3.2","ref":"3.2","sha":"8c22de44cd80f6ef004c3a659835da5dd0d94679","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-12-10T18:53:23Z","pushed_at":"2016-12-10T18:18:11Z","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":146492,"stargazers_count":13433,"watchers_count":13433,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":5217,"mirror_url":null,"open_issues_count":866,"forks":5217,"open_issues":866,"watchers":13433,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/20751"},"html":{"href":"https://github.com/symfony/symfony/pull/20751"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/20751"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/20751/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/20751/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/20751/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/c0cbc85ab8b5098e1382a2a496b2eb130972fbce"}}}}
{"actor":{"display_login":"andesk"}}