{"action":"created","issue":{"url":"https://api.github.com/repos/timber/timber/issues/1379","repository_url":"https://api.github.com/repos/timber/timber","labels_url":"https://api.github.com/repos/timber/timber/issues/1379/labels{/name}","comments_url":"https://api.github.com/repos/timber/timber/issues/1379/comments","events_url":"https://api.github.com/repos/timber/timber/issues/1379/events","html_url":"https://github.com/timber/timber/pull/1379","id":218610224,"number":1379,"title":"1370/twig class","user":{"login":"jarednova","id":1298086,"avatar_url":"https://avatars2.githubusercontent.com/u/1298086?v=3","gravatar_id":"","url":"https://api.github.com/users/jarednova","html_url":"https://github.com/jarednova","followers_url":"https://api.github.com/users/jarednova/followers","following_url":"https://api.github.com/users/jarednova/following{/other_user}","gists_url":"https://api.github.com/users/jarednova/gists{/gist_id}","starred_url":"https://api.github.com/users/jarednova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarednova/subscriptions","organizations_url":"https://api.github.com/users/jarednova/orgs","repos_url":"https://api.github.com/users/jarednova/repos","events_url":"https://api.github.com/users/jarednova/events{/privacy}","received_events_url":"https://api.github.com/users/jarednova/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-03-31T20:34:44Z","updated_at":"2017-03-31T21:06:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/timber/timber/pulls/1379","html_url":"https://github.com/timber/timber/pull/1379","diff_url":"https://github.com/timber/timber/pull/1379.diff","patch_url":"https://github.com/timber/timber/pull/1379.patch"},"body":"**Ticket**: #1370\r\n\r\n#### Issue\r\nChanges in Twig 2.x broke Timber!\r\n\r\n#### Solution\r\n- Test for `Twig_Token` class instead of `Twig_Autoloader` (which was removed in 2.x) and don't add functions to Twig through function wrapper.\r\n\r\n#### Impact\r\n- This introduces a risk that users who had done something like....\r\n\r\n###### PHP\r\n```php\r\nnew TimberFunctionWrapper('my_cool_function');\r\nTimber::render('my-template.twig);\r\n```\r\n\r\n###### Twig\r\n```twig\r\n{{ my_cool_function }}\r\n```\r\n\r\n... will no longer work. That said, this was never _supposed_ to work. It was totally an un-documented piece of functionality that I didn't realize was in there (and is easily achieved in other ways)\r\n\r\n#### Testing\r\nAll tests pass! I've also added new tests to ensure key functionality from `FunctionWrapper` still works"},"comment":{"url":"https://api.github.com/repos/timber/timber/issues/comments/290830023","html_url":"https://github.com/timber/timber/pull/1379#issuecomment-290830023","issue_url":"https://api.github.com/repos/timber/timber/issues/1379","id":290830023,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars2.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2017-03-31T21:06:44Z","updated_at":"2017-03-31T21:06:44Z","body":"\n[![Coverage Status](https://coveralls.io/builds/10876149/badge)](https://coveralls.io/builds/10876149)\n\nCoverage decreased (-0.04%) to 97.56% when pulling **e3cc06f2974fd1590a86e40fa7cb578a9bc16e84 on 1370/twig_class** into **05d81e54d7511b0e131b2a93bfc3f815bd114094 on master**.\n"}}
{"actor":{"display_login":"coveralls"}}