Tugdual Saunier
dfc335fd4e
Added test case for issue #1143
2013-07-23 22:04:57 +02:00
Chris Smith
f80bab25d3
Use a constant for the main namespace
2013-06-28 10:26:52 +01:00
Fabien Potencier
6f0753f0ff
Revert "Fixed PSR-0 in tests"
...
This reverts commit b5928de258 .
2013-06-27 08:24:36 +02:00
Fabien Potencier
3976606739
merged branch hason/patch1 (PR #1080 )
...
This PR was merged into the master branch.
Discussion
----------
Small fixes
Commits
-------
a6205c5 Fixed exception message in Call
b5928de Fixed PSR-0 in tests
2013-06-27 08:24:31 +02:00
Christophe Coevoet
3bc113be2a
Made the include function safe for the autoescaping
...
This fixes a regression introduced in ba88c75557
Fixes #1097
2013-05-29 15:08:43 +02:00
Fabien Potencier
f6c00587f8
added the possibility to ignore the filesystem constructor argument ( closes #1104 )
2013-05-27 08:08:37 +02:00
Fabien Potencier
6939565867
added support for object instances as the second argument of the constant test ( closes #1100 )
2013-05-23 18:28:53 +02:00
Fabien Potencier
ba88c75557
fixed the include function when used in an assignment ( closes #1095 )
2013-05-17 12:06:31 +02:00
Martin Hasoň
8a662f2ab3
Fixed Twig_Loader_Chain::exists for a loader which implements Twig_ExistsLoaderInterface
2013-05-15 12:37:17 +02:00
Martin Hasoň
a6205c55f3
Fixed exception message in Call
2013-05-08 21:49:15 +02:00
Martin Hasoň
b5928de258
Fixed PSR-0 in tests
2013-05-07 22:51:00 +02:00
Fabien Potencier
cbbbab9065
merged branch Tobion/patch-1 (PR #1030 )
...
This PR was merged into the master branch.
Discussion
----------
fix numeric & boolean & float keys in array
Reopened PR of #878
Commits
-------
2c56b70 Merge pull request #3 from tucksaun/patch-1
17d6cc7 [ext] fixed tabs
46012ce [ext] improvements
21f8062 [ext] code cleaning
9347c52 [ext] updated PHP code documenting C code
b41ce60 updated C extension accordingly
e5291e1 rename item to attribute in the exception message because that's the term that is used in twig, e.g. the function
a93f0dc further improved exception message and distinguish array_call and any_call access
26bac14 added tests for array access with confusable keys
db744d5 fix test that that would not fail if no exception is thrown
9ea16ec refactored getAttribute
6fb5afa improved error message for non-existent or invalid attributes
fdfd506 added changelog entry about fixed boolean array access
da616c5 fixed getAttribute for array access with a boolean or float key
b6acf9d updated CHANGELOG
c4d5b3f added some unit tests for previous merge
e84448b fix numeric keys in array
2013-05-07 20:56:07 +02:00
Jordi Boggiano
d753241ebb
Optimize resume after for loops by using + vs array_merge
2013-05-06 15:11:10 +02:00
Fabien Potencier
c8fe253890
changed ☃ to § in tests ( closes #996 )
2013-05-01 20:44:33 +02:00
Fabien Potencier
9ec7e766fb
fixed a unit test when run in isolation
2013-05-01 20:28:29 +02:00
Fabien Potencier
135b618ff9
enforced usage of named arguments after positional ones
2013-05-01 20:07:00 +02:00
Martin Hasoň
19869ce00c
Fixed autoloader registration for tests if phpunit is installed as package together with Twig
2013-04-22 23:29:01 +02:00
Rick Prent
3d19a2eed5
Fixed twig filesystemloader security issue + test ( closes #1026 )
2013-04-08 14:15:31 +02:00
Tobias Schultze
e5291e1be1
rename item to attribute in the exception message because that's the term that is used in twig, e.g. the function
2013-03-15 12:00:26 +01:00
Tobias Schultze
a93f0dca38
further improved exception message and distinguish array_call and any_call access
2013-03-15 12:00:26 +01:00
Tobias Schultze
26bac14c76
added tests for array access with confusable keys
...
array keys like boolean, numeric but string, floats, null
2013-03-15 12:00:25 +01:00
Tobias Schultze
db744d5e51
fix test that that would not fail if no exception is thrown
2013-03-15 12:00:24 +01:00
Tobias Schultze
9ea16ec643
refactored getAttribute
2013-03-15 12:00:23 +01:00
Tobias Schultze
6fb5afa28f
improved error message for non-existent or invalid attributes
2013-03-15 12:00:22 +01:00
Fabien Potencier
c4d5b3ffdb
added some unit tests for previous merge
2013-03-15 11:56:03 +01:00
Pascal Borreli
49488b8f24
Fixed typos
2013-03-10 02:06:44 +00:00
Fabien Potencier
bc30d9b7e2
merged branch Tobion/buildquery (PR #1009 )
...
This PR was squashed before being merged into the master branch (closes #1009 ).
Commits
-------
fcf9525 let url_encode filter also accept array of query parameters
Discussion
----------
let url_encode filter also accept array of query parameters
BC break: no
feature addition: yes
tests pass: yes
documentation: yes
This is also supported in Jinja and so it's consistent: [jinja urlencode](http://modular.math.washington.edu/home/wstein/www/home/bjarke/sage-4.4.4/local/LIB/python/site-packages/Jinja-1.2-py2.6-linux-x86_64.egg/docs/html/builtins.html )
2013-02-26 14:03:39 +01:00
Tobias Schultze
fcf9525dc3
let url_encode filter also accept array of query parameters
2013-02-26 14:03:39 +01:00
Fabien Potencier
7b11c6fd5e
Merge remote-tracking branch 'lyrixx/feat-batch-ceil'
...
* lyrixx/feat-batch-ceil:
Ceil the size in batch filter
Conflicts:
test/Twig/Tests/Fixtures/filters/batch.test
2013-02-26 14:02:07 +01:00
Grégoire Pineau
50f5271ef0
Ceil the size in batch filter
2013-02-22 16:02:01 +01:00
Luiz “Felds” Liscia
ccf3cd1c81
optimize batch function and add tests
2013-02-21 12:11:54 -03:00
Fabien Potencier
a50bc8c95b
added a batch filter
2013-02-21 07:38:58 +01:00
Fabien Potencier
ac86c6368c
changed an exception to be consistent with other ones (and also to better help debugging problems)
2013-02-17 20:51:08 +01:00
Fabien Potencier
b5438c2745
added some unit tests for previous merge
2013-02-08 21:59:58 +01:00
Fabien Potencier
fa0d1eec43
added some missing tests
2013-02-08 21:53:22 +01:00
Fabien Potencier
8b569e49a1
added a note about how to use quotes in strings ( closes #973 )
2013-02-08 19:58:08 +01:00
Jesper Ek
667b274b0d
Added unit test for bug when calling getGlobals() before addGlobal() on Twig_Environment.
2013-02-08 00:08:43 +01:00
Fabien Potencier
f8d4db4107
added the first and last filters ( closes #951 )
2013-01-26 16:59:11 +01:00
Fabien Potencier
5218db7796
added an exception when trying to render a template when no loader has been set ( closes #975 )
2013-01-26 16:09:24 +01:00
Fabien Potencier
19053ab492
merged branch markstory/object-constants (PR #961 )
...
This PR was merged into the master branch.
Commits
-------
8bb953c Fix doc block for twig_constant.
c7dafb7 Update documentation for constant()
cb921ce Implement getting constants from objects.
998b367 Add tests for getting constants from instances.
Discussion
----------
Object constants
Implement the changes discussed in #954 .
2013-01-15 20:54:16 +01:00
Fabien Potencier
5abad16081
relaxed globals management to avoid a BC break ( closes #965 )
2013-01-15 20:48:33 +01:00
Mark Story
998b367c0c
Add tests for getting constants from instances.
2013-01-10 23:37:47 -05:00
Fabien Potencier
d10ebfa3d4
added support for {{ some_string[:2] }} ( closes #952 )
2013-01-08 15:19:19 +01:00
Fabien Potencier
56bef3fa37
forbid mixed usage of raw/verbatim
2013-01-08 13:28:45 +01:00
Fabien Potencier
cd4ab0fde6
renamed the raw tag to verbatim to avoid confusion with the raw filter
2013-01-05 08:57:34 +01:00
Fabien Potencier
720b71a0b8
fixed tests on PHP 5.2
2013-01-04 22:43:10 +01:00
Fabien Potencier
84504c3c39
fixed tests on PHP 5.2
2013-01-04 22:34:22 +01:00
Fabien Potencier
e48b1f3bdf
fixed registration of tests and functions as anonymous functions ( closes #946 )
2013-01-04 22:20:09 +01:00
dantleech
9f5fa532ef
Upgrade problem
2013-01-02 16:57:55 +01:00
Fabien Potencier
2450f79a0e
changed the way globals behave to be more BC with 1.11 and to avoid speed problems at runtime introduced in 4487387 ( closes #932 )
...
* Globals are now managed by themselves, independently of other elements
contained in extensions
* A global variable value can now be changed after the runtime has been
initialized (to be more BC with the way Twig 1.11 works)
* Extensions are not initialized anymore when rendering a template that
is already in the cache (like in Twig 1.11)
2012-12-27 11:00:35 +01:00