{"action":"opened","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/16206","labels_url":"https://api.github.com/repos/symfony/symfony/issues/16206/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/16206/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/16206/events","html_url":"https://github.com/symfony/symfony/issues/16206","id":110866940,"number":16206,"title":"RedirectToRoute with optional parameters not working","user":{"login":"JHGitty","id":5406438,"avatar_url":"https://avatars.githubusercontent.com/u/5406438?v=3","gravatar_id":"","url":"https://api.github.com/users/JHGitty","html_url":"https://github.com/JHGitty","followers_url":"https://api.github.com/users/JHGitty/followers","following_url":"https://api.github.com/users/JHGitty/following{/other_user}","gists_url":"https://api.github.com/users/JHGitty/gists{/gist_id}","starred_url":"https://api.github.com/users/JHGitty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JHGitty/subscriptions","organizations_url":"https://api.github.com/users/JHGitty/orgs","repos_url":"https://api.github.com/users/JHGitty/repos","events_url":"https://api.github.com/users/JHGitty/events{/privacy}","received_events_url":"https://api.github.com/users/JHGitty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-11T16:39:25Z","updated_at":"2015-10-11T16:39:25Z","closed_at":null,"body":"```php\r\n    /**\r\n     * @Route(\"/test/{slug}/{id}\", name=\"test\", defaults={\"slug\" = null, \"id\" = null})\r\n     */\r\n    public function testAction($id)\r\n    {\r\n        // ...\r\n            return $this->redirectToRoute('test');\r\n        // ...\r\n    }\r\n```\r\n\r\nResult:\r\n```\r\nSome mandatory parameters are missing (\"slug\", \"id\") to generate a URL for route \"test\".\r\n```\r\n\r\nIf I try:\r\n```php\r\nreturn $this->redirectToRoute('test', array('id' => null, 'slug' => null));\r\n```\r\n\r\nIt returns:\r\n```\r\nParameter \"id\" for route \"test\" must match \"[^/]++\" (\"\" given) to generate a corresponding URL.\r\n```\r\n\r\nWhat is wrong? Did I miss any information in the official documentation?"}}