Commit Graph

28247 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
90ba197cef [DI][Serializer] Add missing deprecations 2016-11-04 22:11:55 +01:00
Fabien Potencier
3dcbdfdd39 minor #20414 [Console] Fix double use Statement (Jan Emrich)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Fix double use Statement

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

Commits
-------

c3dacbb Remove double use Statement
2016-11-04 11:59:40 -07:00
Fabien Potencier
a55903628a minor #20412 [SecurityBundle] consistent "not authenticated" output in WDT (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[SecurityBundle] consistent "not authenticated" output in WDT

| 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

This makes the output in the toolbar when no token is present consistent
with what it looks like when there is a token.

**Before**:

<img width="335" alt="before" src="https://cloud.githubusercontent.com/assets/1957048/20016982/0841bde2-a2c2-11e6-8ec2-0bea84290e00.png">

**After**:

<img width="278" alt="after" src="https://cloud.githubusercontent.com/assets/1957048/20016981/083f3fae-a2c2-11e6-9ac0-0ad35b816411.png">

Commits
-------

1b05650 consistent "not authenticated" output in WDT
2016-11-04 11:18:25 -07:00
Christian Flothmann
1b05650962 consistent "not authenticated" output in WDT
This makes the output in the toolbar when no token is present consistent
with what it looks like when there is a token.
2016-11-04 19:04:00 +01:00
Jan Emrich
c3dacbb9a1 Remove double use Statement
Syntax Error in Helper/QuestionHelper.php
2016-11-04 18:49:05 +01:00
Fabien Potencier
8fd97217e7 bug #20294 Improved the design of the metrics in the profiler (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #20294).

Discussion
----------

Improved the design of the metrics in the profiler

| Q | A |
| --- | --- |
| Branch? | 2.8 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | - |
| License | MIT |
| Doc PR |  |
- Performance panel now displays Sub-Requests a bit separated from the normal metrics
- Singular/plural: when there is 1 sub-request, we don't display "sub-request**s**" anymore
### Before

![before_subrequests](https://cloud.githubusercontent.com/assets/73419/19680261/5289fd26-9aa5-11e6-8702-1ac50997da78.png)
### After

![after_subrequests](https://cloud.githubusercontent.com/assets/73419/19680272/57324b44-9aa5-11e6-8d85-44cc089bd9f4.png)
- Add bottom margin to metrics so they are correctly displayed when the screen is very small.
### Before & After

![metrics-small-screens](https://cloud.githubusercontent.com/assets/73419/19680259/4f826654-9aa5-11e6-9ed8-1ffe9a3db8bf.png)

Commits
-------

d030a9d Improved the design of the metrics in the profiler
2016-11-04 08:17:22 -07:00
Javier Eguiluz
d030a9d403 Improved the design of the metrics in the profiler 2016-11-04 08:17:21 -07:00
Fabien Potencier
f37ac131e1 bug #20375 [HttpFoundation][Session] Fix memcache session handler (klandaika)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation][Session] Fix memcache session handler

| Q             | A
| ------------- | ---
| Branch?       | 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 3.0, 3.1, master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commit 0216e05605 removed the opening of connection to memcached server on call to `open()`, because it's assumed that connection is already opened. However, `close()` still closes the connection. As a result no more read/write calls can be made if session got closed, as the connection does not get reestablished.

Basically MemcacheSessionHandler should follow same logic as Memcache**d**SessionHandler, which is exactly what this MR acomplishes.

Commits
-------

0423d894 [HttpFoundation][Session] memcached connection should not be closed
2016-11-04 08:14:52 -07:00
Fabien Potencier
8d5c56348c Merge branch '2.7' into 2.8
* 2.7:
  [Console] Fix infinite loop on missing input
2016-11-04 08:10:10 -07:00
Fabien Potencier
74e65e1631 bug #20377 [Console] Fix infinite loop on missing input (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix infinite loop on missing input

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

This fixes the infinite loop occurring when no input is provided for a question which has a validator and no max attempts (`null`), e.g. when using `SymfonyStyle::ask()` which automatically adds a validator.

Commits
-------

e64de1e [Console] Fix infinite loop on missing input
2016-11-04 08:09:28 -07:00
Fabien Potencier
79259aad3f minor #20410 [DI] Add missing deprecation in ContainerBuilder::addCompilerPass (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[DI] Add missing deprecation in ContainerBuilder::addCompilerPass

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

ping @Ener-Getick

Commits
-------

c0e880e [DI] Add missing deprecation in ContainerBuilder::addCompilerPass
2016-11-04 08:02:22 -07:00
Fabien Potencier
3625a6efc1 minor #20405 [SecurityBundle] Display firewall in debug bar even if not authenticated (chalasr)
This PR was squashed before being merged into the 3.2-dev branch (closes #20405).

Discussion
----------

[SecurityBundle] Display firewall in debug bar even if not authenticated

| Q             | A
| ------------- | ---
| Branch?       | master
| Tests pass?   | yes
| License       | MIT

Before:
![before](http://image.prntscr.com/image/897d1f2b43d64c5a8e15a95bf927a01c.png)

After:
![after](http://image.prntscr.com/image/4491a3aea6fe44dd8ca24a2b25a37596.png)

I will take any input to improve the result, I feel it not optimal.

Commits
-------

d81da79 [SecurityBundle] Display firewall in debug bar even if not authenticated
2016-11-04 08:00:34 -07:00
Robin Chalas
d81da793d3 [SecurityBundle] Display firewall in debug bar even if not authenticated 2016-11-04 08:00:33 -07:00
Fabien Potencier
fc557db841 minor #20407 [SecurityBundle] FirewallConfig's user_checker should be mandatory (chalasr)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[SecurityBundle] FirewallConfig's user_checker should be mandatory

| Q             | A
| ------------- | ---
| Branch?       | master
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20404#issuecomment-258395500
| License       | MIT

Commits
-------

6754af2 [SecurityBundle] FirewallConfig's user_checker should be mandatory
2016-11-04 07:59:30 -07:00
Robin Chalas
6754af242b [SecurityBundle] FirewallConfig's user_checker should be mandatory 2016-11-04 15:30:10 +01:00
Fabien Potencier
172d0a4c08 minor #20408 [Yaml] set arguments depending on the PHP version (xabbuh)
This PR was merged into the 3.1 branch.

Discussion
----------

[Yaml] set arguments depending on the PHP version

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| 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
-------

ad54d83 [Yaml] set arguments depending on the PHP version
2016-11-04 07:26:25 -07:00
Fabien Potencier
48ff2bd8a8 minor #20409 [SecurityBundle] Make the FirewallConfig class final (ogizanagi)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[SecurityBundle] Make the FirewallConfig class final

| 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

I suggest to make the `FirewallConfig` class final. This value object is only built by the `SecurityExtension` from the `SecurityBundle` and is not meant to be an extension point.

ping @chalasr

Commits
-------

5963627 [SecurityBundle] Make the FirewallConfig class final
2016-11-04 07:00:04 -07:00
Fabien Potencier
706d92541c minor #20404 [Security] improve some firewall config comments (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Security] improve some firewall config comments

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

Commits
-------

cb6c703 [Security] improve some firewall config comments
2016-11-04 06:59:19 -07:00
Nicolas Grekas
c0e880e277 [DI] Add missing deprecation in ContainerBuilder::addCompilerPass 2016-11-04 14:53:25 +01:00
Maxime STEINHAUSSER
5963627d06 [SecurityBundle] Make the FirewallConfig class final 2016-11-04 13:57:00 +01:00
Christian Flothmann
ad54d83c90 [Yaml] set arguments depending on the PHP version 2016-11-04 11:57:19 +01:00
Christian Flothmann
cb6c7035ff [Security] improve some firewall config comments 2016-11-04 11:34:59 +01:00
Fabien Potencier
9e2ad932e9 feature #20232 [DependencyInjection] fixed ini file values conversion (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[DependencyInjection] fixed ini file values conversion

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

When using the ini format to load parameters in the Container, the parameter values were converted by PHP directly (`'true'` => `1` for instance). But when using the YAML or XML format, the conversions are much broader and more precise (`'true'` => `true` for instance). This PR fixed fixes this discrepancy by using the same rules as XML (we could use `INI_SCANNER_TYPED` for recent versions of PHP but the rules are not exactly the same, so I prefer consistency here).

One might argue that this is a new feature and that this should be merged into master, which I can accept as well. In master, the `XmlUtils::phpize()` method should be deprecated and replaced by a more generic phpize class.

ping @symfony/deciders

Commits
-------

4ccfce6 [DependencyInjection] fixed ini file values conversion
2016-11-03 16:44:20 -07:00
Fabien Potencier
4ccfce6106 [DependencyInjection] fixed ini file values conversion 2016-11-03 16:43:19 -07:00
Fabien Potencier
44595988dc minor #20397 Tweaked the new firewall config in the security profiler panel (javiereguiluz)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Tweaked the new firewall config in the security profiler panel

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

All these options can be `null` ... so maybe we should take care of that edge case.

### Before

![before](https://cloud.githubusercontent.com/assets/73419/19962832/cfc1a1ca-a1b9-11e6-852c-4c7e4065eb37.png)

### After

![after](https://cloud.githubusercontent.com/assets/73419/19962835/d2bd113e-a1b9-11e6-92ae-f93d4592473c.png)

Commits
-------

cdbbd9d Tweaked the new firewall config in the security profiler panel
2016-11-03 10:12:00 -07:00
Robin Chalas
e64de1eac6 [Console] Fix infinite loop on missing input
[Console] Use console exception for missing input

Backport Console RuntimeException in 2.7
2016-11-03 09:51:57 +01:00
Javier Eguiluz
cdbbd9da36 Tweaked the new firewall config in the security profiler panel 2016-11-03 09:36:43 +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
VJ
0423d894f4 [HttpFoundation][Session] memcached connection should not be closed 2016-11-02 08:42:51 -04:00