{"action":"created","issue":{"url":"https://api.github.com/repos/sebastianbergmann/phpunit/issues/3186","repository_url":"https://api.github.com/repos/sebastianbergmann/phpunit","labels_url":"https://api.github.com/repos/sebastianbergmann/phpunit/issues/3186/labels{/name}","comments_url":"https://api.github.com/repos/sebastianbergmann/phpunit/issues/3186/comments","events_url":"https://api.github.com/repos/sebastianbergmann/phpunit/issues/3186/events","html_url":"https://github.com/sebastianbergmann/phpunit/pull/3186","id":336170645,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3Njg2OTcw","number":3186,"title":"Add support for checking subsets that contain duplicate values to ArraySubset","user":{"login":"pfrenssen","id":442924,"node_id":"MDQ6VXNlcjQ0MjkyNA==","avatar_url":"https://avatars0.githubusercontent.com/u/442924?v=4","gravatar_id":"","url":"https://api.github.com/users/pfrenssen","html_url":"https://github.com/pfrenssen","followers_url":"https://api.github.com/users/pfrenssen/followers","following_url":"https://api.github.com/users/pfrenssen/following{/other_user}","gists_url":"https://api.github.com/users/pfrenssen/gists{/gist_id}","starred_url":"https://api.github.com/users/pfrenssen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfrenssen/subscriptions","organizations_url":"https://api.github.com/users/pfrenssen/orgs","repos_url":"https://api.github.com/users/pfrenssen/repos","events_url":"https://api.github.com/users/pfrenssen/events{/privacy}","received_events_url":"https://api.github.com/users/pfrenssen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-06-27T10:30:48Z","updated_at":"2019-01-04T10:10:14Z","closed_at":"2018-08-07T06:42:59Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/sebastianbergmann/phpunit/pulls/3186","html_url":"https://github.com/sebastianbergmann/phpunit/pull/3186","diff_url":"https://github.com/sebastianbergmann/phpunit/pull/3186.diff","patch_url":"https://github.com/sebastianbergmann/phpunit/pull/3186.patch"},"body":"In #3161 support was added for checking indexed arrays in `ArraySubset`. The edge case of checking subsets that contain multiple identical values was left out of the scope of that PR. This means that in the current implementation the following example will generate a false positive:\r\n\r\n* Array: `[0, 1, 2, 3]`\r\n* Subset: `[0, 1, 1, 2]`\r\n* Expected result: `FALSE` since the value `1` is only present once in the array, but twice in the subset.\r\n* Actual result: `TRUE`\r\n\r\nThis PR adds support for this edge case, so that it will become possible to check subsets with duplicate values."},"comment":{"url":"https://api.github.com/repos/sebastianbergmann/phpunit/issues/comments/451403752","html_url":"https://github.com/sebastianbergmann/phpunit/pull/3186#issuecomment-451403752","issue_url":"https://api.github.com/repos/sebastianbergmann/phpunit/issues/3186","id":451403752,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTQwMzc1Mg==","user":{"login":"kmbt","id":2975117,"node_id":"MDQ6VXNlcjI5NzUxMTc=","avatar_url":"https://avatars0.githubusercontent.com/u/2975117?v=4","gravatar_id":"","url":"https://api.github.com/users/kmbt","html_url":"https://github.com/kmbt","followers_url":"https://api.github.com/users/kmbt/followers","following_url":"https://api.github.com/users/kmbt/following{/other_user}","gists_url":"https://api.github.com/users/kmbt/gists{/gist_id}","starred_url":"https://api.github.com/users/kmbt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmbt/subscriptions","organizations_url":"https://api.github.com/users/kmbt/orgs","repos_url":"https://api.github.com/users/kmbt/repos","events_url":"https://api.github.com/users/kmbt/events{/privacy}","received_events_url":"https://api.github.com/users/kmbt/received_events","type":"User","site_admin":false},"created_at":"2019-01-04T10:10:14Z","updated_at":"2019-01-04T10:10:14Z","author_association":"NONE","body":"Having some background in mathematics and also in python programming language I find this way of thinking really confusing.\r\n\r\nIn mathematical set theory, an object just may be or may not be a member of a set. In set theory there is no concept of an object being a member \"more than once\" of a set.\r\n\r\nThis reasoning is applied in python, where the following expression evaluates as `True`:\r\n```\r\nset([[0, 1, 1, 2]) == set([0, 1, 2])\r\n```\r\n\r\nPlease kindly take my remarks into your consideration.\r\n"}}
{"actor":{"display_login":"kmbt"}}