{"action":"created","issue":{"url":"https://api.github.com/repos/ongr-io/RouterBundle/issues/9","labels_url":"https://api.github.com/repos/ongr-io/RouterBundle/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/ongr-io/RouterBundle/issues/9/comments","events_url":"https://api.github.com/repos/ongr-io/RouterBundle/issues/9/events","html_url":"https://github.com/ongr-io/RouterBundle/issues/9","id":54079333,"number":9,"title":"Use @ParamConverter instead of custom matcher","user":{"login":"tautrimas","id":364223,"avatar_url":"https://avatars.githubusercontent.com/u/364223?v=3","gravatar_id":"","url":"https://api.github.com/users/tautrimas","html_url":"https://github.com/tautrimas","followers_url":"https://api.github.com/users/tautrimas/followers","following_url":"https://api.github.com/users/tautrimas/following{/other_user}","gists_url":"https://api.github.com/users/tautrimas/gists{/gist_id}","starred_url":"https://api.github.com/users/tautrimas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tautrimas/subscriptions","organizations_url":"https://api.github.com/users/tautrimas/orgs","repos_url":"https://api.github.com/users/tautrimas/repos","events_url":"https://api.github.com/users/tautrimas/events{/privacy}","received_events_url":"https://api.github.com/users/tautrimas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ongr-io/RouterBundle/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-12T17:07:13Z","updated_at":"2015-02-01T00:49:18Z","closed_at":null,"body":"Remove **SeoUrlMatcher** and convert it to custom [@ParamConverter](http://symfony.com/doc/2.3/bundles/SensioFrameworkExtraBundle/annotations/converters.html).\r\n\r\nRemember to set `$seoKey` in addition to resolved document. Example of [setting request attribute](https://github.com/sensiolabs/SensioFrameworkExtraBundle/blob/48547ed5ce820a7bbd7aef544c809e216362bc20/Request/ParamConverter/DoctrineParamConverter.php#L69).\r\n\r\n**Configuration** should no longer be needed.\r\n\r\n**SeoUrlGenerator** should be removed. Instread, **SeoAwareTrait** should contain a method:\r\n\r\n```php\r\n/**\r\n * Returns document's SEO URL optionally by key.\r\n */\r\npublic function getSeoSlug($key = null);\r\n```\r\n\r\n**Twig** usage:\r\n\r\n```twig\r\nurl(project_product, { url: document.getSeoSlug() } )\r\n```\r\n\r\nDocuments should contain at least **one SEO URL at all times**. One possibility to achieve that is to always add URL like `/product/faadbaad`. Then, no secondary route is needed at all."},"comment":{"url":"https://api.github.com/repos/ongr-io/RouterBundle/issues/comments/72345253","html_url":"https://github.com/ongr-io/RouterBundle/issues/9#issuecomment-72345253","issue_url":"https://api.github.com/repos/ongr-io/RouterBundle/issues/9","id":72345253,"user":{"login":"martiis","id":4210866,"avatar_url":"https://avatars.githubusercontent.com/u/4210866?v=3","gravatar_id":"","url":"https://api.github.com/users/martiis","html_url":"https://github.com/martiis","followers_url":"https://api.github.com/users/martiis/followers","following_url":"https://api.github.com/users/martiis/following{/other_user}","gists_url":"https://api.github.com/users/martiis/gists{/gist_id}","starred_url":"https://api.github.com/users/martiis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martiis/subscriptions","organizations_url":"https://api.github.com/users/martiis/orgs","repos_url":"https://api.github.com/users/martiis/repos","events_url":"https://api.github.com/users/martiis/events{/privacy}","received_events_url":"https://api.github.com/users/martiis/received_events","type":"User","site_admin":false},"created_at":"2015-02-01T00:49:18Z","updated_at":"2015-02-01T00:49:18Z","body":"But we will be forced to use annotated routing. Symfony-cmf router provides two solutions:\r\n - `ChainedRouter` which contains a number of routers (even symfony default can be included) and tries to match at least one router. **This is not what we want IMO**.\r\n -  `DynamicRouter` *is built to be customized. Both route matching and URL generation services can be injected, and the provided route matcher and URL generator classes are built to be further customizable.* It does not extend symfony router (just implements interfaces), it is a cleaner current ongr router. **GOLD**!"}}