{"action":"created","issue":{"url":"https://api.github.com/repos/tobscure/json-api/issues/67","labels_url":"https://api.github.com/repos/tobscure/json-api/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/tobscure/json-api/issues/67/comments","events_url":"https://api.github.com/repos/tobscure/json-api/issues/67/events","html_url":"https://github.com/tobscure/json-api/pull/67","id":117184450,"number":67,"title":"Unification the API + a little bit improvements with tests ","user":{"login":"pomek","id":2270764,"avatar_url":"https://avatars.githubusercontent.com/u/2270764?v=3","gravatar_id":"","url":"https://api.github.com/users/pomek","html_url":"https://github.com/pomek","followers_url":"https://api.github.com/users/pomek/followers","following_url":"https://api.github.com/users/pomek/following{/other_user}","gists_url":"https://api.github.com/users/pomek/gists{/gist_id}","starred_url":"https://api.github.com/users/pomek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pomek/subscriptions","organizations_url":"https://api.github.com/users/pomek/orgs","repos_url":"https://api.github.com/users/pomek/repos","events_url":"https://api.github.com/users/pomek/events{/privacy}","received_events_url":"https://api.github.com/users/pomek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-16T18:06:30Z","updated_at":"2015-11-16T18:26:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tobscure/json-api/pulls/67","html_url":"https://github.com/tobscure/json-api/pull/67","diff_url":"https://github.com/tobscure/json-api/pull/67.diff","patch_url":"https://github.com/tobscure/json-api/pull/67.patch"},"body":"Hi,\r\n\r\nMy changes will break down the API compatibility. \r\n\r\nIn my opinion, classes which are necessary only for tests should be defined in dedicated (`stubs`) namespace. I've done it. All classes from test scenarios have been moved to `tests/stubs` directory.\r\n\r\nAnother change what I've done is change in the interface (API). In my opinion the method `SerializerInterface::getAttributes()` should be called with some `$model` and some `$fields`, but the `$fields` parameter should always be an array. The next one change is method `getType()` in the same Interface. I've removed unused parameter `$model`. \r\n\r\nAdditionally I've fixed phpDoc in some classes, nothing special :)\r\n\r\nI'm open on your opinion. If is anything what I could improvement, tell me.\r\n"},"comment":{"url":"https://api.github.com/repos/tobscure/json-api/issues/comments/157127731","html_url":"https://github.com/tobscure/json-api/pull/67#issuecomment-157127731","issue_url":"https://api.github.com/repos/tobscure/json-api/issues/67","id":157127731,"user":{"login":"pomek","id":2270764,"avatar_url":"https://avatars.githubusercontent.com/u/2270764?v=3","gravatar_id":"","url":"https://api.github.com/users/pomek","html_url":"https://github.com/pomek","followers_url":"https://api.github.com/users/pomek/followers","following_url":"https://api.github.com/users/pomek/following{/other_user}","gists_url":"https://api.github.com/users/pomek/gists{/gist_id}","starred_url":"https://api.github.com/users/pomek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pomek/subscriptions","organizations_url":"https://api.github.com/users/pomek/orgs","repos_url":"https://api.github.com/users/pomek/repos","events_url":"https://api.github.com/users/pomek/events{/privacy}","received_events_url":"https://api.github.com/users/pomek/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T18:26:17Z","updated_at":"2015-11-16T18:26:17Z","body":"> Anything other than personal taste?\r\n\r\nProbably not, but as we know, in single php file should be a single class definition. If a helper class is necessary, it should be available for tests only. It also allows to easy modified helper classes in the future.\r\n\r\nTests classes are responsible for testing particulate class. I guess the tests classes should be clear and clean much as possible."}}