{"action":"created","comment":{"url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls/comments/34013390","id":34013390,"diff_hunk":"@@ -164,7 +164,7 @@ public function getGeneratedClassesNamespace()\n      */\n     public function setGeneratedClassesTargetDir($generatedClassesTargetDir)\n     {\n-        $this->generatedClassesTargetDir = (string) $generatedClassesTargetDir;\n+        $this->generatedClassesTargetDir = $generatedClassesTargetDir;","path":"src/GeneratedHydrator/Configuration.php","position":5,"original_position":5,"commit_id":"ebd0d0b04b2d0916868e2a89290ed165414e7aae","original_commit_id":"ebd0d0b04b2d0916868e2a89290ed165414e7aae","user":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars.githubusercontent.com/u/154256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"body":"This breaks internal data integrity of the `Configuration` object, and may cause exceptions at a later execution point in time.","created_at":"2015-07-07T07:25:03Z","updated_at":"2015-07-07T07:25:03Z","html_url":"https://github.com/Ocramius/GeneratedHydrator/pull/37#discussion_r34013390","pull_request_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls/comments/34013390"},"html":{"href":"https://github.com/Ocramius/GeneratedHydrator/pull/37#discussion_r34013390"},"pull_request":{"href":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls/37","id":39339946,"html_url":"https://github.com/Ocramius/GeneratedHydrator/pull/37","diff_url":"https://github.com/Ocramius/GeneratedHydrator/pull/37.diff","patch_url":"https://github.com/Ocramius/GeneratedHydrator/pull/37.patch","issue_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/issues/37","number":37,"state":"open","locked":false,"title":"Allow generated classes target dir to be null","user":{"login":"matthiasnoback","id":1193078,"avatar_url":"https://avatars.githubusercontent.com/u/1193078?v=3","gravatar_id":"","url":"https://api.github.com/users/matthiasnoback","html_url":"https://github.com/matthiasnoback","followers_url":"https://api.github.com/users/matthiasnoback/followers","following_url":"https://api.github.com/users/matthiasnoback/following{/other_user}","gists_url":"https://api.github.com/users/matthiasnoback/gists{/gist_id}","starred_url":"https://api.github.com/users/matthiasnoback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthiasnoback/subscriptions","organizations_url":"https://api.github.com/users/matthiasnoback/orgs","repos_url":"https://api.github.com/users/matthiasnoback/repos","events_url":"https://api.github.com/users/matthiasnoback/events{/privacy}","received_events_url":"https://api.github.com/users/matthiasnoback/received_events","type":"User","site_admin":false},"body":"Because of the string casting, in my code I have to call `setGeneratedClassesTargetDir()` like this:\r\n\r\n```php\r\nclass HydrateUsingGeneratedHydrator implements Hydrate\r\n{\r\n    /**\r\n     * @var string|null\r\n     */\r\n    private $cacheDir;\r\n\r\n    public function __construct($cacheDir)\r\n    {\r\n        $this->cacheDir = $cacheDir;\r\n    }\r\n\r\n    public function hydrate(array $data, $object)\r\n    {\r\n        $configuration = new Configuration(get_class($object));\r\n\r\n        if ($this->cacheDir !== null) {\r\n            $configuration->setGeneratedClassesTargetDir($this->cacheDir);\r\n        }\r\n        ...\r\n    }\r\n}\r\n```\r\n\r\nThe proposed change allows me to just call `$configuration->setGeneratedClassesTargetDir($this->cacheDir);` without the extra `if` clause.","created_at":"2015-07-07T06:53:50Z","updated_at":"2015-07-07T07:25:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7cfd177252f0507d53aaa524587f5f1a9457253d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls/37/commits","review_comments_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls/37/comments","review_comment_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/issues/37/comments","statuses_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/statuses/ebd0d0b04b2d0916868e2a89290ed165414e7aae","head":{"label":"matthiasnoback:patch-1","ref":"patch-1","sha":"ebd0d0b04b2d0916868e2a89290ed165414e7aae","user":{"login":"matthiasnoback","id":1193078,"avatar_url":"https://avatars.githubusercontent.com/u/1193078?v=3","gravatar_id":"","url":"https://api.github.com/users/matthiasnoback","html_url":"https://github.com/matthiasnoback","followers_url":"https://api.github.com/users/matthiasnoback/followers","following_url":"https://api.github.com/users/matthiasnoback/following{/other_user}","gists_url":"https://api.github.com/users/matthiasnoback/gists{/gist_id}","starred_url":"https://api.github.com/users/matthiasnoback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthiasnoback/subscriptions","organizations_url":"https://api.github.com/users/matthiasnoback/orgs","repos_url":"https://api.github.com/users/matthiasnoback/repos","events_url":"https://api.github.com/users/matthiasnoback/events{/privacy}","received_events_url":"https://api.github.com/users/matthiasnoback/received_events","type":"User","site_admin":false},"repo":{"id":38669138,"name":"GeneratedHydrator","full_name":"matthiasnoback/GeneratedHydrator","owner":{"login":"matthiasnoback","id":1193078,"avatar_url":"https://avatars.githubusercontent.com/u/1193078?v=3","gravatar_id":"","url":"https://api.github.com/users/matthiasnoback","html_url":"https://github.com/matthiasnoback","followers_url":"https://api.github.com/users/matthiasnoback/followers","following_url":"https://api.github.com/users/matthiasnoback/following{/other_user}","gists_url":"https://api.github.com/users/matthiasnoback/gists{/gist_id}","starred_url":"https://api.github.com/users/matthiasnoback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthiasnoback/subscriptions","organizations_url":"https://api.github.com/users/matthiasnoback/orgs","repos_url":"https://api.github.com/users/matthiasnoback/repos","events_url":"https://api.github.com/users/matthiasnoback/events{/privacy}","received_events_url":"https://api.github.com/users/matthiasnoback/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matthiasnoback/GeneratedHydrator","description":":bullettrain_side: Generated Object Hydrator for PHP - fast conversion from array to object to array","fork":true,"url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator","forks_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/forks","keys_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/teams","hooks_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/hooks","issue_events_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/issues/events{/number}","events_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/events","assignees_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/assignees{/user}","branches_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/branches{/branch}","tags_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/tags","blobs_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/git/refs{/sha}","trees_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/statuses/{sha}","languages_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/languages","stargazers_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/stargazers","contributors_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/contributors","subscribers_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/subscribers","subscription_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/subscription","commits_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/commits{/sha}","git_commits_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/git/commits{/sha}","comments_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/comments{/number}","issue_comment_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/issues/comments{/number}","contents_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/contents/{+path}","compare_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/merges","archive_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/downloads","issues_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/issues{/number}","pulls_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/pulls{/number}","milestones_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/milestones{/number}","notifications_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/labels{/name}","releases_url":"https://api.github.com/repos/matthiasnoback/GeneratedHydrator/releases{/id}","created_at":"2015-07-07T06:42:53Z","updated_at":"2015-07-07T06:42:53Z","pushed_at":"2015-07-07T06:48:26Z","git_url":"git://github.com/matthiasnoback/GeneratedHydrator.git","ssh_url":"git@github.com:matthiasnoback/GeneratedHydrator.git","clone_url":"https://github.com/matthiasnoback/GeneratedHydrator.git","svn_url":"https://github.com/matthiasnoback/GeneratedHydrator","homepage":"","size":825,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"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":"Ocramius:master","ref":"master","sha":"ba0c96cfbf311203cf7664c566463f4530024ad1","user":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars.githubusercontent.com/u/154256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"repo":{"id":11350663,"name":"GeneratedHydrator","full_name":"Ocramius/GeneratedHydrator","owner":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars.githubusercontent.com/u/154256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ocramius/GeneratedHydrator","description":":bullettrain_side: Generated Object Hydrator for PHP - fast conversion from array to object to array","fork":false,"url":"https://api.github.com/repos/Ocramius/GeneratedHydrator","forks_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/forks","keys_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/teams","hooks_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/hooks","issue_events_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/issues/events{/number}","events_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/events","assignees_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/assignees{/user}","branches_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/branches{/branch}","tags_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/tags","blobs_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/statuses/{sha}","languages_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/languages","stargazers_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/stargazers","contributors_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/contributors","subscribers_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/subscribers","subscription_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/subscription","commits_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/contents/{+path}","compare_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/merges","archive_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/downloads","issues_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/issues{/number}","pulls_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls{/number}","milestones_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/milestones{/number}","notifications_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/labels{/name}","releases_url":"https://api.github.com/repos/Ocramius/GeneratedHydrator/releases{/id}","created_at":"2013-07-11T19:16:40Z","updated_at":"2015-07-06T12:52:54Z","pushed_at":"2015-07-07T06:53:50Z","git_url":"git://github.com/Ocramius/GeneratedHydrator.git","ssh_url":"git@github.com:Ocramius/GeneratedHydrator.git","clone_url":"https://github.com/Ocramius/GeneratedHydrator.git","svn_url":"https://github.com/Ocramius/GeneratedHydrator","homepage":"","size":1118,"stargazers_count":152,"watchers_count":152,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":12,"forks":19,"open_issues":12,"watchers":152,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls/37"},"html":{"href":"https://github.com/Ocramius/GeneratedHydrator/pull/37"},"issue":{"href":"https://api.github.com/repos/Ocramius/GeneratedHydrator/issues/37"},"comments":{"href":"https://api.github.com/repos/Ocramius/GeneratedHydrator/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ocramius/GeneratedHydrator/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/Ocramius/GeneratedHydrator/statuses/ebd0d0b04b2d0916868e2a89290ed165414e7aae"}}}}