{"action":"opened","issue":{"url":"https://api.github.com/repos/top-think/framework/issues/342","repository_url":"https://api.github.com/repos/top-think/framework","labels_url":"https://api.github.com/repos/top-think/framework/issues/342/labels{/name}","comments_url":"https://api.github.com/repos/top-think/framework/issues/342/comments","events_url":"https://api.github.com/repos/top-think/framework/issues/342/events","html_url":"https://github.com/top-think/framework/issues/342","id":187228847,"number":342,"title":"关于路由使用别名后导致url_convert配置失效问题","user":{"login":"GordonLife","id":10444028,"avatar_url":"https://avatars.githubusercontent.com/u/10444028?v=3","gravatar_id":"","url":"https://api.github.com/users/GordonLife","html_url":"https://github.com/GordonLife","followers_url":"https://api.github.com/users/GordonLife/followers","following_url":"https://api.github.com/users/GordonLife/following{/other_user}","gists_url":"https://api.github.com/users/GordonLife/gists{/gist_id}","starred_url":"https://api.github.com/users/GordonLife/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GordonLife/subscriptions","organizations_url":"https://api.github.com/users/GordonLife/orgs","repos_url":"https://api.github.com/users/GordonLife/repos","events_url":"https://api.github.com/users/GordonLife/events{/privacy}","received_events_url":"https://api.github.com/users/GordonLife/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-04T01:02:09Z","updated_at":"2016-11-04T01:02:09Z","closed_at":null,"body":"从这段代码中发现但路由中有使用别名时不进行路由解析，导致url_convert配置不起作用，路由中的驼峰操作名没有被转换成小写下划线形式\r\n\r\n// 检查别名路由\r\n            $alias = Route::rules('alias');\r\n            if ($alias) {\r\n                // 别名路由解析\r\n                foreach ($alias as $key => $val) {\r\n                    if (is_array($val)) {\r\n                        $val = $val[0];\r\n                    }\r\n                    if (0 === strpos($url, $val)) {\r\n                        $url = $key . substr($url, strlen($val));\r\n                        break;\r\n                    }\r\n                }\r\n            } else {\r\n                // 路由标识不存在 直接解析\r\n                $url = self::parseUrl($url, $domain);\r\n            }\r\n            if (isset($info['query'])) {\r\n                // 解析地址里面参数 合并到vars\r\n                parse_str($info['query'], $params);\r\n                $vars = array_merge($params, $vars);\r\n            }"}}
{"actor":{"display_login":"GordonLife"}}