{"action":"created","issue":{"url":"https://api.github.com/repos/Wisembly/AMQPBundle/issues/47","repository_url":"https://api.github.com/repos/Wisembly/AMQPBundle","labels_url":"https://api.github.com/repos/Wisembly/AMQPBundle/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/Wisembly/AMQPBundle/issues/47/comments","events_url":"https://api.github.com/repos/Wisembly/AMQPBundle/issues/47/events","html_url":"https://github.com/Wisembly/AMQPBundle/pull/47","id":293172339,"number":47,"title":"add a int casting for the memory limit option","user":{"login":"krichprollsch","id":562696,"avatar_url":"https://avatars2.githubusercontent.com/u/562696?v=4","gravatar_id":"","url":"https://api.github.com/users/krichprollsch","html_url":"https://github.com/krichprollsch","followers_url":"https://api.github.com/users/krichprollsch/followers","following_url":"https://api.github.com/users/krichprollsch/following{/other_user}","gists_url":"https://api.github.com/users/krichprollsch/gists{/gist_id}","starred_url":"https://api.github.com/users/krichprollsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krichprollsch/subscriptions","organizations_url":"https://api.github.com/users/krichprollsch/orgs","repos_url":"https://api.github.com/users/krichprollsch/repos","events_url":"https://api.github.com/users/krichprollsch/events{/privacy}","received_events_url":"https://api.github.com/users/krichprollsch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"krichprollsch","id":562696,"avatar_url":"https://avatars2.githubusercontent.com/u/562696?v=4","gravatar_id":"","url":"https://api.github.com/users/krichprollsch","html_url":"https://github.com/krichprollsch","followers_url":"https://api.github.com/users/krichprollsch/followers","following_url":"https://api.github.com/users/krichprollsch/following{/other_user}","gists_url":"https://api.github.com/users/krichprollsch/gists{/gist_id}","starred_url":"https://api.github.com/users/krichprollsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krichprollsch/subscriptions","organizations_url":"https://api.github.com/users/krichprollsch/orgs","repos_url":"https://api.github.com/users/krichprollsch/repos","events_url":"https://api.github.com/users/krichprollsch/events{/privacy}","received_events_url":"https://api.github.com/users/krichprollsch/received_events","type":"User","site_admin":false},"assignees":[{"login":"krichprollsch","id":562696,"avatar_url":"https://avatars2.githubusercontent.com/u/562696?v=4","gravatar_id":"","url":"https://api.github.com/users/krichprollsch","html_url":"https://github.com/krichprollsch","followers_url":"https://api.github.com/users/krichprollsch/followers","following_url":"https://api.github.com/users/krichprollsch/following{/other_user}","gists_url":"https://api.github.com/users/krichprollsch/gists{/gist_id}","starred_url":"https://api.github.com/users/krichprollsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krichprollsch/subscriptions","organizations_url":"https://api.github.com/users/krichprollsch/orgs","repos_url":"https://api.github.com/users/krichprollsch/repos","events_url":"https://api.github.com/users/krichprollsch/events{/privacy}","received_events_url":"https://api.github.com/users/krichprollsch/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-01-31T14:14:08Z","updated_at":"2018-02-02T07:43:57Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/Wisembly/AMQPBundle/pulls/47","html_url":"https://github.com/Wisembly/AMQPBundle/pull/47","diff_url":"https://github.com/Wisembly/AMQPBundle/pull/47.diff","patch_url":"https://github.com/Wisembly/AMQPBundle/pull/47.patch"},"body":"The memory limit must be an `int` but the command line gives a `string`:\r\n\r\n```\r\n$ php bin/console amqp:consume foo --memory-limit=50\r\n13:57:23 ERROR     [console] Error thrown while running command \"amqp:consume foo --memory-limit=50\". Message: \"The option \"memory_limit\" with value \"50\" is expected to be of type \"integer\" or \"null\", but is of type \"string\".\" [\"error\" => Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException { …},\"command\" => \"amqp:consume foo --memory-limit=50\",\"message\" => \"The option \"memory_limit\" with value \"50\" is expected to be of type \"integer\" or \"null\", but is of type \"string\".\"][]\r\n\r\nIn OptionsResolver.php line 788:\r\n                                                                                                       \r\n  The option \"memory_limit\" with value \"50\" is expected to be of type \"integer\" or \"null\", but is of   \r\n  type \"string\".                                                                                       \r\n```\r\n\r\nWe have to pass an `int` or `null`. So I decide to cast first, then set `null` if the result is `0`.\r\nIndeed, `0` will always kill the consumer, it's a bad configuration value (see https://github.com/swarrot/swarrot/blob/master/src/Swarrot/Processor/MemoryLimit/MemoryLimitProcessor.php#L41)"},"comment":{"url":"https://api.github.com/repos/Wisembly/AMQPBundle/issues/comments/362510405","html_url":"https://github.com/Wisembly/AMQPBundle/pull/47#issuecomment-362510405","issue_url":"https://api.github.com/repos/Wisembly/AMQPBundle/issues/47","id":362510405,"user":{"login":"krichprollsch","id":562696,"avatar_url":"https://avatars2.githubusercontent.com/u/562696?v=4","gravatar_id":"","url":"https://api.github.com/users/krichprollsch","html_url":"https://github.com/krichprollsch","followers_url":"https://api.github.com/users/krichprollsch/followers","following_url":"https://api.github.com/users/krichprollsch/following{/other_user}","gists_url":"https://api.github.com/users/krichprollsch/gists{/gist_id}","starred_url":"https://api.github.com/users/krichprollsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krichprollsch/subscriptions","organizations_url":"https://api.github.com/users/krichprollsch/orgs","repos_url":"https://api.github.com/users/krichprollsch/repos","events_url":"https://api.github.com/users/krichprollsch/events{/privacy}","received_events_url":"https://api.github.com/users/krichprollsch/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T07:43:57Z","updated_at":"2018-02-02T07:43:57Z","author_association":"MEMBER","body":"@Taluu PR updated. WDYT now?"}}
{"actor":{"display_login":"krichprollsch"}}