{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/7694","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/7694/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/7694/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/7694/events","html_url":"https://github.com/yiisoft/yii2/pull/7694","id":60853511,"number":7694,"title":"Twig url()/path() more functional to resolve #6924","user":{"login":"tanakahisateru","id":403893,"avatar_url":"https://avatars.githubusercontent.com/u/403893?v=3","gravatar_id":"","url":"https://api.github.com/users/tanakahisateru","html_url":"https://github.com/tanakahisateru","followers_url":"https://api.github.com/users/tanakahisateru/followers","following_url":"https://api.github.com/users/tanakahisateru/following{/other_user}","gists_url":"https://api.github.com/users/tanakahisateru/gists{/gist_id}","starred_url":"https://api.github.com/users/tanakahisateru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanakahisateru/subscriptions","organizations_url":"https://api.github.com/users/tanakahisateru/orgs","repos_url":"https://api.github.com/users/tanakahisateru/repos","events_url":"https://api.github.com/users/tanakahisateru/events{/privacy}","received_events_url":"https://api.github.com/users/tanakahisateru/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-12T16:59:32Z","updated_at":"2015-03-12T17:07:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/7694","html_url":"https://github.com/yiisoft/yii2/pull/7694","diff_url":"https://github.com/yiisoft/yii2/pull/7694.diff","patch_url":"https://github.com/yiisoft/yii2/pull/7694.patch"},"body":"My idea for Twig renderers' `url()` / `path()` to resolve #6924 is below:\r\n\r\n## They should work same even when empty array passed as 2nd argument explicitly, because there are actions with no params.\r\n\r\n```\r\nurl('/site/index', {page:2})\r\nurl('/site/index', {})\r\n```\r\n\r\n## They also should accept array as 1st argument in order to distinguish action-routes from plain pathes or aliases.\r\n\r\n```\r\nurl(['/site/index'])\r\nurl('/other-app/some/path.html')\r\nurl('@web/css/style.css')\r\n```"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/78530287","html_url":"https://github.com/yiisoft/yii2/pull/7694#issuecomment-78530287","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/7694","id":78530287,"user":{"login":"tanakahisateru","id":403893,"avatar_url":"https://avatars.githubusercontent.com/u/403893?v=3","gravatar_id":"","url":"https://api.github.com/users/tanakahisateru","html_url":"https://github.com/tanakahisateru","followers_url":"https://api.github.com/users/tanakahisateru/followers","following_url":"https://api.github.com/users/tanakahisateru/following{/other_user}","gists_url":"https://api.github.com/users/tanakahisateru/gists{/gist_id}","starred_url":"https://api.github.com/users/tanakahisateru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanakahisateru/subscriptions","organizations_url":"https://api.github.com/users/tanakahisateru/orgs","repos_url":"https://api.github.com/users/tanakahisateru/repos","events_url":"https://api.github.com/users/tanakahisateru/events{/privacy}","received_events_url":"https://api.github.com/users/tanakahisateru/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T17:07:10Z","updated_at":"2015-03-12T17:07:10Z","body":"And complex of both should be safe:\r\n\r\n```\r\nurl(['/site/index'], {})\r\nurl(['/site/index'], {page: 2})\r\n```"}}