{"action":"created","issue":{"url":"https://api.github.com/repos/Sylius/Sylius/issues/7096","repository_url":"https://api.github.com/repos/Sylius/Sylius","labels_url":"https://api.github.com/repos/Sylius/Sylius/issues/7096/labels{/name}","comments_url":"https://api.github.com/repos/Sylius/Sylius/issues/7096/comments","events_url":"https://api.github.com/repos/Sylius/Sylius/issues/7096/events","html_url":"https://github.com/Sylius/Sylius/pull/7096","id":195578413,"number":7096,"title":"Fix #7093 #7094","user":{"login":"bpolaszek","id":5569077,"avatar_url":"https://avatars.githubusercontent.com/u/5569077?v=3","gravatar_id":"","url":"https://api.github.com/users/bpolaszek","html_url":"https://github.com/bpolaszek","followers_url":"https://api.github.com/users/bpolaszek/followers","following_url":"https://api.github.com/users/bpolaszek/following{/other_user}","gists_url":"https://api.github.com/users/bpolaszek/gists{/gist_id}","starred_url":"https://api.github.com/users/bpolaszek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpolaszek/subscriptions","organizations_url":"https://api.github.com/users/bpolaszek/orgs","repos_url":"https://api.github.com/users/bpolaszek/repos","events_url":"https://api.github.com/users/bpolaszek/events{/privacy}","received_events_url":"https://api.github.com/users/bpolaszek/received_events","type":"User","site_admin":false},"labels":[{"id":58127774,"url":"https://api.github.com/repos/Sylius/Sylius/labels/Bug%20Fix","name":"Bug Fix","color":"eb6420","default":false},{"id":236064845,"url":"https://api.github.com/repos/Sylius/Sylius/labels/New%20Feature","name":"New Feature","color":"64CF1D","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-14T16:28:10Z","updated_at":"2017-01-06T13:53:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Sylius/Sylius/pulls/7096","html_url":"https://github.com/Sylius/Sylius/pull/7096","diff_url":"https://github.com/Sylius/Sylius/pull/7096.diff","patch_url":"https://github.com/Sylius/Sylius/pull/7096.patch"},"body":"| Q               | A\r\n| --------------- | ---\r\n| Bug fix?        | yes |\r\n| New feature?    | yes |\r\n| BC breaks?      | maybe* |\r\n| Related tickets | fixes #7093 #7094  |\r\n| License         | MIT |\r\n\r\n## Promoting / Demoting user roles\r\n[SyliusUserBundle] Refactored question helper - fixes #7093 \r\n[SyliusUserBundle] Added a new interaction to specify the user type (shop / admin) - fixes #7094 \r\n\r\n## * BC breaks \r\n* I don't know if this can be called a \"BC break\" since the code was already broken since Symfony 3.0, and the patch should work on Symfony 2.5+.\r\n* The protected function `Sylius\\Bundle\\UserBundle\\Command\\AbstractRoleCommand::executeRoleCommand` has a new 1st argument: `InputInterface`. This indeed leads to a BC break to possible custom inheritances of `Sylius\\Bundle\\UserBundle\\Command\\AbstractRoleCommand`, but the probability to drink a beer with an alien on the Eiffel Tower one day is more important than facing that kind of issue, IMHO."},"comment":{"url":"https://api.github.com/repos/Sylius/Sylius/issues/comments/270907164","html_url":"https://github.com/Sylius/Sylius/pull/7096#issuecomment-270907164","issue_url":"https://api.github.com/repos/Sylius/Sylius/issues/7096","id":270907164,"user":{"login":"bpolaszek","id":5569077,"avatar_url":"https://avatars.githubusercontent.com/u/5569077?v=3","gravatar_id":"","url":"https://api.github.com/users/bpolaszek","html_url":"https://github.com/bpolaszek","followers_url":"https://api.github.com/users/bpolaszek/followers","following_url":"https://api.github.com/users/bpolaszek/following{/other_user}","gists_url":"https://api.github.com/users/bpolaszek/gists{/gist_id}","starred_url":"https://api.github.com/users/bpolaszek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpolaszek/subscriptions","organizations_url":"https://api.github.com/users/bpolaszek/orgs","repos_url":"https://api.github.com/users/bpolaszek/repos","events_url":"https://api.github.com/users/bpolaszek/events{/privacy}","received_events_url":"https://api.github.com/users/bpolaszek/received_events","type":"User","site_admin":false},"created_at":"2017-01-06T13:53:49Z","updated_at":"2017-01-06T13:53:49Z","body":"Hi @pjedrzejewski, @Arminek !\r\n\r\nSorry for the delay. And happy new year, btw :)\r\nAlright, I thought SyliusUserBundle, unlike other Sylius bundles, was tightly coupled to Sylius Standard.\r\n\r\nWhen I look at the [configuration reference](http://docs.sylius.org/en/latest/bundles/SyliusUserBundle/summary.html), 3 types of users are used in Sylius:\r\n* admin\r\n* shop\r\n* oauth\r\n\r\nSemantically, how would you name a variable containing one of these values? `$userType` ? `$userRepositoryType`? None of them convince me.\r\n\r\nBesides, I think that, when using SyliusUserBundle as a standalone library, there's no notion of admin / shop / oauth. The user is free to configure its own repository with the correct names according to its application (it could be values like \"member\", \"affiliate\", ... instead of \"shop\", \"admin\" etc). \r\n\r\nAs a consequence, I think we should be able to list exactly which types are already configured and suggest them when using the promote / demote commands.\r\n\r\nWhat do you think about it?"}}
{"actor":{"display_login":"bpolaszek"}}