merged branch tomglue/console_reregister_commands_fix (PR #8242)

This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8242).

Discussion
----------

[FrameworkBundle] do not re-register commands each time a Console\Application is run

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

I have been experimenting with using the Symfony console application inside of a React event loop which works quite well.

In this scenario, I re-use an instances of a Console\Application to run multiple tasks. This works well apart from unnecessarily reloading the command classes from all included bundles each time doRun() is called (https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Console/Application.php#L68). This can also lead to running out of file descriptors under heavy load as bootstrap.php.cache uses a RecursiveDirectoryIterator to load the command.

Commits
-------

1983fc3 [FrameworkBundle] do not re-register commands each time a Console\Application is run
[FrameworkBundle] tweaked previous merge (refs #8242)
[Security] fixed usage of the salt for the bcrypt encoder (refs #8210)
merged branch msonnabaum/request-get-encodings (PR #8185)

This PR was merged into the master branch.

Discussion
----------

[HttpFoundation] Added Request::getEncodings() method

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

We needed access to the Accept-Encoding information in Drupal, and I was surprised to see that there wasn't a method on the request object to access this.

This PR adds that method.

Commits
-------

28a8443 [HttpFoundation] Added Request::getEncodings() method
[HttpFoundation] tweaked previous merge (refs #8185)
add namespace parameter to PhpDumper::dump
merged branch zakharovvi/dependencyinjection_phpdumper_namespace (PR #8119)

This PR was submitted for the 2.3 branch but it was merged into the master branch instead (closes #8119).

Discussion
----------

[DependencyInjection] add namespace parameter to PhpDumper::dump

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

Commits
-------

97320a5 [DependencyInjection] add namespace parameter to PhpDumper::dump
fixed date type format pattern regex
merged branch bamarni/date-format-regex (PR #8198)

This PR was submitted for the 2.1 branch but it was merged into the 2.2 branch instead (closes #8198).

Discussion
----------

[Form] fixed date type format pattern regex

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

I don't understand what is the rationale behind the current regex, why is there mandatory in-between characters?

The current regex passes with the format option set to ```dMyyyy``` while it doesn't with ```dMy```, on the linked icu documentation it is stated that ```y``` is equivalent to ```yyyy```.

So when setting this format option to dMy, fields are rendered in a wrong order because of the fallback (year, month, day).

Commits
-------

6a91bbb [Form] fixed date type format pattern regex
Throw exception if value is passed to VALUE_NONE input, long syntax
merged branch tiagojsag/console_input_options_fix (PR #8199)

This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8199).

Discussion
----------

[Console] Throw exception if value is passed to VALUE_NONE input optin, long syntax

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

Input options with InputOption::VALUE_NONE accept values in both short and long syntaxes:
- When using the long syntax, no exception is thrown;
- When using short, a "The %s option does not exist" exception is thrown.

This PR only addresses the long syntax case. The short syntax case would require considerable refactoring of the parse code, which I believe should be discussed.

I included a test that illustrates the above mentioned problem for the long syntax scenario.

Commits
-------

32ea77f Throw exception if value is passed to VALUE_NONE input, long syntax
Merge branch '2.2' into 2.3

* 2.2:
  Throw exception if value is passed to VALUE_NONE input, long syntax
  fixed date type format pattern regex
  [FrameworkBundle] tweaked previous merge (refs #8242)
  do not re-register commands each time a Console\Application is run
  [Process] moved env check to the Process class (refs #8227)
  fix issue where $_ENV contains array vals
  [DomCrawler] Fix handling file:// without a host
  [Form] corrected interface bind() method defined against in deprecation notice
  [Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol

Conflicts:
	src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php
	src/Symfony/Component/DomCrawler/Link.php
	src/Symfony/Component/Form/Form.php
merged branch lsmith77/force_content_type (PR #8050)

This PR was merged into the 2.2 branch.

Discussion
----------

[WebProfilerBundle] force the Content-Type to html in the web profiler controllers

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | [![Build Status](https://travis-ci.org/lsmith77/symfony.png?branch=force_content_type)](https://travis-ci.org/lsmith77/symfony)
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This just forces the Content-Type to match what will be returned, otherwise if the request format happens to be something else than HTML (which can be the case when building an app that only does JSON/XML with FOSRestBundle) it can happen that the Response class automatically sets a different Content-Type.

The approach taken here matches https://github.com/nelmio/NelmioApiDocBundle/blob/master/Controller/ApiDocController.php#L24

Commits
-------

6d2135b force the Content-Type to html in the web profiler controllers
merged branch Seldaek/simplesecurity (PR #6069)

This PR was merged into the master branch.

Discussion
----------

[Security] Add simpler customization options

The goal of this is to provide a simpler extension point for people that don't have the time to dive into the whole security factory + authentication provider + user provider + authentication listener + token mess. As it stands, it gives you a way to just create one class that is handling all the security stuff in one (by implementing SimpleFormAuthenticatorInterface and UserProviderInterface) + one or more token classes.

I would like feedback on whether people think this makes sense or not before continuing and doing a SimpleHttpAuthenticatorInterface for non-form based stuff.

Just FYI that's how it would look in security.yml:

```yaml
security:
    providers:
        simple:
            id: simple_authenticator
    firewalls:
        foo:
            pattern: ^/
            simple_form:
                provider: simple
                authenticator: simple_authenticator
```

/cc @atrauzzi (who posted a long rant on the ML about how hard this all is, and I can't agree more - I hope it's the right account on github?)

Commits
-------

74cfc84 marked some classes as being experimental in 2.3
471e5bc [Security] allowed simple pre-auth to be optional if another auth mechanism already authenticated the user
01c913b moved the simple HTTP authenticator to a pre-auth one
887d9b8 fixed wrong Logger interface
65335ea [Security] Renamed simple_token to simple_http, added support for failure and success handler to both simple firewalls
f7a11a1 [Security] Add simple_token auth method
1fe2ed6 [Security] Add SimpleForm authentication
Revert "marked some classes as being experimental in 2.3"

This reverts commit 74cfc84c87ac281d1ed5aeb8eca9c86ae46c50cf.
[Security] updated the CHANGELOG
merged branch lsmith77/container_check_alias_in_has_method (PR #8252)

This PR was merged into the 2.3 branch.

Discussion
----------

Container check alias in has method

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | [![Build Status](https://travis-ci.org/lsmith77/symfony.png?branch=container_check_alias_in_has_method)](https://travis-ci.org/lsmith77/symfony)
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This bug might also be in 2.2 but we encountered it in 2.3 and the relevant code was changed slightly from 2.2 to 2.3. We noticed this issue here:
https://github.com/symfony-cmf/RoutingBundle/issues/109

The issue is caused by the ``$container->has->('router')`` check in the Router related commands:
https://github.com/symfony/FrameworkBundle/blob/master/Command/RouterDebugCommand.php#L32

As with the CMF we use a chain router service that is aliased to ``router``, the commands do not get registered.

One could classify this as a BC break, but imho its a bug fix.

Commits
-------

aa79393 also consider alias in Container::has()
[DomCrawler] added a note about the default charset
[HttpFoundation] fixed issue with session_regenerate_id (closes #7380)
merged branch fabpot/bcrypt-salt (PR #8266)

This PR was merged into the 2.3 branch.

Discussion
----------

[Security] fixed usage of the salt for the bcrypt encoder (refs #8210)

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

see #8210

Commits
-------

b5ded81 [Security] fixed usage of the salt for the bcrypt encoder (refs #8210)