{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/28649","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/28649/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/28649/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/28649/events","html_url":"https://github.com/symfony/symfony/pull/28649","id":365217886,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5MjAwNjQ4","number":28649,"title":"[Form] FormErrorIterator do not filter only with Constraint causes ","user":{"login":"gmponos","id":5675248,"node_id":"MDQ6VXNlcjU2NzUyNDg=","avatar_url":"https://avatars1.githubusercontent.com/u/5675248?v=4","gravatar_id":"","url":"https://api.github.com/users/gmponos","html_url":"https://github.com/gmponos","followers_url":"https://api.github.com/users/gmponos/followers","following_url":"https://api.github.com/users/gmponos/following{/other_user}","gists_url":"https://api.github.com/users/gmponos/gists{/gist_id}","starred_url":"https://api.github.com/users/gmponos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmponos/subscriptions","organizations_url":"https://api.github.com/users/gmponos/orgs","repos_url":"https://api.github.com/users/gmponos/repos","events_url":"https://api.github.com/users/gmponos/events{/privacy}","received_events_url":"https://api.github.com/users/gmponos/received_events","type":"User","site_admin":false},"labels":[{"id":100378,"node_id":"MDU6TGFiZWwxMDAzNzg=","url":"https://api.github.com/repos/symfony/symfony/labels/Feature","name":"Feature","color":"02e10c","default":false},{"id":99594,"node_id":"MDU6TGFiZWw5OTU5NA==","url":"https://api.github.com/repos/symfony/symfony/labels/Form","name":"Form","color":"DDDDDD","default":false},{"id":237003792,"node_id":"MDU6TGFiZWwyMzcwMDM3OTI=","url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/symfony/symfony/milestones/18","html_url":"https://github.com/symfony/symfony/milestone/18","labels_url":"https://api.github.com/repos/symfony/symfony/milestones/18/labels","id":3234645,"node_id":"MDk6TWlsZXN0b25lMzIzNDY0NQ==","number":18,"title":"next","description":"https://symfony.com/roadmap?version=4.2#checker","creator":{"login":"nicolas-grekas","id":243674,"node_id":"MDQ6VXNlcjI0MzY3NA==","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":148,"closed_issues":333,"state":"open","created_at":"2018-04-02T12:03:21Z","updated_at":"2018-10-21T06:57:51Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2018-09-30T11:39:08Z","updated_at":"2018-10-21T11:54:43Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/28649","html_url":"https://github.com/symfony/symfony/pull/28649","diff_url":"https://github.com/symfony/symfony/pull/28649.diff","patch_url":"https://github.com/symfony/symfony/pull/28649.patch"},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | master for features\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| License       | MIT\r\n| Doc PR        | symfony/symfony-docs\r\n\r\nI made this PR based on [this](https://github.com/symfony/symfony/pull/28564#discussion_r219699798)\r\n\r\nIn general I believe that the FormError object should be strict on the type of the Cause. It should either be a `ConstraintViolation` object an object that implements `toString` function or a simple string and this should be checked during the construction of the FormError. For me it's too vague what a cause argument is and what `findByCodes` does.. Althought this PR does not check anything on the construction of the FormError object this can be the first step.\r\n\r\nI will add tests later if you agree with this PR. Let me know. 😄 \r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/431662710","html_url":"https://github.com/symfony/symfony/pull/28649#issuecomment-431662710","issue_url":"https://api.github.com/repos/symfony/symfony/issues/28649","id":431662710,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTY2MjcxMA==","user":{"login":"ro0NL","id":1047696,"node_id":"MDQ6VXNlcjEwNDc2OTY=","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},"created_at":"2018-10-21T11:54:43Z","updated_at":"2018-10-21T11:54:43Z","author_association":"CONTRIBUTOR","body":"> We could also think about having a filter()\r\n\r\nalso see https://github.com/symfony/symfony/pull/19496#discussion_r80360692. Im curious about the proposed API, as we avoid the callback to have convenient API today. Now just provide more meaning to \"code\" in the form component (e.g. if the cause is scalar-ish; it's a code).\r\n\r\nOther filters fit foreach IMHO."}}
{"actor":{"display_login":"ro0NL"}}