{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/28500","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/28500/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/28500/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/28500/events","html_url":"https://github.com/symfony/symfony/issues/28500","id":361180225,"node_id":"MDU6SXNzdWUzNjExODAyMjU=","number":28500,"title":"NumberToLocalizedStringTransformer incorrect reverseTransform","user":{"login":"koutja","id":26272443,"node_id":"MDQ6VXNlcjI2MjcyNDQz","avatar_url":"https://avatars0.githubusercontent.com/u/26272443?v=4","gravatar_id":"","url":"https://api.github.com/users/koutja","html_url":"https://github.com/koutja","followers_url":"https://api.github.com/users/koutja/followers","following_url":"https://api.github.com/users/koutja/following{/other_user}","gists_url":"https://api.github.com/users/koutja/gists{/gist_id}","starred_url":"https://api.github.com/users/koutja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koutja/subscriptions","organizations_url":"https://api.github.com/users/koutja/orgs","repos_url":"https://api.github.com/users/koutja/repos","events_url":"https://api.github.com/users/koutja/events{/privacy}","received_events_url":"https://api.github.com/users/koutja/received_events","type":"User","site_admin":false},"labels":[{"id":100079,"node_id":"MDU6TGFiZWwxMDAwNzk=","url":"https://api.github.com/repos/symfony/symfony/labels/Bug","name":"Bug","color":"e10c02","default":false},{"id":99594,"node_id":"MDU6TGFiZWw5OTU5NA==","url":"https://api.github.com/repos/symfony/symfony/labels/Form","name":"Form","color":"DDDDDD","default":false},{"id":520300257,"node_id":"MDU6TGFiZWw1MjAzMDAyNTc=","url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Waiting%20feedback","name":"Status: Waiting feedback","color":"fef2c0","default":false},{"id":2932845,"node_id":"MDU6TGFiZWwyOTMyODQ1","url":"https://api.github.com/repos/symfony/symfony/labels/Unconfirmed","name":"Unconfirmed","color":"444444","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-09-18T07:58:12Z","updated_at":"2018-09-18T10:46:03Z","closed_at":null,"author_association":"NONE","body":"**Symfony version(s) affected**: 3.4.15\r\nPHP 7.2\r\n\r\n**Description**  \r\n\r\nUnable to reverse value for property path \"foo\": The number contains unrecognized characters: \".\"\r\nwhen valeu equal '239.' or other string contains number with dot in end. \r\nIt was happend in class Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer when call method reverseTransform\r\n\r\n<!-- A clear and concise description of the problem. -->\r\n\r\n**How to reproduce**  \r\n\r\n1. Create form like this\r\n```\r\n    public function buildForm(FormBuilderInterface $builder, array $options)\r\n    {\r\n        $builder->add('foo', NumberType::class, ['required' => false]);\r\n    }\r\n```\r\n\r\n2.  submit values and check valid\r\n```\r\n$form->submit([\r\n    'foo' => '239.'\r\n]);\r\nif (!$form->isValid()){\r\n    echo 'form is not valid';\r\n}\r\n```\r\nOR \r\n```\r\n$transformer = NumberToLocalizedStringTransformer();\r\n$transformer->reverseTransform('239.');\r\n```\r\n\r\n<!-- Code and/or config needed to reproduce the problem. If it's a complex bug,\r\n     create a \"bug reproducer\" as explained in:\r\n     https://symfony.com/doc/current/contributing/code/reproducer.html -->\r\n\r\n**Possible Solution**  \r\n<!--- Optional: only if you have suggestions on a fix/reason for the bug -->\r\n\r\n**Additional context**  \r\n<!-- Optional: any other context about the problem: log messages, screenshots, etc. -->\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/422345765","html_url":"https://github.com/symfony/symfony/issues/28500#issuecomment-422345765","issue_url":"https://api.github.com/repos/symfony/symfony/issues/28500","id":422345765,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjM0NTc2NQ==","user":{"login":"koutja","id":26272443,"node_id":"MDQ6VXNlcjI2MjcyNDQz","avatar_url":"https://avatars0.githubusercontent.com/u/26272443?v=4","gravatar_id":"","url":"https://api.github.com/users/koutja","html_url":"https://github.com/koutja","followers_url":"https://api.github.com/users/koutja/followers","following_url":"https://api.github.com/users/koutja/following{/other_user}","gists_url":"https://api.github.com/users/koutja/gists{/gist_id}","starred_url":"https://api.github.com/users/koutja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koutja/subscriptions","organizations_url":"https://api.github.com/users/koutja/orgs","repos_url":"https://api.github.com/users/koutja/repos","events_url":"https://api.github.com/users/koutja/events{/privacy}","received_events_url":"https://api.github.com/users/koutja/received_events","type":"User","site_admin":false},"created_at":"2018-09-18T10:46:03Z","updated_at":"2018-09-18T10:46:03Z","author_association":"NONE","body":"dump\r\n`NumberToLocalizedStringTransformer.php on line 210:\r\narray:7 [\r\n  \"$result\" => 239.0\r\n  \"$remainder\" => \".\"\r\n  \"$position\" => 3\r\n  \"$length\" => NumberFormatter {#1415\r\n    #errorCode: 0\r\n    #errorMessage: \"U_ZERO_ERROR\"\r\n    -style: 1\r\n    -attributes: array:3 [\r\n      8 => 0\r\n      1 => 0\r\n      11 => 4\r\n    ]\r\n    -initializedAttributes: array:1 [\r\n      1 => true\r\n    ]\r\n  }\r\n  \"$groupSep\" => \",\"\r\n  \"$decSep\" => \".\"\r\n  \"$encoding\" => \"ASCII\"\r\n]\r\nNumberToLocalizedStringTransformer.php on line 212:\r\nNumberToLocalizedStringTransformer {#1377\r\n  #grouping: false\r\n  #roundingMode: 6\r\n  -scale: null\r\n}`"}}
{"actor":{"display_login":"koutja"}}