{"action":"created","issue":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/5199","repository_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle","labels_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/5199/labels{/name}","comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/5199/comments","events_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/5199/events","html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/5199","id":351934952,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MzgwMDM5","number":5199,"title":"Extension Dispatcher","user":{"login":"kunicmarko20","id":13528674,"node_id":"MDQ6VXNlcjEzNTI4Njc0","avatar_url":"https://avatars3.githubusercontent.com/u/13528674?v=4","gravatar_id":"","url":"https://api.github.com/users/kunicmarko20","html_url":"https://github.com/kunicmarko20","followers_url":"https://api.github.com/users/kunicmarko20/followers","following_url":"https://api.github.com/users/kunicmarko20/following{/other_user}","gists_url":"https://api.github.com/users/kunicmarko20/gists{/gist_id}","starred_url":"https://api.github.com/users/kunicmarko20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kunicmarko20/subscriptions","organizations_url":"https://api.github.com/users/kunicmarko20/orgs","repos_url":"https://api.github.com/users/kunicmarko20/repos","events_url":"https://api.github.com/users/kunicmarko20/events{/privacy}","received_events_url":"https://api.github.com/users/kunicmarko20/received_events","type":"User","site_admin":false},"labels":[{"id":356102365,"node_id":"MDU6TGFiZWwzNTYxMDIzNjU=","url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/labels/minor","name":"minor","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-08-19T21:13:18Z","updated_at":"2018-08-28T06:54:39Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/5199","html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/5199","diff_url":"https://github.com/sonata-project/SonataAdminBundle/pull/5199.diff","patch_url":"https://github.com/sonata-project/SonataAdminBundle/pull/5199.patch"},"body":"<!-- THE PR TEMPLATE IS NOT AN OPTION. DO NOT DELETE IT, MAKE SURE YOU READ AND EDIT IT! -->\r\n\r\n<!--\r\n    Show us you choose the right branch.\r\n    Different branches are used for different things :\r\n    - 3.x is for everything backwards compatible, like patches, features and deprecation notices\r\n    - master is for deprecation removals and other changes that cannot be done without a BC-break\r\n    More details here: https://github.com/sonata-project/SonataAdminBundle/blob/3.x/CONTRIBUTING.md#the-base-branch\r\n-->\r\nI am targeting this branch, because this is BC\r\n\r\n<!--\r\n    Specify which issues will be fixed/closed.\r\n    Remove it if this is not related.\r\n-->\r\n\r\n## Changelog\r\n\r\n<!-- MANDATORY\r\n    Fill the changelog part inside the code block.\r\n    Follow this schema: http://keepachangelog.com/\r\n-->\r\n\r\n<!-- \r\n    If you are updating something that doesn't require\r\n    a release, you can delete whole Changelog section.\r\n    (eg. update to docs, tests)\r\n-->\r\n\r\n<!-- REMOVE EMPTY SECTIONS -->\r\n```markdown\r\n### Added\r\n- Admin specific `ExtensionEmitter` that will be used to dispatch extension events\r\n- Admin specific `ExtensionNotifier` and `ExtensionProcessor` that will handle events\r\n- Admin specific `ExtensionProvider` that will provide extensions\r\n- Single-method Event Objects per Extension Interface\r\n\r\n### Changed\r\n- Separated `Sonata\\AdminBundle\\Admin\\AdminExtensionInterface` into single-method\r\ninterfaces, they can be found under the `Sonata\\AdminBundle\\Admin\\Extension` namespace\r\n\r\n### Deprecated\r\n- `Sonata\\AdminBundle\\Admin\\AdminExtensionInterface`\r\n- `Sonata\\AdminBundle\\Admin\\AbstractAdminExtension`\r\n- `Sonata\\AdminBundle\\Admin\\AbstractAdmin::addExtension`\r\n```\r\n\r\n## To do\r\n    \r\n- [x] Update the tests\r\n- [x] Update the changelog\r\n- [x] Add an upgrade note\r\n\r\n## Subject\r\n\r\nBuilt on top of #5164, this adds PSR14 compliant (hopefully it won't change much until it is approved) dispatcher for our extension instead of current logic, this will transform:\r\n\r\n```php\r\n    public function update($object)\r\n    {\r\n        $this->preUpdate($object);\r\n        foreach ($this->extensions as $extension) {\r\n            $extension->preUpdate($this, $object);\r\n        }\r\n        \r\n        //...\r\n\r\n        $this->postUpdate($object);\r\n        foreach ($this->extensions as $extension) {\r\n            $extension->postUpdate($this, $object);\r\n        }\r\n        return $object;\r\n    }\r\n```\r\n\r\ninto:\r\n\r\n```php\r\npublic function update($object)\r\n    {\r\n        $this->preUpdate($object);\r\n        $this->extensionEmitter->dispatch(new PreUpdateMessage($this, $object));\r\n\r\n        //...\r\n\r\n         $this->postUpdate($object);\r\n         $this->extensionEmitter->dispatch(new PostUpdateMessage($this, $object));\r\n\r\n         return $object;\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/comments/416471831","html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/5199#issuecomment-416471831","issue_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/5199","id":416471831,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjQ3MTgzMQ==","user":{"login":"kunicmarko20","id":13528674,"node_id":"MDQ6VXNlcjEzNTI4Njc0","avatar_url":"https://avatars3.githubusercontent.com/u/13528674?v=4","gravatar_id":"","url":"https://api.github.com/users/kunicmarko20","html_url":"https://github.com/kunicmarko20","followers_url":"https://api.github.com/users/kunicmarko20/followers","following_url":"https://api.github.com/users/kunicmarko20/following{/other_user}","gists_url":"https://api.github.com/users/kunicmarko20/gists{/gist_id}","starred_url":"https://api.github.com/users/kunicmarko20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kunicmarko20/subscriptions","organizations_url":"https://api.github.com/users/kunicmarko20/orgs","repos_url":"https://api.github.com/users/kunicmarko20/repos","events_url":"https://api.github.com/users/kunicmarko20/events{/privacy}","received_events_url":"https://api.github.com/users/kunicmarko20/received_events","type":"User","site_admin":false},"created_at":"2018-08-28T06:54:39Z","updated_at":"2018-08-28T06:54:39Z","author_association":"MEMBER","body":"@sonata-project/contributors this is the second time my changes are gone, I have no idea what is going on with this PR."}}
{"actor":{"display_login":"kunicmarko20"}}