Commit Graph

27999 Commits

Author SHA1 Message Date
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
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
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
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
Nicolas Grekas
8ad991e6c1 [Console] Fix empty COLUMNS/LINES env vars 2016-10-27 17:03:48 +02:00
Fabien Potencier
10d7ecc21c minor #20324 Remove reverted feature from 3.2 changelog (chalasr)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Remove reverted feature from 3.2 changelog

Reverted in a4ce063

Commits
-------

bc1ffea Remove reverted feature from changelog
2016-10-27 08:03:07 -07:00
Fabien Potencier
a149403225 minor #20331 Remove extra line in doc-block comment (bocharsky-bw)
This PR was merged into the 3.1 branch.

Discussion
----------

Remove extra line in doc-block comment

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

Commits
-------

6bfd0f1 Remove extra line in doc-block comment
2016-10-27 07:57:55 -07:00
Fabien Potencier
0d545b27a3 bug #20321 Compatibility with Twig 1.27 (xkobal)
This PR was submitted for the 3.1 branch but it was merged into the 2.7 branch instead (closes #20321).

Discussion
----------

Compatibility with Twig 1.27

| Q             | A
| ------------- | ---
| Branch?       | "master" for new features / 2.7, 2.8 or 3.1 for fixes
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

In FilesystemLoader::findTemplate(), you must accept a second argument that when set to "false" returns "false" instead of throwing an exception. Not supporting this argument is deprecated since version 1.27.

Commits
-------

77c5395 Compatibility with Twig 1.27
2016-10-27 07:46:29 -07:00
Xavier HAUSHERR
77c5395a79 Compatibility with Twig 1.27 2016-10-27 07:46:29 -07:00
Victor Bocharsky
6bfd0f1f45 Remove extra line in doc-block comment 2016-10-27 17:15:50 +03:00
Nicolas Grekas
f16d44dbc6 [VarDumper] Fix dumping Twig source in stack traces 2016-10-27 14:02:32 +02:00
Nicolas Grekas
06203b160a [VarDumper] Fix source links to Twig files 2016-10-27 13:47:11 +02:00
Robin Chalas
bc1ffeaecd
Remove reverted feature from changelog 2016-10-27 13:24:04 +02:00
Nicolas Grekas
f2f232d599 Enhance GAE compat by removing some realpath() 2016-10-27 11:13:40 +02:00
Nicolas Grekas
1c6093e8d5 minor #20322 [DependencyInjection] Remove old code in XML loader (hason)
This PR was merged into the 3.1 branch.

Discussion
----------

[DependencyInjection] Remove old code in XML loader

| 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
-------

d090159 [DependencyInjection] Remove old code in XML loader
2016-10-27 11:07:14 +02:00
Martin Hasoň
d090159fb2 [DependencyInjection] Remove old code in XML loader 2016-10-27 10:29:18 +02:00
Fabien Potencier
bda7e6b7e5 bumped Symfony version to 3.2.0 2016-10-26 21:11:23 -07:00
Fabien Potencier
ea699a044f Merge pull request #20317 from fabpot/release-3.2.0-BETA1
released v3.2.0-BETA1
2016-10-26 20:45:57 -07:00
Fabien Potencier
f1d3ee9594 updated VERSION for 3.2.0-BETA1 2016-10-26 20:45:09 -07:00
Fabien Potencier
a50d865358 updated CHANGELOG for 3.2.0-BETA1 2016-10-26 20:44:59 -07:00
Fabien Potencier
0dc1a3dab1 bumped Symfony version to 3.1.7 2016-10-26 19:53:37 -07:00
Fabien Potencier
8f345c38c2 Merge pull request #20316 from fabpot/release-3.1.6
released v3.1.6
2016-10-26 19:38:53 -07:00
Fabien Potencier
c1a76dad1a updated VERSION for 3.1.6 2016-10-26 19:38:31 -07:00
Fabien Potencier
27ce7bf657 updated CHANGELOG for 3.1.6 2016-10-26 19:38:08 -07:00