{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony/pulls/comments/174079155","pull_request_review_id":103369442,"id":174079155,"diff_hunk":"@@ -24,12 +24,17 @@ public function __construct(ReceiverInterface $decoratedReceiver, int $maximumNu\n         $this->maximumNumberOfMessages = $maximumNumberOfMessages;\n     }\n \n-    public function receive(): iterable\n+    public function receive(): \\Generator\n     {\n+        $generator = $this->decoratedReceiver->receive();\n         $receivedMessages = 0;\n \n-        foreach ($this->decoratedReceiver->receive() as $message) {\n-            yield $message;\n+        foreach ($generator as $message) {\n+            try {\n+                yield $message;\n+            } catch (\\Throwable $e) {\n+                $generator->throw($e);","path":"src/Symfony/Component/Message/Transport/Enhancers/MaximumCountReceiver.php","position":36,"original_position":16,"commit_id":"0f76918d4420eb19e3eb851de1e74daa5b10ddbd","original_commit_id":"0f76918d4420eb19e3eb851de1e74daa5b10ddbd","user":{"login":"ro0NL","id":1047696,"avatar_url":"https://avatars0.githubusercontent.com/u/1047696?v=4","gravatar_id":"","url":"https://api.github.com/users/ro0NL","html_url":"https://github.com/ro0NL","followers_url":"https://api.github.com/users/ro0NL/followers","following_url":"https://api.github.com/users/ro0NL/following{/other_user}","gists_url":"https://api.github.com/users/ro0NL/gists{/gist_id}","starred_url":"https://api.github.com/users/ro0NL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ro0NL/subscriptions","organizations_url":"https://api.github.com/users/ro0NL/orgs","repos_url":"https://api.github.com/users/ro0NL/repos","events_url":"https://api.github.com/users/ro0NL/events{/privacy}","received_events_url":"https://api.github.com/users/ro0NL/received_events","type":"User","site_admin":false},"body":"what abou an instanceof check here, to preserve `iterable`? ","created_at":"2018-03-13T10:26:33Z","updated_at":"2018-03-13T10:26:33Z","html_url":"https://github.com/symfony/symfony/pull/24411#discussion_r174079155","pull_request_url":"https://api.github.com/repos/symfony/symfony/pulls/24411","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments/174079155"},"html":{"href":"https://github.com/symfony/symfony/pull/24411#discussion_r174079155"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony/pulls/24411"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/24411","id":144471223,"html_url":"https://github.com/symfony/symfony/pull/24411","diff_url":"https://github.com/symfony/symfony/pull/24411.diff","patch_url":"https://github.com/symfony/symfony/pull/24411.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/24411","number":24411,"state":"open","locked":false,"title":"[Message] Add a new Message component","user":{"login":"sroze","id":804625,"avatar_url":"https://avatars0.githubusercontent.com/u/804625?v=4","gravatar_id":"","url":"https://api.github.com/users/sroze","html_url":"https://github.com/sroze","followers_url":"https://api.github.com/users/sroze/followers","following_url":"https://api.github.com/users/sroze/following{/other_user}","gists_url":"https://api.github.com/users/sroze/gists{/gist_id}","starred_url":"https://api.github.com/users/sroze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sroze/subscriptions","organizations_url":"https://api.github.com/users/sroze/orgs","repos_url":"https://api.github.com/users/sroze/repos","events_url":"https://api.github.com/users/sroze/events{/privacy}","received_events_url":"https://api.github.com/users/sroze/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | master\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | #24326\r\n| License       | MIT\r\n| Doc PR        | [within the PR for now](https://github.com/sroze/symfony/blob/add-message-component/src/Symfony/Component/Message/README.md)\r\n\r\nAs discussed in #24326. This PR is to help going forward with the discussions of having a Message component. \r\n\r\n# Resources\r\n\r\n| What | Where\r\n| --- | ---\r\n| Documentation | [In the PR](https://github.com/sroze/symfony/blob/add-message-component/src/Symfony/Component/Message/README.md)\r\n| Demo | [In `sroze/symfony-demo:message-component-demo`](https://github.com/sroze/symfony-demo/compare/message-component-demo)\r\n| [php-enqueue](https://github.com/php-enqueue/enqueue-dev) adapter | 1. Source: [In `sroze/enqueue-bridge`](https://github.com/sroze/enqueue-bridge) _(to be moved as `symfony/enqueue-bridge` I guess)_<br/>2. Demo: [In `sroze/symfony-demo:message-component-demo-with-enqueue`](https://github.com/sroze/symfony-demo/compare/message-component-demo...sroze:message-component-demo-with-enqueue)\r\n| [Swarrot](https://github.com/swarrot/swarrot) adapter | **Outdated adapter, waiting for stabilization** 1. Source: [In `sroze/swarrot-bridge`](https://github.com/sroze/swarrot-bridge) _(to be moved as `symfony/swarrot-bridge` I guess)_<br/>2. Demo: [In `sroze/symfony-demo:message-component-demo-with-swarrot`](https://github.com/sroze/symfony-demo/compare/message-component-demo...sroze:message-component-demo-with-swarrot)\r\n| [HTTP](https://github.com/sroze/message-http-adapter) adapter | **Outdated adapter, waiting for stabilization** 1. Source: [In `sroze/message-http-adapter`](https://github.com/sroze/message-http-adapter) <br/>2. Demo: [In `sroze/symfony-demo:message-component-demo-with-http-adapter`](https://github.com/sroze/symfony-demo/compare/message-component-demo...sroze:message-component-demo-with-http-adapter)\r\n| Web profiler integration | _In the pull-request_\r\n\r\n# Important points\r\n\r\n1. **Tests are not in the PR as they were written in PhpSpec & Behat.** If we decide to go forward with this approach, I'll translate them to PHPUnit.\r\n2. The aim is not to solve all the message/queuing problems but provide a good, simple and extensible message bus for developers.\r\n3. The communication with the actual AMQP/API brokers is down to the adapters for now. Not sure if we need to ship some by default or not 🤔 \r\n\r\nI guess that this would replace #23842 & #23315.\r\n\r\n# Changes from the proposals\r\n\r\nBased on the comments, a few changes have been made from the proposal.\r\n\r\n1. `MessageProducer`s have been renamed to `MessageSender`s\r\n2. `MessageConsumer`s have been renamed to `MessageReceiver`s\r\n  ","created_at":"2017-10-03T16:39:23Z","updated_at":"2018-03-13T10:26:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f43123b2b30a16baa4864f6cd4b4def2e01565da","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":864126276,"url":"https://api.github.com/repos/symfony/symfony/labels/:snowflake:%20Feature%20Freeze","name":":snowflake: Feature Freeze","color":"F2F8FD","default":false},{"id":100378,"url":"https://api.github.com/repos/symfony/symfony/labels/Feature","name":"Feature","color":"02e10c","default":false},{"id":238909857,"url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Needs%20Work","name":"Status: Needs Work","color":"fad8c7","default":false}],"milestone":{"url":"https://api.github.com/repos/symfony/symfony/milestones/17","html_url":"https://github.com/symfony/symfony/milestone/17","labels_url":"https://api.github.com/repos/symfony/symfony/milestones/17/labels","id":2795131,"number":17,"title":"4.1","description":"https://symfony.com/roadmap?version=4.1#checker","creator":{"login":"nicolas-grekas","id":243674,"avatar_url":"https://avatars3.githubusercontent.com/u/243674?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolas-grekas","html_url":"https://github.com/nicolas-grekas","followers_url":"https://api.github.com/users/nicolas-grekas/followers","following_url":"https://api.github.com/users/nicolas-grekas/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-grekas/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-grekas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-grekas/subscriptions","organizations_url":"https://api.github.com/users/nicolas-grekas/orgs","repos_url":"https://api.github.com/users/nicolas-grekas/repos","events_url":"https://api.github.com/users/nicolas-grekas/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-grekas/received_events","type":"User","site_admin":false},"open_issues":140,"closed_issues":198,"state":"open","created_at":"2017-09-26T15:40:00Z","updated_at":"2018-03-13T10:01:40Z","due_on":"2018-05-31T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/24411/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/24411/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/24411/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/0f76918d4420eb19e3eb851de1e74daa5b10ddbd","head":{"label":"sroze:add-message-component","ref":"add-message-component","sha":"0f76918d4420eb19e3eb851de1e74daa5b10ddbd","user":{"login":"sroze","id":804625,"avatar_url":"https://avatars0.githubusercontent.com/u/804625?v=4","gravatar_id":"","url":"https://api.github.com/users/sroze","html_url":"https://github.com/sroze","followers_url":"https://api.github.com/users/sroze/followers","following_url":"https://api.github.com/users/sroze/following{/other_user}","gists_url":"https://api.github.com/users/sroze/gists{/gist_id}","starred_url":"https://api.github.com/users/sroze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sroze/subscriptions","organizations_url":"https://api.github.com/users/sroze/orgs","repos_url":"https://api.github.com/users/sroze/repos","events_url":"https://api.github.com/users/sroze/events{/privacy}","received_events_url":"https://api.github.com/users/sroze/received_events","type":"User","site_admin":false},"repo":{"id":15307551,"name":"symfony","full_name":"sroze/symfony","owner":{"login":"sroze","id":804625,"avatar_url":"https://avatars0.githubusercontent.com/u/804625?v=4","gravatar_id":"","url":"https://api.github.com/users/sroze","html_url":"https://github.com/sroze","followers_url":"https://api.github.com/users/sroze/followers","following_url":"https://api.github.com/users/sroze/following{/other_user}","gists_url":"https://api.github.com/users/sroze/gists{/gist_id}","starred_url":"https://api.github.com/users/sroze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sroze/subscriptions","organizations_url":"https://api.github.com/users/sroze/orgs","repos_url":"https://api.github.com/users/sroze/repos","events_url":"https://api.github.com/users/sroze/events{/privacy}","received_events_url":"https://api.github.com/users/sroze/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sroze/symfony","description":"The Symfony PHP framework","fork":true,"url":"https://api.github.com/repos/sroze/symfony","forks_url":"https://api.github.com/repos/sroze/symfony/forks","keys_url":"https://api.github.com/repos/sroze/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sroze/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sroze/symfony/teams","hooks_url":"https://api.github.com/repos/sroze/symfony/hooks","issue_events_url":"https://api.github.com/repos/sroze/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/sroze/symfony/events","assignees_url":"https://api.github.com/repos/sroze/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/sroze/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/sroze/symfony/tags","blobs_url":"https://api.github.com/repos/sroze/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sroze/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sroze/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/sroze/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sroze/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/sroze/symfony/languages","stargazers_url":"https://api.github.com/repos/sroze/symfony/stargazers","contributors_url":"https://api.github.com/repos/sroze/symfony/contributors","subscribers_url":"https://api.github.com/repos/sroze/symfony/subscribers","subscription_url":"https://api.github.com/repos/sroze/symfony/subscription","commits_url":"https://api.github.com/repos/sroze/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/sroze/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/sroze/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/sroze/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/sroze/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/sroze/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sroze/symfony/merges","archive_url":"https://api.github.com/repos/sroze/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sroze/symfony/downloads","issues_url":"https://api.github.com/repos/sroze/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/sroze/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/sroze/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/sroze/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sroze/symfony/labels{/name}","releases_url":"https://api.github.com/repos/sroze/symfony/releases{/id}","deployments_url":"https://api.github.com/repos/sroze/symfony/deployments","created_at":"2013-12-19T09:28:20Z","updated_at":"2015-03-16T09:50:25Z","pushed_at":"2018-03-13T10:13:10Z","git_url":"git://github.com/sroze/symfony.git","ssh_url":"git@github.com:sroze/symfony.git","clone_url":"https://github.com/sroze/symfony.git","svn_url":"https://github.com/sroze/symfony","homepage":"symfony.com","size":108930,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"symfony:master","ref":"master","sha":"9e82562948253bf547243aa1c4cf6ec734d608da","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars3.githubusercontent.com/u/143937?v=4","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":458058,"name":"symfony","full_name":"symfony/symfony","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars3.githubusercontent.com/u/143937?v=4","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony","description":"The Symfony PHP framework","fork":false,"url":"https://api.github.com/repos/symfony/symfony","forks_url":"https://api.github.com/repos/symfony/symfony/forks","keys_url":"https://api.github.com/repos/symfony/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony/teams","hooks_url":"https://api.github.com/repos/symfony/symfony/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony/events","assignees_url":"https://api.github.com/repos/symfony/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony/tags","blobs_url":"https://api.github.com/repos/symfony/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony/subscription","commits_url":"https://api.github.com/repos/symfony/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony/merges","archive_url":"https://api.github.com/repos/symfony/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony/downloads","issues_url":"https://api.github.com/repos/symfony/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony/releases{/id}","deployments_url":"https://api.github.com/repos/symfony/symfony/deployments","created_at":"2010-01-04T14:21:21Z","updated_at":"2018-03-13T07:42:19Z","pushed_at":"2018-03-13T10:13:13Z","git_url":"git://github.com/symfony/symfony.git","ssh_url":"git@github.com:symfony/symfony.git","clone_url":"https://github.com/symfony/symfony.git","svn_url":"https://github.com/symfony/symfony","homepage":"https://symfony.com","size":114493,"stargazers_count":16948,"watchers_count":16948,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":6088,"mirror_url":null,"archived":false,"open_issues_count":852,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":6088,"open_issues":852,"watchers":16948,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/24411"},"html":{"href":"https://github.com/symfony/symfony/pull/24411"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/24411"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/24411/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/24411/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/24411/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/0f76918d4420eb19e3eb851de1e74daa5b10ddbd"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ro0NL"}}