{"action":"created","comment":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/comments/66061681","id":66061681,"diff_hunk":"@@ -0,0 +1,168 @@\n+<?php\n+/**\n+ * @link http://www.yiiframework.com/\n+ * @copyright Copyright (c) 2008 Yii Software LLC\n+ * @license http://www.yiiframework.com/license/\n+ */\n+\n+namespace yii\\web;\n+\n+use yii\\base\\Arrayable;\n+use yii\\base\\Component;\n+use yii\\base\\InvalidConfigException;\n+use yii\\helpers\\ArrayHelper;\n+\n+/**\n+ * CsvResponseFormatter formats the given data into CSV response content.\n+ *\n+ * It is used by [[Response]] to format response data.\n+ *\n+ * @author Sam Mousa <sam@mousa.nl>\n+ * @since 2.0.9\n+ */\n+class CsvResponseFormatter extends Component implements ResponseFormatterInterface\n+{\n+    /**\n+     * @var int Maximum number of bytes to use in memory before using a temp file. Defaults to 20MB\n+     */\n+    public $maxMemory = 20 * 1024 * 1024;\n+    /**\n+     * @var string the Content-Type header for the response\n+     */\n+    public $contentType = 'text/csv';\n+\n+    /**\n+     * @var boolean Whether to include column names as the first line, if data is associative.\n+     */\n+    public $includeColumnNames = true;\n+\n+    /**\n+     * @var string The delimiter to use (one character only)\n+     * @see fputcsv\n+     */\n+    public $delimiter = ',';\n+\n+    /**\n+     * @var string The field enclosure to use (one character only)\n+     * @see fputcsv\n+     */\n+    public $enclosure = '\"';\n+\n+    /**\n+     * @var string The escape character to use (one character only)\n+     * @see fputcsv\n+     */\n+    public $escape = '\\'';\n+\n+    /**\n+     * @var bool Whether to check all rows for column names. This means iterating the data twice but it adds support\n+     * for non-uniform data (ie rows with missing columns).\n+     */\n+    public $checkAllRows = false;\n+\n+    /**\n+     * @var string The value to use for NULL values.\n+     */\n+    public $nullValue = \"(null)\";","path":"framework/web/CsvResponseFormatter.php","position":66,"original_position":66,"commit_id":"17e6adf513d07a4214a31156a3af2ad6da6ffc4e","original_commit_id":"a4db71b49e31b3106578a87958c30a4d5bd7cdc0","user":{"login":"mikehaertl","id":675062,"avatar_url":"https://avatars.githubusercontent.com/u/675062?v=3","gravatar_id":"","url":"https://api.github.com/users/mikehaertl","html_url":"https://github.com/mikehaertl","followers_url":"https://api.github.com/users/mikehaertl/followers","following_url":"https://api.github.com/users/mikehaertl/following{/other_user}","gists_url":"https://api.github.com/users/mikehaertl/gists{/gist_id}","starred_url":"https://api.github.com/users/mikehaertl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikehaertl/subscriptions","organizations_url":"https://api.github.com/users/mikehaertl/orgs","repos_url":"https://api.github.com/users/mikehaertl/repos","events_url":"https://api.github.com/users/mikehaertl/events{/privacy}","received_events_url":"https://api.github.com/users/mikehaertl/received_events","type":"User","site_admin":false},"body":"I tend to disagree. I'd say that an empty string is \"much more equal\" to the `null` value than the string `(null)`. Say you import this into excel. All the columns that where not set before now suddenly contain a string.","created_at":"2016-06-07T12:34:39Z","updated_at":"2016-06-07T12:34:39Z","html_url":"https://github.com/yiisoft/yii2/pull/11717#discussion_r66061681","pull_request_url":"https://api.github.com/repos/yiisoft/yii2/pulls/11717","_links":{"self":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/comments/66061681"},"html":{"href":"https://github.com/yiisoft/yii2/pull/11717#discussion_r66061681"},"pull_request":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/11717"}}},"pull_request":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/11717","id":72860209,"html_url":"https://github.com/yiisoft/yii2/pull/11717","diff_url":"https://github.com/yiisoft/yii2/pull/11717.diff","patch_url":"https://github.com/yiisoft/yii2/pull/11717.patch","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/11717","number":11717,"state":"open","locked":false,"title":"Implemented CSV Response formatter #11674","user":{"login":"SamMousa","id":547021,"avatar_url":"https://avatars.githubusercontent.com/u/547021?v=3","gravatar_id":"","url":"https://api.github.com/users/SamMousa","html_url":"https://github.com/SamMousa","followers_url":"https://api.github.com/users/SamMousa/followers","following_url":"https://api.github.com/users/SamMousa/following{/other_user}","gists_url":"https://api.github.com/users/SamMousa/gists{/gist_id}","starred_url":"https://api.github.com/users/SamMousa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamMousa/subscriptions","organizations_url":"https://api.github.com/users/SamMousa/orgs","repos_url":"https://api.github.com/users/SamMousa/repos","events_url":"https://api.github.com/users/SamMousa/events{/privacy}","received_events_url":"https://api.github.com/users/SamMousa/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Is bugfix?    | no\r\n| New feature?  | yes\r\n| Breaks BC?    | no\r\n| Tests pass?   | yes\r\n| Fixed issues  | #11674 \r\n\r\n","created_at":"2016-06-07T11:44:07Z","updated_at":"2016-06-07T12:34:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d654149d78a845151d1b306d98d55aaaf9dc1eab","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yiisoft/yii2/pulls/11717/commits","review_comments_url":"https://api.github.com/repos/yiisoft/yii2/pulls/11717/comments","review_comment_url":"https://api.github.com/repos/yiisoft/yii2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/11717/comments","statuses_url":"https://api.github.com/repos/yiisoft/yii2/statuses/17e6adf513d07a4214a31156a3af2ad6da6ffc4e","head":{"label":"SamMousa:enh-11674","ref":"enh-11674","sha":"17e6adf513d07a4214a31156a3af2ad6da6ffc4e","user":{"login":"SamMousa","id":547021,"avatar_url":"https://avatars.githubusercontent.com/u/547021?v=3","gravatar_id":"","url":"https://api.github.com/users/SamMousa","html_url":"https://github.com/SamMousa","followers_url":"https://api.github.com/users/SamMousa/followers","following_url":"https://api.github.com/users/SamMousa/following{/other_user}","gists_url":"https://api.github.com/users/SamMousa/gists{/gist_id}","starred_url":"https://api.github.com/users/SamMousa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamMousa/subscriptions","organizations_url":"https://api.github.com/users/SamMousa/orgs","repos_url":"https://api.github.com/users/SamMousa/repos","events_url":"https://api.github.com/users/SamMousa/events{/privacy}","received_events_url":"https://api.github.com/users/SamMousa/received_events","type":"User","site_admin":false},"repo":{"id":31261382,"name":"yii2","full_name":"SamMousa/yii2","owner":{"login":"SamMousa","id":547021,"avatar_url":"https://avatars.githubusercontent.com/u/547021?v=3","gravatar_id":"","url":"https://api.github.com/users/SamMousa","html_url":"https://github.com/SamMousa","followers_url":"https://api.github.com/users/SamMousa/followers","following_url":"https://api.github.com/users/SamMousa/following{/other_user}","gists_url":"https://api.github.com/users/SamMousa/gists{/gist_id}","starred_url":"https://api.github.com/users/SamMousa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamMousa/subscriptions","organizations_url":"https://api.github.com/users/SamMousa/orgs","repos_url":"https://api.github.com/users/SamMousa/repos","events_url":"https://api.github.com/users/SamMousa/events{/privacy}","received_events_url":"https://api.github.com/users/SamMousa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SamMousa/yii2","description":"Yii 2 framework main development repo","fork":true,"url":"https://api.github.com/repos/SamMousa/yii2","forks_url":"https://api.github.com/repos/SamMousa/yii2/forks","keys_url":"https://api.github.com/repos/SamMousa/yii2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SamMousa/yii2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SamMousa/yii2/teams","hooks_url":"https://api.github.com/repos/SamMousa/yii2/hooks","issue_events_url":"https://api.github.com/repos/SamMousa/yii2/issues/events{/number}","events_url":"https://api.github.com/repos/SamMousa/yii2/events","assignees_url":"https://api.github.com/repos/SamMousa/yii2/assignees{/user}","branches_url":"https://api.github.com/repos/SamMousa/yii2/branches{/branch}","tags_url":"https://api.github.com/repos/SamMousa/yii2/tags","blobs_url":"https://api.github.com/repos/SamMousa/yii2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SamMousa/yii2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SamMousa/yii2/git/refs{/sha}","trees_url":"https://api.github.com/repos/SamMousa/yii2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SamMousa/yii2/statuses/{sha}","languages_url":"https://api.github.com/repos/SamMousa/yii2/languages","stargazers_url":"https://api.github.com/repos/SamMousa/yii2/stargazers","contributors_url":"https://api.github.com/repos/SamMousa/yii2/contributors","subscribers_url":"https://api.github.com/repos/SamMousa/yii2/subscribers","subscription_url":"https://api.github.com/repos/SamMousa/yii2/subscription","commits_url":"https://api.github.com/repos/SamMousa/yii2/commits{/sha}","git_commits_url":"https://api.github.com/repos/SamMousa/yii2/git/commits{/sha}","comments_url":"https://api.github.com/repos/SamMousa/yii2/comments{/number}","issue_comment_url":"https://api.github.com/repos/SamMousa/yii2/issues/comments{/number}","contents_url":"https://api.github.com/repos/SamMousa/yii2/contents/{+path}","compare_url":"https://api.github.com/repos/SamMousa/yii2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SamMousa/yii2/merges","archive_url":"https://api.github.com/repos/SamMousa/yii2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SamMousa/yii2/downloads","issues_url":"https://api.github.com/repos/SamMousa/yii2/issues{/number}","pulls_url":"https://api.github.com/repos/SamMousa/yii2/pulls{/number}","milestones_url":"https://api.github.com/repos/SamMousa/yii2/milestones{/number}","notifications_url":"https://api.github.com/repos/SamMousa/yii2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SamMousa/yii2/labels{/name}","releases_url":"https://api.github.com/repos/SamMousa/yii2/releases{/id}","deployments_url":"https://api.github.com/repos/SamMousa/yii2/deployments","created_at":"2015-02-24T13:32:17Z","updated_at":"2016-02-03T12:45:17Z","pushed_at":"2016-06-07T12:33:50Z","git_url":"git://github.com/SamMousa/yii2.git","ssh_url":"git@github.com:SamMousa/yii2.git","clone_url":"https://github.com/SamMousa/yii2.git","svn_url":"https://github.com/SamMousa/yii2","homepage":"http://www.yiiframework.com","size":36573,"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":"yiisoft:master","ref":"master","sha":"662f86acb5f7d5c88f9587d35d97f9ad98e99dfb","user":{"login":"yiisoft","id":993323,"avatar_url":"https://avatars.githubusercontent.com/u/993323?v=3","gravatar_id":"","url":"https://api.github.com/users/yiisoft","html_url":"https://github.com/yiisoft","followers_url":"https://api.github.com/users/yiisoft/followers","following_url":"https://api.github.com/users/yiisoft/following{/other_user}","gists_url":"https://api.github.com/users/yiisoft/gists{/gist_id}","starred_url":"https://api.github.com/users/yiisoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiisoft/subscriptions","organizations_url":"https://api.github.com/users/yiisoft/orgs","repos_url":"https://api.github.com/users/yiisoft/repos","events_url":"https://api.github.com/users/yiisoft/events{/privacy}","received_events_url":"https://api.github.com/users/yiisoft/received_events","type":"Organization","site_admin":false},"repo":{"id":3431193,"name":"yii2","full_name":"yiisoft/yii2","owner":{"login":"yiisoft","id":993323,"avatar_url":"https://avatars.githubusercontent.com/u/993323?v=3","gravatar_id":"","url":"https://api.github.com/users/yiisoft","html_url":"https://github.com/yiisoft","followers_url":"https://api.github.com/users/yiisoft/followers","following_url":"https://api.github.com/users/yiisoft/following{/other_user}","gists_url":"https://api.github.com/users/yiisoft/gists{/gist_id}","starred_url":"https://api.github.com/users/yiisoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiisoft/subscriptions","organizations_url":"https://api.github.com/users/yiisoft/orgs","repos_url":"https://api.github.com/users/yiisoft/repos","events_url":"https://api.github.com/users/yiisoft/events{/privacy}","received_events_url":"https://api.github.com/users/yiisoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yiisoft/yii2","description":"Yii 2 framework main development repo","fork":false,"url":"https://api.github.com/repos/yiisoft/yii2","forks_url":"https://api.github.com/repos/yiisoft/yii2/forks","keys_url":"https://api.github.com/repos/yiisoft/yii2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yiisoft/yii2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yiisoft/yii2/teams","hooks_url":"https://api.github.com/repos/yiisoft/yii2/hooks","issue_events_url":"https://api.github.com/repos/yiisoft/yii2/issues/events{/number}","events_url":"https://api.github.com/repos/yiisoft/yii2/events","assignees_url":"https://api.github.com/repos/yiisoft/yii2/assignees{/user}","branches_url":"https://api.github.com/repos/yiisoft/yii2/branches{/branch}","tags_url":"https://api.github.com/repos/yiisoft/yii2/tags","blobs_url":"https://api.github.com/repos/yiisoft/yii2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yiisoft/yii2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yiisoft/yii2/git/refs{/sha}","trees_url":"https://api.github.com/repos/yiisoft/yii2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yiisoft/yii2/statuses/{sha}","languages_url":"https://api.github.com/repos/yiisoft/yii2/languages","stargazers_url":"https://api.github.com/repos/yiisoft/yii2/stargazers","contributors_url":"https://api.github.com/repos/yiisoft/yii2/contributors","subscribers_url":"https://api.github.com/repos/yiisoft/yii2/subscribers","subscription_url":"https://api.github.com/repos/yiisoft/yii2/subscription","commits_url":"https://api.github.com/repos/yiisoft/yii2/commits{/sha}","git_commits_url":"https://api.github.com/repos/yiisoft/yii2/git/commits{/sha}","comments_url":"https://api.github.com/repos/yiisoft/yii2/comments{/number}","issue_comment_url":"https://api.github.com/repos/yiisoft/yii2/issues/comments{/number}","contents_url":"https://api.github.com/repos/yiisoft/yii2/contents/{+path}","compare_url":"https://api.github.com/repos/yiisoft/yii2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yiisoft/yii2/merges","archive_url":"https://api.github.com/repos/yiisoft/yii2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yiisoft/yii2/downloads","issues_url":"https://api.github.com/repos/yiisoft/yii2/issues{/number}","pulls_url":"https://api.github.com/repos/yiisoft/yii2/pulls{/number}","milestones_url":"https://api.github.com/repos/yiisoft/yii2/milestones{/number}","notifications_url":"https://api.github.com/repos/yiisoft/yii2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yiisoft/yii2/labels{/name}","releases_url":"https://api.github.com/repos/yiisoft/yii2/releases{/id}","deployments_url":"https://api.github.com/repos/yiisoft/yii2/deployments","created_at":"2012-02-13T15:32:36Z","updated_at":"2016-06-07T12:12:45Z","pushed_at":"2016-06-07T12:33:50Z","git_url":"git://github.com/yiisoft/yii2.git","ssh_url":"git@github.com:yiisoft/yii2.git","clone_url":"https://github.com/yiisoft/yii2.git","svn_url":"https://github.com/yiisoft/yii2","homepage":"http://www.yiiframework.com","size":56491,"stargazers_count":8200,"watchers_count":8200,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4790,"mirror_url":null,"open_issues_count":1032,"forks":4790,"open_issues":1032,"watchers":8200,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/11717"},"html":{"href":"https://github.com/yiisoft/yii2/pull/11717"},"issue":{"href":"https://api.github.com/repos/yiisoft/yii2/issues/11717"},"comments":{"href":"https://api.github.com/repos/yiisoft/yii2/issues/11717/comments"},"review_comments":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/11717/comments"},"review_comment":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/11717/commits"},"statuses":{"href":"https://api.github.com/repos/yiisoft/yii2/statuses/17e6adf513d07a4214a31156a3af2ad6da6ffc4e"}}}}
{"actor":{"display_login":"mikehaertl"}}