Commit Graph

643 Commits

Author SHA1 Message Date
Fabien Potencier 01ab6f317b added some more tests for the filename autoescape strategy 2015-01-14 07:56:45 +01:00
Fabien Potencier 4481bf5f38 added an escaping strategy based on the template filename extension 2015-01-13 16:33:59 +01:00
Martin Hasoň d2fc98d026 Fixed regression for dynamic parent 2014-12-09 23:17:55 +01:00
Albert Casademont 4319bb9b84 Fix the For optimizer, "include" function was always optimized 2014-12-04 16:17:48 +01:00
Fabien Potencier 4ba0789614 removed @covers annotations 2014-11-20 08:47:31 +01:00
Fabien Potencier 73baf337b2 cleaned up tests 2014-10-23 08:17:02 +02:00
Fabien Potencier a88500e762 bug #1551 Fixed using of unary operators with default parameters (hason)
This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed using of unary operators with default parameters

Fixes #1322

Commits
-------

5ba4e9c Fixed using of unary operators with default parameters
2014-10-23 08:11:36 +02:00
Fabien Potencier 79333cc8e3 feature #1548 Improved an exception message for unknown arguments (hason)
This PR was merged into the 1.16-dev branch.

Discussion
----------

Improved an exception message for unknown arguments

Commits
-------

6427189 Improved an exception message for unknown arguments
2014-10-23 08:07:50 +02:00
Fabien Potencier 72cb567474 bug #1550 Fixed php error for "in" operator (hason)
This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed php error for "in" operator

I have added the tests and also fixed the php error ``An exception has been thrown during the rendering of a template ("strlen() expects parameter 1 to be string, array given")``.

Commits
-------

8dfeda0 Fixed "in" operator for resources and strings
2014-10-22 16:42:06 +02:00
Fabien Potencier c2a1385389 feature #1529 Fixed guessing a template info for the Twig_Error_Loader exception (hason)
This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed guessing a template info for the Twig_Error_Loader exception

Commits
-------

8f617dc Fixed guessing a template info for the Twig_Error_Loader exception
2014-10-22 16:34:32 +02:00
Martin Hasoň 8dfeda01c1 Fixed "in" operator for resources and strings 2014-10-22 08:34:49 +02:00
Martin Hasoň 5ba4e9c606 Fixed using of unary operators with default parameters 2014-10-21 09:39:34 +02:00
Roman Lasinski d95d0fd300 Fix for broken BC through #1503: The slice filter works as the array_slice PHP function for arrays 2014-10-21 08:45:27 +02:00
Krystian Kuczek 3aa177118b Moved skip for HHVM
Skip for HHVM was moved up as test is Failed earlier trying to access
DateTime->date.
2014-10-21 00:59:07 +02:00
Martin Hasoň 8f617dc6b5 Fixed guessing a template info for the Twig_Error_Loader exception 2014-10-20 11:57:38 +02:00
Fabien Potencier a7edb17646 Revert "bug #1470 Fixed "in" operator (hason)"
This reverts commit 5b172b5175, reversing
changes made to 0d0cdba3bb.
2014-10-16 20:28:23 +02:00
Martin Hasoň 6427189000 Improved an exception message for unknown arguments 2014-10-16 13:41:31 +02:00
Fabien Potencier 385a83b4e4 Revert "bug #1535 fixed negative number lexing (fabpot)"
This reverts commit 7bda3b6103, reversing
changes made to c86e621e09.

Conflicts:
	CHANGELOG
2014-10-16 10:29:01 +02:00
Fabien Potencier 083313abb4 added some failing tests 2014-10-14 19:06:56 +02:00
Fabien Potencier 7bda3b6103 bug #1535 fixed negative number lexing (fabpot)
This PR was merged into the 1.16-dev branch.

Discussion
----------

fixed negative number lexing

Fixes #1368 and #1322.

I don't see it breaking BC as relying on the current way seems weird to me.

Commits
-------

bf541bf fixed negative number lexing
2014-10-14 18:19:19 +02:00
Fabien Potencier bf541bf249 fixed negative number lexing 2014-10-14 18:08:14 +02:00
Christophe Coevoet 0082e0523c Fixed the support of 2-word tests without a custom node class 2014-10-14 12:50:18 +02:00
Fabien Potencier c476a6b1fc added missing tests 2014-10-12 00:29:52 +02:00
Fabien Potencier b5f074207d fixed macros when using an argument named like a PHP super globa 2014-10-11 22:38:36 +02:00
Fabien Potencier 8a36022dde bug #1533 Make date_modify work with DateTimeImmutable (globin)
This PR was squashed before being merged into the 1.16-dev branch (closes #1533).

Discussion
----------

Make date_modify work with DateTimeImmutable

Use the return value of `$date->modify` because `DateTimeImmutable::modify`
returns the modified object and does not modify the object modify was
called on.

Commits
-------

a5fe46f Make date_modify work with DateTimeImmutable
2014-10-11 22:13:21 +02:00
Robin Gloster a5fe46fce7 Make date_modify work with DateTimeImmutable 2014-10-11 22:13:17 +02:00
Fabien Potencier d3eda6aedd added some more tests 2014-10-11 18:53:37 +02:00
Fabien Potencier 28fc3bb0cd bug #1521 Fix MB characters handling in split (1emming)
This PR was squashed before being merged into the 1.16-dev branch (closes #1521).

Discussion
----------

Fix MB characters handling in split

The PR fixes using multibyte characters in the ```split```-filter

Since I messed up the rebase of https://github.com/fabpot/Twig/pull/1446 I created a new PR.
Let me know if this something that is kind of wanted, thanks!

Commits
-------

8cde52d Fix MB characters handling in split
2014-10-11 01:33:37 +02:00
1emming 8cde52d222 Fix MB characters handling in split 2014-10-11 01:33:34 +02:00
Andrey Grachov f76e67f91d Fixed usage of LimitIterator 2014-10-11 01:28:33 +02:00
Fabien Potencier bad42dbb32 bug #1530 Improved error reporting in a sandboxed template (hason)
This PR was merged into the 1.16-dev branch.

Discussion
----------

Improved error reporting in a sandboxed template

Commits
-------

58efc42 Improved error reporting in a sandboxed template
2014-10-10 15:57:57 +02:00
Fabien Potencier 194f6a14dc bug #1528 Fixed guessing a template info for exceptions (hason)
This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed guessing a template info for exceptions

Commits
-------

42cd697 Fixed guessing a template info for exceptions
2014-10-10 15:46:25 +02:00
Martin Hasoň 58efc421dc Improved error reporting in a sandboxed template 2014-10-10 15:36:50 +02:00
Martin Hasoň 42cd697667 Fixed guessing a template info for exceptions 2014-10-10 12:27:07 +02:00
Martin Hasoň 0e7cec5ece Fixed resetting debug info in compiler 2014-10-10 12:25:51 +02:00
Fabien Potencier 5b172b5175 bug #1470 Fixed "in" operator (hason)
This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed "in" operator

Commits
-------

9b6497f Fixed "in" operator
2014-10-01 19:50:35 +02:00
Fabien Potencier 9c12486651 fixed some assertions 2014-09-30 19:44:16 +02:00
Rhodri Pugh c740060051 fix inconsistent response from twig_slice 2014-09-30 19:40:27 +02:00
Javier Spagnoletti 15ce450e32 Improved exception message while trying to access an attribute from an empty array. 2014-08-06 07:18:32 +01:00
Martin Hasoň 9b6497f383 Fixed "in" operator 2014-08-05 15:28:57 +02:00
Martin Hasoň 0c169ce98c Fixed a test on hhvm 2014-08-04 12:46:42 +02:00
Martin Hasoň 4c26981ce5 Fixed "starts with" a "ends with" operators for non-string arguments 2014-08-02 17:11:21 +02:00
Fabien Potencier 0c508d2703 bug #1452 Fixed 'starts with' operator for empty needle (hason)
This PR was merged into the 1.16-dev branch.

Discussion
----------

Fixed 'starts with' operator for empty needle

Fixes #1432

Commits
-------

790305a Fixed 'starts with' operator for empty needle
2014-08-01 17:28:52 +02:00
Martin Hasoň 790305af93 Fixed 'starts with' operator for empty needle 2014-08-01 14:43:36 +02:00
Fabien Potencier c03a7a323a fixed the attribute() function when passing a variable for the arguments 2014-08-01 09:18:16 +02:00
Fabien Potencier 72aa82b9a2 minor #1465 Some minor cleanup (JeroenDeDauw)
This PR was merged into the 1.16-dev branch.

Discussion
----------

Some minor cleanup

Commits
-------

e6da6bb Restore unused var
d8e1077 Get rid of naming clash
3e50672 Remove unused local vars
291141f Remove unused var
9921554 Fix type hint
1d2b877 Fix type hint
2014-07-31 15:21:40 +02:00
jeroendedauw 3e50672029 Remove unused local vars 2014-07-31 10:37:48 +02:00
jeroendedauw 1d2b8777d0 Fix type hint
PHPStorm wrongly inferred the type 'Unicode'
2014-07-31 10:36:30 +02:00
Martin Hasoň 632fe90000 Simplified Twig_Node_Include 2014-07-31 09:18:56 +02:00
Fabien Potencier eed777f8d8 replaced deprecated divisibleby by divisible by in tests 2014-07-05 14:12:06 +02:00