Commits
-------
0cbf5a0 Added an option to mark filters as preserving the safeness
Discussion
----------
Added an option to mark filters as preserving the safeness
Closes#678
I haven't written a test for this yet as I don't know how to provide a stub filter (as none of the core filters use this option) for the setup of the testsuite.
---------------------------------------------------------------------------
by fabpot at 2012-04-07T20:15:36Z
@stof: Can you also add some information in the phpdoc with an example so that people understand more easily when and why you would want to use this new option? Thanks.
---------------------------------------------------------------------------
by fabpot at 2012-04-07T20:16:36Z
Also, adding a unit test that demonstrates the bug you had in #678 would be good.
---------------------------------------------------------------------------
by stof at 2012-04-20T08:33:58Z
@fabpot none of the core filters are using this options, so what is the right way to add a test ?
---------------------------------------------------------------------------
by fabpot at 2012-04-20T08:36:26Z
by defining a filter in the test that uses it.
---------------------------------------------------------------------------
by stof at 2012-04-20T08:39:06Z
but is it possible to register a filter from the tests with the custom stuff used by Twig ?
---------------------------------------------------------------------------
by fabpot at 2012-04-20T08:48:06Z
in integrationTest.php, we already have quite a few functions and filters registered. I would just be a matter of adding a new one.
---------------------------------------------------------------------------
by stof at 2012-04-20T16:17:01Z
@fabpot renamed, tested and squashed
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.
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
* 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
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.
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)
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.
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