This PR was merged into the master branch.
Commits
-------
c5d351d cast $name to string ($name can be an object implementing __toString function)
Discussion
----------
Cast $name to string in Loader/Chain.php and Loader/FileSystem.php
related to #603
This PR was merged into the master branch.
Commits
-------
2506be1 optimized the way Twig exceptions are managed
Discussion
----------
Optimized the way Twig exceptions are managed
As guessing the template name and the line number of where an error occurred is quite expensive, this is now avoided as much as possible.
~~As a side-effect, it also fixes 822 (@hason can you confirm?).~~
This PR was squashed before being merged into the master branch (closes#841).
Commits
-------
08ecb0e Improvements for loader speeds
Discussion
----------
Improvements for loader speeds
This is something started from #822 .
It attempts to improve the speed of the chain loader and rest of the standard loaders by adding a cache level and a ```hasSource()``` method for them in order gain speed.
---------------------------------------------------------------------------
by dlsniper at 2012-09-27T14:56:24Z
Thanks for the feedback, I'll do the changes tonight or during the coming weekend.
As for the utility of the ```::setExtendedErrorHandling()``` function, this saves me about 25% to 40% on the benchkmark Fabien presented in the original ticket.
Thanks!
---------------------------------------------------------------------------
by dlsniper at 2012-09-29T11:34:59Z
I've added some caching for the Chain Loader but it's still a WIP. I'll work more on this in the coming hours.
---------------------------------------------------------------------------
by dlsniper at 2012-09-29T23:10:10Z
I'm getting better values right now that I had before, standing on:
```
0.09
0.07 ... x 1
0.07 ... x 1
```
I've also noticed that if I run the tests from the browser then I'll have an overall slowdown of about 0.10 which I'm not sure from where it comes from. Any pointers before me digging a bit more into Twigs internals.
---------------------------------------------------------------------------
by dlsniper at 2012-10-03T21:31:15Z
@fabpot what's your opinion about this PR?
---------------------------------------------------------------------------
by dlsniper at 2012-10-14T18:26:13Z
@Tobion and @fabpot done and done :)
I'm not sure why the tests are failing on PHP 5.4 as I don't have it installed anywhere.
This PR was merged into the master branch.
Commits
-------
d5df200 * bug fixes. * str_split on empty delimeter. * tests and documentation updated.
e3c201a Added "split" filter aka explode.
Discussion
----------
Split filter fix
Modification of request #621:
str_split, bug fixes
---------------------------------------------------------------------------
by senz at 2012-08-21T05:56:51Z
@fabpot this is squashed and fixed (hopefully) #621
This PR was merged into the master branch.
Commits
-------
d398e55 - drop tsrm fetch, not necessary as it is passed as argument already
Discussion
----------
drop unnecessary tsrmls_fetch
This PR was merged into the master branch.
Commits
-------
d52e15b remove tautology
Discussion
----------
remove tautology
We already know the example is "for example".
This PR was merged into the master branch.
Commits
-------
c23ef25 Add assertEquals to NativeExtensionTest.php
9126dc6 Twig extension: fix case when accessing property of an array casted into object
34cf8e1 Fix double free
4980903 Enhancements for twig extension
db3cb80 Fix NativeExtensionTest
3485ee7 Native extension: handle dynamic properties defined in the get_properties handler in a per instance fashion.
Discussion
----------
Native extension: call get_properties in per instance manner instead of caching it.
Since dynamic properties of an object can be defined by its get_properties handler, we need to call it for each instance.
---------------------------------------------------------------------------
by char101 at 2012-09-21T10:30:37Z
PHPUnit test result
```
PHPUnit 3.7.1 by Sebastian Bergmann.
.S........................................................... 61 / 1253 ( 4%)
............................................................. 122 / 1253 ( 9%)
............................................................. 183 / 1253 ( 14%)
............................................................. 244 / 1253 ( 19%)
............................................................. 305 / 1253 ( 24%)
............................................................. 366 / 1253 ( 29%)
............................................................. 427 / 1253 ( 34%)
............................................................. 488 / 1253 ( 38%)
............................................................. 549 / 1253 ( 43%)
............................................................. 610 / 1253 ( 48%)
............................................................. 671 / 1253 ( 53%)
............................................................. 732 / 1253 ( 58%)
............................................................. 793 / 1253 ( 63%)
............................................................. 854 / 1253 ( 68%)
............................................................. 915 / 1253 ( 73%)
............................................................. 976 / 1253 ( 77%)
............................................................. 1037 / 1253 ( 82%)
............................................................. 1098 / 1253 ( 87%)
............................................................. 1159 / 1253 ( 92%)
............................................................. 1220 / 1253 ( 97%)
.................................
Time: 4 seconds, Memory: 13.25Mb
OK, but incomplete or skipped tests!
Tests: 1253, Assertions: 2969, Skipped: 1.
```
---------------------------------------------------------------------------
by stof at 2012-09-21T11:58:51Z
@char101 My previous comment about the way the test should be implemented is still valid. Please rewrite it to use the same way to all other integration tests in Twig
---------------------------------------------------------------------------
by char101 at 2012-09-23T04:51:36Z
@stof I don't see the reason of using a fixture. The test case works, it accomplishes its goal. It's simple. It doesn't test for a feature, it tests for a specific case where PHP crashes.
---------------------------------------------------------------------------
by stof at 2012-09-23T13:53:41Z
@char101 I see one: you are building a Twig instance and rendering a template here, which is exactely what the integration tests are doing.
Btw, your test would fail when running phpunit in strict mode as it does not assert anything
---------------------------------------------------------------------------
by char101 at 2012-09-24T02:05:58Z
@stof I don't have the desire to change what isn't broken, but you are free to change it as you see fit. As for the assert, I have added it to the test.