{"action":"created","issue":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2356","repository_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel","labels_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2356/labels{/name}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2356/comments","events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2356/events","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2356","id":333652602,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1ODEyODE1","number":2356,"title":"[WIP] EZEE-2081: Move NotificationBundle into Kernel","user":{"login":"ViniTou","id":19517274,"node_id":"MDQ6VXNlcjE5NTE3Mjc0","avatar_url":"https://avatars1.githubusercontent.com/u/19517274?v=4","gravatar_id":"","url":"https://api.github.com/users/ViniTou","html_url":"https://github.com/ViniTou","followers_url":"https://api.github.com/users/ViniTou/followers","following_url":"https://api.github.com/users/ViniTou/following{/other_user}","gists_url":"https://api.github.com/users/ViniTou/gists{/gist_id}","starred_url":"https://api.github.com/users/ViniTou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViniTou/subscriptions","organizations_url":"https://api.github.com/users/ViniTou/orgs","repos_url":"https://api.github.com/users/ViniTou/repos","events_url":"https://api.github.com/users/ViniTou/events{/privacy}","received_events_url":"https://api.github.com/users/ViniTou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-19T12:38:42Z","updated_at":"2018-06-25T06:54:19Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2356","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2356","diff_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2356.diff","patch_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2356.patch"},"body":"| Question           | Answer\r\n| ------------------ | ------------------\r\n| **JIRA issue**     | [EZEE-2081](https://jira.ez.no/browse/EZEE-2081)\r\n| **Bug/Improvement**| no\r\n| **New feature**    | yes\r\n| **Target version** | `master`\r\n| **BC breaks**      | yes (but only for notificationBundle)\r\n| **Tests pass**     | yes/no\r\n| **Doc needed**     | yes\r\n\r\nNotification Bundle is now moved into CoreBundle of EzPublishKernel. Basically this just moves code from NotificationBundle into new namespace + adds NotificationService into repository.\r\n\r\nplease, look at the file structure, services name and declarations. And docblocks.\r\nRelated PR:\r\nhttps://github.com/ezsystems/ezplatform-admin-ui/pull/518\r\n**TODO**:\r\n- [x] Implement feature / fix a bug.\r\n- [ ] Implement tests.\r\n- [x] Fix new code according to Coding Standards (`$ composer fix-cs`).\r\n- [x] Ask for Code Review.\r\n"},"comment":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/comments/399850620","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2356#issuecomment-399850620","issue_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2356","id":399850620,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTg1MDYyMA==","user":{"login":"ezrobot","id":681611,"node_id":"MDQ6VXNlcjY4MTYxMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/681611?v=4","gravatar_id":"","url":"https://api.github.com/users/ezrobot","html_url":"https://github.com/ezrobot","followers_url":"https://api.github.com/users/ezrobot/followers","following_url":"https://api.github.com/users/ezrobot/following{/other_user}","gists_url":"https://api.github.com/users/ezrobot/gists{/gist_id}","starred_url":"https://api.github.com/users/ezrobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezrobot/subscriptions","organizations_url":"https://api.github.com/users/ezrobot/orgs","repos_url":"https://api.github.com/users/ezrobot/repos","events_url":"https://api.github.com/users/ezrobot/events{/privacy}","received_events_url":"https://api.github.com/users/ezrobot/received_events","type":"User","site_admin":false},"created_at":"2018-06-25T06:54:19Z","updated_at":"2018-06-25T06:54:19Z","author_association":"CONTRIBUTOR","body":"Tool version : PHP CS Fixer 2.7.1 Sandy Pool by Fabien Potencier and Dariusz Ruminski\nCommand executed ```php-cs-fixer --dry-run -v fix ```\nThis Pull Request does not respect [PSR-2 Coding Standards](http://www.php-fig.org/psr/psr-2/), please, see the suggested diff below:\n\n```diff\ndiff --git a/eZ/Publish/Core/Persistence/Legacy/Notification/Gateway.php b/eZ/Publish/Core/Persistence/Legacy/Notification/Gateway.php\nindex 8bc8766..cd65c2f 100644\n--- a/eZ/Publish/Core/Persistence/Legacy/Notification/Gateway.php\n+++ b/eZ/Publish/Core/Persistence/Legacy/Notification/Gateway.php\n@@ -22,7 +22,7 @@ abstract class Gateway\n      *\n      * @return int\n      */\n-    public abstract function createNotification(Notification $notification): int;\n+    abstract public function createNotification(Notification $notification): int;\n \n     /**\n      * Get Notification by its id.\n@@ -31,7 +31,7 @@ abstract class Gateway\n      *\n      * @return array\n      */\n-    public abstract function getNotificationById(int $notificationId): array;\n+    abstract public function getNotificationById(int $notificationId): array;\n \n     /**\n      * Update Notification ValueObject in persistent storage.\n@@ -43,14 +43,14 @@ abstract class Gateway\n      *\n      * @throws \\eZ\\Publish\\Core\\Base\\Exceptions\\InvalidArgumentException\n      */\n-    public abstract function updateNotification(Notification $notification): void;\n+    abstract public function updateNotification(Notification $notification): void;\n \n     /**\n      * @param int $userId\n      *\n      * @return int\n      */\n-    public abstract function countUserNotifications(int $userId): int;\n+    abstract public function countUserNotifications(int $userId): int;\n \n     /**\n      * Count users unread Notifications.\n@@ -59,7 +59,7 @@ abstract class Gateway\n      *\n      * @return int\n      */\n-    public abstract function countUserPendingNotifications(int $userId): int;\n+    abstract public function countUserPendingNotifications(int $userId): int;\n \n     /**\n      * @param int $userId\n@@ -68,5 +68,5 @@ abstract class Gateway\n      *\n      * @return array\n      */\n-    public abstract function loadUserNotifications(int $userId, int $offset = 0, int $limit = -1): array;\n+    abstract public function loadUserNotifications(int $userId, int $offset = 0, int $limit = -1): array;\n }\ndiff --git a/eZ/Publish/Core/Persistence/Legacy/Notification/Handler.php b/eZ/Publish/Core/Persistence/Legacy/Notification/Handler.php\nindex ab0a394..0135b50 100644\n--- a/eZ/Publish/Core/Persistence/Legacy/Notification/Handler.php\n+++ b/eZ/Publish/Core/Persistence/Legacy/Notification/Handler.php\n@@ -8,7 +8,6 @@ declare(strict_types=1);\n \n namespace eZ\\Publish\\Core\\Persistence\\Legacy\\Notification;\n \n-use eZ\\Publish\\Core\\Persistence\\Legacy\\Notification\\Gateway\\DoctrineDatabase;\n use eZ\\Publish\\SPI\\Persistence\\Notification\\Handler as HandlerInterface;\n use eZ\\Publish\\SPI\\Persistence\\Notification\\Notification;\n use eZ\\Publish\\SPI\\Persistence\\Notification\\UpdateStruct;\n```\n"}}
{"actor":{"display_login":"ezrobot"}}