Commit Graph

32924 Commits

Author SHA1 Message Date
Nicolas Grekas
579e3b3bb5 feature #22679 [Form] Add tel and color types (apetitpa)
This PR was squashed before being merged into the 3.4 branch (closes #22679).

Discussion
----------

[Form] Add tel and color types

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22596
| License       | MIT
| Doc PR        | not provided yet

Commits
-------

5b07ca7 [Form] Add tel and color types
2017-10-02 14:59:32 +02:00
apetitpa
5b07ca7f2f [Form] Add tel and color types 2017-10-02 14:59:30 +02:00
Maxime Steinhausser
f9aeee5e63 [DI] Fix missing CHANGELOG update + typo 2017-10-02 14:00:46 +02:00
Nicolas Grekas
fc6b9ec67e Merge branch '2.7' into 2.8
* 2.7:
  fix tests
2017-10-02 10:46:46 +02:00
Nicolas Grekas
817f594f48 fix tests 2017-10-02 10:43:16 +02:00
Nicolas Grekas
f86b4c43a3 fix tests 2017-10-02 09:56:07 +02:00
Nicolas Grekas
681ff3333d Merge branch '3.3' into 3.4
* 3.3:
  fix merge
2017-10-02 09:25:08 +02:00
Nicolas Grekas
7fa94dc846 fix merge 2017-10-02 09:25:00 +02:00
Nicolas Grekas
d6972d4233 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
  Fix in simple-phpunit script
2017-10-02 09:23:43 +02:00
Nicolas Grekas
e36a69710e Merge branch '2.8' into 3.3
* 2.8:
  fix merge
2017-10-02 09:18:51 +02:00
Nicolas Grekas
ef4f532395 fix merge 2017-10-02 09:17:52 +02:00
Nicolas Grekas
90986f4502 fix merge 2017-10-02 09:00:01 +02:00
Nicolas Grekas
09e512851f Fix in simple-phpunit script 2017-10-02 08:54:00 +02:00
Nicolas Grekas
fedcc91c8d Merge branch '3.3' into 3.4
* 3.3: (23 commits)
  Tests and fix for issue in array model data in EntityType field with multiple=true
  [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
  removed useless PHPDoc
  [Form] Fix FormInterface::submit() annotation
  [PHPUnitBridge] don't remove when set to  empty string
  PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
  HttpCache does not consider ESI resources in HEAD requests
  Fix translation for "This field was not expected"
  [Routing] Enhance Route(Collection) docblocks
  Added improvement for accuracy in MoneyToLocalizedStringTransformer.
  Removed unused private property
  Use correct verb form in the pull request template
  Use PHP_MAXPATHLEN in Filesystem.
  Added null as explicit return type (?TokenInterface)
  [FrameworkBundle] Fix Routing\DelegatingLoader
  Render all line breaks according to the exception message
  [Form] Fix phpdoc
  [DI] remove confusing code
  [Form] Fixed GroupSequence with "constraints" option
  [Validator] Clarify UUID validator behavior
  ...
2017-10-02 08:49:52 +02:00
Nicolas Grekas
a707bbf090 Merge branch '2.8' into 3.3
* 2.8: (22 commits)
  Tests and fix for issue in array model data in EntityType field with multiple=true
  [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
  removed useless PHPDoc
  [Form] Fix FormInterface::submit() annotation
  PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
  HttpCache does not consider ESI resources in HEAD requests
  Fix translation for "This field was not expected"
  [Routing] Enhance Route(Collection) docblocks
  Added improvement for accuracy in MoneyToLocalizedStringTransformer.
  Removed unused private property
  Use correct verb form in the pull request template
  Use PHP_MAXPATHLEN in Filesystem.
  Added null as explicit return type (?TokenInterface)
  [FrameworkBundle] Fix Routing\DelegatingLoader
  Render all line breaks according to the exception message
  [Form] Fix phpdoc
  [DI] remove confusing code
  [Form] Fixed GroupSequence with "constraints" option
  [Validator] Clarify UUID validator behavior
  [Filesystem] Fixed makePathRelative
  ...
2017-10-02 08:42:24 +02:00
Fabien Potencier
8486a501d2 minor #24391 Remove remaining @experimental annotations (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove remaining `@experimental` annotations

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

Our policy states that experimental features should be either be deprecated or go mainstream in the next minor.
I propose to make all current ones mainstream.

Commits
-------

17a413876a Remove remaining `@experimental` annotations
2017-10-01 16:14:29 -07:00
Nicolas Grekas
d4cbc70c50 Merge branch '2.7' into 2.8
* 2.7: (22 commits)
  Tests and fix for issue in array model data in EntityType field with multiple=true
  [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
  removed useless PHPDoc
  [Form] Fix FormInterface::submit() annotation
  PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
  HttpCache does not consider ESI resources in HEAD requests
  Fix translation for "This field was not expected"
  [Routing] Enhance Route(Collection) docblocks
  Added improvement for accuracy in MoneyToLocalizedStringTransformer.
  Removed unused private property
  Use correct verb form in the pull request template
  Use PHP_MAXPATHLEN in Filesystem.
  Added null as explicit return type (?TokenInterface)
  [FrameworkBundle] Fix Routing\DelegatingLoader
  Render all line breaks according to the exception message
  [Form] Fix phpdoc
  [DI] remove confusing code
  [Form] Fixed GroupSequence with "constraints" option
  [Validator] Clarify UUID validator behavior
  [Filesystem] Fixed makePathRelative
  ...
2017-10-01 23:00:16 +02:00
Nicolas Grekas
17a413876a Remove remaining @experimental annotations 2017-10-01 22:19:08 +02:00
Fabien Potencier
a11589f45c bug #23980 Tests and fix for issue in array model data in EntityType field with multiple=true (stoccc)
This PR was squashed before being merged into the 2.7 branch (closes #23980).

Discussion
----------

Tests and fix for issue in array model data in EntityType field with multiple=true

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| License       | MIT
| Fixed tickets | #23927

Provided some tests and the fix for #23927.
Rebased to 2.7, replaces #23930

Commits
-------

aaba6b4c2b Tests and fix for issue in array model data in EntityType field with multiple=true
2017-10-01 11:10:38 -07:00
stoccc
aaba6b4c2b Tests and fix for issue in array model data in EntityType field with multiple=true 2017-10-01 11:10:36 -07:00
Fabien Potencier
09dbed766d feature #23845 [Validator] Add unique entity violation cause (Ilya Vertakov)
This PR was squashed before being merged into the 3.4 branch (closes #23845).

Discussion
----------

[Validator] Add unique entity violation cause

| Q             | A
| ------------- | ---
| Branch?       | 3.4 or master
| Bug fix?      | no
| New feature?  | yes/no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | n/a

This PR adds unique entity validation error cause which can be array of entities to constraint violation

Commits
-------

7ae06dc617 [Validator] Add unique entity violation cause
2017-10-01 11:06:53 -07:00
Ilya Vertakov
7ae06dc617 [Validator] Add unique entity violation cause 2017-10-01 11:06:51 -07:00
Fabien Potencier
af384aeee0 feature #22132 [Lock] Automaticaly release lock when user forget it (jderusse)
This PR was squashed before being merged into the 3.4 branch (closes #22132).

Discussion
----------

[Lock] Automaticaly release lock when user forget it

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

The objective of this PR is to automatically release the Lock when the user forget to call the `release` method (like the `fclose` function does in, php core).
The implementation is comparable to #22115 but the purpose is not the same.

I create a new PR to not mix things.

Commits
-------

2eedc1fd37 [Lock] Automaticaly release lock when user forget it
2017-10-01 11:03:21 -07:00
Jérémy Derussé
2eedc1fd37 [Lock] Automaticaly release lock when user forget it 2017-10-01 11:03:19 -07:00
Fabien Potencier
a8d5359408 bug #22586 [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible (aaa2000)
This PR was squashed before being merged into the 2.7 branch (closes #22586).

Discussion
----------

[Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see comment below -->
| Bug fix?      | yes-ish
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | <!-- #-prefixed issue number(s), if any -->
| License       | MIT

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Implements the same behaviour that `NumberToLocalizedStringTransformer` in order to accept both comma and dot implemented in #5941

Commits
-------

f96a7f81b8 [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
2017-10-01 10:48:22 -07:00
adev
f96a7f81b8 [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible 2017-10-01 10:48:20 -07:00
Fabien Potencier
41665b759f fixed CS 2017-10-01 10:11:23 -07:00
Fabien Potencier
8c35d91e7d feature #21751 Bootstrap4 support for Twig form theme (hiddewie, javiereguiluz)
This PR was merged into the 3.4 branch.

Discussion
----------

Bootstrap4 support for Twig form theme

**This PR is a followup from #19648. That PR was closed because GitHub thought my branch contained no commits after a force push...**

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

I have made a port of the Twig form theming code for Bootstrap 3 to the α-5 version of Bootstrap 4.
- The (inheritance) structure of the form theming files has changed because a number of blocks are the same between BS 3 and 4. They have been migrated to `bootstrap_base_layout.html.twig`.
  The new tree is as follows:

```
bootstrap_base_layout.html.twig
|-- bootstrap_3_layout.html.twig
|   `-- bootstrap_3_horizontal_layout.html.twig
`-- bootstrap_4_layout.html.twig
    `-- bootstrap_4_horizontal_layout.html.twig
```
- Any occurances of `.form-horizontal` have been removed from the BS 4 code.
- Checkboxes and radio buttons have been stacked using the `.form-check`, `.form-check-label` and `.form-check-input` classes. There is now no distinction between checkboxes and radio buttons in the markdown.
- All layout tests have been added and updated for BS4. The inheritance tree is as follows:

```
AbstractLayoutTest
`-- AbstractBootstrap3LayoutTest
    |-- AbstractBootstrap3HorizontalLayoutTest
    `-- AbstractBootstrap4LayoutTest
        `-- AbstractBootstrap4HorizontalLayoutTest
```

All tests pass. The classes `FormExtensionBootstrap4LayoutTest` and `FormExtensionBootstrap4HorizontalLayoutTest` have been created similarly to the BS 3 versions.
- ~~The label coloring on an validation is not correct. I've made an issue (twbs/bootstrap#20535) of the problem.~~
- No [custom form elements](http://v4-alpha.getbootstrap.com/components/forms/#custom-forms) have been used.
- A docs PR can be created if this PR is accepted.
- The new code might have to be updated if large changes occur in the BS 4 α.

Screenshot of BS3 and 4 comparison for the same form:

![1](https://cloud.githubusercontent.com/assets/1073881/17732594/dfcb50d6-6472-11e6-8e96-c46987809322.PNG)

Commits
-------

f12e5887ff Removed unneeded wrapping quotes around a Twig key
709f134dc8 Removed unneeded wrapping quotes around a Twig key
4222d54a53 Initial commit for Bootstrap 4 form theme, based on Bootstrap 3 form theme
2017-10-01 10:10:24 -07:00
Fabien Potencier
4f89386b74 feature #24383 [FrameworkBundle] Don't clear app pools on cache:clear (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Don't clear app pools on cache:clear

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no, but behavior change
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23685
| License       | MIT
| Doc PR        | -

The cache:clear command currently clears all cache pools by default.
This is not expected and is a bad default behavior (as explained in linked issue).
If we don't want to have that behavior forever, I see no other option than just doing the change, as done here, targeting 3.4.

Commits
-------

b0c04f8354 [FrameworkBundle] Don't clear app pools on cache:clear
2017-10-01 09:49:04 -07:00
Tobias Schultze
ffc74eb959 [DoctrineBridge] Deprecate DbalSessionHandler 2017-10-01 17:08:32 +02:00
Nicolas Grekas
b0c04f8354 [FrameworkBundle] Don't clear app pools on cache:clear 2017-09-30 20:17:55 +02:00
Fabien Potencier
0c6eca34f6 feature #24148 [Form] Hide label button when its setted to false (TeLiXj)
This PR was submitted for the 2.7 branch but it was merged into the 3.4 branch instead (closes #24148).

Discussion
----------

[Form] Hide label button when its setted to false

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

Added same behaviour in buttons like in other form components when label is setted to false, don't show it.
It's very useful with buttons with icon and without text.

Commits
-------

e3190755cf Hide label button when its setted to false
2017-09-30 07:30:11 -07:00
TeLiXj
e3190755cf Hide label button when its setted to false
Added same behaviour in buttons like in other form components when label is setted to false, don't show it. It's very useful with buttons with icon and without text
2017-09-30 07:30:11 -07:00
Fabien Potencier
f73d8d26b0 bug #24157 [Intl] Fixed support of Locale::getFallback (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

[Intl] Fixed support of Locale::getFallback

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

Commits
-------

256055218e [Intl] Fixed support of Locale::getFallback
2017-09-30 07:22:16 -07:00
Fabien Potencier
166f64efb1 bug #24198 [HttpFoundation] Fix file upload multiple with no files (enumag)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix file upload multiple with no files

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

```php
<form method="post" enctype="multipart/form-data">
<input type="file" multiple name="img[]">
<input type="submit">
</form>

<?php

$loader = require __DIR__ . '/../app/autoload.php';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
    var_export($request->files->all()['img']);
}
```

Expected result when I send the form without any files:

```
array ()
```

Actual result:

```
array ( 0 => NULL, )
```

This causes a problem later when using FileType with multiple option - if no files are sent the form data are `[0 => '']` instead of `[]`.

Of course I need to add a test for this.

Commits
-------

d4f6039dcd [HttpFoundation] Fix file upload multiple with no files
2017-09-30 07:18:14 -07:00
Fabien Potencier
72cc5df5fc minor #24342 removed useless PHPDoc (OskarStark)
This PR was squashed before being merged into the 2.7 branch (closes #24342).

Discussion
----------

removed useless PHPDoc

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | n/a

Commits
-------

5ee9043d8b removed useless PHPDoc
2017-09-30 07:00:25 -07:00
Oskar Stark
5ee9043d8b removed useless PHPDoc 2017-09-30 07:00:23 -07:00
Fabien Potencier
77998813fe minor #24374 [HttpFoundation] Return instance in StreamedResponse (abellion)
This PR was squashed before being merged into the 3.4 branch (closes #24374).

Discussion
----------

[HttpFoundation] Return instance in StreamedResponse

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

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

2080582a75 [HttpFoundation] Return instance in StreamedResponse
2017-09-30 06:57:21 -07:00
Antoine Bellion
2080582a75 [HttpFoundation] Return instance in StreamedResponse 2017-09-30 06:57:19 -07:00
Fabien Potencier
f6d001e5fe bug #24379 [PHPUnitBridge] don't remove when set to empty string (Simperfit)
This PR was merged into the 3.3 branch.

Discussion
----------

[PHPUnitBridge] don't remove when set to  empty string

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

Fix a bug when passing empty string symfony/yaml and phpspec/prophecy

Commits
-------

722872f4c4 [PHPUnitBridge] don't remove when set to  empty string
2017-09-30 06:53:22 -07:00
Fabien Potencier
fbbab43506 minor #24384 [Form] Fix FormInterface::submit() annotation (enumag)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix FormInterface::submit() annotation

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

`null|string|array` does not cover all possible values. For example for UploadType it is an instance of UploadedFile.

Commits
-------

c6c09e4f28 [Form] Fix FormInterface::submit() annotation
2017-09-30 06:49:47 -07:00
Fabien Potencier
cd91b8f120 minor #24385 [FrameworkBundle] Register a NullLogger from test kernels (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Register a NullLogger from test kernels

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Relates to #24300

This will avoid unnecessary output on Travis or when running FrameworkBundle tests locally:
- before: https://travis-ci.org/symfony/symfony/jobs/281624658#L3594-L3635
- after: https://travis-ci.org/symfony/symfony/jobs/281643868#L3599-L3617

but also needed for anyone running functional tests on their project and using the default logger, in order to not get garbage output.

Do we need to find a more generic solution (like exposing a `framework.default_logger` option so users can set it to false for test)? Or just documenting this?

Commits
-------

c109dcd5ae [FrameworkBundle] Register a NullLogger from test kernels
2017-09-30 06:45:16 -07:00
Fabien Potencier
a2ae9a4ff8 feature #24378 [SecurityBundle] Deprecate auto picking the first provider (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Deprecate auto picking the first provider

when no provider is explicitly configured on a firewall

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | yes <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | https://symfony-devs.slack.com/archives/C3A2XAQ20/p1506626210000345 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

From @Pierstoval on Slack:

> Hey, guys, I learnt a few days ago that if you don't specify a user provider in a firewall configuration, the security will use the first one in the list. Don't anyone think specifying the user provider should be mandatory ? Or at least mandatory if we have more than one provider registered?

- [x] UPGRADE files
- [x] CHANGELOG
- [x] Fix other tests
- [x] Removal PR #24380

Commits
-------

2d1e3347a6 [SecurityBundle] Deprecate auto picking the first provider
2017-09-30 06:42:59 -07:00
Fabien Potencier
b1e2d21213 feature #24260 [Security] Add impersonation support for stateless authentication (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Add impersonation support for stateless authentication

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/lafourchette/SwitchUserStatelessBundle/issues/10#issuecomment-330434589
| License       | MIT
| Doc PR        | n/a

The `switch_user` listener triggers a redirection in case of success and thus does not play well with stateless authentication which is common nowadays (as opposed to other listeners like the [exception one](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php#L187..#L189)).
This adds a new `stateless` option to the `switch_user` listener, if set to true then no redirection is triggered during user switching.

This will avoid the need for [lafourchette/SwitchUserStatelessBundle](https://github.com/lafourchette/SwitchUserStatelessBundle) which just duplicated the symfony SwitchUserListener (with config factory) at a given state to avoid the 2 LOC which are causing the redirection.
The bundle is not actively maintained and the listener it provides is out of date due to the missing upstream additions and bug fixes (see https://github.com/lafourchette/SwitchUserStatelessBundle/issues/10).

Commits
-------

e7a5803e2e [Security] Add user impersonation support for stateless authentication
2017-09-30 06:39:03 -07:00
Maxime Steinhausser
c109dcd5ae [FrameworkBundle] Register a NullLogger from test kernels 2017-09-30 14:58:47 +02:00
Maxime Steinhausser
2d1e3347a6 [SecurityBundle] Deprecate auto picking the first provider
when no provider is explicitly configured on a firewall
2017-09-30 13:21:25 +02:00
Robin Chalas
e7a5803e2e [Security] Add user impersonation support for stateless authentication 2017-09-30 13:13:18 +02:00
Jáchym Toušek
c6c09e4f28 [Form] Fix FormInterface::submit() annotation 2017-09-29 22:09:03 +02:00
Amrouche Hamza
722872f4c4
[PHPUnitBridge] don't remove when set to empty string 2017-09-29 20:45:30 +02:00
Fabien Potencier
09afa64909 feature #24300 [HttpKernel][FrameworkBundle] Add a minimalist default PSR-3 logger (dunglas)
This PR was squashed before being merged into the 3.4 branch (closes #24300).

Discussion
----------

[HttpKernel][FrameworkBundle] Add a minimalist default PSR-3 logger

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

This PR provides a minimalist PSR-3 logger that is always available when FrameworkBundle is installed.
By default, it writes errors on `stderr`, regular logs on `stdout` and discards debug data (this is configurable).

This approach has several benefits:

- It's what expect from an app logging systems of major containerization and orchestration tools including [Docker](https://docs.docker.com/engine/admin/logging/view_container_logs/) and [Kubernetes](https://kubernetes.io/docs/concepts/cluster-administration/logging/), as well as most cloud providers such as [Heroku](https://devcenter.heroku.com/articles/logging#writing-to-your-log) and [Google Container Engine](https://kubernetes.io/docs/tasks/debug-application-cluster/logging-stackdriver/). If the app follows this standard (and it's not currently the case with Symfony by default) logs will be automatically collected, aggregated and stored.
- It's in sync with the "back to Unix roots" philosophy of Flex
- Logs are directly displayed in the console when running the integrated PHP web server (`bin/console server:start` or Flex's `make serve`), Create React App also do that for instance.
- It fixes a common problem when installing Flex recipes: many bundles expect a logger service but currently there is none available by default, and you usually get a `"logger" service not found error` (because packages depend of the PSR, but the PSR doesn't provide a logger service).

Commits
-------

9a06513ec7 [HttpKernel][FrameworkBundle] Add a minimalist default PSR-3 logger
2017-09-29 10:02:07 -07:00