{"action":"created","issue":{"url":"https://api.github.com/repos/ryanwinchester/hubspot-php/issues/43","repository_url":"https://api.github.com/repos/ryanwinchester/hubspot-php","labels_url":"https://api.github.com/repos/ryanwinchester/hubspot-php/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/ryanwinchester/hubspot-php/issues/43/comments","events_url":"https://api.github.com/repos/ryanwinchester/hubspot-php/issues/43/events","html_url":"https://github.com/ryanwinchester/hubspot-php/issues/43","id":142320664,"number":43,"title":"Iterate over results","user":{"login":"geekdevs","id":864822,"avatar_url":"https://avatars.githubusercontent.com/u/864822?v=3","gravatar_id":"","url":"https://api.github.com/users/geekdevs","html_url":"https://github.com/geekdevs","followers_url":"https://api.github.com/users/geekdevs/followers","following_url":"https://api.github.com/users/geekdevs/following{/other_user}","gists_url":"https://api.github.com/users/geekdevs/gists{/gist_id}","starred_url":"https://api.github.com/users/geekdevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geekdevs/subscriptions","organizations_url":"https://api.github.com/users/geekdevs/orgs","repos_url":"https://api.github.com/users/geekdevs/repos","events_url":"https://api.github.com/users/geekdevs/events{/privacy}","received_events_url":"https://api.github.com/users/geekdevs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-21T11:27:59Z","updated_at":"2016-03-21T18:41:43Z","closed_at":null,"body":"I am now upgrading from version `v0.9.7`  and I think something has broken on the lib regarding iterating over the results. \r\n\r\nCurrently, if I run code like this it would give me 0 results.\r\n\r\n```\r\n        $count = 0;\r\n        $resp = $hubSpotService->contacts()->all();\r\n        foreach ($resp as $row) {\r\n            ++$count;\r\n        }\r\n\r\n        echo $count; //outputs `0`\r\n```\r\n\r\nThe only workaround for this I see is following (which looks ugly).\r\n\r\n```\r\n        $count = 0;\r\n        $resp = $hubSpotService->contacts()->all()->toArray();\r\n        foreach ($resp as $row) {\r\n            ++$count;\r\n        }\r\n\r\n        echo $count; //outputs `3`\r\n```\r\n\r\nIs this an \"official\" way to iterate over results now? Previously (on v.0.9.7) both approaches would give me the same output."},"comment":{"url":"https://api.github.com/repos/ryanwinchester/hubspot-php/issues/comments/199419865","html_url":"https://github.com/ryanwinchester/hubspot-php/issues/43#issuecomment-199419865","issue_url":"https://api.github.com/repos/ryanwinchester/hubspot-php/issues/43","id":199419865,"user":{"login":"ryanwinchester","id":2897340,"avatar_url":"https://avatars.githubusercontent.com/u/2897340?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanwinchester","html_url":"https://github.com/ryanwinchester","followers_url":"https://api.github.com/users/ryanwinchester/followers","following_url":"https://api.github.com/users/ryanwinchester/following{/other_user}","gists_url":"https://api.github.com/users/ryanwinchester/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanwinchester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanwinchester/subscriptions","organizations_url":"https://api.github.com/users/ryanwinchester/orgs","repos_url":"https://api.github.com/users/ryanwinchester/repos","events_url":"https://api.github.com/users/ryanwinchester/events{/privacy}","received_events_url":"https://api.github.com/users/ryanwinchester/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T18:41:43Z","updated_at":"2016-03-21T18:41:43Z","body":"Then that is a bug in Deals class"}}