{"action":"created","comment":{"url":"https://api.github.com/repos/Sylius/Sylius/pulls/comments/33233535","id":33233535,"diff_hunk":"@@ -254,6 +270,7 @@ public function thereIsUser($email, $password, $role = null, $enabled = 'yes', $\n         if ($flush) {\n             $this->getEntityManager()->flush();\n         }\n+            $this->getManager('user')->persist($user);","path":"src/Sylius/Bundle/CoreBundle/Behat/CoreContext.php","position":112,"original_position":112,"commit_id":"f5ef3eb3b73fa6f68186424b1e6477de63eaccc8","original_commit_id":"f5ef3eb3b73fa6f68186424b1e6477de63eaccc8","user":{"login":"michalmarcinkowski","id":7572437,"avatar_url":"https://avatars.githubusercontent.com/u/7572437?v=3","gravatar_id":"","url":"https://api.github.com/users/michalmarcinkowski","html_url":"https://github.com/michalmarcinkowski","followers_url":"https://api.github.com/users/michalmarcinkowski/followers","following_url":"https://api.github.com/users/michalmarcinkowski/following{/other_user}","gists_url":"https://api.github.com/users/michalmarcinkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/michalmarcinkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalmarcinkowski/subscriptions","organizations_url":"https://api.github.com/users/michalmarcinkowski/orgs","repos_url":"https://api.github.com/users/michalmarcinkowski/repos","events_url":"https://api.github.com/users/michalmarcinkowski/events{/privacy}","received_events_url":"https://api.github.com/users/michalmarcinkowski/received_events","type":"User","site_admin":false},"body":"You should do this before the ``` if ``` statement","created_at":"2015-06-25T08:44:23Z","updated_at":"2015-06-25T08:44:23Z","html_url":"https://github.com/Sylius/Sylius/pull/2255#discussion_r33233535","pull_request_url":"https://api.github.com/repos/Sylius/Sylius/pulls/2255","_links":{"self":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/comments/33233535"},"html":{"href":"https://github.com/Sylius/Sylius/pull/2255#discussion_r33233535"},"pull_request":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/2255"}}},"pull_request":{"url":"https://api.github.com/repos/Sylius/Sylius/pulls/2255","id":26175119,"html_url":"https://github.com/Sylius/Sylius/pull/2255","diff_url":"https://github.com/Sylius/Sylius/pull/2255.diff","patch_url":"https://github.com/Sylius/Sylius/pull/2255.patch","issue_url":"https://api.github.com/repos/Sylius/Sylius/issues/2255","number":2255,"state":"open","locked":false,"title":"[RFC][POC] Decouple from Doctrine Persistence and PHP 5.4!","user":{"login":"pjedrzejewski","id":614970,"avatar_url":"https://avatars.githubusercontent.com/u/614970?v=3","gravatar_id":"","url":"https://api.github.com/users/pjedrzejewski","html_url":"https://github.com/pjedrzejewski","followers_url":"https://api.github.com/users/pjedrzejewski/followers","following_url":"https://api.github.com/users/pjedrzejewski/following{/other_user}","gists_url":"https://api.github.com/users/pjedrzejewski/gists{/gist_id}","starred_url":"https://api.github.com/users/pjedrzejewski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjedrzejewski/subscriptions","organizations_url":"https://api.github.com/users/pjedrzejewski/orgs","repos_url":"https://api.github.com/users/pjedrzejewski/repos","events_url":"https://api.github.com/users/pjedrzejewski/events{/privacy}","received_events_url":"https://api.github.com/users/pjedrzejewski/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | yes\r\n| Deprecations? | no\r\n| Fixed tickets | #1764 #2232 #2223\r\n| License       | MIT\r\n| Doc PR        | -\r\n\r\n**Do NOT review the code! It is a quick POC.**\r\n\r\nHey folks!\r\n\r\nThese changes are partially inspired by another bundle (inspired by Sylius resource, lol), but I could not find it on github/packagist... Can be that it is gone, I have looked at it long time ago and it inspired me to work on this.\r\n\r\nI wanted to do it for a long time and seems like it is a last moment to introduce a BC break of this size in Sylius fundamentals. It is an alternative approach to @stloyd's #1764 DomainManagers and effectively decouples Sylius components from the Doctrine Persistence interfaces, while staying very close to them, so that any Symfony developer will be used to the same API. Overview of my proposed changes:\r\n\r\n* Introducting **ResourceManagerInterface**.\r\n\r\nEvery resource gets it's own dedicated resource manager. Additionally, it has this EvenfulResourceManager, which dispatches our beloved events.\r\n\r\nAlso, I have made it a bit smarter, and it has only save() and delete() methods. Save will know if it is a new or existing resource and dispatch an appropriate event. (update or create)\r\n\r\n* Decouple the \"createNew\" from Repository interface and move it to dedicated **ResourceFactoryInterface**. The reason is that in Sylius we often want several ways to create a resource, for example create variant for product, create taxon for taxonomy and I found factories really useful when working on multi-stock inventory (top secret, yet). I believe dedicated factory is  the right place, as opposed to putting it on the \"DomainManager\" in original PR from Joseph. (great work, just saying)\r\n\r\n* Introduce ResourceEventDispatcherInterface. We have our resource events and I was tired of passing the strings around, to dispatch appropriate event name, now every resource gets a dedicated event dispatcher which can be used more easily.\r\n\r\nDo not look at the resource controller yet, it needs some work and better flashes handling and so on. I will move them to a listener and generally, the controller will have all the previous functionality.\r\n\r\n**IMPORTANT NOTE**\r\nThis change requires us to move to PHP 5.4 (ResourceInterface::getId). With recent decisions about PHP version for Symfony 3.0, I'm more than convinced to move to 5.4, especially, that we could do a good use of traits in many places. (in few we could hide design flaws too... by making our anemic models smaller in terms of LOC... joke)\r\n\r\nLet me know what do you think.","created_at":"2014-12-16T20:03:57Z","updated_at":"2015-06-25T08:44:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62f99456dd7f8f496bac5388ff5b600c330a4411","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Sylius/Sylius/pulls/2255/commits","review_comments_url":"https://api.github.com/repos/Sylius/Sylius/pulls/2255/comments","review_comment_url":"https://api.github.com/repos/Sylius/Sylius/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sylius/Sylius/issues/2255/comments","statuses_url":"https://api.github.com/repos/Sylius/Sylius/statuses/f5ef3eb3b73fa6f68186424b1e6477de63eaccc8","head":{"label":"pjedrzejewski:resource-bundle-refactoring","ref":"resource-bundle-refactoring","sha":"f5ef3eb3b73fa6f68186424b1e6477de63eaccc8","user":{"login":"pjedrzejewski","id":614970,"avatar_url":"https://avatars.githubusercontent.com/u/614970?v=3","gravatar_id":"","url":"https://api.github.com/users/pjedrzejewski","html_url":"https://github.com/pjedrzejewski","followers_url":"https://api.github.com/users/pjedrzejewski/followers","following_url":"https://api.github.com/users/pjedrzejewski/following{/other_user}","gists_url":"https://api.github.com/users/pjedrzejewski/gists{/gist_id}","starred_url":"https://api.github.com/users/pjedrzejewski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjedrzejewski/subscriptions","organizations_url":"https://api.github.com/users/pjedrzejewski/orgs","repos_url":"https://api.github.com/users/pjedrzejewski/repos","events_url":"https://api.github.com/users/pjedrzejewski/events{/privacy}","received_events_url":"https://api.github.com/users/pjedrzejewski/received_events","type":"User","site_admin":false},"repo":{"id":14465495,"name":"Sylius","full_name":"pjedrzejewski/Sylius","owner":{"login":"pjedrzejewski","id":614970,"avatar_url":"https://avatars.githubusercontent.com/u/614970?v=3","gravatar_id":"","url":"https://api.github.com/users/pjedrzejewski","html_url":"https://github.com/pjedrzejewski","followers_url":"https://api.github.com/users/pjedrzejewski/followers","following_url":"https://api.github.com/users/pjedrzejewski/following{/other_user}","gists_url":"https://api.github.com/users/pjedrzejewski/gists{/gist_id}","starred_url":"https://api.github.com/users/pjedrzejewski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjedrzejewski/subscriptions","organizations_url":"https://api.github.com/users/pjedrzejewski/orgs","repos_url":"https://api.github.com/users/pjedrzejewski/repos","events_url":"https://api.github.com/users/pjedrzejewski/events{/privacy}","received_events_url":"https://api.github.com/users/pjedrzejewski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pjedrzejewski/Sylius","description":"Modern e-commerce for PHP, based on the Symfony2 framework.","fork":true,"url":"https://api.github.com/repos/pjedrzejewski/Sylius","forks_url":"https://api.github.com/repos/pjedrzejewski/Sylius/forks","keys_url":"https://api.github.com/repos/pjedrzejewski/Sylius/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pjedrzejewski/Sylius/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pjedrzejewski/Sylius/teams","hooks_url":"https://api.github.com/repos/pjedrzejewski/Sylius/hooks","issue_events_url":"https://api.github.com/repos/pjedrzejewski/Sylius/issues/events{/number}","events_url":"https://api.github.com/repos/pjedrzejewski/Sylius/events","assignees_url":"https://api.github.com/repos/pjedrzejewski/Sylius/assignees{/user}","branches_url":"https://api.github.com/repos/pjedrzejewski/Sylius/branches{/branch}","tags_url":"https://api.github.com/repos/pjedrzejewski/Sylius/tags","blobs_url":"https://api.github.com/repos/pjedrzejewski/Sylius/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pjedrzejewski/Sylius/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pjedrzejewski/Sylius/git/refs{/sha}","trees_url":"https://api.github.com/repos/pjedrzejewski/Sylius/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pjedrzejewski/Sylius/statuses/{sha}","languages_url":"https://api.github.com/repos/pjedrzejewski/Sylius/languages","stargazers_url":"https://api.github.com/repos/pjedrzejewski/Sylius/stargazers","contributors_url":"https://api.github.com/repos/pjedrzejewski/Sylius/contributors","subscribers_url":"https://api.github.com/repos/pjedrzejewski/Sylius/subscribers","subscription_url":"https://api.github.com/repos/pjedrzejewski/Sylius/subscription","commits_url":"https://api.github.com/repos/pjedrzejewski/Sylius/commits{/sha}","git_commits_url":"https://api.github.com/repos/pjedrzejewski/Sylius/git/commits{/sha}","comments_url":"https://api.github.com/repos/pjedrzejewski/Sylius/comments{/number}","issue_comment_url":"https://api.github.com/repos/pjedrzejewski/Sylius/issues/comments{/number}","contents_url":"https://api.github.com/repos/pjedrzejewski/Sylius/contents/{+path}","compare_url":"https://api.github.com/repos/pjedrzejewski/Sylius/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pjedrzejewski/Sylius/merges","archive_url":"https://api.github.com/repos/pjedrzejewski/Sylius/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pjedrzejewski/Sylius/downloads","issues_url":"https://api.github.com/repos/pjedrzejewski/Sylius/issues{/number}","pulls_url":"https://api.github.com/repos/pjedrzejewski/Sylius/pulls{/number}","milestones_url":"https://api.github.com/repos/pjedrzejewski/Sylius/milestones{/number}","notifications_url":"https://api.github.com/repos/pjedrzejewski/Sylius/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pjedrzejewski/Sylius/labels{/name}","releases_url":"https://api.github.com/repos/pjedrzejewski/Sylius/releases{/id}","created_at":"2013-11-17T11:15:26Z","updated_at":"2015-05-04T15:19:45Z","pushed_at":"2015-06-25T07:53:35Z","git_url":"git://github.com/pjedrzejewski/Sylius.git","ssh_url":"git@github.com:pjedrzejewski/Sylius.git","clone_url":"https://github.com/pjedrzejewski/Sylius.git","svn_url":"https://github.com/pjedrzejewski/Sylius","homepage":"Sylius.org","size":19804,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":7,"default_branch":"master"}},"base":{"label":"Sylius:master","ref":"master","sha":"78902966353c49b26431681d6265592609b6bfc2","user":{"login":"Sylius","id":719423,"avatar_url":"https://avatars.githubusercontent.com/u/719423?v=3","gravatar_id":"","url":"https://api.github.com/users/Sylius","html_url":"https://github.com/Sylius","followers_url":"https://api.github.com/users/Sylius/followers","following_url":"https://api.github.com/users/Sylius/following{/other_user}","gists_url":"https://api.github.com/users/Sylius/gists{/gist_id}","starred_url":"https://api.github.com/users/Sylius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sylius/subscriptions","organizations_url":"https://api.github.com/users/Sylius/orgs","repos_url":"https://api.github.com/users/Sylius/repos","events_url":"https://api.github.com/users/Sylius/events{/privacy}","received_events_url":"https://api.github.com/users/Sylius/received_events","type":"Organization","site_admin":false},"repo":{"id":2717549,"name":"Sylius","full_name":"Sylius/Sylius","owner":{"login":"Sylius","id":719423,"avatar_url":"https://avatars.githubusercontent.com/u/719423?v=3","gravatar_id":"","url":"https://api.github.com/users/Sylius","html_url":"https://github.com/Sylius","followers_url":"https://api.github.com/users/Sylius/followers","following_url":"https://api.github.com/users/Sylius/following{/other_user}","gists_url":"https://api.github.com/users/Sylius/gists{/gist_id}","starred_url":"https://api.github.com/users/Sylius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sylius/subscriptions","organizations_url":"https://api.github.com/users/Sylius/orgs","repos_url":"https://api.github.com/users/Sylius/repos","events_url":"https://api.github.com/users/Sylius/events{/privacy}","received_events_url":"https://api.github.com/users/Sylius/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sylius/Sylius","description":"Modern e-commerce for PHP, based on the Symfony2 framework.","fork":false,"url":"https://api.github.com/repos/Sylius/Sylius","forks_url":"https://api.github.com/repos/Sylius/Sylius/forks","keys_url":"https://api.github.com/repos/Sylius/Sylius/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sylius/Sylius/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sylius/Sylius/teams","hooks_url":"https://api.github.com/repos/Sylius/Sylius/hooks","issue_events_url":"https://api.github.com/repos/Sylius/Sylius/issues/events{/number}","events_url":"https://api.github.com/repos/Sylius/Sylius/events","assignees_url":"https://api.github.com/repos/Sylius/Sylius/assignees{/user}","branches_url":"https://api.github.com/repos/Sylius/Sylius/branches{/branch}","tags_url":"https://api.github.com/repos/Sylius/Sylius/tags","blobs_url":"https://api.github.com/repos/Sylius/Sylius/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sylius/Sylius/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sylius/Sylius/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sylius/Sylius/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sylius/Sylius/statuses/{sha}","languages_url":"https://api.github.com/repos/Sylius/Sylius/languages","stargazers_url":"https://api.github.com/repos/Sylius/Sylius/stargazers","contributors_url":"https://api.github.com/repos/Sylius/Sylius/contributors","subscribers_url":"https://api.github.com/repos/Sylius/Sylius/subscribers","subscription_url":"https://api.github.com/repos/Sylius/Sylius/subscription","commits_url":"https://api.github.com/repos/Sylius/Sylius/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sylius/Sylius/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sylius/Sylius/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sylius/Sylius/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sylius/Sylius/contents/{+path}","compare_url":"https://api.github.com/repos/Sylius/Sylius/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sylius/Sylius/merges","archive_url":"https://api.github.com/repos/Sylius/Sylius/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sylius/Sylius/downloads","issues_url":"https://api.github.com/repos/Sylius/Sylius/issues{/number}","pulls_url":"https://api.github.com/repos/Sylius/Sylius/pulls{/number}","milestones_url":"https://api.github.com/repos/Sylius/Sylius/milestones{/number}","notifications_url":"https://api.github.com/repos/Sylius/Sylius/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sylius/Sylius/labels{/name}","releases_url":"https://api.github.com/repos/Sylius/Sylius/releases{/id}","created_at":"2011-11-05T22:05:52Z","updated_at":"2015-06-25T08:37:16Z","pushed_at":"2015-06-25T07:53:38Z","git_url":"git://github.com/Sylius/Sylius.git","ssh_url":"git@github.com:Sylius/Sylius.git","clone_url":"https://github.com/Sylius/Sylius.git","svn_url":"https://github.com/Sylius/Sylius","homepage":"Sylius.org","size":47286,"stargazers_count":1848,"watchers_count":1848,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":644,"mirror_url":null,"open_issues_count":447,"forks":644,"open_issues":447,"watchers":1848,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/2255"},"html":{"href":"https://github.com/Sylius/Sylius/pull/2255"},"issue":{"href":"https://api.github.com/repos/Sylius/Sylius/issues/2255"},"comments":{"href":"https://api.github.com/repos/Sylius/Sylius/issues/2255/comments"},"review_comments":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/2255/comments"},"review_comment":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/2255/commits"},"statuses":{"href":"https://api.github.com/repos/Sylius/Sylius/statuses/f5ef3eb3b73fa6f68186424b1e6477de63eaccc8"}}}}