Commit Graph

1375 Commits

Author SHA1 Message Date
Jordi Boggiano b2e1675f0c Add is array test 2012-04-13 12:57:54 +02:00
Fabien Potencier 4e28408ce1 fixed a PHP notice when trying to access a key on a non-object/array variable 2012-04-12 14:36:25 +02:00
Fabien Potencier 58fbe0da41 updated CHANGELOG 2012-04-11 16:52:26 +02:00
Fabien Potencier fd634d1af2 merged branch Tobion/random-fix (PR #693)
Commits
-------

06361ca added note in changelog
2706412 fixed random function when charset is null

Discussion
----------

Fixed random function when charset is null

Fixed random function when charset is null and the value is an empty string, resulting in an mt_rand error max(-1) is smaller than min(0).
Also fixed a test on windows.

But I don't know why you introduced the special handling for `null === $env->getCharset()`.
Why is that necessary and why is it possible to have a null charset at all? Usually it defaults to utf-8 anyway.
2012-04-09 18:27:10 +02:00
Tobias Schultze 06361ca346 added note in changelog 2012-04-09 09:30:01 +02:00
Tobias Schultze 27064127ad fixed random function when charset is null 2012-04-09 09:26:53 +02:00
Fabien Potencier 46ae99fa4c merged branch igorw/composer (PR #691)
Commits
-------

72d3c19 [composer] Add branch alias for dev-master, adjust some other things

Discussion
----------

[composer] Add branch alias for dev-master, adjust some other things

* branch alias allows installation of dev-master by requiring 1.7.*, which is important since most packages depend on twig "<2.0.0"
* remove the version field, the version is determined by branch names and tags only
* change license to BSD-3, this is more explicit and the preferred format for BSD licenses
2012-04-08 14:20:37 +02:00
Fabien Potencier 1b47b40104 enhanced error reporting when the template file is an instance of SplFileInfo 2012-04-08 14:12:00 +02:00
Igor Wiedler 72d3c19e71 [composer] Add branch alias for dev-master, adjust some other things
* branch alias allows installation of dev-master by requiring 1.7.*, which is important since most packages depend on twig "<2.0.0"
* remove the version field, the version is determined by branch names and tags only
* change license to BSD-3, this is more explicit and the preferred format for BSD licenses
2012-04-08 14:07:23 +02:00
Fabien Potencier fe3c17f51f added a tip in the doc 2012-04-08 12:58:26 +02:00
Fabien Potencier c6bf195e21 added a unit test to demonstrate the need to pass blocks when calling renderBlock|displayBlock 2012-04-07 22:40:59 +02:00
Fabien Potencier a39784432a merged branch igorw/patch-1 (PR #689)
Commits
-------

11d4c6a [doc] Remove backticks in intro doc

Discussion
----------

[doc] Remove backticks in intro doc
2012-04-07 18:15:20 +02:00
Igor Wiedler 11d4c6af6a [doc] Remove backticks in intro doc 2012-04-07 18:38:17 +03:00
Fabien Potencier 7bc8ca5be7 merged branch markstory/loop-docs (PR #688)
Commits
-------

2a7102d Update docs concerning loop.last.

Discussion
----------

Update docs concerning loop.last.

Add docs for #687. `loop.last` is not defined when looping with conditions.
2012-04-07 16:41:37 +02:00
mark_story 2a7102d059 Update docs concerning loop.last. 2012-04-07 09:50:44 -04:00
Fabien Potencier fbacbe60ad added some more information about unknown variable/attributes in the doc (closes #685) 2012-04-05 22:53:39 +02:00
Fabien Potencier f2f1f32b41 added Twig_Environment::mergeGlobals() 2012-04-03 19:13:43 +02:00
Fabien Potencier 3398b38cf0 fixed a regression when a template only extends another one without defining any blocks (closes #683) 2012-04-03 19:13:30 +02:00
Fabien Potencier e2220bb282 bumped version to 1.7.0-DEV 2012-04-03 09:56:57 +02:00
Fabien Potencier 8f242ca858 made usage of mergeContextWithGlobals in macros 2012-04-03 09:45:11 +02:00
Fabien Potencier b19ef8ea16 fixed doc markup 2012-04-03 09:10:53 +02:00
Fabien Potencier 81807ea95b fixed doc markup 2012-04-03 09:08:32 +02:00
Fabien Potencier 53e89ef2eb fixed doc indexes 2012-04-03 09:07:53 +02:00
Fabien Potencier e9c1433a99 renamed a test 2012-04-03 09:07:04 +02:00
Fabien Potencier 1f6e640d96 added compilation checks to avoid misuses of the sandbox tag 2012-04-03 09:03:41 +02:00
Fabien Potencier 2055f567f9 fixed Twig unit tests when a template must throw an exception 2012-04-03 08:59:31 +02:00
Fabien Potencier 3f962ba89e enhance error reporting in Twig unit tests 2012-04-03 08:49:35 +02:00
Fabien Potencier 8656bd2afe added doc for the sandbox tag 2012-04-03 08:38:32 +02:00
Fabien Potencier 7ea15600ee added a note about sandbox policy checks in the doc (refs #677) 2012-04-03 07:32:06 +02:00
Fabien Potencier 999e54efb0 fixed filesystem loader freshness logic for high traffic websites (closes #682) 2012-04-03 07:20:26 +02:00
Fabien Potencier 50421c8620 bumped version to 1.6.4-DEV 2012-04-02 19:45:40 +02:00
Fabien Potencier ff61094aa3 prepared the 1.6.4 release v1.6.4 2012-04-02 19:42:18 +02:00
Fabien Potencier aa4efe1c0a updated CHANGELOG 2012-04-01 10:25:37 +02:00
Fabien Potencier 9473315752 fixed file permission 2012-04-01 10:24:05 +02:00
Fabien Potencier e3b5998a6d merged branch Nami-Doc/patch-1 (PR #680)
Commits
-------

27ffef0 The question I'm asking myself now is : how could I get $trace['line'] is not set if there's a check before the <= ? anyway, fixed
36618fe fix a bug where when an error would be thrown through the loader (Twig_Error_Loader by Twig_Loader_Filesystem, ie) the $trace['line'] would not be set (since we're not in a template)

Discussion
----------

fix a bug where when an error would be thrown through the loader

(Twig_Error_Loader by Twig_Loader_Filesystem, ie) the $trace['line'] would not be set (since we're not in a template)

thanks

---------------------------------------------------------------------------

by Nami-Doc at 2012-03-31T20:00:31Z

fixed, thanks @stof. Now I wonder (as I just wrote) : how could I get the error with that isset here ?

---------------------------------------------------------------------------

by stof at 2012-03-31T20:05:45Z

@Nami-Doc what was the exact error you got ?

---------------------------------------------------------------------------

by Nami-Doc at 2012-03-31T20:09:51Z

Php states that $trace['line'] isn't set

---------------------------------------------------------------------------

by Nami-Doc at 2012-03-31T20:23:33Z

O.K., got it. this has been fixed in #675, but composer (great tool) installed me last tag, but I think it's better to check it outside the loop anyway (micro-micro-optimisation)
2012-04-01 10:22:57 +02:00
Fabien Potencier 27f55cc567 fixed performance when compiling large files 2012-04-01 10:06:09 +02:00
Nami-Doc 27ffef077a The question I'm asking myself now is : how could I get $trace['line'] is not set if there's a check before the <= ? anyway, fixed 2012-03-31 22:59:45 +03:00
Nami-Doc 36618fe101 fix a bug where when an error would be thrown through the loader (Twig_Error_Loader by Twig_Loader_Filesystem, ie) the $trace['line'] would not be set (since we're not in a template) 2012-03-31 19:45:34 +03:00
Fabien Potencier dfb523eab6 made a small optimization when there is only one trait used in a template 2012-03-31 15:26:42 +02:00
Fabien Potencier 1e9a1ae0be optimized parent template creation when the template does not use dynamic inheritance 2012-03-31 15:21:57 +02:00
Fabien Potencier 6e2fd68e7b merged branch lyrixx/error-guess (PR #675)
Commits
-------

d0ae029 Fixed notice in Twig_Error::guessTemplateLine

Discussion
----------

Fixed notice in Twig_Error::guessTemplateLine

Sometimes, `trace['line']` is not available and makes notice.

You can see tests in https://github.com/lyrixx/Silex-Kitchen-Edition/tree/composer.
2012-03-24 00:23:13 +01:00
Grégoire Pineau d0ae0294c0 Fixed notice in Twig_Error::guessTemplateLine 2012-03-23 23:59:21 +01:00
Fabien Potencier a980023df8 merged branch carbonatethis/Documentation (PR #674)
Commits
-------

bf0cc53 Added code snippet to documentation to describe handling null values with date filter

Discussion
----------

Date filter docs update

Added code snippet to documentation to describe handling null values with date filter
2012-03-22 19:43:11 +01:00
cb bf0cc537e3 Added code snippet to documentation to describe handling null values with date filter 2012-03-22 13:12:09 -05:00
Fabien Potencier ab016bd605 bumped version to 1.6.4-DEV 2012-03-22 18:31:45 +01:00
Fabien Potencier c2a53a2614 prepared the 1.6.3 release v1.6.3 2012-03-22 18:28:15 +01:00
Fabien Potencier a4fa6db03b added documentation for the trim filter 2012-03-22 14:34:27 +01:00
Fabien Potencier 4a0773a8ad fixed usage of Z_ADDREF_P for PHP 5.2 in the C extension 2012-03-22 14:25:00 +01:00
Fabien Potencier 405cbb5be2 merged branch shieldo/patch-1 (PR #670)
Commits
-------

7f0cca0 fixed incorrect docblock

Discussion
----------

fixed incorrect docblock

---------------------------------------------------------------------------

by shieldo at 2012-03-19T18:15:41Z

True, and done.

---------------------------------------------------------------------------

by fabpot at 2012-03-19T18:19:33Z

Can you rebase your PR and squash your commits so that we don't have the merge? Thanks.

---------------------------------------------------------------------------

by shieldo at 2012-03-19T18:43:28Z

Sorry about that.  Done. :)
2012-03-19 19:52:05 +01:00
Fabien Potencier 141d622dc9 simplified code 2012-03-19 19:17:36 +01:00