{"action":"created","issue":{"url":"https://api.github.com/repos/slimphp/Slim-Skeleton/issues/42","repository_url":"https://api.github.com/repos/slimphp/Slim-Skeleton","labels_url":"https://api.github.com/repos/slimphp/Slim-Skeleton/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/slimphp/Slim-Skeleton/issues/42/comments","events_url":"https://api.github.com/repos/slimphp/Slim-Skeleton/issues/42/events","html_url":"https://github.com/slimphp/Slim-Skeleton/issues/42","id":172573959,"number":42,"title":"Slight inconvenience with route pattern matching?","user":{"login":"dwangus","id":13408351,"avatar_url":"https://avatars.githubusercontent.com/u/13408351?v=3","gravatar_id":"","url":"https://api.github.com/users/dwangus","html_url":"https://github.com/dwangus","followers_url":"https://api.github.com/users/dwangus/followers","following_url":"https://api.github.com/users/dwangus/following{/other_user}","gists_url":"https://api.github.com/users/dwangus/gists{/gist_id}","starred_url":"https://api.github.com/users/dwangus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwangus/subscriptions","organizations_url":"https://api.github.com/users/dwangus/orgs","repos_url":"https://api.github.com/users/dwangus/repos","events_url":"https://api.github.com/users/dwangus/events{/privacy}","received_events_url":"https://api.github.com/users/dwangus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-22T22:53:17Z","updated_at":"2016-10-21T06:02:38Z","closed_at":null,"body":"I don't know if this is an issue with Slim-Skeleton or the Slim framework in general, but I noticed that in src/routes.php, the order in which you write your routes actually matters in some fringe cases.\r\n\r\nFor example (and this is what happened for me), let's say I have 2 routes:\r\n\r\n$app->get('/hours/{name}', ...);\r\n$app->get('/{date}/{name}', ...);\r\n\r\nI noticed that if I write the second route in routes.php before the first route, it essentially makes null any calls to the first route -- and in the second route, $args['date'] will always be the string 'hours'.\r\n\r\nIs there a way to reinforce, no matter the order routes are written, that certain paths with concrete names get precedence before those with variable argument-names?"},"comment":{"url":"https://api.github.com/repos/slimphp/Slim-Skeleton/issues/comments/255300935","html_url":"https://github.com/slimphp/Slim-Skeleton/issues/42#issuecomment-255300935","issue_url":"https://api.github.com/repos/slimphp/Slim-Skeleton/issues/42","id":255300935,"user":{"login":"RhanCandia","id":7951366,"avatar_url":"https://avatars.githubusercontent.com/u/7951366?v=3","gravatar_id":"","url":"https://api.github.com/users/RhanCandia","html_url":"https://github.com/RhanCandia","followers_url":"https://api.github.com/users/RhanCandia/followers","following_url":"https://api.github.com/users/RhanCandia/following{/other_user}","gists_url":"https://api.github.com/users/RhanCandia/gists{/gist_id}","starred_url":"https://api.github.com/users/RhanCandia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RhanCandia/subscriptions","organizations_url":"https://api.github.com/users/RhanCandia/orgs","repos_url":"https://api.github.com/users/RhanCandia/repos","events_url":"https://api.github.com/users/RhanCandia/events{/privacy}","received_events_url":"https://api.github.com/users/RhanCandia/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T06:02:38Z","updated_at":"2016-10-21T06:02:38Z","body":"@dwangus Maybe if you explicitly declare a pattern like so:\r\n\r\n$app->get('/hours/{name}', ...);\r\n$app->get('/{date:[date-format-regex]}/{name}', ...);\r\n\r\nSo that the second one know that he shouldn't catch the above route."}}
{"actor":{"display_login":"RhanCandia"}}