{"action":"created","comment":{"url":"https://api.github.com/repos/Sylius/Sylius/pulls/comments/51119868","id":51119868,"diff_hunk":"@@ -0,0 +1,57 @@\n+{\n+    \"name\": \"sylius/association-bundle\",\n+    \"type\": \"symfony-bundle\",\n+    \"description\": \"Products association for your Symfony2 applications.\",\n+    \"keywords\": [\"shop\", \"ecommerce\", \"products\", \"product\", \"assortment\", \"association\"],\n+    \"homepage\": \"http://sylius.org\",\n+    \"license\": \"MIT\",\n+    \"authors\": [\n+        {\n+            \"name\": \"Paweł Jędrzejewski\",\n+            \"homepage\": \"http://pjedrzejewski.com\"\n+        },\n+        {\n+            \"name\": \"Leszek Prabucki\",\n+            \"email\": \"leszek.prabucki@gmail.com\"\n+        },\n+        {\n+            \"name\": \"Łukasz Chruściel\",\n+            \"email\": \"lukasz.chrusciel@lakion.com\"\n+        },\n+        {\n+            \"name\":     \"Sylius project\",\n+            \"homepage\": \"http://sylius.org\"\n+        },\n+        {\n+            \"name\":     \"Community contributions\",\n+            \"homepage\": \"http://github.com/Sylius/Sylius/contributors\"\n+        }\n+    ],\n+    \"require\": {\n+        \"php\": \"^5.5.9|^7.0\",\n+\n+        \"symfony/framework-bundle\": \"^2.7.7\",\n+        \"stof/doctrine-extensions-bundle\": \"~1.1\",\n+        \"symfony/form\": \"^2.7.7\",\n+        \"symfony/validator\": \"^2.7.7\",\n+        \"sylius/resource-bundle\": \"0.17\"\n+    },\n+    \"require-dev\": {\n+        \"phpspec/phpspec\": \"~2.4\"\n+    },\n+    \"config\": {\n+        \"bin-dir\": \"bin\"\n+    },\n+    \"autoload\": {\n+        \"psr-4\": { \"Sylius\\\\Bundle\\\\ArchetypeBundle\\\\\": \"\" }\n+    },\n+    \"autoload-dev\": {\n+        \"psr-4\": { \"Sylius\\\\Bundle\\\\ArchetypeBundle\\\\spec\\\\\": \"spec/\" }\n+    },\n+    \"extra\": {\n+        \"branch-alias\": {\n+            \"dev-master\": \"0.17-dev\"\n+        }\n+    },\n+    \"minimum-stability\": \"dev\"","path":"src/Sylius/Bundle/AssociationBundle/composer.json","position":56,"original_position":56,"commit_id":"73f1cbab3c8990fb0b343664ae120d751240ca1d","original_commit_id":"73f1cbab3c8990fb0b343664ae120d751240ca1d","user":{"login":"lchrusciel","id":6213903,"avatar_url":"https://avatars.githubusercontent.com/u/6213903?v=3","gravatar_id":"","url":"https://api.github.com/users/lchrusciel","html_url":"https://github.com/lchrusciel","followers_url":"https://api.github.com/users/lchrusciel/followers","following_url":"https://api.github.com/users/lchrusciel/following{/other_user}","gists_url":"https://api.github.com/users/lchrusciel/gists{/gist_id}","starred_url":"https://api.github.com/users/lchrusciel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lchrusciel/subscriptions","organizations_url":"https://api.github.com/users/lchrusciel/orgs","repos_url":"https://api.github.com/users/lchrusciel/repos","events_url":"https://api.github.com/users/lchrusciel/events{/privacy}","received_events_url":"https://api.github.com/users/lchrusciel/received_events","type":"User","site_admin":false},"body":"[yup](https://github.com/Sylius/Sylius/pull/3165#discussion_r50532385)","created_at":"2016-01-28T13:14:45Z","updated_at":"2016-01-28T13:14:45Z","html_url":"https://github.com/Sylius/Sylius/pull/3165#discussion_r51119868","pull_request_url":"https://api.github.com/repos/Sylius/Sylius/pulls/3165","_links":{"self":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/comments/51119868"},"html":{"href":"https://github.com/Sylius/Sylius/pull/3165#discussion_r51119868"},"pull_request":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/3165"}}},"pull_request":{"url":"https://api.github.com/repos/Sylius/Sylius/pulls/3165","id":42924693,"html_url":"https://github.com/Sylius/Sylius/pull/3165","diff_url":"https://github.com/Sylius/Sylius/pull/3165.diff","patch_url":"https://github.com/Sylius/Sylius/pull/3165.patch","issue_url":"https://api.github.com/repos/Sylius/Sylius/issues/3165","number":3165,"state":"open","locked":false,"title":"[Association] Associated products","user":{"login":"lchrusciel","id":6213903,"avatar_url":"https://avatars.githubusercontent.com/u/6213903?v=3","gravatar_id":"","url":"https://api.github.com/users/lchrusciel","html_url":"https://github.com/lchrusciel","followers_url":"https://api.github.com/users/lchrusciel/followers","following_url":"https://api.github.com/users/lchrusciel/following{/other_user}","gists_url":"https://api.github.com/users/lchrusciel/gists{/gist_id}","starred_url":"https://api.github.com/users/lchrusciel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lchrusciel/subscriptions","organizations_url":"https://api.github.com/users/lchrusciel/orgs","repos_url":"https://api.github.com/users/lchrusciel/repos","events_url":"https://api.github.com/users/lchrusciel/events{/privacy}","received_events_url":"https://api.github.com/users/lchrusciel/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?    | no\r\n| Deprecations? | no\r\n| Fixed tickets |\r\n| License       | MIT\r\n| Doc PR        | WIP\r\n\r\nIt is extended #2098 PR. @l3l0 has done awsome work so I only extracted it to separated bundle. \r\nThis PR was reviewed once, but feel free to point me out more problems ;)\r\n\r\n# Update \r\n## Important change\r\nDue to extraction to different budnle the previous configuration does not apply any more. \r\nPrevious config:\r\n```yml\r\nsylius_product:\r\n    product_association:\r\n        classes:\r\n            product: Sylius\\Component\\Product\\Model\\ProductAssociation\r\n            myOwn: MyOwn\\SomeAssociation\\Model\\MyOwnAssociation\r\n```\r\nAfter feedback it was decided to change a configuration to more dynamic. Current version is inspired by AttributesBundle configuration.\r\nNow it has to be done in separated tree, where you have to precise a subject of association. The most basic config looks like that:\r\n```yml\r\nsylius_association:\r\n    classes:\r\n        product:\r\n            subject: Sylius\\Component\\Core\\Model\\Product\r\n            association:\r\n                model: Sylius\\Component\\Product\\Model\\ProductAssociation\r\n```\r\n\r\nBecause of assigning this PR to v0.16 milestone it was associated with @pamil #3110 PR\r\n\r\nTODOs:\r\n - [x] Write new behats\r\n - [x] Adapt *ProductAssociationContext* to new test\r\n\r\n# Update \r\nSince last time I have worked on this PR plenty things changed in Sylius core, so new dynamic configuration has to be adjusted to them. For now, new association configuration looks like this:\r\n```yml\r\nsylius_association:\r\n    resources:\r\n        product:\r\n            subject: Sylius\\Component\\Core\\Model\\Product\r\n            association:\r\n                classes:\r\n                    model: Sylius\\Component\\Product\\Model\\ProductAssociation\r\n```","created_at":"2015-08-20T12:43:31Z","updated_at":"2016-01-28T13:14:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed6103d415216446cf6dc174a6efccedf652ffe8","assignee":null,"milestone":{"url":"https://api.github.com/repos/Sylius/Sylius/milestones/4","html_url":"https://github.com/Sylius/Sylius/milestones/v0.17.0","labels_url":"https://api.github.com/repos/Sylius/Sylius/milestones/4/labels","id":1104562,"number":4,"title":"v0.17.0","description":"Version v0.17.0 of Sylius platform.","creator":{"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},"open_issues":6,"closed_issues":13,"state":"open","created_at":"2015-05-11T11:10:11Z","updated_at":"2016-01-27T19:29:36Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Sylius/Sylius/pulls/3165/commits","review_comments_url":"https://api.github.com/repos/Sylius/Sylius/pulls/3165/comments","review_comment_url":"https://api.github.com/repos/Sylius/Sylius/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sylius/Sylius/issues/3165/comments","statuses_url":"https://api.github.com/repos/Sylius/Sylius/statuses/73f1cbab3c8990fb0b343664ae120d751240ca1d","head":{"label":"lchrusciel:associated-products","ref":"associated-products","sha":"73f1cbab3c8990fb0b343664ae120d751240ca1d","user":{"login":"lchrusciel","id":6213903,"avatar_url":"https://avatars.githubusercontent.com/u/6213903?v=3","gravatar_id":"","url":"https://api.github.com/users/lchrusciel","html_url":"https://github.com/lchrusciel","followers_url":"https://api.github.com/users/lchrusciel/followers","following_url":"https://api.github.com/users/lchrusciel/following{/other_user}","gists_url":"https://api.github.com/users/lchrusciel/gists{/gist_id}","starred_url":"https://api.github.com/users/lchrusciel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lchrusciel/subscriptions","organizations_url":"https://api.github.com/users/lchrusciel/orgs","repos_url":"https://api.github.com/users/lchrusciel/repos","events_url":"https://api.github.com/users/lchrusciel/events{/privacy}","received_events_url":"https://api.github.com/users/lchrusciel/received_events","type":"User","site_admin":false},"repo":{"id":27534661,"name":"Sylius","full_name":"lchrusciel/Sylius","owner":{"login":"lchrusciel","id":6213903,"avatar_url":"https://avatars.githubusercontent.com/u/6213903?v=3","gravatar_id":"","url":"https://api.github.com/users/lchrusciel","html_url":"https://github.com/lchrusciel","followers_url":"https://api.github.com/users/lchrusciel/followers","following_url":"https://api.github.com/users/lchrusciel/following{/other_user}","gists_url":"https://api.github.com/users/lchrusciel/gists{/gist_id}","starred_url":"https://api.github.com/users/lchrusciel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lchrusciel/subscriptions","organizations_url":"https://api.github.com/users/lchrusciel/orgs","repos_url":"https://api.github.com/users/lchrusciel/repos","events_url":"https://api.github.com/users/lchrusciel/events{/privacy}","received_events_url":"https://api.github.com/users/lchrusciel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lchrusciel/Sylius","description":"Modern e-commerce for PHP, based on the Symfony2 framework.","fork":true,"url":"https://api.github.com/repos/lchrusciel/Sylius","forks_url":"https://api.github.com/repos/lchrusciel/Sylius/forks","keys_url":"https://api.github.com/repos/lchrusciel/Sylius/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lchrusciel/Sylius/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lchrusciel/Sylius/teams","hooks_url":"https://api.github.com/repos/lchrusciel/Sylius/hooks","issue_events_url":"https://api.github.com/repos/lchrusciel/Sylius/issues/events{/number}","events_url":"https://api.github.com/repos/lchrusciel/Sylius/events","assignees_url":"https://api.github.com/repos/lchrusciel/Sylius/assignees{/user}","branches_url":"https://api.github.com/repos/lchrusciel/Sylius/branches{/branch}","tags_url":"https://api.github.com/repos/lchrusciel/Sylius/tags","blobs_url":"https://api.github.com/repos/lchrusciel/Sylius/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lchrusciel/Sylius/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lchrusciel/Sylius/git/refs{/sha}","trees_url":"https://api.github.com/repos/lchrusciel/Sylius/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lchrusciel/Sylius/statuses/{sha}","languages_url":"https://api.github.com/repos/lchrusciel/Sylius/languages","stargazers_url":"https://api.github.com/repos/lchrusciel/Sylius/stargazers","contributors_url":"https://api.github.com/repos/lchrusciel/Sylius/contributors","subscribers_url":"https://api.github.com/repos/lchrusciel/Sylius/subscribers","subscription_url":"https://api.github.com/repos/lchrusciel/Sylius/subscription","commits_url":"https://api.github.com/repos/lchrusciel/Sylius/commits{/sha}","git_commits_url":"https://api.github.com/repos/lchrusciel/Sylius/git/commits{/sha}","comments_url":"https://api.github.com/repos/lchrusciel/Sylius/comments{/number}","issue_comment_url":"https://api.github.com/repos/lchrusciel/Sylius/issues/comments{/number}","contents_url":"https://api.github.com/repos/lchrusciel/Sylius/contents/{+path}","compare_url":"https://api.github.com/repos/lchrusciel/Sylius/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lchrusciel/Sylius/merges","archive_url":"https://api.github.com/repos/lchrusciel/Sylius/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lchrusciel/Sylius/downloads","issues_url":"https://api.github.com/repos/lchrusciel/Sylius/issues{/number}","pulls_url":"https://api.github.com/repos/lchrusciel/Sylius/pulls{/number}","milestones_url":"https://api.github.com/repos/lchrusciel/Sylius/milestones{/number}","notifications_url":"https://api.github.com/repos/lchrusciel/Sylius/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lchrusciel/Sylius/labels{/name}","releases_url":"https://api.github.com/repos/lchrusciel/Sylius/releases{/id}","deployments_url":"https://api.github.com/repos/lchrusciel/Sylius/deployments","created_at":"2014-12-04T10:09:34Z","updated_at":"2016-01-12T07:29:40Z","pushed_at":"2016-01-28T12:36:45Z","git_url":"git://github.com/lchrusciel/Sylius.git","ssh_url":"git@github.com:lchrusciel/Sylius.git","clone_url":"https://github.com/lchrusciel/Sylius.git","svn_url":"https://github.com/lchrusciel/Sylius","homepage":"Sylius.org","size":23756,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"Sylius:master","ref":"master","sha":"8b479af8a20f06ecd1121fa11f59f1d4246da810","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":"Component-based and format-agnostic (JSON/XML/HTML) eCommerce framework on top of Symfony.","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}","deployments_url":"https://api.github.com/repos/Sylius/Sylius/deployments","created_at":"2011-11-05T22:05:52Z","updated_at":"2016-01-27T16:38:00Z","pushed_at":"2016-01-28T12:59:36Z","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":"http://Sylius.org","size":54505,"stargazers_count":2137,"watchers_count":2137,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":776,"mirror_url":null,"open_issues_count":503,"forks":776,"open_issues":503,"watchers":2137,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/3165"},"html":{"href":"https://github.com/Sylius/Sylius/pull/3165"},"issue":{"href":"https://api.github.com/repos/Sylius/Sylius/issues/3165"},"comments":{"href":"https://api.github.com/repos/Sylius/Sylius/issues/3165/comments"},"review_comments":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/3165/comments"},"review_comment":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/3165/commits"},"statuses":{"href":"https://api.github.com/repos/Sylius/Sylius/statuses/73f1cbab3c8990fb0b343664ae120d751240ca1d"}}}}