Commit Graph

622 Commits

Author SHA1 Message Date
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
Fabien Potencier eeeef75f0a replaced deprecated sameas by same as in tests 2014-07-05 14:06:29 +02:00
Fabien Potencier 1930600e4e fixed url_encode when raw is false and URL is an array 2014-05-26 02:31:15 +02:00
Fabien Potencier f1aee16381 bug #1370 Fixed inheritance in a 'use'-hierarchy (hason)
This PR was merged into the 1.15-dev branch.

Discussion
----------

Fixed inheritance in a 'use'-hierarchy

Fixes #1365

Commits
-------

9e0907e Fixed inheritance in a 'use'-hierarchy
2014-05-26 02:00:46 +02:00
Fabien Potencier 02b80626f0 bug #1382 Added isSandbox check around the __toString check in Sandbox extension (Scott Smith, smitherz82)
This PR was merged into the 1.15-dev branch.

Discussion
----------

Added isSandbox check around the __toString check in Sandbox extension

The `__toString` policy check currently still happens when the sandbox is disabled

Commits
-------

3ce4202 Added test for sandbox __toString when not enabled
8dfa432 Added isSandbox check around the __toString check
2014-05-26 01:57:06 +02:00
Ulf 0db5c3100b [Twig][Tests][Fixtures][filters] Added empty string tests for "first" and "last" filters 2014-05-15 21:43:46 +02:00
Fabien Potencier cd4a372738 added some missing tests 2014-05-12 16:45:36 +02:00
Fabien Potencier 365feec87e made usage of return; instead of return null; 2014-04-16 12:37:16 +02:00
Scott Smith 3ce420284e Added test for sandbox __toString when not enabled 2014-04-15 19:03:53 +01:00
Martin Hasoň 9e0907e19a Fixed inheritance in a 'use'-hierarchy 2014-03-27 11:53:33 +01:00
Fabien Potencier 98903bb83f bug #1361 Fixed recursively calling blocks in templates with inheritance (hason)
This PR was merged into the 1.15-dev branch.

Discussion
----------

Fixed recursively calling blocks in templates with inheritance

Replaces #1321
Fixes KnpLabs/KnpMenu#136 and KnpLabs/KnpMenu#119

Commits
-------

efb7b47 Add "broken" block inheritance test case
ef98ea2 Fixed recursively calling blocks in templates with inheritance
2014-03-15 11:49:13 +01:00
Adrien Brault efb7b479d3 Add "broken" block inheritance test case 2014-03-13 12:40:24 +01:00
Martin Hasoň ef98ea278a Fixed recursively calling blocks in templates with inheritance 2014-03-13 12:23:25 +01:00
Tugdual Saunier 6e800d8277 Fixed fetching of a property defined but not initialized in C extension, fixed #1337 2014-02-13 09:48:39 +00:00
Tobias Schultze bdbc56d385 added test for accessing xml attributes 2014-01-31 15:53:51 +01:00
Fabien Potencier e9e4748475 added a note about how to check for dynamic attribute existence in the docs 2014-01-29 09:45:07 +01:00
Fabien Potencier 4983af78f7 minor #1303 Improved exception message for accessing object (without ArrayAccess) as array (hason)
This PR was merged into the 1.15-dev branch.

Discussion
----------

Improved exception message for accessing object (without ArrayAccess) as array

Commits
-------

770712b Improved exception message for accessing object without ArrayAccess as array
2014-01-05 17:48:49 +01:00
Fabien Potencier e5e2a01051 made some minor tweaks to PHPUnit assertions 2014-01-05 17:26:18 +01:00
Martin Hasoň 770712b4c0 Improved exception message for accessing object without ArrayAccess as array 2013-12-31 22:30:37 +01:00
Fabien Potencier a2c6db7ea7 added an error message when trying to import an undefined block from a trait 2013-12-06 11:06:49 +01:00
Fabien Potencier 107fd201bf feature #1286 Adding ignoreStrictCheck option for call_user_func_array, if throwing exception (fabpot)
This PR was merged into the master branch.

Discussion
----------

Adding ignoreStrictCheck option for call_user_func_array, if throwing exception

Same as #1236 with added unit tests and C extension support (to come).

"I experienced the issue when using FuelPHP's ORM with EAV containers. When I tried to reference a property that was not defined I expected to get null, but instead the whole application stopped because an exception was thrown in the ORM, that no such function is present.

I couldn't find other possible exception that could be thrown when this function is called, so I assumed it's safe to take the ignoreStrictCheck into consideration here."

Commits
-------

1abf5d9 [ext] Mirroring PHP change for call_user_func_array, see #1286
9ab290b added tests for exceptions thrown in __call()
c711d37 Adding ignoreStrictCheck option for call_user_func_array, if throwing exception
2013-12-03 15:08:30 +01:00
Fabien Potencier 9ab290bdb2 added tests for exceptions thrown in __call() 2013-12-03 14:14:58 +01:00