Commit Graph

2487 Commits

Author SHA1 Message Date
Fabien Potencier 8ce76eda73 bug #1662 Fix leaks (jpauli)
This PR was merged into the 1.x branch.

Discussion
----------

Fix leaks

Commits
-------

c41d305 Cleanup API - make the compiler happy
8bb7cbb Fixed memory leaks
2015-03-26 13:32:49 +01:00
Julien Pauli c41d305251 Cleanup API - make the compiler happy 2015-03-26 12:44:45 +01:00
Julien Pauli 8bb7cbbd9d Fixed memory leaks 2015-03-26 12:44:37 +01:00
Fabien Potencier 7ee4aec238 tweaked docs about the C extension 2015-03-17 18:21:28 +01:00
Fabien Potencier eecf85e903 minor #1642 removed an obsolete recipe (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

removed an obsolete recipe

Commits
-------

cb73249 removed an obsolete recipe
2015-03-06 08:12:47 +01:00
Fabien Potencier cb732490a3 removed an obsolete recipe 2015-03-02 18:29:18 +01:00
Fabien Potencier 11f9ebe8b6 feature #1641 deprecated the String loader (fabpot)
This PR was merged into the 1.18-dev branch.

Discussion
----------

deprecated the String loader

Even if the String loader should never be used, people keep trying to use it. It's too confusing to keep and we don't really need it in tests. So, I propose to deprecate it in 1.x and remove it in 2.x

Commits
-------

3779435 deprecated the String loader
2015-03-02 17:39:24 +01:00
Fabien Potencier 3779435d62 deprecated the String loader 2015-03-02 15:45:22 +01:00
Fabien Potencier 19f8d073aa minor #1638 added PHP 7 nightly to the test matrix and HHVM nightly (fabpot)
This PR was merged into the 1.18-dev branch.

Discussion
----------

added PHP 7 nightly to the test matrix and HHVM nightly

Commits
-------

a1295e9 added PHP 7 nightly to the test matrix and HHVM nightly
2015-02-27 17:10:10 +01:00
Fabien Potencier 7e8a54a700 minor #1601 reduced the number of times error information has to be guessed (fabpot)
This PR was merged into the 1.18-dev branch.

Discussion
----------

reduced the number of times error information has to be guessed

Commits
-------

651613c reduced the number of times error information should be guessed
2015-02-27 17:09:18 +01:00
Fabien Potencier a1295e936f added PHP 7 nightly to the test matrix and HHVM nightly 2015-02-27 16:47:28 +01:00
Fabien Potencier 651613c32c reduced the number of times error information should be guessed 2015-02-27 16:01:28 +01:00
Fabien Potencier 5e7bb28517 updated CHANGELOG 2015-02-27 15:27:47 +01:00
Fabien Potencier 3309c3c246 bug #1637 Updates slice so that it still accepts a SimpleXMLElement (bob-p)
This PR was merged into the 1.18-dev branch.

Discussion
----------

Updates slice so that it still accepts a SimpleXMLElement

Since #1503 you cannot pass a SimpleXMLElement to slice as you get:

   Catchable fatal error: Argument 1 passed to LimitIterator::__construct() must implement interface Iterator, instance of SimpleXMLElement given

As SimpleXMLElement implements Traversable but not Iterator

This checks that $item is an instance of Iterator before passing to LimitIterator

Commits
-------

aea075b Updates slice so that it still accepts a SimpleXMLElement
2015-02-27 15:25:52 +01:00
Thomas Pomfret aea075b3a8 Updates slice so that it still accepts a SimpleXMLElement 2015-02-26 15:25:06 -05:00
Fabien Potencier fb8b04ef15 minor #1617 Fix time sensitive profiler test (ready) (SpacePossum)
This PR was squashed before being merged into the 1.18-dev branch (closes #1617).

Discussion
----------

Fix time sensitive profiler test (ready)

The profiler tests fail some times because of the performance of the machine these are run on.
These changes should provide stability.

Commits
-------

a80cb35 Fix time sensitive profiler test (ready)
2015-02-16 11:15:51 +01:00
Possum a80cb35e51 Fix time sensitive profiler test (ready) 2015-02-16 11:15:49 +01:00
Fabien Potencier fd6f28be48 fixed filesystem loader when trying to load a non-file 2015-02-16 11:14:36 +01:00
Fabien Potencier 8e32c5068d minor #1622 [#1621] Failing tests for Filesystem loader (scaytrase)
This PR was squashed before being merged into the 1.18-dev branch (closes #1622).

Discussion
----------

[#1621] Failing tests for Filesystem loader

See #1621

Commits
-------

f7a49f2 [#1621] Failing tests for Filesystem loader
2015-02-16 11:10:38 +01:00
Pavel Batanov f7a49f2687 [#1621] Failing tests for Filesystem loader 2015-02-16 11:10:29 +01:00
Fabien Potencier 74a8bddec4 fixed typo 2015-01-30 12:04:23 +01:00
Fabien Potencier dc15ea0917 simplified code 2015-01-30 12:01:23 +01:00
Fabien Potencier 5a5a640cbc minor #1609 get PHP version info once on construction (SpacePossum)
This PR was squashed before being merged into the 1.18-dev branch (closes #1609).

Discussion
----------

get PHP version info once on construction

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes

Hi,
I was profiling a project and noticed that `phpversion` was called 5000 times by Twig.
This patch reduces the amount of calls without breaking anything (I hope ;)  )

![twig_phpversion](https://cloud.githubusercontent.com/assets/10462973/5921451/53d3e66c-a644-11e4-94aa-a3daf762e34d.png)

Commits
-------

24ff698 get PHP version info once on construction
2015-01-29 10:43:27 +01:00
Possum 24ff698dc5 get PHP version info once on construction 2015-01-29 10:43:24 +01:00
Fabien Potencier 1e46631409 bug #1616 fixed named args for static methods (kriswallsmith)
This PR was merged into the 1.18-dev branch.

Discussion
----------

fixed named args for static methods

This fixes an obscure reflection error that gets thrown if a functioned backed by a static method is called with named arguments.

Commits
-------

7868fe8 fixed named args for static methods
2015-01-29 08:19:54 +01:00
Kris Wallsmith 7868fe838e fixed named args for static methods 2015-01-29 16:46:20 +13:00
Fabien Potencier 6b434f4521 bumped version to 1.18.1-DEV 2015-01-25 18:35:14 +01:00
Fabien Potencier 4cf7464348 prepared the 1.18.0 release v1.18.0 2015-01-25 18:32:08 +01:00
Fabien Potencier e7c5bde274 added some more unit tests 2015-01-25 17:01:33 +01:00
Fabien Potencier 89afc0de5a updated CHANGELOG 2015-01-25 16:38:00 +01:00
Fabien Potencier d34628dd36 bug #1585 Fixed wrong line numbers in error messages for multi-line statements (hason)
This PR was merged into the 1.18-dev branch.

Discussion
----------

Fixed wrong line numbers in error messages for multi-line statements

Partially fixes #1351

Commits
-------

08c5196 Fixed wrong line numbers in error messages for multi-line statements
2015-01-25 16:37:05 +01:00
Fabien Potencier ac05689f8d minor #1435 Improved named arguments (hason)
This PR was merged into the 1.18-dev branch.

Discussion
----------

Improved named arguments

Commits
-------

e9b8bcc Fixed determining the necessary arguments for callable functions
5f4377b Improved an exception message for missing value of optional arguments
2015-01-25 09:59:11 +01:00
Martin Hasoň e9b8bccec3 Fixed determining the necessary arguments for callable functions 2015-01-22 14:23:03 +01:00
Martin Hasoň 5f4377b863 Improved an exception message for missing value of optional arguments 2015-01-22 14:22:52 +01:00
Fabien Potencier ae72b5dccf minor #1605 Small cleanup to use already declared variable (hason)
This PR was merged into the 1.18-dev branch.

Discussion
----------

Small cleanup to use already declared variable

Commits
-------

f60a8c4 Small cleanup to use already declared variable
2015-01-21 16:28:26 +01:00
Martin Hasoň f60a8c405c Small cleanup to use already declared variable 2015-01-21 11:05:50 +01:00
Martin Hasoň 08c51964e2 Fixed wrong line numbers in error messages for multi-line statements 2015-01-21 10:46:46 +01:00
Fabien Potencier b9e3e6c51a feature #1603 removed the special Sandbox Module class (fabpot)
This PR was merged into the 1.18-dev branch.

Discussion
----------

removed the special Sandbox Module class

This PR removes the need for the special Sandbox Module class. This approach can be generalized by adding more "empty" nodes in the Module class to allow third-party extension to easily add code to the generated class. But I think that hacking the module class is always never a good idea and should be avoided (so this "feature" should not even be documented :)).

This is an alternative for #1436, fixes #1402.

Commits
-------

57400e2 added more hooks in Module
3b12d55 removed the special Sandbox Module class
2015-01-21 00:28:53 +01:00
Fabien Potencier 57400e24b4 added more hooks in Module 2015-01-20 19:31:33 +01:00
Fabien Potencier 3b12d558bb removed the special Sandbox Module class 2015-01-20 19:30:00 +01:00
Fabien Potencier 68e5db52f8 feature #1602 added Twig_Environment::createTemplate() (fabpot)
This PR was merged into the 1.18-dev branch.

Discussion
----------

added Twig_Environment::createTemplate()

fixes #1506

Commits
-------

6ec928e added Twig_Environment::createTemplate()
2015-01-20 18:12:53 +01:00
Fabien Potencier 89df3c20ef fixed CS 2015-01-20 14:45:25 +01:00
Fabien Potencier 6ec928e2aa added Twig_Environment::createTemplate() 2015-01-20 14:35:14 +01:00
Fabien Potencier dff81dc846 fixed CS 2015-01-20 14:20:15 +01:00
Fabien Potencier 675ae52a2a added more paths to .gitignore 2015-01-20 03:31:04 +01:00
Fabien Potencier a60a522105 feature #1597 added a profiler (fabpot)
This PR was merged into the 1.17-dev branch.

Discussion
----------

added a profiler

This profiler allows to better understand what's going on when rendering templates. It should be used when debug is true only as it adds some overhead.

Here is a sample output in the text format:

```
main 567.04ms/100%
└ index 463.28ms/82%
  └ base 463.24ms/82%
    └ base::block(header)
    └ index::block(content) 306.29ms/54%
    │ └ included 50.18ms/9%
    │ └ included 45.42ms/8%
    │ └ included 35.42ms/6%
    │ └ base::block(content) 104.97ms/19%
    │ │ └ included 34.90ms/6%
    │ └ included 35.84ms/6%
    └ base::block(footer) 156.84ms/28%
      └ included 38.96ms/7%
      └ base::macro(foo)
```

You can also dump a profile in a Blackfire compatible format to [visualise the data as a graph](http://goo.gl/RwNGFH).

A profile is also a great way to be able to list all templates/blocks/macros that were used when rendering a template.

A PR on Symfony (symfony/symfony#13428) integrates this profiler in the Symfony web profiler to replace the current TimedTwigEngine and to add a new Twig panel.

![symfony-web-profiler](https://cloud.githubusercontent.com/assets/47313/5755461/019cd6a4-9ca5-11e4-8762-68e2a709c336.png)

Commits
-------

4408caa added a profiler
2015-01-20 03:09:25 +01:00
Fabien Potencier b40c555f0f fixed CS 2015-01-20 03:07:54 +01:00
Fabien Potencier fc292dda7d minor #1565 Update batch.rst (NAYZO)
This PR was squashed before being merged into the 1.17-dev branch (closes #1565).

Discussion
----------

Update batch.rst

Commits
-------

403736f Update batch.rst
2015-01-20 03:07:23 +01:00
Ala Eddine Khefifi 403736f031 Update batch.rst 2015-01-20 03:07:22 +01:00
Fabien Potencier 4408caae0c added a profiler 2015-01-20 03:04:00 +01:00