{"shas":[["26757ab327fedf6e690d748f34e9e3a8879743a6","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","simplified code for previous merge/commits","Fabien Potencier"],["755ea99bd4944ab2e090e3b7a9f1cf003b805e68","660609b171607ff3dcd294929e5d8239736f4298@chalopin.fr","Correction of a BC break with json_encode and PHP 5.2.x","JEDIBC"],["945579a8f6104e55c4e8c80d606b9fae2b351b4b","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","merged branch JEDIBC/master (PR #401)\n\nCommits\n-------\n\n755ea99 Correction of a BC break with json_encode and PHP 5.2.x\n\nDiscussion\n----------\n\nBC break with json_encode and php 5.2.x\n\nHi,\n\njson_encode on php 5.2.x doesn't take the $options parameter wich result in a warning and the function return nothing.\n\nCheers.","Fabien Potencier"],["c7be5242c40e6544ad51ab8a7c05f181e9e3cff2","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","fixed unit test, updated CHANGELOG","Fabien Potencier"],["ef485402e04a419cc2f6f52b5d795d750b016fa4","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","fixed Parser bug","Fabien Potencier"],["9b73026e911b11401770f00c73f5e755c4a88f75","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","fixed Parser bug when a child node is null","Fabien Potencier"],["396435ecd05556adb0a8bd05b14641cb4f8a8aa5","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","prepared 1.1.2 released","Fabien Potencier"],["f918219cf958f72ca25d53b9b7498dc778da8c16","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","bumped version to 1.2.0-DEV","Fabien Potencier"],["0580f192ca370256882b1607acb6ae2d70d12616","78b6854e22ab09d4ae3dac29b92052963103b33e@wiedler.ch","fix highlighting of snippet in recipes doc","Igor Wiedler"],["d55ca98bc3c0ebaadc9420798698db81148109e6","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","merged branch igorw/recipes-highlight (PR #405)\n\nCommits\n-------\n\n0580f19 fix highlighting of snippet in recipes doc\n\nDiscussion\n----------\n\nfix highlighting of snippet in recipes doc","Fabien Potencier"],["e6dde1d6dfa47e41efe972e204ad5b9ee4a4829e","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","added GtkSourceView support in doc","Fabien Potencier"],["1202b5fbe71fa50e6ce511c82402882c685fe0a0","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","merged branch kotas/master (PR #362)\n\nCommits\n-------\n\nf5b9df9 added `if` modifier support to for loop like {% for k in v if k is odd %}\n\nDiscussion\n----------\n\n[1.2] added `if` modifier support to for loop\n\nHi.\n\nI'm one of Twig users who love it so much. :)\n\nI've made a patch for adding `if` modifier support to `for` loop in Twig.\n\nExample:\n<pre>\n{% for n in range(0, 5) if n is odd %}\n  {{ n }}\n{% endfor %}\n</pre>\n\nOutput:\n<pre>\n1\n3\n5\n</pre>\n\nThis idea comes from Python's list comprehensions. (like `[n for n in range(0,6) if n % 2 == 1]`)\n\nHere is another example.\n\nBefore:\n<pre>\n{% set no_items = true %}\n{% for item in items %}\n  {% if item.available %}\n    {% set no_items = false %}\n    {{ item.name }}\n  {% endif %}\n{% endfor %}\n{% if no_items %}\n  No items available.\n{% endif %}\n</pre>\n\nAfter:\n<pre>\n{% for item in items if item.available %}\n  {{ item.name }}\n{% else %}\n  No items available.\n{% endfor %}\n</pre>\n\nI hope you like it. But If not, just ignore this request. :)\n\nThanks.\n\n---------------------------------------------------------------------------\n\nby fabpot at 2011/06/24 01:33:33 -0700\n\nI like it! I will schedule it for inclusion in Twig 1.2. Thanks.\n\n---------------------------------------------------------------------------\n\nby hhamon at 2011/06/26 16:43:26 -0700\n\n+1\n\n---------------------------------------------------------------------------\n\nby nikic at 2011/06/27 00:42:14 -0700\n\nI think the idea per se is interesting. But I just checked all Twig templates in my whole codebase and couldn't find any use for it. What was your practical use for this feature @kotas?\n\n---------------------------------------------------------------------------\n\nby kotas at 2011/06/27 01:52:48 -0700\n\n@nikic My practical use is shown as the second example in the body of this pull request.\n\nSometimes you need to \"filter\" an array by seeing its element's property like \"item.available\" or by some condition like \"item.price >= 500\".\n\nTo do this, in the current version of Twig, you have to write \"for\" and \"if\" as nested scopes. And if you want to write {% else %} of the \"for\" loop, you have to make a temporary variable to see if all elements are skipped.\n\nI think this feature is not essential, but makes templates clean.\n\n---------------------------------------------------------------------------\n\nby nikic at 2011/06/27 06:23:24 -0700\n\nThe thing about `else` seems plausible. +1\n\n---------------------------------------------------------------------------\n\nby chucktrukk at 2011/08/02 17:39:16 -0700\n\nAlso +1. that makes some very clean template code.","Fabien Potencier"],["d306dabea349185801c6cd27ad3b0fb4b8cabe7b","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","fixed unit tests for previous merge","Fabien Potencier"],["46eccb9ab56355cd7c7b4de1a39fdd94232260d3","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","added documentation for previous merge","Fabien Potencier"],["c201137f2191adefc9f1d9d4ad0a8df8bda5410b","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","moved Template::getParent() logic to the base class","Fabien Potencier"],["801f3e638c76d57172b07d685c18f47eb1efbb27","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","removed the possibility to use the extends tag from a block (as it is semantically incorrect and it probably does not work as you expect it to in this case)","Fabien Potencier"],["440d13753a4545938b6ad4805904d7d9f88f684a","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","added the possibility to test for exceptions in integration tests","Fabien Potencier"],["26d8aff74675ab52f837fc60d2e1cebee8a39fda","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","refactored code","Fabien Potencier"],["652ac774d6662ef2a5462dac3b68c31207c7a010","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","removed obsolete code","Fabien Potencier"],["da4d964047d7240ac23bc77130f4e29226540e14","551b58b6a2376295008e6445f7a2be3a4ab93239@googlemail.com","Do not use Node_Expression_Name for function names, just use strings for those","nikic"]],"ref":"refs/heads/master","size":33,"head":"bf0ff053202e5d67c0abb0ab638f1556c17c6389","push_id":40605469}