{"action":"created","issue":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/8908","repository_url":"https://api.github.com/repos/PrestaShop/PrestaShop","labels_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/8908/labels{/name}","comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/8908/comments","events_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/8908/events","html_url":"https://github.com/PrestaShop/PrestaShop/pull/8908","id":310475629,"number":8908,"title":"Refactored Form Handling management","user":{"login":"mickaelandrieu","id":1247388,"avatar_url":"https://avatars2.githubusercontent.com/u/1247388?v=4","gravatar_id":"","url":"https://api.github.com/users/mickaelandrieu","html_url":"https://github.com/mickaelandrieu","followers_url":"https://api.github.com/users/mickaelandrieu/followers","following_url":"https://api.github.com/users/mickaelandrieu/following{/other_user}","gists_url":"https://api.github.com/users/mickaelandrieu/gists{/gist_id}","starred_url":"https://api.github.com/users/mickaelandrieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickaelandrieu/subscriptions","organizations_url":"https://api.github.com/users/mickaelandrieu/orgs","repos_url":"https://api.github.com/users/mickaelandrieu/repos","events_url":"https://api.github.com/users/mickaelandrieu/events{/privacy}","received_events_url":"https://api.github.com/users/mickaelandrieu/received_events","type":"User","site_admin":false},"labels":[{"id":759159192,"url":"https://api.github.com/repos/PrestaShop/PrestaShop/labels/1.7.x","name":"1.7.x","color":"6270ea","default":false},{"id":19737371,"url":"https://api.github.com/repos/PrestaShop/PrestaShop/labels/Type:%20Improvement","name":"Type: Improvement","color":"207de5","default":false},{"id":330551716,"url":"https://api.github.com/repos/PrestaShop/PrestaShop/labels/waiting%20for%20QA%20feedback","name":"waiting for QA feedback","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/milestones/34","html_url":"https://github.com/PrestaShop/PrestaShop/milestone/34","labels_url":"https://api.github.com/repos/PrestaShop/PrestaShop/milestones/34/labels","id":2810726,"number":34,"title":"1.7.4.0","description":null,"creator":{"login":"eternoendless","id":1009343,"avatar_url":"https://avatars3.githubusercontent.com/u/1009343?v=4","gravatar_id":"","url":"https://api.github.com/users/eternoendless","html_url":"https://github.com/eternoendless","followers_url":"https://api.github.com/users/eternoendless/followers","following_url":"https://api.github.com/users/eternoendless/following{/other_user}","gists_url":"https://api.github.com/users/eternoendless/gists{/gist_id}","starred_url":"https://api.github.com/users/eternoendless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eternoendless/subscriptions","organizations_url":"https://api.github.com/users/eternoendless/orgs","repos_url":"https://api.github.com/users/eternoendless/repos","events_url":"https://api.github.com/users/eternoendless/events{/privacy}","received_events_url":"https://api.github.com/users/eternoendless/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":152,"state":"open","created_at":"2017-10-03T14:54:58Z","updated_at":"2018-04-23T15:33:46Z","due_on":null,"closed_at":null},"comments":18,"created_at":"2018-04-02T12:44:27Z","updated_at":"2018-04-23T16:35:04Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/8908","html_url":"https://github.com/PrestaShop/PrestaShop/pull/8908","diff_url":"https://github.com/PrestaShop/PrestaShop/pull/8908.diff","patch_url":"https://github.com/PrestaShop/PrestaShop/pull/8908.patch"},"body":"<!-- Thank you for contributing to the PrestaShop project! \r\n\r\nPlease take the time to edit the \"Answers\" rows with the necessary information: -->\r\n\r\n| Questions     | Answers\r\n| ------------- | -------------------------------------------------------\r\n| Branch?       | develop\r\n| Description?  | As pointing by both @alegout and @sarjon, form handling can be refactored: this is my proposal, see docs => https://github.com/PrestaShop/prestafony-project/blob/fbbd8cb0e77fd94deb6871699cdee74d9652c5f0/docs/migration-guide.md#form-data-handlers\r\n| Type?         | improvement\r\n| Category?     | BO\r\n| BC breaks?    | no\r\n| Deprecations? | yes `PerformanceFormHandler`\r\n| Fixed ticket? | none, but can avoid errors that come from copy/pastes: i've already spotted a lot in current form handlers (repetitive tasks aren't funny btw)\r\n| How to test?  | All migrated pages from Advanced and Shop parameters should works as expected.\r\n\r\n<!-- Click the form's \"Preview button\" to make sure the table is functional in GitHub. Thank you! -->\r\n\r\n## TLDR;\r\n\r\nHow to register a new form handler?\r\n\r\n```yaml\r\n    prestashop.adapter.administration.form_handler:\r\n        class: 'PrestaShop\\PrestaShop\\Core\\Form\\FormHandler'\r\n        arguments:\r\n            - '@=service(\"form.factory\").createBuilder()'\r\n            - '@prestashop.hook.dispatcher'\r\n            - '@prestashop.adapter.administration.form_provider'\r\n            - # form Types\r\n              'general': 'PrestaShopBundle\\Form\\Admin\\AdvancedParameters\\Administration\\GeneralType'\r\n              'upload_quota': 'PrestaShopBundle\\Form\\Admin\\AdvancedParameters\\Administration\\UploadQuotaType'\r\n              'notifications': 'PrestaShopBundle\\Form\\Admin\\AdvancedParameters\\Administration\\NotificationsType'\r\n            - 'AdministrationPage' # hookName\r\n```\r\n\r\n\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/prestashop/prestashop/8908)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/comments/383639997","html_url":"https://github.com/PrestaShop/PrestaShop/pull/8908#issuecomment-383639997","issue_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/8908","id":383639997,"user":{"login":"mickaelandrieu","id":1247388,"avatar_url":"https://avatars2.githubusercontent.com/u/1247388?v=4","gravatar_id":"","url":"https://api.github.com/users/mickaelandrieu","html_url":"https://github.com/mickaelandrieu","followers_url":"https://api.github.com/users/mickaelandrieu/followers","following_url":"https://api.github.com/users/mickaelandrieu/following{/other_user}","gists_url":"https://api.github.com/users/mickaelandrieu/gists{/gist_id}","starred_url":"https://api.github.com/users/mickaelandrieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickaelandrieu/subscriptions","organizations_url":"https://api.github.com/users/mickaelandrieu/orgs","repos_url":"https://api.github.com/users/mickaelandrieu/repos","events_url":"https://api.github.com/users/mickaelandrieu/events{/privacy}","received_events_url":"https://api.github.com/users/mickaelandrieu/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T16:35:04Z","updated_at":"2018-04-23T16:35:04Z","author_association":"CONTRIBUTOR","body":"@eternoendless, yes this step is not required anymore ! well spotted :)"}}
{"actor":{"display_login":"mickaelandrieu"}}