Commit Graph

2703 Commits

Author SHA1 Message Date
Tobias Schultze f24a4aeb15 remove unused private property 2015-08-22 16:51:58 +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
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
Fabien Potencier 8c4291ac08 removed usage of deprecated features, marked some tests as being legacy 2015-08-18 13:34:47 +02:00
Fabien Potencier b5db9dc5f2 added the Symfony PHPUnit bridge to better manage deprecation notices 2015-08-18 13:34:47 +02:00
Fabien Potencier 23c392212e added deprecated notices for deprecated features 2015-08-18 13:34:46 +02:00
Fabien Potencier bd87ba8ad0 added some documentation about deprecation notices 2015-08-18 13:34:46 +02:00
Fabien Potencier d16b7bf0a7 added a way to trigger deprecation notices for filters and functions 2015-08-18 09:47:53 +02:00
Fabien Potencier 21f536bc0a added deprecation for the raw tag 2015-08-18 09:47:53 +02:00
Fabien Potencier efcfe8e0d7 added deprecation notices for deprecated tests 2015-08-18 09:47:53 +02:00
Fabien Potencier c1f54190da feature #1771 Remove the reserved macro names (stof)
This PR was merged into the 2.0-dev branch.

Discussion
----------

Remove the reserved macro names

Replaces #1765 and #1766

Commits
-------

23a7b6f Remove the reserved macro names
2015-08-17 21:45:33 +02:00
Fabien Potencier 65e70a2c87 fixed CS 2015-08-17 21:43:54 +02:00
Fabien Potencier 5f253f77a8 minor #1772 Optimize the retrieval of reserved macro names (stof)
This PR was merged into the 1.x branch.

Discussion
----------

Optimize the retrieval of reserved macro names

The list of reserved names does not need to be reset for each template compilation.

Commits
-------

c267257 Optimize the retrieval of reserved macro names
2015-08-17 21:42:30 +02:00
Fabien Potencier 66c32e0974 minor #1770 Remove dead code (stof)
This PR was merged into the 1.x branch.

Discussion
----------

Remove dead code

Array keys cannot be objects in PHP.

Commits
-------

a07ac6a Remove dead code
2015-08-17 21:41:22 +02:00
Christophe Coevoet c267257ccf Optimize the retrieval of reserved macro names
The list of reserved names does not need to be reset for each template
compilation.
2015-08-17 11:47:30 +02:00
Christophe Coevoet 23a7b6fb35 Remove the reserved macro names 2015-08-17 11:45:58 +02:00
Christophe Coevoet a07ac6a0a8 Remove dead code
Array keys cannot be objects in PHP.
2015-08-17 11:33:49 +02:00
Fabien Potencier 38adc8520d made Twig_Extension_Staging final 2015-08-16 18:58:19 +02:00
Fabien Potencier c27b04c9d6 added the raw tag as being deprecated 2015-08-15 23:53:21 +02:00
Fabien Potencier 39885c9140 replaced obsolete raw tag by verbatim in tests 2015-08-15 23:50:57 +02:00
Fabien Potencier 0e83e2e583 simplified code 2015-08-15 21:59:10 +02:00
Fabien Potencier 9f319e55c7 Merge branch '1.x'
* 1.x:
  fixed typos and CS
  [doc/recipes] Added OPcache support
  Remove broken code
2015-08-15 21:53:57 +02:00
Fabien Potencier 499d4e7d60 bug #1763 Remove broken code (stof)
This PR was merged into the 1.x branch.

Discussion
----------

Remove broken code

https://github.com/twigphp/Twig/commit/651613c32c315bbeb330b2a6354b34c288e9ea0a#diff-841d1051670799376e88c87114d2caf0 broke the code of ``Twig_Node_Module::compileLoadTemplate`` when passing a non-constant node (it triggers a fatal error)
Trait templates can only be constant expression nodes, so fixing the broken is not actually needed and it can be removed.
Given it is a protected method, I haven't changed the signature to typehint the node as a Twig_Node_Expression_Constant

Commits
-------

e6ae0d0 Remove broken code
2015-08-15 21:53:40 +02:00
Fabien Potencier af129b2f75 fixed typos and CS 2015-08-13 14:50:40 +02:00
Fabien Potencier 5f5d8b0647 minor #1762 [doc/recipes] Added OPcache support (iKwinto)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #1762).

Discussion
----------

[doc/recipes] Added OPcache support

OPcache enabled by default cache sinse PHP 5.5.

Commits
-------

1f3fb9a [doc/recipes] Added OPcache support
2015-08-13 14:49:08 +02:00
Alexander Vasilyev 1f3fb9a178 [doc/recipes] Added OPcache support 2015-08-13 14:49:08 +02:00
Fabien Potencier d71f4f229d fixed some tests 2015-08-13 11:02:25 +02:00
Fabien Potencier 6cb83c93e1 Revert "replaced array() by [] in *generated* PHP code"
This reverts commit 6d50f987fb.
2015-08-13 11:00:18 +02:00
Christophe Coevoet e6ae0d0caa Remove broken code
Trait templates can only be constant expression nodes, so fixing the
broken is not actually needed and it can be removed.
2015-08-13 10:32:03 +02:00