{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/26529","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/26529/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/26529/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/26529/events","html_url":"https://github.com/symfony/symfony/pull/26529","id":305194604,"number":26529,"title":"[Routing] Allow defining and reusing subroutines","user":{"login":"nicolas-grekas","id":243674,"avatar_url":"https://avatars3.githubusercontent.com/u/243674?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolas-grekas","html_url":"https://github.com/nicolas-grekas","followers_url":"https://api.github.com/users/nicolas-grekas/followers","following_url":"https://api.github.com/users/nicolas-grekas/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-grekas/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-grekas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-grekas/subscriptions","organizations_url":"https://api.github.com/users/nicolas-grekas/orgs","repos_url":"https://api.github.com/users/nicolas-grekas/repos","events_url":"https://api.github.com/users/nicolas-grekas/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-grekas/received_events","type":"User","site_admin":false},"labels":[{"id":100378,"url":"https://api.github.com/repos/symfony/symfony/labels/Feature","name":"Feature","color":"02e10c","default":false},{"id":111254,"url":"https://api.github.com/repos/symfony/symfony/labels/Routing","name":"Routing","color":"DDDDDD","default":false},{"id":237003792,"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":{"url":"https://api.github.com/repos/symfony/symfony/milestones/17","html_url":"https://github.com/symfony/symfony/milestone/17","labels_url":"https://api.github.com/repos/symfony/symfony/milestones/17/labels","id":2795131,"number":17,"title":"4.1","description":"https://symfony.com/roadmap?version=4.1#checker","creator":{"login":"nicolas-grekas","id":243674,"avatar_url":"https://avatars3.githubusercontent.com/u/243674?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolas-grekas","html_url":"https://github.com/nicolas-grekas","followers_url":"https://api.github.com/users/nicolas-grekas/followers","following_url":"https://api.github.com/users/nicolas-grekas/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-grekas/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-grekas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-grekas/subscriptions","organizations_url":"https://api.github.com/users/nicolas-grekas/orgs","repos_url":"https://api.github.com/users/nicolas-grekas/repos","events_url":"https://api.github.com/users/nicolas-grekas/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-grekas/received_events","type":"User","site_admin":false},"open_issues":148,"closed_issues":203,"state":"open","created_at":"2017-09-26T15:40:00Z","updated_at":"2018-03-15T07:20:41Z","due_on":"2018-05-31T07:00:00Z","closed_at":null},"comments":4,"created_at":"2018-03-14T14:56:59Z","updated_at":"2018-03-15T09:39:42Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/26529","html_url":"https://github.com/symfony/symfony/pull/26529","diff_url":"https://github.com/symfony/symfony/pull/26529.diff","patch_url":"https://github.com/symfony/symfony/pull/26529.patch"},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | master\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | #26524\r\n| License       | MIT\r\n| Doc PR        | -\r\n\r\nTested locally:\r\n- config/routes/annotations.yaml:\r\n```\r\n_subroutines:\r\n    yyyy_mm_dd: \\d{4}-\\d{2}-\\d{2}\r\n```\r\n- src/Controller/HelloController.php\r\n```\r\nclass HelloController extends Controller\r\n{\r\n    /**\r\n     * @Route(\"/hello/{date<(?&yyyy_mm_dd)>}\", name=\"hello\")\r\n     */\r\n```\r\n\r\nIt works well :)\r\n\r\nIf anyone wants to take over, please do, here are the remaining steps:\r\n- [ ] agree on vocabulary\r\n- [x] add tests\r\n- [x] implement in `XmlFileLoader`\r\n- [x] implement in `RoutingConfigurator`\r\n- [x] handle in `UrlMatcher`\r\n- [x] add docblocks\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/373316485","html_url":"https://github.com/symfony/symfony/pull/26529#issuecomment-373316485","issue_url":"https://api.github.com/repos/symfony/symfony/issues/26529","id":373316485,"user":{"login":"iltar","id":1754678,"avatar_url":"https://avatars0.githubusercontent.com/u/1754678?v=4","gravatar_id":"","url":"https://api.github.com/users/iltar","html_url":"https://github.com/iltar","followers_url":"https://api.github.com/users/iltar/followers","following_url":"https://api.github.com/users/iltar/following{/other_user}","gists_url":"https://api.github.com/users/iltar/gists{/gist_id}","starred_url":"https://api.github.com/users/iltar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iltar/subscriptions","organizations_url":"https://api.github.com/users/iltar/orgs","repos_url":"https://api.github.com/users/iltar/repos","events_url":"https://api.github.com/users/iltar/events{/privacy}","received_events_url":"https://api.github.com/users/iltar/received_events","type":"User","site_admin":false},"created_at":"2018-03-15T09:39:42Z","updated_at":"2018-03-15T09:39:42Z","author_association":"CONTRIBUTOR","body":"di parameters are not really a good extension point for this imo.\r\n\r\nThis could work in theory, but I rather _not_ refer to DI parameters _at all_.\r\n```\r\n_subroutines:\r\n    yyyy_mm_dd: '%parameters.yyyy_mm_dd%'\r\n```"}}
{"actor":{"display_login":"iltar"}}