{"action":"created","issue":{"url":"https://api.github.com/repos/J7mbo/Aurex/issues/3","labels_url":"https://api.github.com/repos/J7mbo/Aurex/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/J7mbo/Aurex/issues/3/comments","events_url":"https://api.github.com/repos/J7mbo/Aurex/issues/3/events","html_url":"https://github.com/J7mbo/Aurex/issues/3","id":99857552,"number":3,"title":"Twig function asset() not working","user":{"login":"raphaelcazorla","id":6424862,"avatar_url":"https://avatars.githubusercontent.com/u/6424862?v=3","gravatar_id":"","url":"https://api.github.com/users/raphaelcazorla","html_url":"https://github.com/raphaelcazorla","followers_url":"https://api.github.com/users/raphaelcazorla/followers","following_url":"https://api.github.com/users/raphaelcazorla/following{/other_user}","gists_url":"https://api.github.com/users/raphaelcazorla/gists{/gist_id}","starred_url":"https://api.github.com/users/raphaelcazorla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphaelcazorla/subscriptions","organizations_url":"https://api.github.com/users/raphaelcazorla/orgs","repos_url":"https://api.github.com/users/raphaelcazorla/repos","events_url":"https://api.github.com/users/raphaelcazorla/events{/privacy}","received_events_url":"https://api.github.com/users/raphaelcazorla/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/J7mbo/Aurex/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-09T03:21:22Z","updated_at":"2015-08-11T19:57:08Z","closed_at":null,"body":"Hi,\r\n\r\nWhenever I try to call the asset() function in my twig files, I get this error:\r\n```\r\nTwig_Error_Runtime in Template.php line 158:\r\nAn exception has been thrown during the rendering of a template (\"Identifier \"request\" is not defined.\") in \"layout.html.twig\" at line 14.\r\n```\r\nI just pointed out that variable \"$aurex\" is empty in Aurex/lib/Framework/Module/Modules/TwigModule/TwigModule.php line 45\r\n```\r\n$twig->addFunction(new \\Twig_SimpleFunction('asset', function ($asset) use ($aurex) {\r\n\t/** @var Request $request */\r\n\tvar_dump($aurex);  //==> returns nothing!\r\n\t$request = $aurex['request'];\r\n\treturn sprintf('%s/assets/%s', $request->getBasePath(), ltrim($asset, '/'));\r\n}));\r\n```\r\nbut is still available line 42, just before the addFunction() call : \r\n```\r\n$aurex['twig'] = $aurex->extend('twig', function($twig, $aurex) {\r\n    /** @var \\Twig_Environment $twig */\r\n\tvar_dump($aurex);  //==> returns something !\r\n    $twig->addFunction(new \\Twig_SimpleFunction('asset', function ($asset) use ($aurex) {\r\n        /** @var Request $request */\r\n        $request = $aurex['request'];\r\n        return sprintf('%s/assets/%s', $request->getBasePath(), ltrim($asset, '/'));\r\n    }));\r\n    return $twig;\r\n});\r\n```\r\nI think there is a problem there...or am I missing something?\r\n\r\nAlso, I got no access to \"app\" in twig templates?!\r\n\r\nThank you for your help.\r\nGood job by the way ;)"},"comment":{"url":"https://api.github.com/repos/J7mbo/Aurex/issues/comments/130045271","html_url":"https://github.com/J7mbo/Aurex/issues/3#issuecomment-130045271","issue_url":"https://api.github.com/repos/J7mbo/Aurex/issues/3","id":130045271,"user":{"login":"raphaelcazorla","id":6424862,"avatar_url":"https://avatars.githubusercontent.com/u/6424862?v=3","gravatar_id":"","url":"https://api.github.com/users/raphaelcazorla","html_url":"https://github.com/raphaelcazorla","followers_url":"https://api.github.com/users/raphaelcazorla/followers","following_url":"https://api.github.com/users/raphaelcazorla/following{/other_user}","gists_url":"https://api.github.com/users/raphaelcazorla/gists{/gist_id}","starred_url":"https://api.github.com/users/raphaelcazorla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphaelcazorla/subscriptions","organizations_url":"https://api.github.com/users/raphaelcazorla/orgs","repos_url":"https://api.github.com/users/raphaelcazorla/repos","events_url":"https://api.github.com/users/raphaelcazorla/events{/privacy}","received_events_url":"https://api.github.com/users/raphaelcazorla/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T19:57:08Z","updated_at":"2015-08-11T19:57:08Z","body":"Cool, seems I'm quiet getting things altogether!\r\n\r\nLast thing, I think quiet annoying, but could be understandable if we consider Aurex is some kind of \"skeleton\":\r\n\r\nThe installation process does not allow future updates...like upgrading from 0.2.1 to 0.2.2 :-)\r\nMaybe you have a simple solution, but from my understanding, apart from doing some kind of merge with git, it's not that simple...am I wrong?\r\nDo you any other solution in mind?\r\n\r\nMany thanks again!"}}