{"action":"created","issue":{"url":"https://api.github.com/repos/guzzle/promises/issues/58","repository_url":"https://api.github.com/repos/guzzle/promises","labels_url":"https://api.github.com/repos/guzzle/promises/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/guzzle/promises/issues/58/comments","events_url":"https://api.github.com/repos/guzzle/promises/issues/58/events","html_url":"https://github.com/guzzle/promises/issues/58","id":198721541,"number":58,"title":"more semantic","user":{"login":"yozman","id":11918866,"avatar_url":"https://avatars.githubusercontent.com/u/11918866?v=3","gravatar_id":"","url":"https://api.github.com/users/yozman","html_url":"https://github.com/yozman","followers_url":"https://api.github.com/users/yozman/followers","following_url":"https://api.github.com/users/yozman/following{/other_user}","gists_url":"https://api.github.com/users/yozman/gists{/gist_id}","starred_url":"https://api.github.com/users/yozman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yozman/subscriptions","organizations_url":"https://api.github.com/users/yozman/orgs","repos_url":"https://api.github.com/users/yozman/repos","events_url":"https://api.github.com/users/yozman/events{/privacy}","received_events_url":"https://api.github.com/users/yozman/received_events","type":"User","site_admin":false},"labels":[{"id":180620164,"url":"https://api.github.com/repos/guzzle/promises/labels/wontfix","name":"wontfix","color":"ffffff","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2017-01-04T14:36:39Z","updated_at":"2017-01-07T09:09:57Z","closed_at":null,"body":"https://github.com/guzzle/promises/blob/master/src/Promise.php#L35\r\n```php\r\n$p = new static(null, [$this, 'cancel']);\r\n```\r\n\r\nwish u improve it"},"comment":{"url":"https://api.github.com/repos/guzzle/promises/issues/comments/271072343","html_url":"https://github.com/guzzle/promises/issues/58#issuecomment-271072343","issue_url":"https://api.github.com/repos/guzzle/promises/issues/58","id":271072343,"user":{"login":"sagikazarmark","id":1226384,"avatar_url":"https://avatars.githubusercontent.com/u/1226384?v=3","gravatar_id":"","url":"https://api.github.com/users/sagikazarmark","html_url":"https://github.com/sagikazarmark","followers_url":"https://api.github.com/users/sagikazarmark/followers","following_url":"https://api.github.com/users/sagikazarmark/following{/other_user}","gists_url":"https://api.github.com/users/sagikazarmark/gists{/gist_id}","starred_url":"https://api.github.com/users/sagikazarmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sagikazarmark/subscriptions","organizations_url":"https://api.github.com/users/sagikazarmark/orgs","repos_url":"https://api.github.com/users/sagikazarmark/repos","events_url":"https://api.github.com/users/sagikazarmark/events{/privacy}","received_events_url":"https://api.github.com/users/sagikazarmark/received_events","type":"User","site_admin":false},"created_at":"2017-01-07T09:09:56Z","updated_at":"2017-01-07T09:09:56Z","body":"> extension\r\n\r\nThe thing is that \"extension\" is a bit misleading. By extension you mean extending the class. For that I say inheritance. Extension in a wider term however means functional extension of a module/software component. This is what O is from SOLID: Open/Closed principle.\r\n\r\nOpen for extension in our case means that we have an abstraction which we can use to extend the existing software components. For example write a decorator which adds your logic to the existing one.\r\n\r\nPeople regularly (mis)use inheritance for extension, because it's easy to do. But in many cases it is just wrong, because that way you might actually modify the behaviour from the inside instead of *extending* it. Classes not meant to be extended (inherited) should not be extended (inherited). That's where the final keyword helps.\r\n\r\nIf you want to read more about this topic, there are awesome posts by awesome people:\r\n\r\nhttp://verraes.net/2014/05/final-classes-in-php/\r\nhttp://ocramius.github.io/blog/when-to-declare-classes-final/\r\nhttps://codeblog.jonskeet.uk/2013/03/15/the-open-closed-principle-in-review/\r\nhttps://8thlight.com/blog/uncle-bob/2014/05/12/TheOpenClosedPrinciple.html"}}
{"actor":{"display_login":"sagikazarmark"}}