{"action":"created","issue":{"url":"https://api.github.com/repos/api-platform/core/issues/2579","repository_url":"https://api.github.com/repos/api-platform/core","labels_url":"https://api.github.com/repos/api-platform/core/issues/2579/labels{/name}","comments_url":"https://api.github.com/repos/api-platform/core/issues/2579/comments","events_url":"https://api.github.com/repos/api-platform/core/issues/2579/events","html_url":"https://github.com/api-platform/core/pull/2579","id":416873143,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU3OTk4Mjky","number":2579,"title":"Use composition for Normalizers","user":{"login":"joelwurtz","id":90466,"node_id":"MDQ6VXNlcjkwNDY2","avatar_url":"https://avatars3.githubusercontent.com/u/90466?v=4","gravatar_id":"","url":"https://api.github.com/users/joelwurtz","html_url":"https://github.com/joelwurtz","followers_url":"https://api.github.com/users/joelwurtz/followers","following_url":"https://api.github.com/users/joelwurtz/following{/other_user}","gists_url":"https://api.github.com/users/joelwurtz/gists{/gist_id}","starred_url":"https://api.github.com/users/joelwurtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelwurtz/subscriptions","organizations_url":"https://api.github.com/users/joelwurtz/orgs","repos_url":"https://api.github.com/users/joelwurtz/repos","events_url":"https://api.github.com/users/joelwurtz/events{/privacy}","received_events_url":"https://api.github.com/users/joelwurtz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-03-04T16:05:07Z","updated_at":"2019-03-04T21:17:58Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/api-platform/core/pulls/2579","html_url":"https://github.com/api-platform/core/pull/2579","diff_url":"https://github.com/api-platform/core/pull/2579.diff","patch_url":"https://github.com/api-platform/core/pull/2579.patch"},"body":"<!-- Please update this template with something that matches your PR -->\r\n| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | no\r\n| Deprecations? | yes\r\n| Tests pass?   | yes\r\n| Fixed tickets | #2355 \r\n| License       | MIT\r\n| Doc PR        | /\r\n\r\nThis is a beginning for #2355 to use composition over inheritance in the various normalizer. Goal is to be decoupled from the ObjectNormalizer so someone can still use JSON LD / Hydra / Json API with a custom normalizer or a different implementation.\r\n\r\nThere is a lot of questions that i wonder, that's why it's far from being complete but it shows where i want to go.\r\n\r\nSome questions i have: \r\n\r\n * Should we have a new class instead ? (easier for depreciation)\r\n * Does every normalizer should use composition (like i began to do) or should we add a generic decoupling instead (not sure if it will be easier)\r\n * Some behavior may be not available in the sub normalizer (like object to populate) is there a way to enforce this or should we just tell the user to take care of this with documentation ?\r\n"},"comment":{"url":"https://api.github.com/repos/api-platform/core/issues/comments/469425365","html_url":"https://github.com/api-platform/core/pull/2579#issuecomment-469425365","issue_url":"https://api.github.com/repos/api-platform/core/issues/2579","id":469425365,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2OTQyNTM2NQ==","user":{"login":"joelwurtz","id":90466,"node_id":"MDQ6VXNlcjkwNDY2","avatar_url":"https://avatars3.githubusercontent.com/u/90466?v=4","gravatar_id":"","url":"https://api.github.com/users/joelwurtz","html_url":"https://github.com/joelwurtz","followers_url":"https://api.github.com/users/joelwurtz/followers","following_url":"https://api.github.com/users/joelwurtz/following{/other_user}","gists_url":"https://api.github.com/users/joelwurtz/gists{/gist_id}","starred_url":"https://api.github.com/users/joelwurtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelwurtz/subscriptions","organizations_url":"https://api.github.com/users/joelwurtz/orgs","repos_url":"https://api.github.com/users/joelwurtz/repos","events_url":"https://api.github.com/users/joelwurtz/events{/privacy}","received_events_url":"https://api.github.com/users/joelwurtz/received_events","type":"User","site_admin":false},"created_at":"2019-03-04T21:17:58Z","updated_at":"2019-03-04T21:17:58Z","author_association":"CONTRIBUTOR","body":"> For now I'm not sure to fully understand the changes\r\n\r\nMe neither xD, there is a lot of code that is duplicated from ObjectNormalizer and actually trying to see the little differences betweens (like iri convertion / relation normalizatiing and others stuffs)\r\n\r\nI think a may have a way to completly remove the AbstractItemNormalizer, but this may require new methods in some interfaces.\r\n\r\nI will try to do a first shot by creating a new way of normalization (withtout the AbstractItemNormalizer) without touching the existing implementation so we can spot / benchmark / tests behaviors in parallel."}}
{"actor":{"display_login":"joelwurtz"}}