Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame^] | 1 | # 3.3.2 (2021-05-16) |
| 2 | |
| 3 | * Revert "Throw a proper exception when a template name is an absolute path (as it has never been supported)" |
| 4 | |
| 5 | # 3.3.1 (2021-05-12) |
| 6 | |
| 7 | * Fix PHP 8.1 compatibility |
| 8 | * Throw a proper exception when a template name is an absolute path (as it has never been supported) |
| 9 | |
| 10 | # 3.3.0 (2021-02-08) |
| 11 | |
| 12 | * Fix macro calls in a "cache" tag |
| 13 | * Add the slug filter |
| 14 | * Allow extra bundle to be compatible with Twig 2 |
| 15 | |
| 16 | # 3.2.1 (2021-01-05) |
| 17 | |
| 18 | * Fix extra bundle compat with older versions of Symfony |
| 19 | |
| 20 | # 3.2.0 (2021-01-05) |
| 21 | |
| 22 | * Add the Cache extension in the "extra" repositories: "cache" tag |
| 23 | * Add "registerUndefinedTokenParserCallback" |
| 24 | * Mark built-in node visitors as @internal |
| 25 | * Fix "odd" not working for negative numbers |
| 26 | |
| 27 | # 3.1.1 (2020-10-27) |
| 28 | |
| 29 | * Fix "include(template_from_string())" |
| 30 | |
| 31 | # 3.1.0 (2020-10-21) |
| 32 | |
| 33 | * Fix sandbox support when using "include(template_from_string())" |
| 34 | * Make round brackets optional for one argument tests like "same as" or "divisible by" |
| 35 | * Add support for ES2015 style object initialisation shortcut { a } is the same as { 'a': a } |
| 36 | |
| 37 | # 3.0.5 (2020-08-05) |
| 38 | |
| 39 | * Fix twig_compare w.r.t. whitespace trimming |
| 40 | * Fix sandbox not disabled if syntax error occurs within {% sandbox %} tag |
| 41 | * Fix a regression when not using a space before an operator |
| 42 | * Restrict callables to closures in filters |
| 43 | * Allow trailing commas in argument lists (in calls as well as definitions) |
| 44 | |
| 45 | # 3.0.4 (2020-07-05) |
| 46 | |
| 47 | * Fix comparison operators |
| 48 | * Fix options not taken into account when using "Michelf\MarkdownExtra" |
| 49 | * Fix "Twig\Extra\Intl\IntlExtension::getCountryName()" to accept "null" as a first argument |
| 50 | * Throw exception in case non-Traversable data is passed to "filter" |
| 51 | * Fix context optimization on PHP 7.4 |
| 52 | * Fix PHP 8 compatibility |
| 53 | * Fix ambiguous syntax parsing |
| 54 | |
| 55 | # 3.0.3 (2020-02-11) |
| 56 | |
| 57 | * Add a check to ensure that iconv() is defined |
| 58 | |
| 59 | # 3.0.2 (2020-02-11) |
| 60 | |
| 61 | * Avoid exceptions when an intl resource is not found |
| 62 | * Fix implementation of case-insensitivity for method names |
| 63 | |
| 64 | # 3.0.1 (2019-12-28) |
| 65 | |
| 66 | * fixed Symfony 5.0 support for the HTML extra extension |
| 67 | |
| 68 | # 3.0.0 (2019-11-15) |
| 69 | |
| 70 | * fixed number formatter in Intl extra extension when using a formatter prototype |
| 71 | |
| 72 | # 3.0.0-BETA1 (2019-11-11) |
| 73 | |
| 74 | * removed the "if" condition support on the "for" tag |
| 75 | * made the in, <, >, <=, >=, ==, and != operators more strict when comparing strings and integers/floats |
| 76 | * removed the "filter" tag |
| 77 | * added type hints everywhere |
| 78 | * changed Environment::resolveTemplate() to always return a TemplateWrapper instance |
| 79 | * removed Template::__toString() |
| 80 | * removed Parser::isReservedMacroName() |
| 81 | * removed SanboxedPrintNode |
| 82 | * removed Node::setTemplateName() |
| 83 | * made classes maked as "@final" final |
| 84 | * removed InitRuntimeInterface, ExistsLoaderInterface, and SourceContextLoaderInterface |
| 85 | * removed the "spaceless" tag |
| 86 | * removed Twig\Environment::getBaseTemplateClass() and Twig\Environment::setBaseTemplateClass() |
| 87 | * removed the "base_template_class" option on Twig\Environment |
| 88 | * bumped minimum PHP version to 7.2 |
| 89 | * removed PSR-0 classes |
| 90 | |
| 91 | # 2.14.6 (2021-XX-XX) |
| 92 | |
| 93 | * Revert "Throw a proper exception when a template name is an absolute path (as it has never been supported)" |
| 94 | |
| 95 | # 2.14.5 (2021-05-12) |
| 96 | |
| 97 | * Fix PHP 8.1 compatibility |
| 98 | * Throw a proper exception when a template name is an absolute path (as it has never been supported) |
| 99 | |
| 100 | # 2.14.4 (2021-03-10) |
| 101 | |
| 102 | * Add the slug filter |
| 103 | |
| 104 | # 2.14.3 (2021-01-05) |
| 105 | |
| 106 | * Fix extra bundle compat with older versions of Symfony |
| 107 | |
| 108 | # 2.14.2 (2021-01-05) |
| 109 | |
| 110 | * Fix "odd" not working for negative numbers |
| 111 | |
| 112 | # 2.14.1 (2020-10-27) |
| 113 | |
| 114 | * Fix "include(template_from_string())" |
| 115 | |
| 116 | # 2.14.0 (2020-10-21) |
| 117 | |
| 118 | * Fix sandbox support when using "include(template_from_string())" |
| 119 | * Make round brackets optional for one argument tests like "same as" or "divisible by" |
| 120 | * Add support for ES2015 style object initialisation shortcut { a } is the same as { 'a': a } |
| 121 | * Drop PHP 7.1 support |
| 122 | |
| 123 | # 2.13.1 (2020-08-05) |
| 124 | |
| 125 | * Fix sandbox not disabled if syntax error occurs within {% sandbox %} tag |
| 126 | * Fix a regression when not using a space before an operator |
| 127 | * Restrict callables to closures in filters |
| 128 | * Allow trailing commas in argument lists (in calls as well as definitions) |
| 129 | |
| 130 | # 2.13.0 (2020-07-05) |
| 131 | |
| 132 | * Fix options not taken into account when using "Michelf\MarkdownExtra" |
| 133 | * Fix "Twig\Extra\Intl\IntlExtension::getCountryName()" to accept "null" as a first argument |
| 134 | * Drop support for PHP 7.0 |
| 135 | * Throw exception in case non-Traversable data is passed to "filter" |
| 136 | * Fix context optimization on PHP 7.4 |
| 137 | * Fix PHP 8 compatibility |
| 138 | * Fix ambiguous syntax parsing |
| 139 | |
| 140 | # 2.12.5 (2020-02-11) |
| 141 | |
| 142 | * Add a check to ensure that iconv() is defined |
| 143 | |
| 144 | # 2.12.4 (2020-02-11) |
| 145 | |
| 146 | * Avoid exceptions when an intl resource is not found |
| 147 | * Fix implementation of case-insensitivity for method names |
| 148 | |
| 149 | # 2.12.3 (2019-12-28) |
| 150 | |
| 151 | * fixed Symfony 5.0 support for the HTML extra extension |
| 152 | * fixed number formatter in Intl extra extension when using a formatter prototype |
| 153 | |
| 154 | # 2.12.2 (2019-11-11) |
| 155 | |
| 156 | * added supported for exponential numbers |
| 157 | |
| 158 | # 2.12.1 (2019-10-17) |
| 159 | |
| 160 | * added the String extension in the "extra" repositories: "u" filter |
| 161 | |
| 162 | # 2.12.0 (2019-10-05) |
| 163 | |
| 164 | * added the spaceship operator ("<=>"), useful when using an arrow function in the "sort" filter |
| 165 | * added support for an "arrow" function on the "sort" filter |
| 166 | * added the CssInliner extension in the "extra" repositories: "inline_css" |
| 167 | filter |
| 168 | * added the Inky extension in the "extra" repositories: "inky_to_html" filter |
| 169 | * added Intl extension in the "extra" repositories: "country_name", |
| 170 | "currency_name", "currency_symbol", "language_name", "locale_name", |
| 171 | "timezone_name", "format_currency", "format_number", |
| 172 | "format_*_number", "format_datetime", "format_date", and "format_time" |
| 173 | filters, and the "country_timezones" function |
| 174 | * added the Markdown extension in the "extra" repositories: "markdown_to_html", |
| 175 | and "html_to_markdown" filters |
| 176 | * added the HtmlExtension extension in the "extra" repositories: "date_uri" |
| 177 | filter, and "html_classes" function |
| 178 | * optimized "block('foo') ?? 'bar'" |
| 179 | * fixed the empty test on Traversable instances |
| 180 | * fixed array_key_exists() on objects |
| 181 | * fixed cache when opcache is installed but disabled |
| 182 | * fixed using macros in arrow functions |
| 183 | * fixed split filter on edge case |
| 184 | |
| 185 | # 2.11.3 (2019-06-18) |
| 186 | |
| 187 | * display partial output (PHP buffer) when an error occurs in debug mode |
| 188 | * fixed the filter filter (allow the result to be used several times) |
| 189 | * fixed macro auto-import when a template contains only macros |
| 190 | |
| 191 | # 2.11.2 (2019-06-05) |
| 192 | |
| 193 | * fixed macro auto-import |
| 194 | |
| 195 | # 2.11.1 (2019-06-04) |
| 196 | |
| 197 | * added support for "Twig\Markup" instances in the "in" test (again) |
| 198 | * allowed string operators as variables names in assignments |
| 199 | * fixed support for macros defined in parent templates |
| 200 | |
| 201 | # 2.11.0 (2019-05-31) |
| 202 | |
| 203 | * added the possibility to register classes/interfaces as being safe for the escaper ("EscaperExtension::addSafeClass()") |
| 204 | * deprecated CoreExtension::setEscaper() and CoreExtension::getEscapers() in favor of the same methods on EscaperExtension |
| 205 | * macros are now auto-imported in the template they are defined (under the ``_self`` variable) |
| 206 | * added support for macros on "is defined" tests |
| 207 | * fixed macros "import" when using the same name in the parent and child templates |
| 208 | * fixed recursive macros |
| 209 | * macros imported "globally" in a template are now available in macros without re-importing them |
| 210 | * fixed the "filter" filter when the argument is \Traversable but does not implement \Iterator (\SimpleXmlElement for instance) |
| 211 | * fixed a PHP fatal error when calling a macro imported in a block in a nested block |
| 212 | * fixed a PHP fatal error when calling a macro imported in the template in another macro |
| 213 | * fixed wrong error message on "import" and "from" |
| 214 | |
| 215 | # 2.10.0 (2019-05-14) |
| 216 | |
| 217 | * deprecated "if" conditions on "for" tags |
| 218 | * added "filter", "map", and "reduce" filters (and support for arrow functions) |
| 219 | * fixed partial output leak when a PHP fatal error occurs |
| 220 | * optimized context access on PHP 7.4 |
| 221 | |
| 222 | # 2.9.0 (2019-04-28) |
| 223 | |
| 224 | * deprecated returning "false" to remove a Node from NodeVisitorInterface::leaveNode() |
| 225 | * allowed Twig\NodeVisitor\NodeVisitorInterface::leaveNode() to return "null" instead of "false" (same meaning) |
| 226 | * deprecated the "filter" tag (use the "apply" tag instead) |
| 227 | * added the "apply" tag as a replacement for the "filter" tag |
| 228 | * allowed Twig\Loader\FilesystemLoader::findTemplate() to return "null" instead of "false" (same meaning) |
| 229 | * added support for "Twig\Markup" instances in the "in" test |
| 230 | * fixed "import" when macros are stored in a template string |
| 231 | * fixed Lexer when using custom options containing the # char |
| 232 | * added template line number to twig_get_attribute() |
| 233 | |
| 234 | # 2.8.1 (2019-04-16) |
| 235 | |
| 236 | * fixed EscaperNodeVisitor |
| 237 | * deprecated passing a 3rd, 4th, and 5th arguments to the Sandbox exception classes |
| 238 | * deprecated Node::setTemplateName() in favor of Node::setSourceContext() |
| 239 | |
| 240 | # 2.8.0 (2019-04-16) |
| 241 | |
| 242 | * added Traversable support for the length filter |
| 243 | * fixed some wrong location in error messages |
| 244 | * made exception creation faster |
| 245 | * made escaping on ternary expressions (?: and ??) more fine-grained |
| 246 | * added the possibility to give a nice name to string templates (template_from_string function) |
| 247 | * fixed the "with" behavior to always include the globals (for consistency with the "include" and "embed" tags) |
| 248 | * fixed "include" with "ignore missing" when an error loading occurs in the included template |
| 249 | * added support for a new whitespace trimming option ({%~ ~%}, {{~ ~}}, {#~ ~#}) |
| 250 | * added the "column" filter |
| 251 | |
| 252 | # 2.7.4 (2019-03-23) |
| 253 | |
| 254 | * fixed variadic support |
| 255 | * fixed CheckToStringNode implementation (broken when a function/filter is variadic) |
| 256 | |
| 257 | # 2.7.3 (2019-03-21) |
| 258 | |
| 259 | * fixed the spaceless filter so that it behaves like the spaceless tag |
| 260 | * fixed BC break on Environment::resolveTemplate() |
| 261 | * allowed Traversable objects to be used in the "with" tag |
| 262 | * allowed Traversable objects to be used in the "with" tag |
| 263 | * allowed Traversable objects to be used in the "with" argument of the "include" and "embed" tags |
| 264 | |
| 265 | # 2.7.2 (2019-03-12) |
| 266 | |
| 267 | * added TemplateWrapper::getTemplateName() |
| 268 | |
| 269 | # 2.7.1 (2019-03-12) |
| 270 | |
| 271 | * fixed class aliases |
| 272 | |
| 273 | # 2.7.0 (2019-03-12) |
| 274 | |
| 275 | * fixed sandbox security issue (under some circumstances, calling the |
| 276 | __toString() method on an object was possible even if not allowed by the |
| 277 | security policy) |
| 278 | * fixed batch filter clobbers array keys when fill parameter is used |
| 279 | * added preserveKeys support for the batch filter |
| 280 | * fixed "embed" support when used from "template_from_string" |
| 281 | * deprecated passing a Twig\Template to Twig\Environment::load()/Twig\Environment::resolveTemplate() |
| 282 | * added the possibility to pass a TemplateWrapper to Twig\Environment::load() |
| 283 | * marked Twig\Environment::getTemplateClass() as internal (implementation detail) |
| 284 | * improved the performance of the sandbox |
| 285 | * deprecated the spaceless tag |
| 286 | * added a spaceless filter |
| 287 | * added max value to the "random" function |
| 288 | * deprecated Twig\Extension\InitRuntimeInterface |
| 289 | * deprecated Twig\Loader\ExistsLoaderInterface |
| 290 | * deprecated PSR-0 classes in favor of namespaced ones |
| 291 | * made namespace classes the default classes (PSR-0 ones are aliases now) |
| 292 | * added Twig\Loader\ChainLoader::getLoaders() |
| 293 | * removed duplicated directory separator in FilesystemLoader |
| 294 | * deprecated the "base_template_class" option on Twig\Environment |
| 295 | * deprecated the Twig\Environment::getBaseTemplateClass() and |
| 296 | Twig\Environment::setBaseTemplateClass() methods |
| 297 | * changed internal code to use the namespaced classes as much as possible |
| 298 | * deprecated Twig_Parser::isReservedMacroName() |
| 299 | |
| 300 | # 2.6.2 (2019-01-14) |
| 301 | |
| 302 | * fixed regression (key exists check for non ArrayObject objects) |
| 303 | |
| 304 | # 2.6.1 (2019-01-14) |
| 305 | |
| 306 | * fixed ArrayObject access with a null value |
| 307 | * fixed embedded templates starting with a BOM |
| 308 | * fixed using a Twig_TemplateWrapper instance as an argument to extends |
| 309 | * fixed error location when calling an undefined block |
| 310 | * deprecated passing a string as a source on Twig_Error |
| 311 | * switched generated code to use the PHP short array notation |
| 312 | * fixed float representation in compiled templates |
| 313 | * added a second argument to the join filter (last separator configuration) |
| 314 | |
| 315 | # 2.6.0 (2018-12-16) |
| 316 | |
| 317 | * made sure twig_include returns a string |
| 318 | * fixed multi-byte UFT-8 in escape('html_attr') |
| 319 | * added the "deprecated" tag |
| 320 | * added support for dynamically named tests |
| 321 | * fixed GlobalsInterface extended class |
| 322 | * fixed filesystem loader throwing an exception instead of returning false |
| 323 | |
| 324 | # 2.5.0 (2018-07-13) |
| 325 | |
| 326 | * deprecated using the spaceless tag at the root level of a child template (noop anyway) |
| 327 | * deprecated the possibility to define a block in a non-capturing block in a child template |
| 328 | * added the Symfony ctype polyfill as a dependency |
| 329 | * fixed reporting the proper location for errors compiled in templates |
| 330 | * fixed the error handling for the optimized extension-based function calls |
| 331 | * ensured that syntax errors are triggered with the right line |
| 332 | * "js" filter now produces valid JSON |
| 333 | |
| 334 | # 2.4.8 (2018-04-02) |
| 335 | |
| 336 | * fixed a regression when using the "default" filter or the "defined" test on non-existing arrays |
| 337 | |
| 338 | # 2.4.7 (2018-03-20) |
| 339 | |
| 340 | * optimized runtime performance |
| 341 | * optimized parser performance by inlining the constant values |
| 342 | * fixed block names unicity |
| 343 | * fixed counting children of SimpleXMLElement objects |
| 344 | * added missing else clause to avoid infinite loops |
| 345 | * fixed .. (range operator) in sandbox policy |
| 346 | |
| 347 | # 2.4.6 (2018-03-03) |
| 348 | |
| 349 | * fixed a regression in the way the profiler is registered in templates |
| 350 | |
| 351 | # 2.4.5 (2018-03-02) |
| 352 | |
| 353 | * optimized the performance of calling an extension method at runtime |
| 354 | * optimized the performance of the dot operator for array and method calls |
| 355 | * added an exception when using "===" instead of "same as" |
| 356 | * fixed possible array to string conversion concealing actual error |
| 357 | * made variable names deterministic in compiled templates |
| 358 | * fixed length filter when passing an instance of IteratorAggregate |
| 359 | * fixed Environment::resolveTemplate to accept instances of TemplateWrapper |
| 360 | |
| 361 | # 2.4.4 (2017-09-27) |
| 362 | |
| 363 | * added Twig_Profiler_Profile::reset() |
| 364 | * fixed use TokenParser to return an empty Node |
| 365 | * added RuntimeExtensionInterface |
| 366 | * added circular reference detection when loading templates |
| 367 | * added support for runtime loaders in IntegrationTestCase |
| 368 | * fixed deprecation when using Twig_Profiler_Dumper_Html |
| 369 | * removed @final from Twig_Profiler_Dumper_Text |
| 370 | |
| 371 | # 2.4.3 (2017-06-07) |
| 372 | |
| 373 | * fixed namespaces introduction |
| 374 | |
| 375 | # 2.4.2 (2017-06-05) |
| 376 | |
| 377 | * fixed namespaces introduction |
| 378 | |
| 379 | # 2.4.1 (2017-06-05) |
| 380 | |
| 381 | * fixed namespaces introduction |
| 382 | |
| 383 | # 2.4.0 (2017-06-05) |
| 384 | |
| 385 | * added support for PHPUnit 6 when testing extensions |
| 386 | * fixed PHP 7.2 compatibility |
| 387 | * fixed template name generation in Twig_Environment::createTemplate() |
| 388 | * removed final tag on Twig_TokenParser_Include |
| 389 | * dropped HHVM support |
| 390 | * added namespaced aliases for all (non-deprecated) classes and interfaces |
| 391 | * marked Twig_Filter, Twig_Function, Twig_Test, Twig_Node_Module and Twig_Profiler_Profile as final via the @final annotation |
| 392 | |
| 393 | # 2.3.2 (2017-04-20) |
| 394 | |
| 395 | * fixed edge case in the method cache for Twig attributes |
| 396 | |
| 397 | # 2.3.1 (2017-04-18) |
| 398 | |
| 399 | * fixed the empty() test |
| 400 | |
| 401 | # 2.3.0 (2017-03-22) |
| 402 | |
| 403 | * fixed a race condition handling when writing cache files |
| 404 | * "length" filter now returns string length when applied to an object that does |
| 405 | not implement \Countable but provides __toString() |
| 406 | * "empty" test will now consider the return value of the __toString() method for |
| 407 | objects implement __toString() but not \Countable |
| 408 | * fixed JS escaping for unicode characters with higher code points |
| 409 | * added error message when calling `parent()` in a block that doesn't exist in the parent template |
| 410 | |
| 411 | # 2.2.0 (2017-02-26) |
| 412 | |
| 413 | * added a PSR-11 compatible runtime loader |
| 414 | * added `side` argument to `trim` to allow left or right trimming only. |
| 415 | |
| 416 | # 2.1.0 (2017-01-11) |
| 417 | |
| 418 | * fixed twig_get_attribute() |
| 419 | * added Twig_NodeCaptureInterface for nodes that capture all output |
| 420 | |
| 421 | # 2.0.0 (2017-01-05) |
| 422 | |
| 423 | * removed the C extension |
| 424 | * moved Twig_Environment::getAttribute() to twig_get_attribute() |
| 425 | * removed Twig_Environment::getLexer(), Twig_Environment::getParser(), Twig_Environment::getCompiler() |
| 426 | * removed Twig_Compiler::getFilename() |
| 427 | * added hasser support in Twig_Template::getAttribute() |
| 428 | * sped up the json_encode filter |
| 429 | * removed reserved macro names; all names can be used as macro |
| 430 | * removed Twig_Template::getEnvironment() |
| 431 | * changed _self variable to return the current template name |
| 432 | * made the loader a required argument of Twig_Environment constructor |
| 433 | * removed Twig_Environment::clearTemplateCache() |
| 434 | * removed Twig_Autoloader (use Composer instead) |
| 435 | * removed `true` as an equivalent to `html` for the auto-escaping strategy |
| 436 | * removed pre-1.8 autoescape tag syntax |
| 437 | * dropped support for PHP 5.x |
| 438 | * removed the ability to register a global variable after the runtime or the extensions have been initialized |
| 439 | * improved the performance of the filesystem loader |
| 440 | * removed features that were deprecated in 1.x |
| 441 | |
| 442 | # 1.44.4 (2021-XX-XX) |
| 443 | |
| 444 | * Revert "Throw a proper exception when a template name is an absolute path (as it has never been supported)" |
| 445 | |
| 446 | # 1.44.3 (2021-05-12) |
| 447 | |
| 448 | * Fix PHP 8.1 compatibility |
| 449 | * Throw a proper exception when a template name is an absolute path (as it has never been supported) |
| 450 | |
| 451 | # 1.44.2 (2021-01-05) |
| 452 | |
| 453 | * Fix "odd" not working for negative numbers |
| 454 | |
| 455 | # 1.44.1 (2020-10-27) |
| 456 | |
| 457 | * Fix "include(template_from_string())" |
| 458 | |
| 459 | # 1.44.0 (2020-10-21) |
| 460 | |
| 461 | * Remove implicit dependency on ext/iconv in JS escaper |
| 462 | * Fix sandbox support when using "include(template_from_string())" |
| 463 | * Make round brackets optional for one argument tests like "same as" or "divisible by" |
| 464 | * Add support for ES2015 style object initialisation shortcut { a } is the same as { 'a': a } |
| 465 | * Fix filter(), map(), and reduce() to throw a RuntimeError instead of a PHP TypeError |
| 466 | * Drop PHP 7.1 support |
| 467 | |
| 468 | # 1.43.1 (2020-08-05) |
| 469 | |
| 470 | * Fix sandbox not disabled if syntax error occurs within {% sandbox %} tag |
| 471 | * Fix a regression when not using a space before an operator |
| 472 | * Restrict callables to closures in filters |
| 473 | * Allow trailing commas in argument lists (in calls as well as definitions) |
| 474 | |
| 475 | # 1.43.0 (2020-07-05) |
| 476 | |
| 477 | * Throw exception in case non-Traversable data is passed to "filter" |
| 478 | * Fix context optimization on PHP 7.4 |
| 479 | * Fix PHP 8 compatibility |
| 480 | * Drop PHP 5.5 5.6, and 7.0 support |
| 481 | * Fix ambiguous syntax parsing |
| 482 | * In sandbox, the `filter`, `map` and `reduce` filters require Closures in `arrow` parameter |
| 483 | |
| 484 | # 1.42.5 (2020-02-11) |
| 485 | |
| 486 | * Fix implementation of case-insensitivity for method names |
| 487 | |
| 488 | # 1.42.4 (2019-11-11) |
| 489 | |
| 490 | * optimized "block('foo') ?? 'bar" |
| 491 | * added supported for exponential numbers |
| 492 | |
| 493 | # 1.42.3 (2019-08-24) |
| 494 | |
| 495 | * fixed the "split" filter when the delimiter is "0" |
| 496 | * fixed the "empty" test on Traversable instances |
| 497 | * fixed cache when opcache is installed but disabled |
| 498 | * fixed PHP 7.4 compatibility |
| 499 | * bumped the minimal PHP version to 5.5 |
| 500 | |
| 501 | # 1.42.2 (2019-06-18) |
| 502 | |
| 503 | * Display partial output (PHP buffer) when an error occurs in debug mode |
| 504 | |
| 505 | # 1.42.1 (2019-06-04) |
| 506 | |
| 507 | * added support for "Twig\Markup" instances in the "in" test (again) |
| 508 | * allowed string operators as variables names in assignments |
| 509 | |
| 510 | # 1.42.0 (2019-05-31) |
| 511 | |
| 512 | * fixed the "filter" filter when the argument is \Traversable but does not implement \Iterator (\SimpleXmlElement for instance) |
| 513 | * fixed a PHP fatal error when calling a macro imported in a block in a nested block |
| 514 | * fixed a PHP fatal error when calling a macro imported in the template in another macro |
| 515 | * fixed wrong error message on "import" and "from" |
| 516 | |
| 517 | # 1.41.0 (2019-05-14) |
| 518 | |
| 519 | * fixed support for PHP 7.4 |
| 520 | * added "filter", "map", and "reduce" filters (and support for arrow functions) |
| 521 | * fixed partial output leak when a PHP fatal error occurs |
| 522 | * optimized context access on PHP 7.4 |
| 523 | |
| 524 | # 1.40.1 (2019-04-29) |
| 525 | |
| 526 | # fixed regression in NodeTraverser |
| 527 | |
| 528 | # 1.40.0 (2019-04-28) |
| 529 | |
| 530 | * allowed Twig\NodeVisitor\NodeVisitorInterface::leaveNode() to return "null" instead of "false" (same meaning) |
| 531 | * added the "apply" tag as a replacement for the "filter" tag |
| 532 | * allowed Twig\Loader\FilesystemLoader::findTemplate() to return "null" instead of "false" (same meaning) |
| 533 | * added support for "Twig\Markup" instances in the "in" test |
| 534 | * fixed Lexer when using custom options containing the # char |
| 535 | * fixed "import" when macros are stored in a template string |
| 536 | |
| 537 | # 1.39.1 (2019-04-16) |
| 538 | |
| 539 | * fixed EscaperNodeVisitor |
| 540 | |
| 541 | # 1.39.0 (2019-04-16) |
| 542 | |
| 543 | * added Traversable support for the length filter |
| 544 | * fixed some wrong location in error messages |
| 545 | * made exception creation faster |
| 546 | * made escaping on ternary expressions (?: and ??) more fine-grained |
| 547 | * added the possibility to give a nice name to string templates (template_from_string function) |
| 548 | * fixed the "with" behavior to always include the globals (for consistency with the "include" and "embed" tags) |
| 549 | * fixed "include" with "ignore missing" when an error loading occurs in the included template |
| 550 | * added support for a new whitespace trimming option ({%~ ~%}, {{~ ~}}, {#~ ~#}) |
| 551 | |
| 552 | # 1.38.4 (2019-03-23) |
| 553 | |
| 554 | * fixed CheckToStringNode implementation (broken when a function/filter is variadic) |
| 555 | |
| 556 | # 1.38.3 (2019-03-21) |
| 557 | |
| 558 | * fixed the spaceless filter so that it behaves like the spaceless tag |
| 559 | * fixed BC break on Environment::resolveTemplate() |
| 560 | * fixed the bundled Autoloader to also load namespaced classes |
| 561 | * allowed Traversable objects to be used in the "with" tag |
| 562 | * allowed Traversable objects to be used in the "with" argument of the "include" and "embed" tags |
| 563 | |
| 564 | # 1.38.2 (2019-03-12) |
| 565 | |
| 566 | * added TemplateWrapper::getTemplateName() |
| 567 | |
| 568 | # 1.38.1 (2019-03-12) |
| 569 | |
| 570 | * fixed class aliases |
| 571 | |
| 572 | # 1.38.0 (2019-03-12) |
| 573 | |
| 574 | * fixed sandbox security issue (under some circumstances, calling the |
| 575 | __toString() method on an object was possible even if not allowed by the |
| 576 | security policy) |
| 577 | * fixed batch filter clobbers array keys when fill parameter is used |
| 578 | * added preserveKeys support for the batch filter |
| 579 | * fixed "embed" support when used from "template_from_string" |
| 580 | * added the possibility to pass a TemplateWrapper to Twig\Environment::load() |
| 581 | * improved the performance of the sandbox |
| 582 | * added a spaceless filter |
| 583 | * added max value to the "random" function |
| 584 | * made namespace classes the default classes (PSR-0 ones are aliases now) |
| 585 | * removed duplicated directory separator in FilesystemLoader |
| 586 | * added Twig\Loader\ChainLoader::getLoaders() |
| 587 | * changed internal code to use the namespaced classes as much as possible |
| 588 | |
| 589 | # 1.37.1 (2019-01-14) |
| 590 | |
| 591 | * fixed regression (key exists check for non ArrayObject objects) |
| 592 | * fixed logic in TemplateWrapper |
| 593 | |
| 594 | # 1.37.0 (2019-01-14) |
| 595 | |
| 596 | * fixed ArrayObject access with a null value |
| 597 | * fixed embedded templates starting with a BOM |
| 598 | * fixed using a Twig_TemplateWrapper instance as an argument to extends |
| 599 | * switched generated code to use the PHP short array notation |
| 600 | * dropped PHP 5.3 support |
| 601 | * fixed float representation in compiled templates |
| 602 | * added a second argument to the join filter (last separator configuration) |
| 603 | |
| 604 | # 1.36.0 (2018-12-16) |
| 605 | |
| 606 | * made sure twig_include returns a string |
| 607 | * fixed multi-byte UFT-8 in escape('html_attr') |
| 608 | * added the "deprecated" tag |
| 609 | * added support for dynamically named tests |
| 610 | * fixed GlobalsInterface extended class |
| 611 | * fixed filesystem loader throwing an exception instead of returning false |
| 612 | |
| 613 | # 1.35.4 (2018-07-13) |
| 614 | |
| 615 | * ensured that syntax errors are triggered with the right line |
| 616 | * added the Symfony ctype polyfill as a dependency |
| 617 | * "js" filter now produces valid JSON |
| 618 | |
| 619 | # 1.35.3 (2018-03-20) |
| 620 | |
| 621 | * fixed block names unicity |
| 622 | * fixed counting children of SimpleXMLElement objects |
| 623 | * added missing else clause to avoid infinite loops |
| 624 | * fixed .. (range operator) in sandbox policy |
| 625 | |
| 626 | # 1.35.2 (2018-03-03) |
| 627 | |
| 628 | * fixed a regression in the way the profiler is registered in templates |
| 629 | |
| 630 | # 1.35.1 (2018-03-02) |
| 631 | |
| 632 | * added an exception when using "===" instead of "same as" |
| 633 | * fixed possible array to string conversion concealing actual error |
| 634 | * made variable names deterministic in compiled templates |
| 635 | * fixed length filter when passing an instance of IteratorAggregate |
| 636 | * fixed Environment::resolveTemplate to accept instances of TemplateWrapper |
| 637 | |
| 638 | # 1.35.0 (2017-09-27) |
| 639 | |
| 640 | * added Twig_Profiler_Profile::reset() |
| 641 | * fixed use TokenParser to return an empty Node |
| 642 | * added RuntimeExtensionInterface |
| 643 | * added circular reference detection when loading templates |
| 644 | |
| 645 | # 1.34.4 (2017-07-04) |
| 646 | |
| 647 | * added support for runtime loaders in IntegrationTestCase |
| 648 | * fixed deprecation when using Twig_Profiler_Dumper_Html |
| 649 | |
| 650 | # 1.34.3 (2017-06-07) |
| 651 | |
| 652 | * fixed namespaces introduction |
| 653 | |
| 654 | # 1.34.2 (2017-06-05) |
| 655 | |
| 656 | * fixed namespaces introduction |
| 657 | |
| 658 | # 1.34.1 (2017-06-05) |
| 659 | |
| 660 | * fixed namespaces introduction |
| 661 | |
| 662 | # 1.34.0 (2017-06-05) |
| 663 | |
| 664 | * added support for PHPUnit 6 when testing extensions |
| 665 | * fixed PHP 7.2 compatibility |
| 666 | * fixed template name generation in Twig_Environment::createTemplate() |
| 667 | * removed final tag on Twig_TokenParser_Include |
| 668 | * added namespaced aliases for all (non-deprecated) classes and interfaces |
| 669 | * dropped HHVM support |
| 670 | * dropped PHP 5.2 support |
| 671 | |
| 672 | # 1.33.2 (2017-04-20) |
| 673 | |
| 674 | * fixed edge case in the method cache for Twig attributes |
| 675 | |
| 676 | # 1.33.1 (2017-04-18) |
| 677 | |
| 678 | * fixed the empty() test |
| 679 | |
| 680 | # 1.33.0 (2017-03-22) |
| 681 | |
| 682 | * fixed a race condition handling when writing cache files |
| 683 | * "length" filter now returns string length when applied to an object that does |
| 684 | not implement \Countable but provides __toString() |
| 685 | * "empty" test will now consider the return value of the __toString() method for |
| 686 | objects implement __toString() but not \Countable |
| 687 | * fixed JS escaping for unicode characters with higher code points |
| 688 | |
| 689 | # 1.32.0 (2017-02-26) |
| 690 | |
| 691 | * fixed deprecation notice in Twig_Util_DeprecationCollector |
| 692 | * added a PSR-11 compatible runtime loader |
| 693 | * added `side` argument to `trim` to allow left or right trimming only. |
| 694 | |
| 695 | # 1.31.0 (2017-01-11) |
| 696 | |
| 697 | * added Twig_NodeCaptureInterface for nodes that capture all output |
| 698 | * fixed marking the environment as initialized too early |
| 699 | * fixed C89 compat for the C extension |
| 700 | * turned fatal error into exception when a previously generated cache is corrupted |
| 701 | * fixed offline cache warm-ups for embedded templates |
| 702 | |
| 703 | # 1.30.0 (2016-12-23) |
| 704 | |
| 705 | * added Twig_FactoryRuntimeLoader |
| 706 | * deprecated function/test/filter/tag overriding |
| 707 | * deprecated the "disable_c_ext" attribute on Twig_Node_Expression_GetAttr |
| 708 | |
| 709 | # 1.29.0 (2016-12-13) |
| 710 | |
| 711 | * fixed sandbox being left enabled if an exception is thrown while rendering |
| 712 | * marked some classes as being final (via @final) |
| 713 | * made Twig_Error report real source path when possible |
| 714 | * added support for {{ _self }} to provide an upgrade path from 1.x to 2.0 (replaces {{ _self.templateName }}) |
| 715 | * deprecated silent display of undefined blocks |
| 716 | * deprecated support for mbstring.func_overload != 0 |
| 717 | |
| 718 | # 1.28.2 (2016-11-23) |
| 719 | |
| 720 | * fixed precedence between getFoo() and isFoo() in Twig_Template::getAttribute() |
| 721 | * improved a deprecation message |
| 722 | |
| 723 | # 1.28.1 (2016-11-18) |
| 724 | |
| 725 | * fixed block() function when used with a template argument |
| 726 | |
| 727 | # 1.28.0 (2016-11-17) |
| 728 | |
| 729 | * added support for the PHP 7 null coalescing operator for the ?? Twig implementation |
| 730 | * exposed a way to access template data and methods in a portable way |
| 731 | * changed context access to use the PHP 7 null coalescing operator when available |
| 732 | * added the "with" tag |
| 733 | * added support for a custom template on the block() function |
| 734 | * added "is defined" support for block() and constant() |
| 735 | * optimized the way attributes are fetched |
| 736 | |
| 737 | # 1.27.0 (2016-10-25) |
| 738 | |
| 739 | * deprecated Twig_Parser::getEnvironment() |
| 740 | * deprecated Twig_Parser::addHandler() and Twig_Parser::addNodeVisitor() |
| 741 | * deprecated Twig_Compiler::addIndentation() |
| 742 | * fixed regression when registering two extensions having the same class name |
| 743 | * deprecated Twig_LoaderInterface::getSource() (implement Twig_SourceContextLoaderInterface instead) |
| 744 | * fixed the filesystem loader with relative paths |
| 745 | * deprecated Twig_Node::getLine() in favor of Twig_Node::getTemplateLine() |
| 746 | * deprecated Twig_Template::getSource() in favor of Twig_Template::getSourceContext() |
| 747 | * deprecated Twig_Node::getFilename() in favor of Twig_Node::getTemplateName() |
| 748 | * deprecated the "filename" escaping strategy (use "name" instead) |
| 749 | * added Twig_Source to hold information about the original template |
| 750 | * deprecated Twig_Error::getTemplateFile() and Twig_Error::setTemplateFile() in favor of Twig_Error::getTemplateName() and Twig_Error::setTemplateName() |
| 751 | * deprecated Parser::getFilename() |
| 752 | * fixed template paths when a template name contains a protocol like vfs:// |
| 753 | * improved debugging with Twig_Sandbox_SecurityError exceptions for disallowed methods and properties |
| 754 | |
| 755 | # 1.26.1 (2016-10-05) |
| 756 | |
| 757 | * removed template source code from generated template classes when debug is disabled |
| 758 | * fixed default implementation of Twig_Template::getDebugInfo() for better BC |
| 759 | * fixed regression on static calls for functions/filters/tests |
| 760 | |
| 761 | # 1.26.0 (2016-10-02) |
| 762 | |
| 763 | * added template cache invalidation based on more environment options |
| 764 | * added a missing deprecation notice |
| 765 | * fixed template paths when a template is stored in a PHAR file |
| 766 | * allowed filters/functions/tests implementation to use a different class than the extension they belong to |
| 767 | * deprecated Twig_ExtensionInterface::getName() |
| 768 | |
| 769 | # 1.25.0 (2016-09-21) |
| 770 | |
| 771 | * changed the way we store template source in template classes |
| 772 | * removed usage of realpath in cache keys |
| 773 | * fixed Twig cache sharing when used with different versions of PHP |
| 774 | * removed embed parent workaround for simple use cases |
| 775 | * deprecated the ability to store non Node instances in Node::$nodes |
| 776 | * deprecated Twig_Environment::getLexer(), Twig_Environment::getParser(), Twig_Environment::getCompiler() |
| 777 | * deprecated Twig_Compiler::getFilename() |
| 778 | |
| 779 | # 1.24.2 (2016-09-01) |
| 780 | |
| 781 | * fixed static callables |
| 782 | * fixed a potential PHP warning when loading the cache |
| 783 | * fixed a case where the autoescaping does not work as expected |
| 784 | |
| 785 | # 1.24.1 (2016-05-30) |
| 786 | |
| 787 | * fixed reserved keywords (forbids true, false, null and none keywords for variables names) |
| 788 | * fixed support for PHP7 (Throwable support) |
| 789 | * marked the following methods as being internals on Twig_Environment: |
| 790 | getFunctions(), getFilters(), getTests(), getFunction(), getFilter(), getTest(), |
| 791 | getTokenParsers(), getTags(), getNodeVisitors(), getUnaryOperators(), getBinaryOperators(), |
| 792 | getFunctions(), getFilters(), getGlobals(), initGlobals(), initExtensions(), and initExtension() |
| 793 | |
| 794 | # 1.24.0 (2016-01-25) |
| 795 | |
| 796 | * adding support for the ?? operator |
| 797 | * fixed the defined test when used on a constant, a map, or a sequence |
| 798 | * undeprecated _self (should only be used to get the template name, not the template instance) |
| 799 | * fixed parsing on PHP7 |
| 800 | |
| 801 | # 1.23.3 (2016-01-11) |
| 802 | |
| 803 | * fixed typo |
| 804 | |
| 805 | # 1.23.2 (2015-01-11) |
| 806 | |
| 807 | * added versions in deprecated messages |
| 808 | * made file cache tolerant for trailing (back)slashes on directory configuration |
| 809 | * deprecated unused Twig_Node_Expression_ExtensionReference class |
| 810 | |
| 811 | # 1.23.1 (2015-11-05) |
| 812 | |
| 813 | * fixed some exception messages which triggered PHP warnings |
| 814 | * fixed BC on Twig_Test_NodeTestCase |
| 815 | |
| 816 | # 1.23.0 (2015-10-29) |
| 817 | |
| 818 | * deprecated the possibility to override an extension by registering another one with the same name |
| 819 | * deprecated Twig_ExtensionInterface::getGlobals() (added Twig_Extension_GlobalsInterface for BC) |
| 820 | * deprecated Twig_ExtensionInterface::initRuntime() (added Twig_Extension_InitRuntimeInterface for BC) |
| 821 | * deprecated Twig_Environment::computeAlternatives() |
| 822 | |
| 823 | # 1.22.3 (2015-10-13) |
| 824 | |
| 825 | * fixed regression when using null as a cache strategy |
| 826 | * improved performance when checking template freshness |
| 827 | * fixed warnings when loaded templates do not exist |
| 828 | * fixed template class name generation to prevent possible collisions |
| 829 | * fixed logic for custom escapers to call them even on integers and null values |
| 830 | * changed template cache names to take into account the Twig C extension |
| 831 | |
| 832 | # 1.22.2 (2015-09-22) |
| 833 | |
| 834 | * fixed a race condition in template loading |
| 835 | |
| 836 | # 1.22.1 (2015-09-15) |
| 837 | |
| 838 | * fixed regression in template_from_string |
| 839 | |
| 840 | # 1.22.0 (2015-09-13) |
| 841 | |
| 842 | * made Twig_Test_IntegrationTestCase more flexible |
| 843 | * added an option to force PHP bytecode invalidation when writing a compiled template into the cache |
| 844 | * fixed the profiler duration for the root node |
| 845 | * changed template cache names to take into account enabled extensions |
| 846 | * deprecated Twig_Environment::clearCacheFiles(), Twig_Environment::getCacheFilename(), |
| 847 | Twig_Environment::writeCacheFile(), and Twig_Environment::getTemplateClassPrefix() |
| 848 | * added a way to override the filesystem template cache system |
| 849 | * added a way to get the original template source from Twig_Template |
| 850 | |
| 851 | # 1.21.2 (2015-09-09) |
| 852 | |
| 853 | * fixed variable names for the deprecation triggering code |
| 854 | * fixed escaping strategy detection based on filename |
| 855 | * added Traversable support for replace, merge, and sort |
| 856 | * deprecated support for character by character replacement for the "replace" filter |
| 857 | |
| 858 | # 1.21.1 (2015-08-26) |
| 859 | |
| 860 | * fixed regression when using the deprecated Twig_Test_* classes |
| 861 | |
| 862 | # 1.21.0 (2015-08-24) |
| 863 | |
| 864 | * added deprecation notices for deprecated features |
| 865 | * added a deprecation "framework" for filters/functions/tests and test fixtures |
| 866 | |
| 867 | # 1.20.0 (2015-08-12) |
| 868 | |
| 869 | * forbid access to the Twig environment from templates and internal parts of Twig_Template |
| 870 | * fixed limited RCEs when in sandbox mode |
| 871 | * deprecated Twig_Template::getEnvironment() |
| 872 | * deprecated the _self variable for usage outside of the from and import tags |
| 873 | * added Twig_BaseNodeVisitor to ease the compatibility of node visitors |
| 874 | between 1.x and 2.x |
| 875 | |
| 876 | # 1.19.0 (2015-07-31) |
| 877 | |
| 878 | * fixed wrong error message when including an undefined template in a child template |
| 879 | * added support for variadic filters, functions, and tests |
| 880 | * added support for extra positional arguments in macros |
| 881 | * added ignore_missing flag to the source function |
| 882 | * fixed batch filter with zero items |
| 883 | * deprecated Twig_Environment::clearTemplateCache() |
| 884 | * fixed sandbox disabling when using the include function |
| 885 | |
| 886 | # 1.18.2 (2015-06-06) |
| 887 | |
| 888 | * fixed template/line guessing in exceptions for nested templates |
| 889 | * optimized the number of inodes and the size of realpath cache when using the cache |
| 890 | |
| 891 | # 1.18.1 (2015-04-19) |
| 892 | |
| 893 | * fixed memory leaks in the C extension |
| 894 | * deprecated Twig_Loader_String |
| 895 | * fixed the slice filter when used with a SimpleXMLElement object |
| 896 | * fixed filesystem loader when trying to load non-files (like directories) |
| 897 | |
| 898 | # 1.18.0 (2015-01-25) |
| 899 | |
| 900 | * fixed some error messages where the line was wrong (unknown variables or argument names) |
| 901 | * added a new way to customize the main Module node (via empty nodes) |
| 902 | * added Twig_Environment::createTemplate() to create a template from a string |
| 903 | * added a profiler |
| 904 | * fixed filesystem loader cache when different file paths are used for the same template |
| 905 | |
| 906 | # 1.17.0 (2015-01-14) |
| 907 | |
| 908 | * added a 'filename' autoescaping strategy, which dynamically chooses the |
| 909 | autoescaping strategy for a template based on template file extension. |
| 910 | |
| 911 | # 1.16.3 (2014-12-25) |
| 912 | |
| 913 | * fixed regression for dynamic parent templates |
| 914 | * fixed cache management with statcache |
| 915 | * fixed a regression in the slice filter |
| 916 | |
| 917 | # 1.16.2 (2014-10-17) |
| 918 | |
| 919 | * fixed timezone on dates as strings |
| 920 | * fixed 2-words test names when a custom node class is not used |
| 921 | * fixed macros when using an argument named like a PHP super global (like GET or POST) |
| 922 | * fixed date_modify when working with DateTimeImmutable |
| 923 | * optimized for loops |
| 924 | * fixed multi-byte characters handling in the split filter |
| 925 | * fixed a regression in the in operator |
| 926 | * fixed a regression in the slice filter |
| 927 | |
| 928 | # 1.16.1 (2014-10-10) |
| 929 | |
| 930 | * improved error reporting in a sandboxed template |
| 931 | * fixed missing error file/line information under certain circumstances |
| 932 | * fixed wrong error line number in some error messages |
| 933 | * fixed the in operator to use strict comparisons |
| 934 | * sped up the slice filter |
| 935 | * fixed for mb function overload mb_substr acting different |
| 936 | * fixed the attribute() function when passing a variable for the arguments |
| 937 | |
| 938 | # 1.16.0 (2014-07-05) |
| 939 | |
| 940 | * changed url_encode to always encode according to RFC 3986 |
| 941 | * fixed inheritance in a 'use'-hierarchy |
| 942 | * removed the __toString policy check when the sandbox is disabled |
| 943 | * fixed recursively calling blocks in templates with inheritance |
| 944 | |
| 945 | # 1.15.1 (2014-02-13) |
| 946 | |
| 947 | * fixed the conversion of the special '0000-00-00 00:00' date |
| 948 | * added an error message when trying to import an undefined block from a trait |
| 949 | * fixed a C extension crash when accessing defined but uninitialized property. |
| 950 | |
| 951 | # 1.15.0 (2013-12-06) |
| 952 | |
| 953 | * made ignoreStrictCheck in Template::getAttribute() works with __call() methods throwing BadMethodCallException |
| 954 | * added min and max functions |
| 955 | * added the round filter |
| 956 | * fixed a bug that prevented the optimizers to be enabled/disabled selectively |
| 957 | * fixed first and last filters for UTF-8 strings |
| 958 | * added a source function to include the content of a template without rendering it |
| 959 | * fixed the C extension sandbox behavior when get or set is prepend to method name |
| 960 | |
| 961 | # 1.14.2 (2013-10-30) |
| 962 | |
| 963 | * fixed error filename/line when an error occurs in an included file |
| 964 | * allowed operators that contain whitespaces to have more than one whitespace |
| 965 | * allowed tests to be made of 1 or 2 words (like "same as" or "divisible by") |
| 966 | |
| 967 | # 1.14.1 (2013-10-15) |
| 968 | |
| 969 | * made it possible to use named operators as variables |
| 970 | * fixed the possibility to have a variable named 'matches' |
| 971 | * added support for PHP 5.5 DateTimeInterface |
| 972 | |
| 973 | # 1.14.0 (2013-10-03) |
| 974 | |
| 975 | * fixed usage of the html_attr escaping strategy to avoid double-escaping with the html strategy |
| 976 | * added new operators: ends with, starts with, and matches |
| 977 | * fixed some compatibility issues with HHVM |
| 978 | * added a way to add custom escaping strategies |
| 979 | * fixed the C extension compilation on Windows |
| 980 | * fixed the batch filter when using a fill argument with an exact match of elements to batch |
| 981 | * fixed the filesystem loader cache when a template name exists in several namespaces |
| 982 | * fixed template_from_string when the template includes or extends other ones |
| 983 | * fixed a crash of the C extension on an edge case |
| 984 | |
| 985 | # 1.13.2 (2013-08-03) |
| 986 | |
| 987 | * fixed the error line number for an error occurs in and embedded template |
| 988 | * fixed crashes of the C extension on some edge cases |
| 989 | |
| 990 | # 1.13.1 (2013-06-06) |
| 991 | |
| 992 | * added the possibility to ignore the filesystem constructor argument in Twig_Loader_Filesystem |
| 993 | * fixed Twig_Loader_Chain::exists() for a loader which implements Twig_ExistsLoaderInterface |
| 994 | * adjusted backtrace call to reduce memory usage when an error occurs |
| 995 | * added support for object instances as the second argument of the constant test |
| 996 | * fixed the include function when used in an assignment |
| 997 | |
| 998 | # 1.13.0 (2013-05-10) |
| 999 | |
| 1000 | * fixed getting a numeric-like item on a variable ('09' for instance) |
| 1001 | * fixed getting a boolean or float key on an array, so it is consistent with PHP's array access: |
| 1002 | `{{ array[false] }}` behaves the same as `echo $array[false];` (equals `$array[0]`) |
| 1003 | * made the escape filter 20% faster for happy path (escaping string for html with UTF-8) |
| 1004 | * changed ☃ to § in tests |
| 1005 | * enforced usage of named arguments after positional ones |
| 1006 | |
| 1007 | # 1.12.3 (2013-04-08) |
| 1008 | |
| 1009 | * fixed a security issue in the filesystem loader where it was possible to include a template one |
| 1010 | level above the configured path |
| 1011 | * fixed fatal error that should be an exception when adding a filter/function/test too late |
| 1012 | * added a batch filter |
| 1013 | * added support for encoding an array as query string in the url_encode filter |
| 1014 | |
| 1015 | # 1.12.2 (2013-02-09) |
| 1016 | |
| 1017 | * fixed the timezone used by the date filter and function when the given date contains a timezone (like 2010-01-28T15:00:00+02:00) |
| 1018 | * fixed globals when getGlobals is called early on |
| 1019 | * added the first and last filter |
| 1020 | |
| 1021 | # 1.12.1 (2013-01-15) |
| 1022 | |
| 1023 | * added support for object instances as the second argument of the constant function |
| 1024 | * relaxed globals management to avoid a BC break |
| 1025 | * added support for {{ some_string[:2] }} |
| 1026 | |
| 1027 | # 1.12.0 (2013-01-08) |
| 1028 | |
| 1029 | * added verbatim as an alias for the raw tag to avoid confusion with the raw filter |
| 1030 | * fixed registration of tests and functions as anonymous functions |
| 1031 | * fixed globals management |
| 1032 | |
| 1033 | # 1.12.0-RC1 (2012-12-29) |
| 1034 | |
| 1035 | * added an include function (does the same as the include tag but in a more flexible way) |
| 1036 | * added the ability to use any PHP callable to define filters, functions, and tests |
| 1037 | * added a syntax error when using a loop variable that is not defined |
| 1038 | * added the ability to set default values for macro arguments |
| 1039 | * added support for named arguments for filters, tests, and functions |
| 1040 | * moved filters/functions/tests syntax errors to the parser |
| 1041 | * added support for extended ternary operator syntaxes |
| 1042 | |
| 1043 | # 1.11.1 (2012-11-11) |
| 1044 | |
| 1045 | * fixed debug info line numbering (was off by 2) |
| 1046 | * fixed escaping when calling a macro inside another one (regression introduced in 1.9.1) |
| 1047 | * optimized variable access on PHP 5.4 |
| 1048 | * fixed a crash of the C extension when an exception was thrown from a macro called without being imported (using _self.XXX) |
| 1049 | |
| 1050 | # 1.11.0 (2012-11-07) |
| 1051 | |
| 1052 | * fixed macro compilation when a variable name is a PHP reserved keyword |
| 1053 | * changed the date filter behavior to always apply the default timezone, except if false is passed as the timezone |
| 1054 | * fixed bitwise operator precedences |
| 1055 | * added the template_from_string function |
| 1056 | * fixed default timezone usage for the date function |
| 1057 | * optimized the way Twig exceptions are managed (to make them faster) |
| 1058 | * added Twig_ExistsLoaderInterface (implementing this interface in your loader make the chain loader much faster) |
| 1059 | |
| 1060 | # 1.10.3 (2012-10-19) |
| 1061 | |
| 1062 | * fixed wrong template location in some error messages |
| 1063 | * reverted a BC break introduced in 1.10.2 |
| 1064 | * added a split filter |
| 1065 | |
| 1066 | # 1.10.2 (2012-10-15) |
| 1067 | |
| 1068 | * fixed macro calls on PHP 5.4 |
| 1069 | |
| 1070 | # 1.10.1 (2012-10-15) |
| 1071 | |
| 1072 | * made a speed optimization to macro calls when imported via the "import" tag |
| 1073 | * fixed C extension compilation on Windows |
| 1074 | * fixed a segfault in the C extension when using DateTime objects |
| 1075 | |
| 1076 | # 1.10.0 (2012-09-28) |
| 1077 | |
| 1078 | * extracted functional tests framework to make it reusable for third-party extensions |
| 1079 | * added namespaced templates support in Twig_Loader_Filesystem |
| 1080 | * added Twig_Loader_Filesystem::prependPath() |
| 1081 | * fixed an error when a token parser pass a closure as a test to the subparse() method |
| 1082 | |
| 1083 | # 1.9.2 (2012-08-25) |
| 1084 | |
| 1085 | * fixed the in operator for objects that contain circular references |
| 1086 | * fixed the C extension when accessing a public property of an object implementing the \ArrayAccess interface |
| 1087 | |
| 1088 | # 1.9.1 (2012-07-22) |
| 1089 | |
| 1090 | * optimized macro calls when auto-escaping is on |
| 1091 | * fixed wrong parent class for Twig_Function_Node |
| 1092 | * made Twig_Loader_Chain more explicit about problems |
| 1093 | |
| 1094 | # 1.9.0 (2012-07-13) |
| 1095 | |
| 1096 | * made the parsing independent of the template loaders |
| 1097 | * fixed exception trace when an error occurs when rendering a child template |
| 1098 | * added escaping strategies for CSS, URL, and HTML attributes |
| 1099 | * fixed nested embed tag calls |
| 1100 | * added the date_modify filter |
| 1101 | |
| 1102 | # 1.8.3 (2012-06-17) |
| 1103 | |
| 1104 | * fixed paths in the filesystem loader when passing a path that ends with a slash or a backslash |
| 1105 | * fixed escaping when a project defines a function named html or js |
| 1106 | * fixed chmod mode to apply the umask correctly |
| 1107 | |
| 1108 | # 1.8.2 (2012-05-30) |
| 1109 | |
| 1110 | * added the abs filter |
| 1111 | * fixed a regression when using a number in template attributes |
| 1112 | * fixed compiler when mbstring.func_overload is set to 2 |
| 1113 | * fixed DateTimeZone support in date filter |
| 1114 | |
| 1115 | # 1.8.1 (2012-05-17) |
| 1116 | |
| 1117 | * fixed a regression when dealing with SimpleXMLElement instances in templates |
| 1118 | * fixed "is_safe" value for the "dump" function when "html_errors" is not defined in php.ini |
| 1119 | * switched to use mbstring whenever possible instead of iconv (you might need to update your encoding as mbstring and iconv encoding names sometimes differ) |
| 1120 | |
| 1121 | # 1.8.0 (2012-05-08) |
| 1122 | |
| 1123 | * enforced interface when adding tests, filters, functions, and node visitors from extensions |
| 1124 | * fixed a side-effect of the date filter where the timezone might be changed |
| 1125 | * simplified usage of the autoescape tag; the only (optional) argument is now the escaping strategy or false (with a BC layer) |
| 1126 | * added a way to dynamically change the auto-escaping strategy according to the template "filename" |
| 1127 | * changed the autoescape option to also accept a supported escaping strategy (for BC, true is equivalent to html) |
| 1128 | * added an embed tag |
| 1129 | |
| 1130 | # 1.7.0 (2012-04-24) |
| 1131 | |
| 1132 | * fixed a PHP warning when using CIFS |
| 1133 | * fixed template line number in some exceptions |
| 1134 | * added an iterable test |
| 1135 | * added an error when defining two blocks with the same name in a template |
| 1136 | * added the preserves_safety option for filters |
| 1137 | * fixed a PHP notice when trying to access a key on a non-object/array variable |
| 1138 | * enhanced error reporting when the template file is an instance of SplFileInfo |
| 1139 | * added Twig_Environment::mergeGlobals() |
| 1140 | * added compilation checks to avoid misuses of the sandbox tag |
| 1141 | * fixed filesystem loader freshness logic for high traffic websites |
| 1142 | * fixed random function when charset is null |
| 1143 | |
| 1144 | # 1.6.5 (2012-04-11) |
| 1145 | |
| 1146 | * fixed a regression when a template only extends another one without defining any blocks |
| 1147 | |
| 1148 | # 1.6.4 (2012-04-02) |
| 1149 | |
| 1150 | * fixed PHP notice in Twig_Error::guessTemplateLine() introduced in 1.6.3 |
| 1151 | * fixed performance when compiling large files |
| 1152 | * optimized parent template creation when the template does not use dynamic inheritance |
| 1153 | |
| 1154 | # 1.6.3 (2012-03-22) |
| 1155 | |
| 1156 | * fixed usage of Z_ADDREF_P for PHP 5.2 in the C extension |
| 1157 | * fixed compilation of numeric values used in templates when using a locale where the decimal separator is not a dot |
| 1158 | * made the strategy used to guess the real template file name and line number in exception messages much faster and more accurate |
| 1159 | |
| 1160 | # 1.6.2 (2012-03-18) |
| 1161 | |
| 1162 | * fixed sandbox mode when used with inheritance |
| 1163 | * added preserveKeys support for the slice filter |
| 1164 | * fixed the date filter when a DateTime instance is passed with a specific timezone |
| 1165 | * added a trim filter |
| 1166 | |
| 1167 | # 1.6.1 (2012-02-29) |
| 1168 | |
| 1169 | * fixed Twig C extension |
| 1170 | * removed the creation of Twig_Markup instances when not needed |
| 1171 | * added a way to set the default global timezone for dates |
| 1172 | * fixed the slice filter on strings when the length is not specified |
| 1173 | * fixed the creation of the cache directory in case of a race condition |
| 1174 | |
| 1175 | # 1.6.0 (2012-02-04) |
| 1176 | |
| 1177 | * fixed raw blocks when used with the whitespace trim option |
| 1178 | * made a speed optimization to macro calls when imported via the "from" tag |
| 1179 | * fixed globals, parsers, visitors, filters, tests, and functions management in Twig_Environment when a new one or new extension is added |
| 1180 | * fixed the attribute function when passing arguments |
| 1181 | * added slice notation support for the [] operator (syntactic sugar for the slice operator) |
| 1182 | * added a slice filter |
| 1183 | * added string support for the reverse filter |
| 1184 | * fixed the empty test and the length filter for Twig_Markup instances |
| 1185 | * added a date function to ease date comparison |
| 1186 | * fixed unary operators precedence |
| 1187 | * added recursive parsing support in the parser |
| 1188 | * added string and integer handling for the random function |
| 1189 | |
| 1190 | # 1.5.1 (2012-01-05) |
| 1191 | |
| 1192 | * fixed a regression when parsing strings |
| 1193 | |
| 1194 | # 1.5.0 (2012-01-04) |
| 1195 | |
| 1196 | * added Traversable objects support for the join filter |
| 1197 | |
| 1198 | # 1.5.0-RC2 (2011-12-30) |
| 1199 | |
| 1200 | * added a way to set the default global date interval format |
| 1201 | * fixed the date filter for DateInterval instances (setTimezone() does not exist for them) |
| 1202 | * refactored Twig_Template::display() to ease its extension |
| 1203 | * added a number_format filter |
| 1204 | |
| 1205 | # 1.5.0-RC1 (2011-12-26) |
| 1206 | |
| 1207 | * removed the need to quote hash keys |
| 1208 | * allowed hash keys to be any expression |
| 1209 | * added a do tag |
| 1210 | * added a flush tag |
| 1211 | * added support for dynamically named filters and functions |
| 1212 | * added a dump function to help debugging templates |
| 1213 | * added a nl2br filter |
| 1214 | * added a random function |
| 1215 | * added a way to change the default format for the date filter |
| 1216 | * fixed the lexer when an operator ending with a letter ends a line |
| 1217 | * added string interpolation support |
| 1218 | * enhanced exceptions for unknown filters, functions, tests, and tags |
| 1219 | |
| 1220 | # 1.4.0 (2011-12-07) |
| 1221 | |
| 1222 | * fixed lexer when using big numbers (> PHP_INT_MAX) |
| 1223 | * added missing preserveKeys argument to the reverse filter |
| 1224 | * fixed macros containing filter tag calls |
| 1225 | |
| 1226 | # 1.4.0-RC2 (2011-11-27) |
| 1227 | |
| 1228 | * removed usage of Reflection in Twig_Template::getAttribute() |
| 1229 | * added a C extension that can optionally replace Twig_Template::getAttribute() |
| 1230 | * added negative timestamp support to the date filter |
| 1231 | |
| 1232 | # 1.4.0-RC1 (2011-11-20) |
| 1233 | |
| 1234 | * optimized variable access when using PHP 5.4 |
| 1235 | * changed the precedence of the .. operator to be more consistent with languages that implements such a feature like Ruby |
| 1236 | * added an Exception to Twig_Loader_Array::isFresh() method when the template does not exist to be consistent with other loaders |
| 1237 | * added Twig_Function_Node to allow more complex functions to have their own Node class |
| 1238 | * added Twig_Filter_Node to allow more complex filters to have their own Node class |
| 1239 | * added Twig_Test_Node to allow more complex tests to have their own Node class |
| 1240 | * added a better error message when a template is empty but contain a BOM |
| 1241 | * fixed "in" operator for empty strings |
| 1242 | * fixed the "defined" test and the "default" filter (now works with more than one call (foo.bar.foo) and for both values of the strict_variables option) |
| 1243 | * changed the way extensions are loaded (addFilter/addFunction/addGlobal/addTest/addNodeVisitor/addTokenParser/addExtension can now be called in any order) |
| 1244 | * added Twig_Environment::display() |
| 1245 | * made the escape filter smarter when the encoding is not supported by PHP |
| 1246 | * added a convert_encoding filter |
| 1247 | * moved all node manipulations outside the compile() Node method |
| 1248 | * made several speed optimizations |
| 1249 | |
| 1250 | # 1.3.0 (2011-10-08) |
| 1251 | |
| 1252 | no changes |
| 1253 | |
| 1254 | # 1.3.0-RC1 (2011-10-04) |
| 1255 | |
| 1256 | * added an optimization for the parent() function |
| 1257 | * added cache reloading when auto_reload is true and an extension has been modified |
| 1258 | * added the possibility to force the escaping of a string already marked as safe (instance of Twig_Markup) |
| 1259 | * allowed empty templates to be used as traits |
| 1260 | * added traits support for the "parent" function |
| 1261 | |
| 1262 | # 1.2.0 (2011-09-13) |
| 1263 | |
| 1264 | no changes |
| 1265 | |
| 1266 | # 1.2.0-RC1 (2011-09-10) |
| 1267 | |
| 1268 | * enhanced the exception when a tag remains unclosed |
| 1269 | * added support for empty Countable objects for the "empty" test |
| 1270 | * fixed algorithm that determines if a template using inheritance is valid (no output between block definitions) |
| 1271 | * added better support for encoding problems when escaping a string (available as of PHP 5.4) |
| 1272 | * added a way to ignore a missing template when using the "include" tag ({% include "foo" ignore missing %}) |
| 1273 | * added support for an array of templates to the "include" and "extends" tags ({% include ['foo', 'bar'] %}) |
| 1274 | * added support for bitwise operators in expressions |
| 1275 | * added the "attribute" function to allow getting dynamic attributes on variables |
| 1276 | * added Twig_Loader_Chain |
| 1277 | * added Twig_Loader_Array::setTemplate() |
| 1278 | * added an optimization for the set tag when used to capture a large chunk of static text |
| 1279 | * changed name regex to match PHP one "[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*" (works for blocks, tags, functions, filters, and macros) |
| 1280 | * removed the possibility to use the "extends" tag from a block |
| 1281 | * added "if" modifier support to "for" loops |
| 1282 | |
| 1283 | # 1.1.2 (2011-07-30) |
| 1284 | |
| 1285 | * fixed json_encode filter on PHP 5.2 |
| 1286 | * fixed regression introduced in 1.1.1 ({{ block(foo|lower) }}) |
| 1287 | * fixed inheritance when using conditional parents |
| 1288 | * fixed compilation of templates when the body of a child template is not empty |
| 1289 | * fixed output when a macro throws an exception |
| 1290 | * fixed a parsing problem when a large chunk of text is enclosed in a comment tag |
| 1291 | * added PHPDoc for all Token parsers and Core extension functions |
| 1292 | |
| 1293 | # 1.1.1 (2011-07-17) |
| 1294 | |
| 1295 | * added a performance optimization in the Optimizer (also helps to lower the number of nested level calls) |
| 1296 | * made some performance improvement for some edge cases |
| 1297 | |
| 1298 | # 1.1.0 (2011-06-28) |
| 1299 | |
| 1300 | * fixed json_encode filter |
| 1301 | |
| 1302 | # 1.1.0-RC3 (2011-06-24) |
| 1303 | |
| 1304 | * fixed method case-sensitivity when using the sandbox mode |
| 1305 | * added timezone support for the date filter |
| 1306 | * fixed possible security problems with NUL bytes |
| 1307 | |
| 1308 | # 1.1.0-RC2 (2011-06-16) |
| 1309 | |
| 1310 | * added an exception when the template passed to "use" is not a string |
| 1311 | * made 'a.b is defined' not throw an exception if a is not defined (in strict mode) |
| 1312 | * added {% line \d+ %} directive |
| 1313 | |
| 1314 | # 1.1.0-RC1 (2011-05-28) |
| 1315 | |
| 1316 | Flush your cache after upgrading. |
| 1317 | |
| 1318 | * fixed date filter when using a timestamp |
| 1319 | * fixed the defined test for some cases |
| 1320 | * fixed a parsing problem when a large chunk of text is enclosed in a raw tag |
| 1321 | * added support for horizontal reuse of template blocks (see docs for more information) |
| 1322 | * added whitespace control modifier to all tags (see docs for more information) |
| 1323 | * added null as an alias for none (the null test is also an alias for the none test now) |
| 1324 | * made TRUE, FALSE, NONE equivalent to their lowercase counterparts |
| 1325 | * wrapped all compilation and runtime exceptions with Twig_Error_Runtime and added logic to guess the template name and line |
| 1326 | * moved display() method to Twig_Template (generated templates should now use doDisplay() instead) |
| 1327 | |
| 1328 | # 1.0.0 (2011-03-27) |
| 1329 | |
| 1330 | * fixed output when using mbstring |
| 1331 | * fixed duplicate call of methods when using the sandbox |
| 1332 | * made the charset configurable for the escape filter |
| 1333 | |
| 1334 | # 1.0.0-RC2 (2011-02-21) |
| 1335 | |
| 1336 | * changed the way {% set %} works when capturing (the content is now marked as safe) |
| 1337 | * added support for macro name in the endmacro tag |
| 1338 | * make Twig_Error compatible with PHP 5.3.0 > |
| 1339 | * fixed an infinite loop on some Windows configurations |
| 1340 | * fixed the "length" filter for numbers |
| 1341 | * fixed Template::getAttribute() as properties in PHP are case sensitive |
| 1342 | * removed coupling between Twig_Node and Twig_Template |
| 1343 | * fixed the ternary operator precedence rule |
| 1344 | |
| 1345 | # 1.0.0-RC1 (2011-01-09) |
| 1346 | |
| 1347 | Backward incompatibilities: |
| 1348 | |
| 1349 | * the "items" filter, which has been deprecated for quite a long time now, has been removed |
| 1350 | * the "range" filter has been converted to a function: 0|range(10) -> range(0, 10) |
| 1351 | * the "constant" filter has been converted to a function: {{ some_date|date('DATE_W3C'|constant) }} -> {{ some_date|date(constant('DATE_W3C')) }} |
| 1352 | * the "cycle" filter has been converted to a function: {{ ['odd', 'even']|cycle(i) }} -> {{ cycle(['odd', 'even'], i) }} |
| 1353 | * the "for" tag does not support "joined by" anymore |
| 1354 | * the "autoescape" first argument is now "true"/"false" (instead of "on"/"off") |
| 1355 | * the "parent" tag has been replaced by a "parent" function ({{ parent() }} instead of {% parent %}) |
| 1356 | * the "display" tag has been replaced by a "block" function ({{ block('title') }} instead of {% display title %}) |
| 1357 | * removed the grammar and simple token parser (moved to the Twig Extensions repository) |
| 1358 | |
| 1359 | Changes: |
| 1360 | |
| 1361 | * added "needs_context" option for filters and functions (the context is then passed as a first argument) |
| 1362 | * added global variables support |
| 1363 | * made macros return their value instead of echoing directly (fixes calling a macro in sandbox mode) |
| 1364 | * added the "from" tag to import macros as functions |
| 1365 | * added support for functions (a function is just syntactic sugar for a getAttribute() call) |
| 1366 | * made macros callable when sandbox mode is enabled |
| 1367 | * added an exception when a macro uses a reserved name |
| 1368 | * the "default" filter now uses the "empty" test instead of just checking for null |
| 1369 | * added the "empty" test |
| 1370 | |
| 1371 | # 0.9.10 (2010-12-16) |
| 1372 | |
| 1373 | Backward incompatibilities: |
| 1374 | |
| 1375 | * The Escaper extension is enabled by default, which means that all displayed |
| 1376 | variables are now automatically escaped. You can revert to the previous |
| 1377 | behavior by removing the extension via $env->removeExtension('escaper') |
| 1378 | or just set the 'autoescape' option to 'false'. |
| 1379 | * removed the "without loop" attribute for the "for" tag (not needed anymore |
| 1380 | as the Optimizer take care of that for most cases) |
| 1381 | * arrays and hashes have now a different syntax |
| 1382 | * arrays keep the same syntax with square brackets: [1, 2] |
| 1383 | * hashes now use curly braces (["a": "b"] should now be written as {"a": "b"}) |
| 1384 | * support for "arrays with keys" and "hashes without keys" is not supported anymore ([1, "foo": "bar"] or {"foo": "bar", 1}) |
| 1385 | * the i18n extension is now part of the Twig Extensions repository |
| 1386 | |
| 1387 | Changes: |
| 1388 | |
| 1389 | * added the merge filter |
| 1390 | * removed 'is_escaper' option for filters (a left over from the previous version) -- you must use 'is_safe' now instead |
| 1391 | * fixed usage of operators as method names (like is, in, and not) |
| 1392 | * changed the order of execution for node visitors |
| 1393 | * fixed default() filter behavior when used with strict_variables set to on |
| 1394 | * fixed filesystem loader compatibility with PHAR files |
| 1395 | * enhanced error messages when an unexpected token is parsed in an expression |
| 1396 | * fixed filename not being added to syntax error messages |
| 1397 | * added the autoescape option to enable/disable autoescaping |
| 1398 | * removed the newline after a comment (mimics PHP behavior) |
| 1399 | * added a syntax error exception when parent block is used on a template that does not extend another one |
| 1400 | * made the Escaper extension enabled by default |
| 1401 | * fixed sandbox extension when used with auto output escaping |
| 1402 | * fixed escaper when wrapping a Twig_Node_Print (the original class must be preserved) |
| 1403 | * added an Optimizer extension (enabled by default; optimizes "for" loops and "raw" filters) |
| 1404 | * added priority to node visitors |
| 1405 | |
| 1406 | # 0.9.9 (2010-11-28) |
| 1407 | |
| 1408 | Backward incompatibilities: |
| 1409 | * the self special variable has been renamed to _self |
| 1410 | * the odd and even filters are now tests: |
| 1411 | {{ foo|odd }} must now be written {{ foo is odd }} |
| 1412 | * the "safe" filter has been renamed to "raw" |
| 1413 | * in Node classes, |
| 1414 | sub-nodes are now accessed via getNode() (instead of property access) |
| 1415 | attributes via getAttribute() (instead of array access) |
| 1416 | * the urlencode filter had been renamed to url_encode |
| 1417 | * the include tag now merges the passed variables with the current context by default |
| 1418 | (the old behavior is still possible by adding the "only" keyword) |
| 1419 | * moved Exceptions to Twig_Error_* (Twig_SyntaxError/Twig_RuntimeError are now Twig_Error_Syntax/Twig_Error_Runtime) |
| 1420 | * removed support for {{ 1 < i < 3 }} (use {{ i > 1 and i < 3 }} instead) |
| 1421 | * the "in" filter has been removed ({{ a|in(b) }} should now be written {{ a in b }}) |
| 1422 | |
| 1423 | Changes: |
| 1424 | * added file and line to Twig_Error_Runtime exceptions thrown from Twig_Template |
| 1425 | * changed trans tag to accept any variable for the plural count |
| 1426 | * fixed sandbox mode (__toString() method check was not enforced if called implicitly from complex statements) |
| 1427 | * added the ** (power) operator |
| 1428 | * changed the algorithm used for parsing expressions |
| 1429 | * added the spaceless tag |
| 1430 | * removed trim_blocks option |
| 1431 | * added support for is*() methods for attributes (foo.bar now looks for foo->getBar() or foo->isBar()) |
| 1432 | * changed all exceptions to extend Twig_Error |
| 1433 | * fixed unary expressions ({{ not(1 or 0) }}) |
| 1434 | * fixed child templates (with an extend tag) that uses one or more imports |
| 1435 | * added support for {{ 1 not in [2, 3] }} (more readable than the current {{ not (1 in [2, 3]) }}) |
| 1436 | * escaping has been rewritten |
| 1437 | * the implementation of template inheritance has been rewritten |
| 1438 | (blocks can now be called individually and still work with inheritance) |
| 1439 | * fixed error handling for if tag when a syntax error occurs within a subparse process |
| 1440 | * added a way to implement custom logic for resolving token parsers given a tag name |
| 1441 | * fixed js escaper to be stricter (now uses a whilelist-based js escaper) |
| 1442 | * added the following filers: "constant", "trans", "replace", "json_encode" |
| 1443 | * added a "constant" test |
| 1444 | * fixed objects with __toString() not being autoescaped |
| 1445 | * fixed subscript expressions when calling __call() (methods now keep the case) |
| 1446 | * added "test" feature (accessible via the "is" operator) |
| 1447 | * removed the debug tag (should be done in an extension) |
| 1448 | * fixed trans tag when no vars are used in plural form |
| 1449 | * fixed race condition when writing template cache |
| 1450 | * added the special _charset variable to reference the current charset |
| 1451 | * added the special _context variable to reference the current context |
| 1452 | * renamed self to _self (to avoid conflict) |
| 1453 | * fixed Twig_Template::getAttribute() for protected properties |
| 1454 | |
| 1455 | # 0.9.8 (2010-06-28) |
| 1456 | |
| 1457 | Backward incompatibilities: |
| 1458 | * the trans tag plural count is now attached to the plural tag: |
| 1459 | old: `{% trans count %}...{% plural %}...{% endtrans %}` |
| 1460 | new: `{% trans %}...{% plural count %}...{% endtrans %}` |
| 1461 | |
| 1462 | * added a way to translate strings coming from a variable ({% trans var %}) |
| 1463 | * fixed trans tag when used with the Escaper extension |
| 1464 | * fixed default cache umask |
| 1465 | * removed Twig_Template instances from the debug tag output |
| 1466 | * fixed objects with __isset() defined |
| 1467 | * fixed set tag when used with a capture |
| 1468 | * fixed type hinting for Twig_Environment::addFilter() method |
| 1469 | |
| 1470 | # 0.9.7 (2010-06-12) |
| 1471 | |
| 1472 | Backward incompatibilities: |
| 1473 | * changed 'as' to '=' for the set tag ({% set title as "Title" %} must now be {% set title = "Title" %}) |
| 1474 | * removed the sandboxed attribute of the include tag (use the new sandbox tag instead) |
| 1475 | * refactored the Node system (if you have custom nodes, you will have to update them to use the new API) |
| 1476 | |
| 1477 | * added self as a special variable that refers to the current template (useful for importing macros from the current template) |
| 1478 | * added Twig_Template instance support to the include tag |
| 1479 | * added support for dynamic and conditional inheritance ({% extends some_var %} and {% extends standalone ? "minimum" : "base" %}) |
| 1480 | * added a grammar sub-framework to ease the creation of custom tags |
| 1481 | * fixed the for tag for large arrays (some loop variables are now only available for arrays and objects that implement the Countable interface) |
| 1482 | * removed the Twig_Resource::resolveMissingFilter() method |
| 1483 | * fixed the filter tag which did not apply filtering to included files |
| 1484 | * added a bunch of unit tests |
| 1485 | * added a bunch of phpdoc |
| 1486 | * added a sandbox tag in the sandbox extension |
| 1487 | * changed the date filter to support any date format supported by DateTime |
| 1488 | * added strict_variable setting to throw an exception when an invalid variable is used in a template (disabled by default) |
| 1489 | * added the lexer, parser, and compiler as arguments to the Twig_Environment constructor |
| 1490 | * changed the cache option to only accepts an explicit path to a cache directory or false |
| 1491 | * added a way to add token parsers, filters, and visitors without creating an extension |
| 1492 | * added three interfaces: Twig_NodeInterface, Twig_TokenParserInterface, and Twig_FilterInterface |
| 1493 | * changed the generated code to match the new coding standards |
| 1494 | * fixed sandbox mode (__toString() method check was not enforced if called implicitly from a simple statement like {{ article }}) |
| 1495 | * added an exception when a child template has a non-empty body (as it is always ignored when rendering) |
| 1496 | |
| 1497 | # 0.9.6 (2010-05-12) |
| 1498 | |
| 1499 | * fixed variables defined outside a loop and for which the value changes in a for loop |
| 1500 | * fixed the test suite for PHP 5.2 and older versions of PHPUnit |
| 1501 | * added support for __call() in expression resolution |
| 1502 | * fixed node visiting for macros (macros are now visited by visitors as any other node) |
| 1503 | * fixed nested block definitions with a parent call (rarely useful but nonetheless supported now) |
| 1504 | * added the cycle filter |
| 1505 | * fixed the Lexer when mbstring.func_overload is used with an mbstring.internal_encoding different from ASCII |
| 1506 | * added a long-syntax for the set tag ({% set foo %}...{% endset %}) |
| 1507 | * unit tests are now powered by PHPUnit |
| 1508 | * added support for gettext via the `i18n` extension |
| 1509 | * fixed twig_capitalize_string_filter() and fixed twig_length_filter() when used with UTF-8 values |
| 1510 | * added a more useful exception if an if tag is not closed properly |
| 1511 | * added support for escaping strategy in the autoescape tag |
| 1512 | * fixed lexer when a template has a big chunk of text between/in a block |
| 1513 | |
| 1514 | # 0.9.5 (2010-01-20) |
| 1515 | |
| 1516 | As for any new release, don't forget to remove all cached templates after |
| 1517 | upgrading. |
| 1518 | |
| 1519 | If you have defined custom filters, you MUST upgrade them for this release. To |
| 1520 | upgrade, replace "array" with "new Twig_Filter_Function", and replace the |
| 1521 | environment constant by the "needs_environment" option: |
| 1522 | |
| 1523 | // before |
| 1524 | 'even' => array('twig_is_even_filter', false), |
| 1525 | 'escape' => array('twig_escape_filter', true), |
| 1526 | |
| 1527 | // after |
| 1528 | 'even' => new Twig_Filter_Function('twig_is_even_filter'), |
| 1529 | 'escape' => new Twig_Filter_Function('twig_escape_filter', array('needs_environment' => true)), |
| 1530 | |
| 1531 | If you have created NodeTransformer classes, you will need to upgrade them to |
| 1532 | the new interface (please note that the interface is not yet considered |
| 1533 | stable). |
| 1534 | |
| 1535 | * fixed list nodes that did not extend the Twig_NodeListInterface |
| 1536 | * added the "without loop" option to the for tag (it disables the generation of the loop variable) |
| 1537 | * refactored node transformers to node visitors |
| 1538 | * fixed automatic-escaping for blocks |
| 1539 | * added a way to specify variables to pass to an included template |
| 1540 | * changed the automatic-escaping rules to be more sensible and more configurable in custom filters (the documentation lists all the rules) |
| 1541 | * improved the filter system to allow object methods to be used as filters |
| 1542 | * changed the Array and String loaders to actually make use of the cache mechanism |
| 1543 | * included the default filter function definitions in the extension class files directly (Core, Escaper) |
| 1544 | * added the // operator (like the floor() PHP function) |
| 1545 | * added the .. operator (as a syntactic sugar for the range filter when the step is 1) |
| 1546 | * added the in operator (as a syntactic sugar for the in filter) |
| 1547 | * added the following filters in the Core extension: in, range |
| 1548 | * added support for arrays (same behavior as in PHP, a mix between lists and dictionaries, arrays and hashes) |
| 1549 | * enhanced some error messages to provide better feedback in case of parsing errors |
| 1550 | |
| 1551 | # 0.9.4 (2009-12-02) |
| 1552 | |
| 1553 | If you have custom loaders, you MUST upgrade them for this release: The |
| 1554 | Twig_Loader base class has been removed, and the Twig_LoaderInterface has also |
| 1555 | been changed (see the source code for more information or the documentation). |
| 1556 | |
| 1557 | * added support for DateTime instances for the date filter |
| 1558 | * fixed loop.last when the array only has one item |
| 1559 | * made it possible to insert newlines in tag and variable blocks |
| 1560 | * fixed a bug when a literal '\n' were present in a template text |
| 1561 | * fixed bug when the filename of a template contains */ |
| 1562 | * refactored loaders |
| 1563 | |
| 1564 | # 0.9.3 (2009-11-11) |
| 1565 | |
| 1566 | This release is NOT backward compatible with the previous releases. |
| 1567 | |
| 1568 | The loaders do not take the cache and autoReload arguments anymore. Instead, |
| 1569 | the Twig_Environment class has two new options: cache and auto_reload. |
| 1570 | Upgrading your code means changing this kind of code: |
| 1571 | |
| 1572 | $loader = new Twig_Loader_Filesystem('/path/to/templates', '/path/to/compilation_cache', true); |
| 1573 | $twig = new Twig_Environment($loader); |
| 1574 | |
| 1575 | to something like this: |
| 1576 | |
| 1577 | $loader = new Twig_Loader_Filesystem('/path/to/templates'); |
| 1578 | $twig = new Twig_Environment($loader, array( |
| 1579 | 'cache' => '/path/to/compilation_cache', |
| 1580 | 'auto_reload' => true, |
| 1581 | )); |
| 1582 | |
| 1583 | * deprecated the "items" filter as it is not needed anymore |
| 1584 | * made cache and auto_reload options of Twig_Environment instead of arguments of Twig_Loader |
| 1585 | * optimized template loading speed |
| 1586 | * removed output when an error occurs in a template and render() is used |
| 1587 | * made major speed improvements for loops (up to 300% on even the smallest loops) |
| 1588 | * added properties as part of the sandbox mode |
| 1589 | * added public properties support (obj.item can now be the item property on the obj object) |
| 1590 | * extended set tag to support expression as value ({% set foo as 'foo' ~ 'bar' %} ) |
| 1591 | * fixed bug when \ was used in HTML |
| 1592 | |
| 1593 | # 0.9.2 (2009-10-29) |
| 1594 | |
| 1595 | * made some speed optimizations |
| 1596 | * changed the cache extension to .php |
| 1597 | * added a js escaping strategy |
| 1598 | * added support for short block tag |
| 1599 | * changed the filter tag to allow chained filters |
| 1600 | * made lexer more flexible as you can now change the default delimiters |
| 1601 | * added set tag |
| 1602 | * changed default directory permission when cache dir does not exist (more secure) |
| 1603 | * added macro support |
| 1604 | * changed filters first optional argument to be a Twig_Environment instance instead of a Twig_Template instance |
| 1605 | * made Twig_Autoloader::autoload() a static method |
| 1606 | * avoid writing template file if an error occurs |
| 1607 | * added $ escaping when outputting raw strings |
| 1608 | * enhanced some error messages to ease debugging |
| 1609 | * fixed empty cache files when the template contains an error |
| 1610 | |
| 1611 | # 0.9.1 (2009-10-14) |
| 1612 | |
| 1613 | * fixed a bug in PHP 5.2.6 |
| 1614 | * fixed numbers with one than one decimal |
| 1615 | * added support for method calls with arguments ({{ foo.bar('a', 43) }}) |
| 1616 | * made small speed optimizations |
| 1617 | * made minor tweaks to allow better extensibility and flexibility |
| 1618 | |
| 1619 | # 0.9.0 (2009-10-12) |
| 1620 | |
| 1621 | * Initial release |