Commit Graph

1481 Commits

Author SHA1 Message Date
Chris Sedlmayr 459a0764ea The Compiler outdent method will now only reduce the indentation if it's OK
to do so, It moves and modifies the check up above the indentation modification.
2012-06-07 23:45:55 +01:00
Fabien Potencier 6d072640c4 added Komodo to the list of supported IDEs 2012-05-31 07:17:23 +02:00
Fabien Potencier 12dff669ef added Coda 2 in the list of supported IDEs 2012-05-30 22:55:03 +02:00
Fabien Potencier 82e73f6bf2 bumped version to 1.8.3 2012-05-30 08:18:29 +02:00
Fabien Potencier 2afc513620 prepared the 1.8.2 release v1.8.2 2012-05-30 08:15:36 +02:00
Fabien Potencier b5b7224d5d fixed some CS issues 2012-05-29 20:38:42 +02:00
Fabien Potencier 26db550230 merged branch blaugueux/master (PR #736)
Commits
-------

c53a02d Fixed DateTimeZone support in date filter.

Discussion
----------

Fixed DateTimeZone support in date filter.

Now $date converted to a DateTime has a DateTimeZone in every case.

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

by fabpot at 2012-05-28T19:20:47Z

Can you add some unit tests to avoid regression to happen later? Thanks.

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

by blaugueux at 2012-05-29T07:52:58Z

@fabpot Here they are.

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

by fabpot at 2012-05-29T10:29:28Z

Great! Can you add a note in the CHANGELOG file and then squash your commit before I merge? Thanks.

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

by blaugueux at 2012-05-29T12:52:22Z

Changelog added. First squash of my life, i cannot say if it's good :(

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

by stof at 2012-05-29T12:55:26Z

it is not. you merged your remote branch instead of forcing the push

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

by blaugueux at 2012-05-29T17:12:05Z

Ok @stof, thanks for your help. I think it's good now.

@fabpot Is it ok for you ?
2012-05-29 20:09:42 +02:00
Benjamin Laugueux c53a02de1a Fixed DateTimeZone support in date filter.
Prevents the DateTime object to be updated when changing the DateTimeZone.

Unit tests added.

Updated changelog.
2012-05-29 19:09:23 +02:00
Fabien Potencier 78a935b6ff updated CHANGELOG 2012-05-28 22:55:00 +02:00
Fabien Potencier b6e417ecf7 merged branch maartendekeizer/master (PR #738)
Commits
-------

f0a0036 Add abs filter including unit test and documentation

Discussion
----------

Add abs filter to Twig

With abs it is possible to make negative values positive and leave positive values positive.

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

by maartendekeizer at 2012-05-26T19:02:34Z

Example when using abs

{% if days_left < 0 %}
    {{ days_left|abs }} days to late!
{% else %}
    {{ days_left }} days left
{% endif %}

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

by stof at 2012-05-26T19:12:43Z

I'm not sure about adding this filter in the core. I think it would be better in the Twig-extensions repo. @fabpot thoughts ?

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

by maartendekeizer at 2012-05-26T21:18:47Z

@stof abs is a really basic/natural function it belongs to the base mathematic functions. If this was an implementation of for example the ABC-formula or Pythagoras it must be in the extension repo., but abs is more core related I think.

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

by fabpot at 2012-05-27T07:11:33Z

Can you add some unit tests and squash your commits? Thanks.

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

by maartendekeizer at 2012-05-27T14:40:56Z

First time squashing commits; learned something new :-). I will add a unit test tomorrow.

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

by maartendekeizer at 2012-05-27T17:36:58Z

Unit test and documentation added.

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

by fabpot at 2012-05-27T18:41:25Z

After fixing the markup issue, you will have to squash again ;)

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

by maartendekeizer at 2012-05-27T20:44:29Z

Done

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

by fabpot at 2012-05-28T19:19:55Z

Looks like you have not squash your commits.

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

by maartendekeizer at 2012-05-28T20:05:34Z

@fabot you want one commit for the complete pr?

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

by fabpot at 2012-05-28T20:06:53Z

For such a PR, yes.
2012-05-28 22:54:16 +02:00
Maarten de Keizer f0a0036892 Add abs filter
including unit test and documentation
2012-05-28 22:27:26 +02:00
Fabien Potencier 47e9b95c37 merged branch hhamon/doc_fixes (PR #737)
Commits
-------

953a0ce [doc] fixed Composer section of the introduction. Added a side note to the Composer official documentation for getting more information.

Discussion
----------

[doc] fixed twig version in installation documentation.

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

by lyrixx at 2012-05-25T23:30:01Z

why not use something like "1.*" ?

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

by fabpot at 2012-05-26T05:55:16Z

This is just an example and we are not going to update it with each new release. So, we can either use `1.*` as suggested by @lyrixx or/and add a note referring to the Composer docs.

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

by hhamon at 2012-05-28T05:34:54Z

That's better indeed!

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

by hhamon at 2012-05-28T05:40:46Z

@fabpot you can merge this PR

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

by fabpot at 2012-05-28T06:07:05Z

Can you squash?

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

by hhamon at 2012-05-28T06:31:42Z

@fabpot squashed!
2012-05-28 08:44:30 +02:00
Hugo Hamon 953a0ce602 [doc] fixed Composer section of the introduction. Added a side note to the Composer official documentation for getting more information. 2012-05-28 08:30:24 +02:00
Fabien Potencier 45d0f6fe67 fixed an obsolete comment in phpdoc 2012-05-26 08:30:56 +02:00
Fabien Potencier 573a360971 fixed a regression when using a number in template attributes (closes #733) 2012-05-23 07:50:43 +02:00
Fabien Potencier 843e1f74ee added an example for the loop variable (closes #732) 2012-05-23 07:40:44 +02:00
Fabien Potencier 0fa26d6429 fixed compiler when mbstring.func_overload is set to 2 (closes #731) 2012-05-21 13:39:18 +02:00
Fabien Potencier e28663efd8 fixed CS 2012-05-19 09:41:36 +02:00
Fabien Potencier 875fa010ce bumped version to 1.8.2-DEV 2012-05-17 18:06:57 +02:00
Fabien Potencier 0bee037579 prepared the 1.8.1 release v1.8.1 2012-05-17 18:02:47 +02:00
Fabien Potencier 06da8234ef merged branch Tobion/patch-5 (PR #729)
Commits
-------

b692268 removed leftover of 93c4406f8 and made some language improvements

Discussion
----------

removed leftover of 93c4406f8 and made some language improvements
2012-05-17 09:08:48 +02:00
Tobias Schultze b6922682b0 removed leftover of 93c4406f8 and made some language improvements 2012-05-17 00:21:17 +03:00
Fabien Potencier 7f06c12c53 fixed tests for PHP 5.2 2012-05-16 17:00:05 +02:00
Fabien Potencier 93c4406f87 fixed typos in the doc (closes #726) 2012-05-16 16:24:38 +02:00
Fabien Potencier 621c7b5757 updated CHANGELOG 2012-05-16 16:22:01 +02:00
Fabien Potencier 3fa5be49ab fixed CHANGELOG 2012-05-16 16:20:34 +02:00
Fabien Potencier 8ec73cf475 fixed a regression introduced by aa6b835816 2012-05-16 16:19:00 +02:00
Fabien Potencier c35e16dbd3 removed obsolete code 2012-05-16 16:01:19 +02:00
Fabien Potencier d661c2a2f6 switched to use mbstring whenever possible instead of iconv (because of issues with iconv and Japanese -- thanks @ganchiku for the tip) 2012-05-12 10:15:51 +02:00
Fabien Potencier f8e9a45388 merged branch Fustrate/master (PR #725)
Commits
-------

6c06a32 Coding style

Discussion
----------

Minor typos and coding style

- Unnecessary return in Lexer
- Typo in TokenParserBrokerInterface
2012-05-11 06:53:17 +02:00
Steven Hoffman 6c06a32663 Coding style
- Unnecessary return in Lexer
- Typo in TokenParserBrokerInterface
2012-05-10 12:10:26 -07:00
Fabien Potencier e445192f06 merged branch literal/v1.8.0 (PR #723)
Commits
-------

d13f742 fix example in doc for embed tag
b11412e improve documentation for embed tag

Discussion
----------

improve documentation for embed tag

https://github.com/fabpot/Twig/issues/722

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

by fabpot at 2012-05-10T05:10:37Z

I think this is a great improvement over the original version! The notion of "micro-layouts" certainly helps understand the concept behind the `embed` tag.

Thanks.
2012-05-10 13:36:58 +02:00
literal d13f7424eb fix example in doc for embed tag 2012-05-10 14:33:17 +03:00
literal b11412efd8 improve documentation for embed tag 2012-05-10 03:10:48 +03:00
Fabien Potencier 078905ed95 fixed dump function is_safe value when html_errors is not defined in php.ini (closes #720) 2012-05-08 14:24:57 +02:00
Fabien Potencier 925254821d bumped version to 1.9.0-DEV 2012-05-08 09:06:03 +02:00
Fabien Potencier 87766410dd prepared the 1.8.0 release v1.8.0 2012-05-08 09:03:46 +02:00
Fabien Potencier 1dc3c4beaf added documentation for the bitwise operators (closes #707) 2012-05-08 08:32:32 +02:00
Fabien Potencier 52cc3817a8 added tests for bitwise operators 2012-05-08 08:30:42 +02:00
Fabien Potencier 4cd98e62d0 clarified usage of the dump function (closes #718) 2012-05-08 08:23:16 +02:00
Fabien Potencier db32d5ef43 enforced interface when adding tests, filters, functions, and node visitors from extensions
This avoids some hard to find bugs where you use a Twig_Function_Method
for instance for a filter. This is hard to find because the interface is
almost the same but the getSafe() contract is not the same.
2012-05-04 08:00:56 +02:00
Fabien Potencier 606d6dc15e updated CHANGELOG 2012-05-03 22:31:44 +02:00
Fabien Potencier 3160189601 merged branch stof/mutable_datetime (PR #717)
Commits
-------

a23d4fb Fixed the handling of the timezone for DateTime objects
a164469 Added a failing test demonstrating the bug with DateTime and timezones

Discussion
----------

Mutable datetime

PHP DateTime objects are mutable so changing the timezone when displaying
it affects the following code whereas it does not occur for other
supported formats.
2012-05-03 22:30:26 +02:00
Christophe Coevoet a23d4fbb71 Fixed the handling of the timezone for DateTime objects 2012-05-03 22:25:04 +02:00
Christophe Coevoet a16446913a Added a failing test demonstrating the bug with DateTime and timezones
PHP DateTime objects are mutable so changing the timezone when displaying
it affects the following code whereas it does not occur for other
supported formats.
2012-05-03 22:20:20 +02:00
Fabien Potencier f3491b5cbf added a missing entry in the CHANGELOG 2012-04-28 09:16:43 +02:00
Fabien Potencier 5923f0cbad fixed markup in the doc 2012-04-27 17:50:30 +02:00
Fabien Potencier db8a109495 merged two doc files 2012-04-27 17:50:30 +02:00
Fabien Potencier bbfc7d7aef renamed a doc file 2012-04-27 17:50:27 +02:00
Fabien Potencier 50c511849f refactored the hacking twig doc chapter 2012-04-27 17:35:26 +02:00