{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony/pulls/comments/91997166","pull_request_review_id":12506799,"id":91997166,"diff_hunk":"@@ -134,6 +134,8 @@ public function buildForm(FormBuilderInterface $builder, array $options)\n                     $builder->add($childForm);\n                 }\n             }\n+            // Invert should not inherit the required option\n+            $invertOptions['required'] = false;","path":"src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php","position":5,"original_position":5,"commit_id":"63761d96c1d36bfca8131e18c98d262ab26636f3","original_commit_id":"63761d96c1d36bfca8131e18c98d262ab26636f3","user":{"login":"ogizanagi","id":2211145,"avatar_url":"https://avatars.githubusercontent.com/u/2211145?v=3","gravatar_id":"","url":"https://api.github.com/users/ogizanagi","html_url":"https://github.com/ogizanagi","followers_url":"https://api.github.com/users/ogizanagi/followers","following_url":"https://api.github.com/users/ogizanagi/following{/other_user}","gists_url":"https://api.github.com/users/ogizanagi/gists{/gist_id}","starred_url":"https://api.github.com/users/ogizanagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogizanagi/subscriptions","organizations_url":"https://api.github.com/users/ogizanagi/orgs","repos_url":"https://api.github.com/users/ogizanagi/repos","events_url":"https://api.github.com/users/ogizanagi/events{/privacy}","received_events_url":"https://api.github.com/users/ogizanagi/received_events","type":"User","site_admin":false},"body":"What about \r\n```diff\r\ndiff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php\r\ndiff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php\r\nindex fb2b7d7..e4f46d8 100644\r\n--- a/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php\r\n+++ b/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php\r\n@@ -107,9 +107,6 @@ class DateIntervalType extends AbstractType\r\n                     }\r\n                 }\r\n             }\r\n-            $invertOptions = array(\r\n-                'error_bubbling' => true,\r\n-            );\r\n             // Append generic carry-along options\r\n             foreach (array('required', 'translation_domain') as $passOpt) {\r\n                 foreach ($this->timeParts as $part) {\r\n@@ -117,10 +114,8 @@ class DateIntervalType extends AbstractType\r\n                         $childOptions[$part][$passOpt] = $options[$passOpt];\r\n                     }\r\n                 }\r\n-                if ($options['with_invert']) {\r\n-                    $invertOptions[$passOpt] = $options[$passOpt];\r\n-                }\r\n             }\r\n+\r\n             foreach ($this->timeParts as $part) {\r\n                 if ($options['with_'.$part]) {\r\n                     $childForm = $builder->create($part, self::$widgets[$options['widget']], $childOptions[$part]);\r\n@@ -135,7 +130,11 @@ class DateIntervalType extends AbstractType\r\n                 }\r\n             }\r\n             if ($options['with_invert']) {\r\n-                $builder->add('invert', 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CheckboxType', $invertOptions);\r\n+                $builder->add('invert', 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CheckboxType', array(\r\n+                    'error_bubbling' => true,\r\n+                    'required' => false,\r\n+                    'translation_domain' => $options['translation_domain'],\r\n+                ));\r\n             }\r\n             $builder->addViewTransformer(new DateIntervalToArrayTransformer($parts, 'text' === $options['widget']));\r\n         }\r\n```\r\n\r\ninstead? Not much different, but simplify things a little bit. ","created_at":"2016-12-12T17:33:12Z","updated_at":"2016-12-12T17:33:15Z","html_url":"https://github.com/symfony/symfony/pull/20877#discussion_r91997166","pull_request_url":"https://api.github.com/repos/symfony/symfony/pulls/20877","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments/91997166"},"html":{"href":"https://github.com/symfony/symfony/pull/20877#discussion_r91997166"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony/pulls/20877"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/20877","id":97549255,"html_url":"https://github.com/symfony/symfony/pull/20877","diff_url":"https://github.com/symfony/symfony/pull/20877.diff","patch_url":"https://github.com/symfony/symfony/pull/20877.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/20877","number":20877,"state":"open","locked":false,"title":"DateIntervalType: 'invert' should not inherit the 'required' option","user":{"login":"galeaspablo","id":12404647,"avatar_url":"https://avatars.githubusercontent.com/u/12404647?v=3","gravatar_id":"","url":"https://api.github.com/users/galeaspablo","html_url":"https://github.com/galeaspablo","followers_url":"https://api.github.com/users/galeaspablo/followers","following_url":"https://api.github.com/users/galeaspablo/following{/other_user}","gists_url":"https://api.github.com/users/galeaspablo/gists{/gist_id}","starred_url":"https://api.github.com/users/galeaspablo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galeaspablo/subscriptions","organizations_url":"https://api.github.com/users/galeaspablo/orgs","repos_url":"https://api.github.com/users/galeaspablo/repos","events_url":"https://api.github.com/users/galeaspablo/events{/privacy}","received_events_url":"https://api.github.com/users/galeaspablo/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | 3.2\r\n| Bug fix?      | yes\r\n| New feature?  | no\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | #20876\r\n| License       | MIT\r\n| Doc PR        | -\r\n\r\nAs explained in #20876, \r\n\r\n> In the DateIntervalType, there is a field, called 'invert', that allows for negative intervals. This is outputted as a checkbox. Which is fine, but it shouldn't be required.\r\n\r\n","created_at":"2016-12-12T13:05:05Z","updated_at":"2016-12-12T17:33:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fb4a702f0ea4e2767095539ea6b4cef4fa31a10a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/20877/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/20877/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/20877/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/63761d96c1d36bfca8131e18c98d262ab26636f3","head":{"label":"galeaspablo:fix/3.2/form_type_dateinterval","ref":"fix/3.2/form_type_dateinterval","sha":"63761d96c1d36bfca8131e18c98d262ab26636f3","user":{"login":"galeaspablo","id":12404647,"avatar_url":"https://avatars.githubusercontent.com/u/12404647?v=3","gravatar_id":"","url":"https://api.github.com/users/galeaspablo","html_url":"https://github.com/galeaspablo","followers_url":"https://api.github.com/users/galeaspablo/followers","following_url":"https://api.github.com/users/galeaspablo/following{/other_user}","gists_url":"https://api.github.com/users/galeaspablo/gists{/gist_id}","starred_url":"https://api.github.com/users/galeaspablo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galeaspablo/subscriptions","organizations_url":"https://api.github.com/users/galeaspablo/orgs","repos_url":"https://api.github.com/users/galeaspablo/repos","events_url":"https://api.github.com/users/galeaspablo/events{/privacy}","received_events_url":"https://api.github.com/users/galeaspablo/received_events","type":"User","site_admin":false},"repo":{"id":76249655,"name":"symfony","full_name":"galeaspablo/symfony","owner":{"login":"galeaspablo","id":12404647,"avatar_url":"https://avatars.githubusercontent.com/u/12404647?v=3","gravatar_id":"","url":"https://api.github.com/users/galeaspablo","html_url":"https://github.com/galeaspablo","followers_url":"https://api.github.com/users/galeaspablo/followers","following_url":"https://api.github.com/users/galeaspablo/following{/other_user}","gists_url":"https://api.github.com/users/galeaspablo/gists{/gist_id}","starred_url":"https://api.github.com/users/galeaspablo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galeaspablo/subscriptions","organizations_url":"https://api.github.com/users/galeaspablo/orgs","repos_url":"https://api.github.com/users/galeaspablo/repos","events_url":"https://api.github.com/users/galeaspablo/events{/privacy}","received_events_url":"https://api.github.com/users/galeaspablo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/galeaspablo/symfony","description":"The Symfony PHP framework","fork":true,"url":"https://api.github.com/repos/galeaspablo/symfony","forks_url":"https://api.github.com/repos/galeaspablo/symfony/forks","keys_url":"https://api.github.com/repos/galeaspablo/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/galeaspablo/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/galeaspablo/symfony/teams","hooks_url":"https://api.github.com/repos/galeaspablo/symfony/hooks","issue_events_url":"https://api.github.com/repos/galeaspablo/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/galeaspablo/symfony/events","assignees_url":"https://api.github.com/repos/galeaspablo/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/galeaspablo/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/galeaspablo/symfony/tags","blobs_url":"https://api.github.com/repos/galeaspablo/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/galeaspablo/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/galeaspablo/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/galeaspablo/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/galeaspablo/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/galeaspablo/symfony/languages","stargazers_url":"https://api.github.com/repos/galeaspablo/symfony/stargazers","contributors_url":"https://api.github.com/repos/galeaspablo/symfony/contributors","subscribers_url":"https://api.github.com/repos/galeaspablo/symfony/subscribers","subscription_url":"https://api.github.com/repos/galeaspablo/symfony/subscription","commits_url":"https://api.github.com/repos/galeaspablo/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/galeaspablo/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/galeaspablo/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/galeaspablo/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/galeaspablo/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/galeaspablo/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/galeaspablo/symfony/merges","archive_url":"https://api.github.com/repos/galeaspablo/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/galeaspablo/symfony/downloads","issues_url":"https://api.github.com/repos/galeaspablo/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/galeaspablo/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/galeaspablo/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/galeaspablo/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/galeaspablo/symfony/labels{/name}","releases_url":"https://api.github.com/repos/galeaspablo/symfony/releases{/id}","deployments_url":"https://api.github.com/repos/galeaspablo/symfony/deployments","created_at":"2016-12-12T11:17:35Z","updated_at":"2016-12-12T11:17:53Z","pushed_at":"2016-12-12T12:57:24Z","git_url":"git://github.com/galeaspablo/symfony.git","ssh_url":"git@github.com:galeaspablo/symfony.git","clone_url":"https://github.com/galeaspablo/symfony.git","svn_url":"https://github.com/galeaspablo/symfony","homepage":"symfony.com","size":77597,"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":"d93024b6a56665d2e09b1788e9b14cb0c1a998f6","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-12T15:25:34Z","pushed_at":"2016-12-12T17:32:45Z","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":146188,"stargazers_count":13432,"watchers_count":13432,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":5220,"mirror_url":null,"open_issues_count":874,"forks":5220,"open_issues":874,"watchers":13432,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/20877"},"html":{"href":"https://github.com/symfony/symfony/pull/20877"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/20877"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/20877/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/20877/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/20877/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/63761d96c1d36bfca8131e18c98d262ab26636f3"}}}}
{"actor":{"display_login":"ogizanagi"}}