Commit Graph

126 Commits

Author SHA1 Message Date
Tugdual Saunier 243043134c Fixed #1126 2013-07-23 21:36:14 +02:00
Fabien Potencier a14bcf6a49 bumped version to 1.13.2-DEV 2013-06-06 10:57:56 +02:00
Fabien Potencier c4da08131d prepared the 1.13.1 release 2013-06-06 08:06:01 +02:00
Fabien Potencier 4a49a3ae30 bumped version to 1.13.1-DEV 2013-05-10 17:25:39 +02:00
Fabien Potencier d9b7bbd2dc prepared the 1.13.0 release 2013-05-10 17:12:43 +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
Fabien Potencier 135b618ff9 enforced usage of named arguments after positional ones 2013-05-01 20:07:00 +02:00
Tugdual Saunier 17d6cc7f10 [ext] fixed tabs 2013-04-08 17:20:46 +02:00
Tugdual Saunier 46012ce3b1 [ext] improvements 2013-04-08 17:20:42 +02:00
Tugdual Saunier 21f80622b6 [ext] code cleaning 2013-04-08 17:20:36 +02:00
Tugdual Saunier 9347c52b64 [ext] updated PHP code documenting C code 2013-04-08 17:20:09 +02:00
Fabien Potencier ceadaa68af bumped version to 1.12.4-DEV 2013-04-08 15:07:19 +02:00
Fabien Potencier 27f3428b08 prepared the 1.12.2 release 2013-04-08 14:40:11 +02:00
Tugdual Saunier 438338827b Revert "merged branch pierrejoye/master (PR #855)"
This reverts commit 347bc81d6e, reversing
changes made to 5d7baaf767.
2013-03-22 16:25:51 +01:00
Arjen Brouwer b41ce6094c updated C extension accordingly 2013-03-15 12:00:27 +01:00
Fabien Potencier 72c8bb73e9 bumped version to 1.12.3-DEV 2013-02-09 19:37:02 +01:00
Fabien Potencier a56f7405be prepared the 1.12.2 release 2013-02-09 19:21:53 +01:00
Fabien Potencier 2a7d317cf9 bumped version to 1.12.2-DEV 2013-01-15 21:09:30 +01:00
Fabien Potencier 7c124c94a5 prepared the 1.12.1 release 2013-01-15 21:03:52 +01:00
Fabien Potencier ad31e1765a bumped version to 1.12.1-DEV 2013-01-08 15:08:36 +01:00
Fabien Potencier 19c860742b prepared the 1.12.0 release 2013-01-08 14:42:43 +01:00
Fabien Potencier 25f7b0c7eb bumped version to 1.12.0-DEV 2012-12-30 21:07:31 +01:00
Fabien Potencier b0082d2d6b prepared the 1.12.0-RC1 release 2012-12-30 20:59:54 +01:00
Charles e8d12da98c Fix empty string comparison 2012-12-06 08:39:46 +07:00
Fabien Potencier 2243a14e3d switched version to 1.12 2012-11-14 14:33:03 +01:00
Fabien Potencier b16765ce8f bumped version to 1.11.2-DEV 2012-11-11 18:22:10 +01:00
Fabien Potencier e81b98944f prepared the 1.11.1 release 2012-11-11 18:17:59 +01:00
Charles 55b76c1799 Fix extension crash when calling unknown method inside a macro 2012-11-08 09:25:27 +07:00
Fabien Potencier c248887296 bumped version to 1.11.0-DEV 2012-11-07 12:22:35 +01:00
Fabien Potencier 795f6d876a prepared the 1.11.0 release 2012-11-07 12:20:21 +01:00
Charles 3164ee33d4 Fix build warning for const pointer 2012-11-07 08:49:50 +07:00
Charles db13b66774 Pass lineno and filename to Twig_Error constructor 2012-11-06 16:51:20 +07:00
Charles adb31d4012 Call Twig_Error constructor 2012-11-06 15:50:00 +07:00
Charles 1b82bf74fd Add template filename for the rest of the exception 2012-11-06 11:37:50 +07:00
Charles 5675140c9e Handle NULL filename 2012-11-06 11:16:51 +07:00
Charles 71f64bc83b Add template name to error message 2012-11-06 11:02:59 +07: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 2012-10-19 12:45:49 +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 2012-10-15 10:23:34 +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 2012-10-15 09:35:01 +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
Anatoliy Belsky b013ede1fa fix windows build 2012-10-04 18:50:52 +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 2012-09-28 22:11:39 +02:00
Charles 9126dc649c Twig extension: fix case when accessing property of an array casted into object 2012-09-21 17:29:41 +07:00
Charles 34cf8e1c6e Fix double free 2012-09-21 16:42:13 +07:00
Charles 498090364b Enhancements for twig extension
- Fix extension memory leak
- Fix gcc compile warning (cast to const char *)
- Add TWIG_HAS_DYNAMIC_PROPERTY
- Remove the previous translation of 'array_key_exists($item, $object)'
  into TWIG_ARRAY_KEY_EXISTS when checking object property because what
  it really means is property_exists which has already been handled by
  TWIG_HAS_PROPERTY and TWIG_HAS_DYNAMIC_PROPERTY
- Fix native extension spacing
2012-09-21 14:47:45 +07:00