{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/28703","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/28703/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/28703/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/28703/events","html_url":"https://github.com/symfony/symfony/issues/28703","id":366298562,"node_id":"MDU6SXNzdWUzNjYyOTg1NjI=","number":28703,"title":"[Form] Do not fail reverse transforming relative dates","user":{"login":"trompette","id":181746,"node_id":"MDQ6VXNlcjE4MTc0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/181746?v=4","gravatar_id":"","url":"https://api.github.com/users/trompette","html_url":"https://github.com/trompette","followers_url":"https://api.github.com/users/trompette/followers","following_url":"https://api.github.com/users/trompette/following{/other_user}","gists_url":"https://api.github.com/users/trompette/gists{/gist_id}","starred_url":"https://api.github.com/users/trompette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trompette/subscriptions","organizations_url":"https://api.github.com/users/trompette/orgs","repos_url":"https://api.github.com/users/trompette/repos","events_url":"https://api.github.com/users/trompette/events{/privacy}","received_events_url":"https://api.github.com/users/trompette/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":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":null,"comments":17,"created_at":"2018-10-03T11:44:18Z","updated_at":"2018-10-04T12:02:50Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Description**  \r\n\r\nSince [v2.8.46](https://github.com/symfony/symfony/releases/tag/v2.8.46), relative dates are not supported anymore by `DateTimeType`.\r\n\r\nI am guessing this is because of the patches :\r\n- bug #28466 [Form] fail reverse transforming invalid RFC 3339 dates\r\n- bug #28372 [Form] Fix DateTimeType html5 input format\r\n\r\nIt would be great to introduce the feature again by adding a dedicated value of the `format` option, or anything better you can think of.\r\n\r\n**Example**  \r\n\r\nAt @lrqdo, the relative dates are helping us simplify our Behat scenarios.\r\n\r\nHere is an example of a Behat scenario failing on v2.8.46:\r\n\r\n```gherkin\r\nWhen I send a POST request to \"/endpoint\" with values:\r\n  | distributionDate | +14 days |\r\nThen the response code should be 200\r\n  Failed asserting that 400 is identical to 200.\r\n```\r\n\r\nHere is the form type we wrote:\r\n\r\n```php\r\npublic function buildForm(FormBuilderInterface $builder, array $options)\r\n{\r\n    $builder->add(\r\n        'distributionDate',\r\n        DateTimeType::class,\r\n        array(\r\n            'widget' => 'single_text',\r\n        )\r\n    );\r\n}\r\n```\r\n\r\nAnd here is the detailed error we get:\r\n\r\n![image](https://user-images.githubusercontent.com/181746/46359058-a90e8680-c668-11e8-8f2c-5b3fae984558.png)\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/426992787","html_url":"https://github.com/symfony/symfony/issues/28703#issuecomment-426992787","issue_url":"https://api.github.com/repos/symfony/symfony/issues/28703","id":426992787,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjk5Mjc4Nw==","user":{"login":"horlyk","id":14296691,"node_id":"MDQ6VXNlcjE0Mjk2Njkx","avatar_url":"https://avatars2.githubusercontent.com/u/14296691?v=4","gravatar_id":"","url":"https://api.github.com/users/horlyk","html_url":"https://github.com/horlyk","followers_url":"https://api.github.com/users/horlyk/followers","following_url":"https://api.github.com/users/horlyk/following{/other_user}","gists_url":"https://api.github.com/users/horlyk/gists{/gist_id}","starred_url":"https://api.github.com/users/horlyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/horlyk/subscriptions","organizations_url":"https://api.github.com/users/horlyk/orgs","repos_url":"https://api.github.com/users/horlyk/repos","events_url":"https://api.github.com/users/horlyk/events{/privacy}","received_events_url":"https://api.github.com/users/horlyk/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T12:02:50Z","updated_at":"2018-10-04T12:02:50Z","author_association":"NONE","body":"@xabbuh great!"}}
{"actor":{"display_login":"horlyk"}}