{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/48055718","id":48055718,"diff_hunk":"@@ -367,6 +367,43 @@ to add additional allowed types without erasing the ones already set.\n     the values to be given as an array mapping option names to allowed types:\n     ``$resolver->setAllowedTypes(array('port' => array('null', 'int')));``\n \n+You can specify an array of a specific type as an allowed option. The expected type is\n+validated in the same way as before (``is_<type>()`` or an ``instanceof`` check).\n+Only for an array, this is done recursively. If you expect an option to be an array of\n+``DateTime`` instances or a numeric array, you can specify this as follows::\n+\n+    // ...\n+    class Mailer\n+    {\n+        // ...\n+        public function configureOptions(OptionsResolver $resolver)\n+        {\n+            // ...\n+            $resolver->setAllowedTypes('dates', 'DateTime[]');\n+            $resolver->setAllowedTypes('ports', 'int[]');\n+        }\n+    }\n+\n+Because the OptionsResolver will validate typed arrays recurively, it is possible to","path":"components/options_resolver.rst","position":21,"original_position":21,"commit_id":"de86e70c9e28ad86460f4f0ce474530f7252846f","original_commit_id":"de86e70c9e28ad86460f4f0ce474530f7252846f","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":"```diff\r\n- recurively\r\n+ recursively\r\n```","created_at":"2015-12-18T18:45:44Z","updated_at":"2015-12-18T18:45:44Z","html_url":"https://github.com/symfony/symfony-docs/pull/6048#discussion_r48055718","pull_request_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/6048","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/48055718"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/6048#discussion_r48055718"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/6048"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/6048","id":54131241,"html_url":"https://github.com/symfony/symfony-docs/pull/6048","diff_url":"https://github.com/symfony/symfony-docs/pull/6048.diff","patch_url":"https://github.com/symfony/symfony-docs/pull/6048.patch","issue_url":"https://api.github.com/repos/symfony/symfony-docs/issues/6048","number":6048,"state":"open","locked":false,"title":"Document typed arrays in optionsresolver","user":{"login":"EVODelavega","id":647725,"avatar_url":"https://avatars.githubusercontent.com/u/647725?v=3","gravatar_id":"","url":"https://api.github.com/users/EVODelavega","html_url":"https://github.com/EVODelavega","followers_url":"https://api.github.com/users/EVODelavega/followers","following_url":"https://api.github.com/users/EVODelavega/following{/other_user}","gists_url":"https://api.github.com/users/EVODelavega/gists{/gist_id}","starred_url":"https://api.github.com/users/EVODelavega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EVODelavega/subscriptions","organizations_url":"https://api.github.com/users/EVODelavega/orgs","repos_url":"https://api.github.com/users/EVODelavega/repos","events_url":"https://api.github.com/users/EVODelavega/events{/privacy}","received_events_url":"https://api.github.com/users/EVODelavega/received_events","type":"User","site_admin":false},"body":"Documentation for changes introduced by [Symfony PR 17032](https://github.com/symfony/symfony/pull/17032)","created_at":"2015-12-18T17:56:18Z","updated_at":"2015-12-18T18:45:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7eace3821d499fc74d03bc345658edf0cf45747a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/6048/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/6048/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/issues/6048/comments","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/de86e70c9e28ad86460f4f0ce474530f7252846f","head":{"label":"EVODelavega:array-validation-PR-17032","ref":"array-validation-PR-17032","sha":"de86e70c9e28ad86460f4f0ce474530f7252846f","user":{"login":"EVODelavega","id":647725,"avatar_url":"https://avatars.githubusercontent.com/u/647725?v=3","gravatar_id":"","url":"https://api.github.com/users/EVODelavega","html_url":"https://github.com/EVODelavega","followers_url":"https://api.github.com/users/EVODelavega/followers","following_url":"https://api.github.com/users/EVODelavega/following{/other_user}","gists_url":"https://api.github.com/users/EVODelavega/gists{/gist_id}","starred_url":"https://api.github.com/users/EVODelavega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EVODelavega/subscriptions","organizations_url":"https://api.github.com/users/EVODelavega/orgs","repos_url":"https://api.github.com/users/EVODelavega/repos","events_url":"https://api.github.com/users/EVODelavega/events{/privacy}","received_events_url":"https://api.github.com/users/EVODelavega/received_events","type":"User","site_admin":false},"repo":{"id":48248307,"name":"symfony-docs","full_name":"EVODelavega/symfony-docs","owner":{"login":"EVODelavega","id":647725,"avatar_url":"https://avatars.githubusercontent.com/u/647725?v=3","gravatar_id":"","url":"https://api.github.com/users/EVODelavega","html_url":"https://github.com/EVODelavega","followers_url":"https://api.github.com/users/EVODelavega/followers","following_url":"https://api.github.com/users/EVODelavega/following{/other_user}","gists_url":"https://api.github.com/users/EVODelavega/gists{/gist_id}","starred_url":"https://api.github.com/users/EVODelavega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EVODelavega/subscriptions","organizations_url":"https://api.github.com/users/EVODelavega/orgs","repos_url":"https://api.github.com/users/EVODelavega/repos","events_url":"https://api.github.com/users/EVODelavega/events{/privacy}","received_events_url":"https://api.github.com/users/EVODelavega/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EVODelavega/symfony-docs","description":"The Symfony documentation","fork":true,"url":"https://api.github.com/repos/EVODelavega/symfony-docs","forks_url":"https://api.github.com/repos/EVODelavega/symfony-docs/forks","keys_url":"https://api.github.com/repos/EVODelavega/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EVODelavega/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EVODelavega/symfony-docs/teams","hooks_url":"https://api.github.com/repos/EVODelavega/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/EVODelavega/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/EVODelavega/symfony-docs/events","assignees_url":"https://api.github.com/repos/EVODelavega/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/EVODelavega/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/EVODelavega/symfony-docs/tags","blobs_url":"https://api.github.com/repos/EVODelavega/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EVODelavega/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EVODelavega/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/EVODelavega/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EVODelavega/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/EVODelavega/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/EVODelavega/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/EVODelavega/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/EVODelavega/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/EVODelavega/symfony-docs/subscription","commits_url":"https://api.github.com/repos/EVODelavega/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/EVODelavega/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/EVODelavega/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/EVODelavega/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/EVODelavega/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/EVODelavega/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EVODelavega/symfony-docs/merges","archive_url":"https://api.github.com/repos/EVODelavega/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EVODelavega/symfony-docs/downloads","issues_url":"https://api.github.com/repos/EVODelavega/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/EVODelavega/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/EVODelavega/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/EVODelavega/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EVODelavega/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/EVODelavega/symfony-docs/releases{/id}","created_at":"2015-12-18T17:43:14Z","updated_at":"2015-12-18T17:43:18Z","pushed_at":"2015-12-18T17:55:29Z","git_url":"git://github.com/EVODelavega/symfony-docs.git","ssh_url":"git@github.com:EVODelavega/symfony-docs.git","clone_url":"https://github.com/EVODelavega/symfony-docs.git","svn_url":"https://github.com/EVODelavega/symfony-docs","homepage":"http://symfony.com/doc","size":33178,"stargazers_count":0,"watchers_count":0,"language":"C++","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:master","ref":"master","sha":"3b2939f79405642edd0679343c8b260f8b74fe27","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":521583,"name":"symfony-docs","full_name":"symfony/symfony-docs","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-docs","description":"The Symfony documentation","fork":false,"url":"https://api.github.com/repos/symfony/symfony-docs","forks_url":"https://api.github.com/repos/symfony/symfony-docs/forks","keys_url":"https://api.github.com/repos/symfony/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony-docs/teams","hooks_url":"https://api.github.com/repos/symfony/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony-docs/events","assignees_url":"https://api.github.com/repos/symfony/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony-docs/tags","blobs_url":"https://api.github.com/repos/symfony/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony-docs/subscription","commits_url":"https://api.github.com/repos/symfony/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony-docs/merges","archive_url":"https://api.github.com/repos/symfony/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony-docs/downloads","issues_url":"https://api.github.com/repos/symfony/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony-docs/releases{/id}","created_at":"2010-02-17T08:43:51Z","updated_at":"2015-12-18T13:47:47Z","pushed_at":"2015-12-18T17:56:19Z","git_url":"git://github.com/symfony/symfony-docs.git","ssh_url":"git@github.com:symfony/symfony-docs.git","clone_url":"https://github.com/symfony/symfony-docs.git","svn_url":"https://github.com/symfony/symfony-docs","homepage":"http://symfony.com/doc","size":42340,"stargazers_count":1059,"watchers_count":1059,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2170,"mirror_url":null,"open_issues_count":313,"forks":2170,"open_issues":313,"watchers":1059,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/6048"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/6048"},"issue":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/6048"},"comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/6048/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/6048/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/6048/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony-docs/statuses/de86e70c9e28ad86460f4f0ce474530f7252846f"}}}}