Commit Graph

2729 Commits

Author SHA1 Message Date
Fabien Potencier 9bea367f3d Merge branch '1.x'
* 1.x:
  bumped version to 1.21.2-DEV
  prepared the 1.21.1 release
  fixed support for Twig_Test_* classes
  bumped version to 1.21.1-DEV
  prepared the 1.21.0 release
2015-08-26 11:09:06 +02:00
Fabien Potencier 91c9f50716 bumped version to 1.21.2-DEV 2015-08-26 11:02:09 +02:00
Fabien Potencier ca8d3aa90b prepared the 1.21.1 release v1.21.1 2015-08-26 10:58:31 +02:00
Fabien Potencier 80f7cfc45f bug #1794 fixed support for Twig_Test_* classes (regression) (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

fixed support for Twig_Test_* classes (regression)

fixes #1791

Commits
-------

9561582 fixed support for Twig_Test_* classes
2015-08-26 10:52:21 +02:00
Fabien Potencier 9561582e2f fixed support for Twig_Test_* classes 2015-08-26 10:26:15 +02:00
Fabien Potencier 71b4dc2572 bumped version to 1.21.1-DEV 2015-08-24 11:58:37 +02:00
Fabien Potencier 913d282cac prepared the 1.21.0 release v1.21.0 2015-08-24 11:51:18 +02:00
Fabien Potencier 962119e8dd Merge branch '1.x'
* 1.x:
  added a note about TwigFiddle
  fixed wrong commit
  removed obsolete comment
2015-08-23 14:35:59 +02:00
Fabien Potencier 1dfa7dfb5d minor #1789 added a note about TwigFiddle (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

added a note about TwigFiddle

Not sure where to mention it, the IDE section seems ok.

ping @ninsuo

Commits
-------

bc9911e added a note about TwigFiddle
2015-08-23 14:35:41 +02:00
Fabien Potencier bc9911e326 added a note about TwigFiddle 2015-08-23 14:22:16 +02:00
Fabien Potencier d08ceadf4a fixed wrong commit 2015-08-23 14:21:39 +02:00
Fabien Potencier d6e42d167e removed obsolete comment 2015-08-23 10:15:17 +02:00
Fabien Potencier 5fc0ffc87b fixed built-in loaders to implement Twig_ExistsLoaderInterface 2015-08-23 10:10:04 +02:00
Fabien Potencier cb66631b30 feature #1773 moved more methods/properties to private (fabpot)
This PR was merged into the 2.0-dev branch.

Discussion
----------

moved more methods/properties to private

I'd like to make even more properties/methods private in 2.0. We can always put them back to protected if that makes sense.

Commits
-------

905a2a8 moved more methods/properties to private
2015-08-23 10:09:03 +02:00
Fabien Potencier 905a2a8102 moved more methods/properties to private 2015-08-23 09:05:30 +02:00
Fabien Potencier a50f8ed85a Merge branch '1.x'
* 1.x:
  move property initialization to the declaration when possible
  optimized the filesystem loader
2015-08-22 17:50:35 +02:00
Fabien Potencier 34666ee7c2 bug #1785 Faster filesystem loader master (fabpot)
This PR was merged into the 2.0-dev branch.

Discussion
----------

Faster filesystem loader master

We need to keep calling `findTemplate()` for all methods to keep BC.

Commits
-------

3da99ce removed BC break in filesystem loader
638eedb Revert "removed an unneeded protected method"
2015-08-22 17:48:43 +02:00
Fabien Potencier f4e281e3dd minor #1784 optimized the filesystem loader (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

optimized the filesystem loader

* added a cache for templates that do not exist
* sped up Filesystem::exists() by avoiding the creation of exceptions

same as d2b97b49f2 that was reverted because of a BC break
and same as what is in 2.0 (but in a BC way).

Commits
-------

21b128a optimized the filesystem loader
2015-08-22 17:46:51 +02:00
Fabien Potencier 3a62bb3f49 minor #1779 Callable typehint (Tobion)
This PR was merged into the 2.0-dev branch.

Discussion
----------

Callable typehint

Add callable typehint which are available since php 5.4 so are safe to use in twig 2.0.

Commits
-------

465208d add callable typehints
2015-08-22 17:42:50 +02:00
Fabien Potencier 73f820e49b minor #1786 move property initialization to the declaration when possible (Tobion)
This PR was merged into the 1.x branch.

Discussion
----------

move property initialization to the declaration when possible

From #1781

Commits
-------

5951d1f move property initialization to the declaration when possible
2015-08-22 17:40:25 +02:00
Fabien Potencier c35cc3413a minor #1787 remove unused private property (Tobion)
This PR was merged into the 2.0-dev branch.

Discussion
----------

remove unused private property

Commits
-------

f24a4ae remove unused private property
2015-08-22 17:39:36 +02:00
Tobias Schultze f24a4aeb15 remove unused private property 2015-08-22 16:51:58 +02:00
Tobias Schultze 5951d1fb22 move property initialization to the declaration when possible 2015-08-22 16:48:43 +02:00
Fabien Potencier 3da99ce98b removed BC break in filesystem loader 2015-08-22 14:54:35 +02:00
Fabien Potencier 638eedb622 Revert "removed an unneeded protected method"
This reverts commit 7de9a57b92.
2015-08-22 14:45:46 +02:00
Fabien Potencier 21b128a89c optimized the filesystem loader
* added a cache for templates that do not exist
* sped up Filesystem::exists() by avoiding the creation of exceptions

same as d2b97b49f2 that was reverted because of a BC break
and same as what is in 2.0 (but in a BC way).
2015-08-22 14:43:11 +02:00
Fabien Potencier 98b1f31f50 Merge branch '1.x'
* 1.x:
  fix escaping strategy that is an array but not a callable
  use travis cache for composer and fast finish
  fix php 5.2 compatibility
  enhance travis setup
  Add missing deprecation triggers
  Fix the deprecation warning for functions and tests
  bumped version to 1.21
  avoid a PHPUnit message when no legacy tests are in the test suite
2015-08-22 09:33:59 +02:00
Fabien Potencier d65a1374a9 bug #1780 fix escaping strategy that is an array but not a callable (Tobion)
This PR was squashed before being merged into the 1.x branch (closes #1780).

Discussion
----------

fix escaping strategy that is an array but not a callable

https://github.com/twigphp/Twig/pull/1779#discussion-diff-37534003

Commits
-------

7f1ee9f fix escaping strategy that is an array but not a callable
2015-08-22 09:28:42 +02:00
Tobias Schultze 7f1ee9f9cb fix escaping strategy that is an array but not a callable 2015-08-22 09:28:40 +02:00
Fabien Potencier b71ce99039 minor #1778 Add missing deprecation triggers (stof)
This PR was merged into the 1.x branch.

Discussion
----------

Add missing deprecation triggers

Assetic is extending the ``Twig_Function`` class directly currently, and this was not triggering any deprecation warning

Commits
-------

cb98576 Add missing deprecation triggers
2015-08-22 09:26:11 +02:00
Fabien Potencier 5ed99139ee minor #1783 enhance travis setup (Tobion)
This PR was merged into the 1.x branch.

Discussion
----------

enhance travis setup

- require php 7 to pass
- allow failures for php7 + twig extension
- use container-based infrastructure
- <del>composer self-update to get rid of the outdated warning</del>
- add travis cache for composer
- use travis fast finish

Commits
-------

11baf55 use travis cache for composer and fast finish
7b579df fix php 5.2 compatibility
118598e enhance travis setup
2015-08-22 09:25:21 +02:00
Tobias Schultze 11baf557fd use travis cache for composer and fast finish 2015-08-21 16:47:01 +02:00
Tobias Schultze 7b579df77d fix php 5.2 compatibility 2015-08-21 16:16:21 +02:00
Tobias Schultze 118598eaf3 enhance travis setup
- require php 7 pass (except with extension)
- use container-based infrastructure
- composer self-update to get rid of the outdated warning
- install --prefer-source because travis auth fails against dist
2015-08-21 16:08:16 +02:00
Tobias Schultze 465208dcfa add callable typehints
make callable nullable to support custom compilation without a callable

remove non-existent callables from tests

add phpdoc for filter/tests/functions
2015-08-21 13:42:59 +02:00
Christophe Coevoet cb98576934 Add missing deprecation triggers 2015-08-20 11:31:45 +02:00
Fabien Potencier 92fa52b874 bug #1775 Fix the deprecation warning for functions and tests (stof)
This PR was merged into the 1.x branch.

Discussion
----------

Fix the deprecation warning for functions and tests

Otherwise, when a function does not define any filter, the message looks like that:

```
Using an instance of "Twig_Environment" for function "nelmio_js_logger" is deprecated. Use Twig_SimpleFunction instead.
```

This happens because the notice about the undefined variable gets silenced too, and ``get_class(null)`` returns the current class.

Commits
-------

1687097 Fix the deprecation warning for functions and tests
2015-08-19 23:10:59 +02:00
Christophe Coevoet 1687097ed0 Fix the deprecation warning for functions and tests 2015-08-19 15:19:42 +02:00
Fabien Potencier 7de9a57b92 removed an unneeded protected method 2015-08-18 17:05:31 +02:00
Fabien Potencier d4aa0238c3 bumped version to 1.21 2015-08-18 15:28:19 +02:00
Fabien Potencier dfd323dec0 simplified code 2015-08-18 15:19:55 +02:00
Fabien Potencier 4cb0704e07 avoid a PHPUnit message when no legacy tests are in the test suite 2015-08-18 15:15:46 +02:00
Fabien Potencier a089f1e8a7 Merge branch '1.x'
* 1.x:
  simplified tests
  added Twig_Util_DeprecationCollector to collect deprecation notices for a set of templates
  tweaked some deprecation messages
  added deprecation notices for deprecated classes
  optimized legacy tests management
  added a way to manage legacy tests in fixtures
  removed usage of deprecated features, marked some tests as being legacy
  added the Symfony PHPUnit bridge to better manage deprecation notices
  added deprecated notices for deprecated features
  added some documentation about deprecation notices
  added a way to trigger deprecation notices for filters and functions
  added deprecation for the raw tag
  added deprecation notices for deprecated tests
  fixed CS
  Optimize the retrieval of reserved macro names
  Remove dead code
  added the raw tag as being deprecated
  replaced obsolete raw tag by verbatim in tests
2015-08-18 15:14:25 +02:00
Fabien Potencier 05b5f80d4a simplified tests 2015-08-18 14:33:40 +02:00
Fabien Potencier 5fdbd991bf feature #1769 Deprecation notices (fabpot, nicolas-grekas)
This PR was merged into the 1.x branch.

Discussion
----------

Deprecation notices

Added a way to warn our users of deprecation features. This framework can be used for core features, but also for functions/tests/filters created by third-party. I haven't added something for tags as it can be done easily in the token parser class.

Fixes #1756 and #1767

Commits
-------

56c7382 added Twig_Util_DeprecationCollector to collect deprecation notices for a set of templates
2da6bae tweaked some deprecation messages
cc98028 added deprecation notices for deprecated classes
c6ab7de optimized legacy tests management
eebfdc7 added a way to manage legacy tests in fixtures
8c4291a removed usage of deprecated features, marked some tests as being legacy
b5db9dc added the Symfony PHPUnit bridge to better manage deprecation notices
23c3922 added deprecated notices for deprecated features
bd87ba8 added some documentation about deprecation notices
d16b7bf added a way to trigger deprecation notices for filters and functions
21f536b added deprecation for the raw tag
efcfe8e added deprecation notices for deprecated tests
65e70a2 fixed CS
2015-08-18 14:05:39 +02:00
Fabien Potencier 56c7382775 added Twig_Util_DeprecationCollector to collect deprecation notices for a set of templates 2015-08-18 13:34:47 +02:00
Fabien Potencier 2da6baee63 tweaked some deprecation messages 2015-08-18 13:34:47 +02:00
Fabien Potencier cc980282de added deprecation notices for deprecated classes 2015-08-18 13:34:47 +02:00
Nicolas Grekas c6ab7de8f2 optimized legacy tests management 2015-08-18 13:34:47 +02:00
Fabien Potencier eebfdc75f1 added a way to manage legacy tests in fixtures 2015-08-18 13:34:47 +02:00