Commit Graph

1658 Commits

Author SHA1 Message Date
Fabien Potencier 0505c2fefd added two new recipes 2012-10-28 15:30:18 +01:00
Fabien Potencier d59642c949 added missing documentation about Twig_Loader_Chain 2012-10-28 15:19:48 +01:00
Fabien Potencier 42df784d04 fixed phpdoc 2012-10-28 14:36:27 +01:00
Fabien Potencier 8dbe803b29 merged branch jeremymarc/master (PR #873)
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
2012-10-27 08:23:19 +02:00
Jeremy Marc c5d351dcd2 cast $name to string ($name can be an object implementing __toString function) 2012-10-26 15:30:04 -07:00
Fabien Potencier 61393dc9fb merged branch fabpot/faster-exceptions (PR #864)
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?).~~
2012-10-20 14:53:18 +02:00
Fabien Potencier 2506be1794 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.
2012-10-19 14:45:58 +02:00
Fabien Potencier 244eaf53b3 updated the docs for the new Twig_ExistsLoaderInterface interface 2012-10-19 14:36:16 +02:00
Fabien Potencier 09ba90919e renamed Twig_ExtendedLoaderInterface to Twig_ExistsLoaderInterface 2012-10-19 14:34:08 +02:00
Fabien Potencier ed0554610a merged branch dlsniper/loader-exception-improvement (PR #841)
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.
2012-10-19 14:27:33 +02:00
Florin Patan 08ecb0e1c4 Improvements for loader speeds 2012-10-19 14:27:32 +02:00
Fabien Potencier af1bfe9516 bumped version to 1.11.0-DEV 2012-10-19 12:48:39 +02:00
Fabien Potencier 79671473d2 prepared the 1.10.3 release v1.10.3 2012-10-19 12:45:49 +02:00
Fabien Potencier 3031fe6b95 changed Node instances line numbers from 0 to 1 in unit tests to better reflect what really happens when using Twig 2012-10-19 08:48:03 +02:00
Fabien Potencier bc64a7f7fa updated CHANGELOG 2012-10-18 14:01:42 +02:00
Fabien Potencier a4490975d3 reverted BC break 2012-10-18 13:59:31 +02:00
Fabien Potencier 191c9220c3 moved some logic from the sandbox node visitor to the sandbox node 2012-10-18 13:55:03 +02:00
Fabien Potencier 580508eda4 fixed wrong exception class in the filesystem loader 2012-10-18 08:36:07 +02:00
Fabien Potencier 650295f592 fixed wrong template location in error messages (closes #803) 2012-10-18 08:21:41 +02:00
Fabien Potencier 3506cfad1d added missing version info in the docs for the split filter 2012-10-18 08:21:41 +02:00
Fabien Potencier bac6bc7851 fixed previous merge 2012-10-16 14:39:58 +02:00
Fabien Potencier a2981f7d8c merged branch innsand/split-filter_fix (PR #811)
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
2012-10-16 14:33:18 +02:00
Fabien Potencier 78669a66d0 fixed import doc 2012-10-16 07:57:52 +02:00
Fabien Potencier 4db861aedb bumped version to 1.10.3-DEV 2012-10-15 10:26:17 +02:00
Fabien Potencier 5d1c9e1370 prepared the 1.10.2 release v1.10.2 2012-10-15 10:23:34 +02:00
Fabien Potencier be3a5a6421 fixed macro calls on PHP 5.4 2012-10-15 10:22:32 +02:00
Fabien Potencier f48f23a34d bumped version to 1.10.2-DEV 2012-10-15 09:38:17 +02:00
Fabien Potencier f88881cece prepared the 1.10.1 release v1.10.1 2012-10-15 09:35:01 +02:00
Fabien Potencier a6473b7cfd updated macro documentation to warn about a hack that won't work anymore in Twig 2.x 2012-10-15 09:15:27 +02:00
Fabien Potencier 82334f876f merged branch Adel-E/update-api-docs (PR #858)
This PR was merged into the master branch.

Commits
-------

bee4cd1 Update doc to correspond to the following: http://twig.sensiolabs.org/documentation http://twig.sensiolabs.org/doc/filters/escape.html

Discussion
----------

Update api docs

Update doc to correspond to the following:
http://twig.sensiolabs.org/documentation
http://twig.sensiolabs.org/doc/filters/escape.html
2012-10-13 21:01:24 +02:00
eadel bee4cd12db Update doc to correspond to the following:
http://twig.sensiolabs.org/documentation
http://twig.sensiolabs.org/doc/filters/escape.html
2012-10-12 21:51:42 +00:00
Fabien Potencier e1e9802c56 fixed tests where macros were not used properly 2012-10-12 16:53:20 +02:00
Fabien Potencier 9728a5de40 refactored previous commit to avoid collission between symbols of different types 2012-10-12 16:47:13 +02:00
Fabien Potencier a4e10c14ed optimized macros when imported via the "import" tag
This commit unifies the way macros are called independently of how they
were included (via the from or import tag -- see e81c932).
2012-10-12 16:09:40 +02:00
Fabien Potencier 347bc81d6e merged branch pierrejoye/master (PR #855)
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
2012-10-08 15:20:00 +02:00
Pierre Joye d398e557e3 - drop tsrm fetch, not necessary as it is passed as argument already 2012-10-08 15:15:38 +02:00
Fabien Potencier 5d7baaf767 refactored some unit tests 2012-10-06 09:21:32 +02:00
Fabien Potencier 7dd2f17646 updated CHANGELOG 2012-10-05 17:09:05 +02:00
Fabien Potencier 8b63fbe72f fixed unit tests when XDebug is enabled 2012-10-05 17:04:55 +02:00
Fabien Potencier 515f34abc3 merged branch weltling/master (PR #854)
This PR was merged into the master branch.

Commits
-------

b013ede fix windows build

Discussion
----------

Trivial fix for windows build
2012-10-04 19:41:45 +02:00
Anatoliy Belsky b013ede1fa fix windows build 2012-10-04 18:50:52 +02:00
Fabien Potencier 120cde3fa5 merged branch greg0ire/patch-1 (PR #851)
This PR was merged into the master branch.

Commits
-------

d52e15b remove tautology

Discussion
----------

remove tautology

We already know the example is "for example".
2012-09-29 18:33:35 +02:00
Fabien Potencier da34d73b4a fixed blanks in the doc 2012-09-29 18:04:58 +02:00
Grégoire Paris d52e15bd36 remove tautology 2012-09-29 19:02:16 +03:00
Fabien Potencier 2f7b43be74 fixed a doc anchor 2012-09-29 18:01:41 +02:00
Fabien Potencier 73ab8ff50c updated CHANGELOG 2012-09-28 23:55:47 +02:00
Fabien Potencier 677d34c55b fixed CS 2012-09-28 23:50:15 +02:00
Fabien Potencier 4ba7ae939c merged branch char101/master (PR #844)
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.
2012-09-28 23:45:13 +02:00
Fabien Potencier 8d14fa8290 bumped version to 1.10.1-DEV 2012-09-28 22:16:35 +02:00
Fabien Potencier 60e91ba691 prepared the 1.10.0 release v1.10.0 2012-09-28 22:11:39 +02:00