Commit Graph

22727 Commits

Author SHA1 Message Date
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 "foo" - 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
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
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
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
Nicolas Grekas
8ad991e6c1 [Console] Fix empty COLUMNS/LINES env vars 2016-10-27 17:03:48 +02: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
Nicolas Grekas
f2f232d599 Enhance GAE compat by removing some realpath() 2016-10-27 11:13:40 +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
f1d3ee9594 updated VERSION for 3.2.0-BETA1 2016-10-26 20:45:09 -07:00
Fabien Potencier
0dc1a3dab1 bumped Symfony version to 3.1.7 2016-10-26 19:53:37 -07:00
Fabien Potencier
c1a76dad1a updated VERSION for 3.1.6 2016-10-26 19:38:31 -07:00
Fabien Potencier
5abd889480 bumped Symfony version to 2.8.14 2016-10-26 19:36:03 -07:00
Fabien Potencier
10b7b5da3b updated VERSION for 2.8.13 2016-10-26 19:18:22 -07:00
Fabien Potencier
ed11f22360 bumped Symfony version to 2.7.21 2016-10-26 19:12:15 -07:00
Fabien Potencier
8beacd2dd8 updated VERSION for 2.7.20 2016-10-26 18:37:19 -07:00
Yonel Ceruto
9b49723426 remove dead code 2016-10-26 13:15:05 -04:00
Fabien Potencier
f2768dc247 feature #19973 Added a default ide file link web view (jeremyFreeAgent)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Added a default ide file link web view

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

When having no `framework.ide` configured or `framework.ide = symfony` the file link open the source in a web view (eg `_profiler/open?file=/src/AppBundle/Controller/DefaultController.php&line=50#line50`).

![](https://cl.ly/2Z0W2J020p43/feature_ide.png)

Commits
-------

ba6bcca Added a default ide file link web view
2016-10-25 11:41:00 -07:00
Jérémy Romey
ba6bccabfe Added a default ide file link web view 2016-10-25 15:27:26 +02:00
Nicolas Grekas
6856faf6e5 [SecurityBundle] Fix twig-bridge lowest dep 2016-10-25 14:37:33 +02:00
Nicolas Grekas
fdb7834f69 Merge branch '3.1'
* 3.1:
  [Yaml] Fix 7.1 compat
2016-10-24 20:44:12 +02:00
Nicolas Grekas
c3b96908e7 bug #20291 [Yaml] Fix 7.1 compat (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Yaml] Fix 7.1 compat

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

Should make CI green again with PHP 7.1 RC4.

Commits
-------

89b78f2 [Yaml] Fix 7.1 compat
2016-10-24 20:43:32 +02:00
Nicolas Grekas
89b78f21eb [Yaml] Fix 7.1 compat 2016-10-24 20:41:13 +02:00
Fabien Potencier
3a86ceedee feature #20285 [TwigBundle] made Twig cache independent of the project root directory (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[TwigBundle] made Twig cache independent of the project root directory

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no (except if people configured relative paths instead of absolute ones, but this was not supported in earlier versions of Twig)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

This makes Twig cache keys independent of the project root directory, thanks to Twig 1.27.

It cannot be merged in 2.7 as a bug fix as people might have used relative paths for some Twig paths (no officially supported by Twig anyway), which would have resolved to `getcwd()` before, but will now be interpreted as being relative to `%kernel.root_dir%` now.

Commits
-------

dc38af3 [TwigBundle] made Twig cache independent of the project root directory
2016-10-24 08:55:54 -07:00
Fabien Potencier
14acca7e23 Merge branch '3.1'
* 3.1:
  Fix edge case with StreamedResponse where headers are sent twice
  removed usage of Twig_Compiler::addIndentation
  A decorated service should not keep the autowiring types
  merge tags instead of completely replacing them
2016-10-24 08:52:51 -07:00
Fabien Potencier
dd73a100c3 Merge branch '2.8' into 3.1
* 2.8:
  Fix edge case with StreamedResponse where headers are sent twice
  removed usage of Twig_Compiler::addIndentation
  A decorated service should not keep the autowiring types
  merge tags instead of completely replacing them
2016-10-24 08:52:44 -07:00
Fabien Potencier
2011f447df Merge branch '2.7' into 2.8
* 2.7:
  Fix edge case with StreamedResponse where headers are sent twice
  removed usage of Twig_Compiler::addIndentation
  merge tags instead of completely replacing them
2016-10-24 08:52:36 -07:00