{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/11439","repository_url":"https://api.github.com/repos/yiisoft/yii2","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/11439/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/11439/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/11439/events","html_url":"https://github.com/yiisoft/yii2/pull/11439","id":151533440,"number":11439,"title":"better unit test for generateRandomBytes()","user":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/severity:important","name":"severity:important","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/16","html_url":"https://github.com/yiisoft/yii2/milestones/2.0.8","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/16/labels","id":1242959,"number":16,"title":"2.0.8","description":"","creator":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":258,"state":"open","created_at":"2015-08-05T22:18:21Z","updated_at":"2016-04-28T12:22:39Z","due_on":"2016-04-25T22:00:00Z","closed_at":null},"comments":14,"created_at":"2016-04-28T02:11:36Z","updated_at":"2016-04-28T14:45:12Z","closed_at":"2016-04-28T10:54:33Z","pull_request":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/11439","html_url":"https://github.com/yiisoft/yii2/pull/11439","diff_url":"https://github.com/yiisoft/yii2/pull/11439.diff","patch_url":"https://github.com/yiisoft/yii2/pull/11439.patch"},"body":"This is a better test for `generateRandomBytes()` which tries to test as much branches of the method as possible using some tricks with overriding `function_exists()`.\r\n\r\ntests are passing locally for me, want to check what travis says and it would be nice if someone could check which cases are not testable on windows.\r\n\r\nThere is also one line of code in the new implementatoin which I am unsure about:\r\nhttps://github.com/yiisoft/yii2/blob/master/framework/base/Security.php#L527\r\nI could not come up with a failing test but I believe it must be \r\n\r\n```php\r\n                $stillNeed -= StringHelper::byteLength($someBytes);\r\n```\r\n\r\nand not `$buffer`.\r\n\r\n@tom-- @yiisoft/core-developers could you please verify this?\r\n\r\nPostponing the 2.0.8 release until this is sorted out.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/215449123","html_url":"https://github.com/yiisoft/yii2/pull/11439#issuecomment-215449123","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/11439","id":215449123,"user":{"login":"tom--","id":1178722,"avatar_url":"https://avatars.githubusercontent.com/u/1178722?v=3","gravatar_id":"","url":"https://api.github.com/users/tom--","html_url":"https://github.com/tom--","followers_url":"https://api.github.com/users/tom--/followers","following_url":"https://api.github.com/users/tom--/following{/other_user}","gists_url":"https://api.github.com/users/tom--/gists{/gist_id}","starred_url":"https://api.github.com/users/tom--/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tom--/subscriptions","organizations_url":"https://api.github.com/users/tom--/orgs","repos_url":"https://api.github.com/users/tom--/repos","events_url":"https://api.github.com/users/tom--/events{/privacy}","received_events_url":"https://api.github.com/users/tom--/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T14:45:12Z","updated_at":"2016-04-28T14:45:12Z","body":"Gah! yes."}}