Commit Graph

28019 Commits

Author SHA1 Message Date
Nicolas Grekas
7572a53b84 [Bridge\Monolog][FrameworkBundle] Add & wire a DebugProcessor 2016-11-05 10:30:35 +01:00
Nicolas Grekas
31d5fffc3c minor #20396 [SecurityBundle] Fix case sensitive use (ogizanagi)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[SecurityBundle] Fix case sensitive use

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  |no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Commits
-------

310e31d [SecurityBundle] Fix case sensitive use
2016-11-03 09:25:26 +01:00
Maxime STEINHAUSSER
310e31dd47 [SecurityBundle] Fix case sensitive use 2016-11-03 09:22:19 +01:00
Nicolas Grekas
7e766dae4a erge branch '3.1'
* 3.1:
  Remove trailing space
  CS fixes
  Remove trailing space
  CS: apply rules
  [Yaml] Clean some messages + add test case
  [Console] simplified code
  [Form] Fix UrlType transforms valid protocols
  [SecurityBundle] Changed encoder configuration example to bcrypt
2016-11-03 09:11:03 +01:00
Nicolas Grekas
73013029fb Merge branch '2.8' into 3.1
* 2.8:
  Remove trailing space
2016-11-03 09:05:19 +01:00
Nicolas Grekas
2b0cec528a Remove trailing space 2016-11-03 09:05:06 +01:00
Nicolas Grekas
63a626e4c8 Merge branch '2.8' into 3.1
* 2.8:
  CS fixes
  Remove trailing space
  CS: apply rules
  [Yaml] Clean some messages + add test case
  [Console] simplified code
  [Form] Fix UrlType transforms valid protocols
  [SecurityBundle] Changed encoder configuration example to bcrypt
2016-11-03 09:04:31 +01:00
Nicolas Grekas
37956db606 Merge branch '2.7' into 2.8
* 2.7:
  CS fixes
  Remove trailing space
  CS: apply rules
  [Yaml] Clean some messages + add test case
  [Form] Fix UrlType transforms valid protocols
  [SecurityBundle] Changed encoder configuration example to bcrypt
2016-11-03 08:52:58 +01:00
Nicolas Grekas
4eb003b653 CS fixes 2016-11-03 08:49:30 +01:00
Nicolas Grekas
1b4963bd84 Remove trailing space 2016-11-03 08:46:56 +01:00
Nicolas Grekas
0aca495522 minor #20364 CS: apply rules (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #20364).

Discussion
----------

CS: apply rules

| Q | A |
| --- | --- |
| Branch? | 2.7 |
| Bug fix? | no |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | n/a |
| Fixed tickets | - |
| License | MIT |
| Doc PR | - |

Commits
-------

22d4e15 CS: apply rules
2016-11-03 08:44:55 +01:00
Dariusz Ruminski
22d4e15634 CS: apply rules 2016-11-03 08:44:53 +01:00
Fabien Potencier
f747fffeb4 feature #19490 [SecurityBundle] Integrate current firewall in Profiler (chalasr)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[SecurityBundle] Integrate current firewall in Profiler

| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | n/a |
| License | MIT |

 Based on #19398.

This integrates current firewall information into the Profiler.

**Toolbar**
![Profiler toolbar](http://image.prntscr.com/image/bedec39cea4945e994c8531b80241cf6.png)

**Panel**
![Profiler panel](http://image.prntscr.com/image/3b656c1346844c6194a0db42cb8f9fdc.png)

Examples:

<details>
 <summary>

Show config</summary>

``` yaml
main:
    pattern:   ^/
    anonymous: false
    stateless: true
    provider: in_memory
    access_denied_url: /access_denied
    http_basic: ~
```

</details>

![Panel](http://image.prntscr.com/image/057062a1da744f3c8e00c3c77ded46a8.png)

<details>
 <summary>

Show config</summary>

``` yaml
main:
    pattern:   ^/
    anonymous: true
    stateless: false
    provider: in_memory
    context: dummy
    access_denied_url: /access_denied
    http_basic: ~
```

</details>

![Panel](http://image.prntscr.com/image/a44e54cf018d4bc98c3e0ecf92c37416.png)

<details>
 <summary>

Show config</summary>

``` yaml
api:
    pattern:   ^/
    security: false
```

</details>

![Panel](http://image.prntscr.com/image/c4ea3d7c792447b2ae2b18cd4e08d0dd.png)

Commits
-------

75e208e Integrate current firewall in profiler
2016-11-02 16:42:59 -07:00
Robin Chalas
75e208e419
Integrate current firewall in profiler 2016-11-03 00:16:31 +01:00
Fabien Potencier
904e90ba63 feature #19398 [DX][SecurityBundle] Introduce a FirewallConfig class accessible from FirewallContext (chalasr)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[DX][SecurityBundle] Introduce a FirewallConfig class accessible from FirewallContext

| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | yes but it should not have any impact in userland |
| Tests pass? | yes |
| Fixed tickets | #15294 |
| License | MIT |
| Doc PR | todo |

With this, the `FirewallContext` class now has a `getConfig()` method returning a `FirewallConfig` object representing the firewall configuration.

Also this adds a `getContext()` method to the `FirewallMap` class of the `SecurityBundle`, to be able to retrieve the current context.

In a next time, this could be useful to display some firewall related informations to the Profiler, as pointed out in #15294.

Also, it can be useful to be able to access the current firewall configuration from an AuthenticationListener, especially for third party bundles (I can develop on demand).

Commits
-------

52d25ed Introduce a FirewallConfig class
2016-11-02 15:52:11 -07:00
Robin Chalas
52d25edb5a
Introduce a FirewallConfig class
Add a FirewallConfig object, pass it to the FirewallContext
Add FirewallContextTest & FirewallConfigTest
Populate FirewallConfig definition from SecurityExtension
Add missing anonymous listener in FirewallConfig::listenerConfigs
Add a functional test
Fabbot fixes
Fix security option value
Add ContextAwareFirewallMapInterface
Remove bool casts from getters
CS/Spelling Fixes

Remove FirewallConfig::listenerConfigs in favor of FirewallConfig::listeners; Add FirewallConfig::allowAnonymous()

Add allowAnonymous()/isSecurityEnabled, update comments
Fabbot fixes

Fix deprecation message

Remove interface

CS Fixes
2016-11-02 23:44:33 +01:00
Fabien Potencier
34e5613700 bug #20336 [HttpKernel] Base DataCollector throws warning on unsupported scheme strings (ogizanagi)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[HttpKernel] Base DataCollector throws warning on unsupported scheme strings

| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | N/A |
| License | MIT |
| Doc PR | N/A |

The issue concerns any collector based on the abstract `Symfony\Component\HttpKernel\DataCollector\DataCollector` class using `cloneVar` on a string containing a unsupported scheme.

The easiest way to reproduce the issue is to add a simple query parameter like `?uri=foo://bar` on any url of your application:

> ContextErrorException in DataCollector.php line 134:
> Warning: file_exists(): Unable to find the wrapper &quot;foo&quot; - did you forget to enable it when you configured PHP?

This PR simply fixes the issue by muting the warning on `file_exists`. But maybe there is a better strategy.

Commits
-------

52faa00 Fix base DataCollector throws warning on unsupported scheme strings
2016-11-02 14:23:14 -07:00
Fabien Potencier
df130a35e4 minor #20388 [Yaml] Clean some messages + add test case (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] Clean some messages + add test case

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Related to #20335 on 3.2.

Commits
-------

7520f7b [Yaml] Clean some messages + add test case
2016-11-02 14:11:25 -07:00
Kévin Dunglas
070e53a9b2
minor #20384 Revert "feature #17608 [DependencyInjection] Autowiring: add setter injection support (dunglas)" (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Revert "feature #17608 [DependencyInjection] Autowiring: add setter injection support (dunglas)"

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This reverts commit 7eab6b9204, reversing
changes made to 35f201f9d6.

As discussed in #20167

Commits
-------

bf91eda Revert "feature #17608 [DependencyInjection] Autowiring: add setter injection support (dunglas)"
2016-11-02 15:08:18 +01:00
Fabien Potencier
a257cb59ec bug #20335 [Yaml] Fix String offset cast error in Inline parser (romainneutron)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Yaml] Fix String offset cast error in Inline parser

| Q | A |
| --- | --- |
| Branch? | 3.2/master |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | N/A |
| License | MIT |

Commits
-------

bc095a5 [Yaml] Fix String offset cast error in Inline parser
2016-11-02 07:03:22 -07:00
Nicolas Grekas
7520f7b937 [Yaml] Clean some messages + add test case 2016-11-02 15:01:29 +01:00
Nicolas Grekas
fedbc3fbcb minor #20380 Don't trim long strings in the profiler logs (javiereguiluz)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Don't trim long strings in the profiler logs

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20371
| License       | MIT
| Doc PR        | -

Commits
-------

7a17080 Don't trim long strings in the profiler logs
2016-11-02 13:44:20 +01:00
Nicolas Grekas
abec679caf Merge branch '3.1'
* 3.1:
  [SecurityBundle] Fix term width in UserPasswordEncoderCommandTest
  remove dead code
2016-11-02 11:48:28 +01:00
Nicolas Grekas
031f4c2d3f minor #20386 [SecurityBundle] Fix term width in UserPasswordEncoderCommandTest (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[SecurityBundle] Fix term width in UserPasswordEncoderCommandTest

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

e342056 [SecurityBundle] Fix term width in UserPasswordEncoderCommandTest
2016-11-02 11:46:53 +01:00
Nicolas Grekas
e342056875 [SecurityBundle] Fix term width in UserPasswordEncoderCommandTest 2016-11-02 11:26:05 +01:00
Maxime STEINHAUSSER
52faa007ae Fix base DataCollector throws warning on unsupported scheme strings 2016-11-02 10:40:06 +01:00
Nicolas Grekas
bf91eda705 Revert "feature #17608 [DependencyInjection] Autowiring: add setter injection support (dunglas)"
This reverts commit 7eab6b9204, reversing
changes made to 35f201f9d6.
2016-11-02 10:26:25 +01:00
Javier Eguiluz
7a17080d55 Don't trim long strings in the profiler logs 2016-11-02 09:26:37 +01:00
Fabien Potencier
779a6df81c bug #20372 [Console] simplified code (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] simplified code

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | ~no~ yes (even if the output is "better" with this PR)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Instead of adding blank character for shorter lines and having to keep the max length of messages, I propose to clear the line via an ANSI sequence like done in the progress bar.

Code is cleaner and output is better as currently, then cursor can be "away" from the last character which is unexpected.

Actually, this is a bug fix as the current code does not work well when using styles in the indicator message.

Commits
-------

0aca9bf [Console] simplified code
2016-10-31 12:36:25 -07:00
Fabien Potencier
0aca9bf03c [Console] simplified code 2016-10-31 11:03:18 -07:00
Fabien Potencier
620ea20f49 bug #20342 [Form] Fix UrlType transforms valid protocols (ogizanagi)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #20342).

Discussion
----------

[Form] Fix UrlType transforms valid protocols

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

According to https://tools.ietf.org/html/rfc3986#section-3.1:

<details>
<summary>`scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )`</summary>
>   Each URI begins with a scheme name that refers to a specification for
   assigning identifiers within that scheme.  As such, the URI syntax is
   a federated and extensible naming system wherein each scheme's
   specification may further restrict the syntax and semantics of
   identifiers using that scheme.

>   Scheme names consist of a sequence of characters beginning with a
   letter and followed by any combination of letters, digits, plus
   ("+"), period ("."), or hyphen ("-").  Although schemes are case-
   insensitive, the canonical form is lowercase and documents that
   specify schemes must do so with lowercase letters.  An implementation
   should accept uppercase letters as equivalent to lowercase in scheme
   names (e.g., allow "HTTP" as well as "http") for the sake of
   robustness but should only produce lowercase scheme names for
   consistency.
</details>

~~Fixing the regex to add missing chars could solve the issue. However according to the RFC, we should not allow underscores. But `\w+` permits it (removing it would be a minor BC break anyway).~~

~~IMHO, we should not care in this listener if the scheme is valid or not (a validator should be used instead), so I'd suggest to simply check if a scheme is provided or not.~~ I'm not using `parse_url($string, PHP_URL_SCHEME)` because `http:/symfony.com` or `http:symfony.com`  is considered valid as containing a scheme.

Actually, I changed my mind about previous fix (28f816a) and went back to the regex, in order to have strings like `symfony.com?uri=http://example.com` properly transformed to `symfony.com?uri=http://example.com`

Commits
-------

46dd3b9 [Form] Fix UrlType transforms valid protocols
2016-10-30 08:33:18 -07:00
Maxime STEINHAUSSER
46dd3b9acb [Form] Fix UrlType transforms valid protocols 2016-10-30 08:33:18 -07:00
Fabien Potencier
16b29a16de minor #20301 [SecurityBundle] Changed encoder configuration example to bcrypt (jeremyFreeAgent)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20301).

Discussion
----------

[SecurityBundle] Changed encoder configuration example to bcrypt

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Simple change in the configuration example to help developers to not use `sha512` as encoder when using `config:dump-reference`.

Commits
-------

a55058f [SecurityBundle] Changed encoder configuration example to bcrypt
2016-10-30 08:29:28 -07:00
Jérémy Romey
a55058f097 [SecurityBundle] Changed encoder configuration example to bcrypt 2016-10-30 08:29:28 -07:00
Fabien Potencier
46a8edea8d bug #20341 Fix YamlReferenceDumper unnamed nested prototypes (ogizanagi)
This PR was squashed before being merged into the 3.2-dev branch (closes #20341).

Discussion
----------

Fix YamlReferenceDumper unnamed nested prototypes

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/20340
| License       | MIT
| Doc PR        | N/A

Ideally, I'd like to output something like:

```yml
pipou:

    # Prototype
    name:

        # Prototype
        -
            didou:                ~
```

But for now, this should fix the regression.

Commits
-------

8e04643 Fix YamlReferenceDumper unnamed nested prototypes
2016-10-28 07:46:54 -07:00
Maxime STEINHAUSSER
8e04643b90 Fix YamlReferenceDumper unnamed nested prototypes 2016-10-28 07:46:53 -07:00
Fabien Potencier
cd9bbb52df minor #20312 [DoctrineBridge] Remove dead code in DoctrineType (yceruto)
This PR was merged into the 3.1 branch.

Discussion
----------

[DoctrineBridge] Remove dead code in DoctrineType

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no (Only the last arguments of a method may be removed [[3]](http://symfony.com/doc/current/contributing/code/bc.html#id13) )
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

After optimization of DoctrineChoiceLoader  (86b2ff112d in https://github.com/symfony/symfony/pull/18359) this code died :)

Commits
-------

9b49723 remove dead code
2016-10-28 07:43:39 -07:00
Nicolas Grekas
700c04bfb0 Merge branch '3.1'
* 3.1:
  [SecurityBundle] Fix test context
2016-10-28 10:51:35 +02:00
Nicolas Grekas
8c787a539a [SecurityBundle] Fix test context 2016-10-28 10:50:54 +02:00
Nicolas Grekas
ae96079dab [SecurityBundle] Fix test context 2016-10-28 10:37:24 +02:00
Nicolas Grekas
87ef7235be Merge branch '3.1'
* 3.1:
  [PhpUnitBridge] Fix undefined variable
  Compatibility with Twig 1.27
  Remove extra line in doc-block comment
  [VarDumper] Fix dumping Twig source in stack traces
  Enhance GAE compat by removing some realpath()
  [DependencyInjection] Remove old code in XML loader
  bumped Symfony version to 3.1.7
  updated VERSION for 3.1.6
  updated CHANGELOG for 3.1.6
  bumped Symfony version to 2.8.14
  updated VERSION for 2.8.13
  updated CHANGELOG for 2.8.13
  bumped Symfony version to 2.7.21
  updated VERSION for 2.7.20
  update CONTRIBUTORS for 2.7.20
  updated CHANGELOG for 2.7.20
  [SecurityBundle] Fix twig-bridge lowest dep
2016-10-28 10:25:06 +02:00
Nicolas Grekas
b77d6d90c5 Merge branch '2.8' into 3.1
* 2.8:
  Compatibility with Twig 1.27
  [VarDumper] Fix dumping Twig source in stack traces
  Enhance GAE compat by removing some realpath()
  bumped Symfony version to 2.8.14
  updated VERSION for 2.8.13
  updated CHANGELOG for 2.8.13
  bumped Symfony version to 2.7.21
  updated VERSION for 2.7.20
  update CONTRIBUTORS for 2.7.20
  updated CHANGELOG for 2.7.20
  [SecurityBundle] Fix twig-bridge lowest dep
2016-10-28 10:18:15 +02:00
Nicolas Grekas
d12f26992b Merge branch '2.7' into 2.8
* 2.7:
  Compatibility with Twig 1.27
  Enhance GAE compat by removing some realpath()
  bumped Symfony version to 2.7.21
  updated VERSION for 2.7.20
  update CONTRIBUTORS for 2.7.20
  updated CHANGELOG for 2.7.20
  [SecurityBundle] Fix twig-bridge lowest dep
2016-10-28 10:10:49 +02:00
Nicolas Grekas
a70e0331b1 minor #20334 [PhpUnitBridge] Fix undefined variable (romainneutron)
This PR was merged into the 3.1 branch.

Discussion
----------

[PhpUnitBridge] Fix undefined variable

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT

Otherwise `$mode` is not defined on line 115

Commits
-------

c4cc392 [PhpUnitBridge] Fix undefined variable
2016-10-28 10:03:48 +02:00
Romain Neutron
bc095a5c36
[Yaml] Fix String offset cast error in Inline parser 2016-10-28 09:35:03 +02:00
Romain Neutron
c4cc3927c3
[PhpUnitBridge] Fix undefined variable
Otherwise `$mode` is not defined on line 115
2016-10-28 09:08:03 +02:00
Fabien Potencier
0572866184 bug #20292 Enhance GAE compat by removing some realpath() (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Enhance GAE compat by removing some realpath()

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20241
| License       | MIT
| Doc PR        | -

The remaining ones are in test folders, or in things that don't run/have to run on GAE directly (e.g. commands).

Commits
-------

f2f232d Enhance GAE compat by removing some realpath()
2016-10-27 08:37:53 -07:00
Fabien Potencier
1d96df0f83 bug #20325 [VarDumper] Fix source links to Twig files (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Fix source links to Twig files

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

06203b1 [VarDumper] Fix source links to Twig files
2016-10-27 08:14:53 -07:00
Fabien Potencier
b0e94f19aa bug #20328 [Console] Fix empty COLUMNS/LINES env vars (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Console] Fix empty COLUMNS/LINES env vars

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Here is a python app that fails otherwise:

test.py:
```python
import os

int(os.environ.get('COLUMNS', 80))
```

test.php:
```php
<?php
putenv('COLUMNS=');
passthru('python test.py');
```

result:
```
$ php test.php
Traceback (most recent call last):
 File "test.py", line 3, in <module>
   int(os.environ.get('COLUMNS', 80))
ValueError: invalid literal for int() with base 10: ''
```

Commits
-------

8ad991e [Console] Fix empty COLUMNS/LINES env vars
2016-10-27 08:08:16 -07:00
Fabien Potencier
74ed9e1941 bug #20326 [VarDumper] Fix dumping Twig source in stack traces (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Fix dumping Twig source in stack traces

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20320
| License       | MIT
| Doc PR        | -

Commits
-------

f16d44d [VarDumper] Fix dumping Twig source in stack traces
2016-10-27 08:05:40 -07:00