{"action":"closed","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/12733","repository_url":"https://api.github.com/repos/yiisoft/yii2","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/12733/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/12733/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/12733/events","html_url":"https://github.com/yiisoft/yii2/issues/12733","id":182716667,"number":12733,"title":"Optional UrlRule prefix","user":{"login":"dmitry-zaporozhan","id":1151025,"avatar_url":"https://avatars.githubusercontent.com/u/1151025?v=3","gravatar_id":"","url":"https://api.github.com/users/dmitry-zaporozhan","html_url":"https://github.com/dmitry-zaporozhan","followers_url":"https://api.github.com/users/dmitry-zaporozhan/followers","following_url":"https://api.github.com/users/dmitry-zaporozhan/following{/other_user}","gists_url":"https://api.github.com/users/dmitry-zaporozhan/gists{/gist_id}","starred_url":"https://api.github.com/users/dmitry-zaporozhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmitry-zaporozhan/subscriptions","organizations_url":"https://api.github.com/users/dmitry-zaporozhan/orgs","repos_url":"https://api.github.com/users/dmitry-zaporozhan/repos","events_url":"https://api.github.com/users/dmitry-zaporozhan/events{/privacy}","received_events_url":"https://api.github.com/users/dmitry-zaporozhan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-13T07:37:07Z","updated_at":"2016-10-14T11:28:09Z","closed_at":"2016-10-14T11:28:09Z","body":"Default url parameters do not work during parsing if parameter is at the beginning of url rule and is omitted.\r\n\r\n`language` is optional and is in the **end** of url rule - works as expected for parsing and creation.\r\n```\r\n[\r\n    'pattern'=>'<controller>/<action>/<language>',\r\n    'route'=>'<controller>/<action>',\r\n    'defaults'=>['language'=>'en'],\r\n]\r\n```\r\n`language` is optional and is in the **beginning** of url rule - parsing does not work if language is omitted, creation works as expected.\r\n```\r\n[\r\n    'pattern'=>'<language>/<controller>/<action>',\r\n    'route'=>'<controller>/<action>',\r\n    'defaults'=>['language'=>'en'],\r\n]\r\n```"}}
{"actor":{"display_login":"dmitry-zaporozhan"}}