Commit Graph

23573 Commits

Author SHA1 Message Date
Fabien Potencier
44efeaaa27 Merge branch '2.3' into 2.7
* 2.3:
  [DependencyInjection] Remove YAML check in CrossCheckTest
  [DependencyInjection] fix phpDoc
2016-04-14 17:17:41 +02:00
Fabien Potencier
6400b703d4 bug #18496 [Console] use ANSI escape sequences in ProgressBar overwrite method (alekitto)
This PR was squashed before being merged into the 2.7 branch (closes #18496).

Discussion
----------

[Console] use ANSI escape sequences in ProgressBar overwrite method

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

Rewritten `overwrite` method in ProgressBar class to use ANSI escape sequences to erase lines.
This removes the need to store the last message length as it is not needed to fill the buffer with spaces anymore. As a plus it correctly resets the cursor position while clearing the output

If the output is not decorated the behavior has not been changed.
Could possibly cause a BC break if testing against the decorated emitted output as binary string

Commits
-------

b6cca4c [Console] use ANSI escape sequences in ProgressBar overwrite method
2016-04-14 13:51:22 +02:00
Alessandro Chitolina
b6cca4c020 [Console] use ANSI escape sequences in ProgressBar overwrite method 2016-04-14 13:51:20 +02:00
Christophe Coevoet
6467b24014 minor #18534 [HttpKernel] Fix wrong number of arguments in call of ExceptionListener::logException() (chalasr)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #18534).

Discussion
----------

[HttpKernel] Fix wrong number of arguments in call of ExceptionListener::logException()

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

The `$original` argument has been removed from the method signature in [22f4807](22f4807522).

Commits
-------

00ae320 [HttpKernel] Fix wrong number of arguments in call of ExceptionListener::logException()
2016-04-14 11:51:33 +02:00
Robin Chalas
00ae320f83 [HttpKernel] Fix wrong number of arguments in call of ExceptionListener::logException()
Remove unexpected argument from ExceptionListener::logException() method call because the signature has changed in 22f4807
2016-04-14 11:51:32 +02:00
Fabien Potencier
8c89a3a0a3 minor #18532 [DependencyInjection] Remove check for YAML class in CrossCheckTest (JhonnyL)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Remove check for YAML class in CrossCheckTest

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

I suppose it's a leftover from when YAML component only was added in suggest.

Commits
-------

af92275 [DependencyInjection] Remove YAML check in CrossCheckTest
2016-04-13 07:04:16 -07:00
jhonnyL
af922758f4 [DependencyInjection] Remove YAML check in CrossCheckTest 2016-04-13 10:32:03 +00:00
Nicolas Grekas
03aa64ad25 minor #18505 [DependencyInjection] fix phpDoc (JhonnyL)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] fix phpDoc

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

* Use inheritdoc where possible
* Remove useless Constructor/__toString

Commits
-------

46ea9cc [DependencyInjection] fix phpDoc
2016-04-12 20:59:35 +02:00
Nicolas Grekas
da357d8424 minor #18519 [Process] Consistently use getProcess() in tests (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Consistently use getProcess() in tests

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

Commits
-------

ce13fe7 [Process] Consistently use getProcess() in tests
2016-04-12 20:54:02 +02:00
Nicolas Grekas
689f27b397 bug #18491 [DependencyInjection] anonymous services are always private (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] anonymous services are always private

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

Commits
-------

0a469a4 anonymous services are always private
2016-04-12 17:22:47 +02:00
Nicolas Grekas
fd693e6997 Merge branch '2.3' into 2.7
* 2.3:
  [Filesystem] Better error handling in remove()
2016-04-12 17:21:00 +02:00
Nicolas Grekas
6401371c7e bug #18515 [Filesystem] Better error handling in remove() (nicolas-grekas)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #18515).

Discussion
----------

[Filesystem] Better error handling in remove()

| Q             | A
| ------------- | ---
| Branch?       | master (to be moved on 2.3 when merging)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18512
| License       | MIT
| Doc PR        | -

Commits
-------

b848ddb [Filesystem] Better error handling in remove()
2016-04-12 17:20:10 +02:00
Nicolas Grekas
b848ddb7f0 [Filesystem] Better error handling in remove() 2016-04-12 17:20:10 +02:00
Nicolas Grekas
ce13fe7454 [Process] Consistently use getProcess() in tests 2016-04-12 13:52:58 +02:00
JhonnyL
46ea9cc453 [DependencyInjection] fix phpDoc 2016-04-11 16:45:49 +02:00
Fabien Potencier
8bf49692b6 minor #18499 [DependencyInjection] Add coverage for invalid Expression in exportParameters (JhonnyL)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] Add coverage for invalid Expression in exportParameters

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

Commits
-------

1931b14 [DependencyInjection] Add coverage for invalid Expression in exportParameters
2016-04-11 05:50:45 -07:00
Fabien Potencier
3cd380da42 Merge branch '2.3' into 2.7
* 2.3:
  [DependencyInjection] Add coverage for all invalid arguments in exportParameters
2016-04-11 05:48:18 -07:00
Fabien Potencier
302e1928b8 minor #18500 [DependencyInjection] Add coverage for all invalid arguments in exportParameters (JhonnyL)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Add coverage for all invalid arguments in exportParameters

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

Commits
-------

87c4f23 [DependencyInjection] Add coverage for all invalid arguments in exportParameters
2016-04-11 05:47:06 -07:00
JhonnyL
1931b14a60 [DependencyInjection] Add coverage for invalid Expression in exportParameters 2016-04-11 10:53:08 +02:00
JhonnyL
87c4f23764 [DependencyInjection] Add coverage for all invalid arguments in exportParameters 2016-04-10 20:31:05 +02:00
Christian Flothmann
0a469a418f anonymous services are always private 2016-04-09 16:46:37 +02:00
Jules Pietri
ea5375c7b7 [Form] refactor CheckboxListMapper and RadioListMapper
fixes #14712 and #17789.

`ChoiceType` now always use `ChoiceToValueTransformer` or
`ChoicesToValuesTransformer` depending on `multiple` option.
Hence `CheckboxListMapper` and `RadioListMapper` don’t handle
the transformation anymore.
Fixes pre selection of choice with model values such as `null`,
`false` or empty string.
2016-04-09 15:28:45 +02:00
Jules Pietri
71841c737c Revert "[Form] refactor RadioListMapper::mapDataToForm()"
closes #18173.

This reverts commit 8f918e5f84.
2016-04-09 15:28:10 +02:00
Christian Flothmann
064aedf9e3 Merge branch '2.3' into 2.7
* 2.3:
  [DependencyInjection] Resolve aliases before removing abstract services + add tests
  Fix Dom Crawler select option with empty value
  Remove unnecessary option assignment
  remove unused variable
  [PropertyAccess] Fix regression
2016-04-09 12:56:56 +02:00
Fabien Potencier
416f7d751f bug #18449 [PropertyAccess] Fix regression (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccess] Fix regression

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

All credits go to @MisatoTremor

I don't measure any perf impact.

Commits
-------

2b30d48 [PropertyAccess] Fix regression
2016-04-07 17:14:27 +02:00
Fabien Potencier
283875b325 bug #18429 [Console] Correct time formatting. (camporter)
This PR was squashed before being merged into the 2.7 branch (closes #18429).

Discussion
----------

[Console] Correct time formatting.

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

The previous behavior caused dramatic jumps in the reported time instead of smoothly transitioning between time ranges.
Added tests around the new behavior and the transitions between seconds, minutes, and days.

Commits
-------

b264b66 [Console] Correct time formatting.
2016-04-07 17:12:31 +02:00
Cameron Porter
b264b66a90 [Console] Correct time formatting. 2016-04-07 17:12:27 +02:00
Fabien Potencier
004a6678d2 bug #18467 [DependencyInjection] Resolve aliases before removing abstract services + add tests (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Resolve aliases before removing abstract services + add tests

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

Commits
-------

9802a41 [DependencyInjection] Resolve aliases before removing abstract services + add tests
2016-04-07 17:04:06 +02:00
Christophe Coevoet
abf4f67605 bug #18460 [DomCrawler] Fix select option with empty value (Matt Wells)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Fix select option with empty value

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

While using the Laravel's testing suite which makes use of the Symfony DOM Crawler (v3.0.2). I have been populating a form with a select which has a value which can be an empty value.

For example, with this select you can choose your gender or leave it empty if you don't want to specify:

```html
<select name="gender">
  <option selected></option>
  <option>Female</option>
  <option>Male</option>
</select>
```

When the `DomCrawler\Field::getValue()` is called I was expect to get the value `''` however I was actually getting `'on'`. This is caused by the [DomCrawler\Field::buildOptionValue()](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php#L262-L271) sets the default value to 'on' when there is no value which makes sense for ratios and checkboxes but not for select.

I have tracked this bug back to v2.3 but it is still present in v3, however, the default value was changed from '1' to 'on' in v2.5 which means that this patch will conflict when merging up the maintained versions.

Commits
-------

58276a2 Fix Dom Crawler select option with empty value
2016-04-07 10:21:15 +02:00
Nicolas Grekas
9802a41b3c [DependencyInjection] Resolve aliases before removing abstract services + add tests 2016-04-06 19:38:23 +02:00
Matt Wells
58276a274e Fix Dom Crawler select option with empty value 2016-04-06 14:13:46 +01:00
Tobias Schultze
5c94dccd59 minor #18452 [Security] mock the proper method (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] mock the proper method

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

Commits
-------

4b78d03 mock the proper method
2016-04-06 13:28:56 +02:00
Tobias Schultze
e251e36467 minor #18456 [Form] Remove unnecessary option assignment (sergeyfedotov)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Remove unnecessary option assignment

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

Option assignment is not required because the prototype inherits this option from the parent form via standard inheritance mechanism.

Related pull requests: #16959, #18317

Commits
-------

da8a197 Remove unnecessary option assignment
2016-04-06 13:21:17 +02:00
Fabien Potencier
192e821211 minor #18451 [Security] remove unused variable (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] remove unused variable

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

Commits
-------

d5964ae remove unused variable
2016-04-06 09:46:14 +02:00
Sergey Fedotov
da8a19728b Remove unnecessary option assignment 2016-04-05 23:03:15 +03:00
Christian Flothmann
d5964aee96 remove unused variable 2016-04-05 20:29:19 +02:00
Christian Flothmann
4b78d03379 mock the proper method 2016-04-05 20:28:19 +02:00
Nicolas Grekas
2b30d486db [PropertyAccess] Fix regression 2016-04-05 18:42:48 +02:00
Fabien Potencier
034f47635c Merge branch '2.3' into 2.7
* 2.3:
  [HttpFoundation] Improve phpdoc
  [Logging] Add support for firefox in ChromePhpHandler
  [Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
  [Form] fix "prototype" not required when parent form is not required
2016-04-05 18:36:43 +02:00
Fabien Potencier
5b6da77a96 bug #18425 [Security] Fixed SwitchUserListener when exiting an impersonation with AnonymousToken (lyrixx)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Fixed SwitchUserListener when exiting an impersonation with AnonymousToken

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

If you configure a firewall with switch user with `role: IS_AUTHENTICATED_ANONYMOUSLY` it's impossible to exit the
impersonation because the next line `$this->provider->refreshUser($original->getUser())` will fail. It fails because `RefreshUser`
expects an instance of `UserInterface` and here it's a string.

Therefore, it does not make sense to refresh an Anonymous Token, right ?

Commits
-------

59fea72 [Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
2016-04-05 18:29:34 +02:00
Fabien Potencier
134a7c9c72 bug #18317 [Form] fix "prototype" not required when parent form is not required (HeahDude)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] fix "prototype" not required when parent form is not required

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

Commits
-------

7df9ca2 [Form] fix "prototype" not required when parent form is not required
2016-04-05 18:24:57 +02:00
Nicolas Grekas
019e316aa0 minor #18442 [HttpFoundation] Improve phpdoc (mnapoli)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #18442).

Discussion
----------

[HttpFoundation] Improve phpdoc

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

Improve the phpdoc for the `$default` parameter of the `get()` method. It wasn't clear when the default value would be used (whether the key would not exist or the value was `null` or nullish).

The comment is now in sync with `Symfony\Component\HttpFoundation\ParameterBag::get()`.

Commits
-------

6bfbb2e [HttpFoundation] Improve phpdoc
2016-04-05 17:56:10 +02:00
Matthieu Napoli
6bfbb2e25f [HttpFoundation] Improve phpdoc
Improve the phpdoc for the `$default` parameter of the `get()` method. It wasn't clear when the default value would be used (whether the key would not exist or the value was `null` or nullish).

The comment is now in sync with `Symfony\Component\HttpFoundation\ParameterBag::get()`.
2016-04-05 17:56:01 +02:00
Nicolas Grekas
511e41a897 bug #18439 [Logging] Add support for Firefox (43+) in ChromePhpHandler (arjenm)
This PR was merged into the 2.3 branch.

Discussion
----------

[Logging] Add support for Firefox (43+) in ChromePhpHandler

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

Firefox added support for Chrome Logger a while back in [version 43](https://www.mozilla.org/en-US/firefox/43.0/releasenotes/).
Support for Firefox was added in the ChromePHPHandler of [Monolog 1.18.0](https://github.com/Seldaek/monolog/issues/721), although its not mentioned in the changelog.

This PR is basically just to replace the originally copied regular expression, [with this new one](fa96f6aa8f).

There should be no BC breakage, even though users may be using Monolog versions between 1.11 and 1.18. Monolog's ChromePHPHandler only got minor touch ups and its protocol (and thus output) remained the same.
This fix in fact also adds support for Firefox 43+ to older Monolog's when using the Symfony-version of that handler (which they should be using), since the Symfony-version of ChromePhpHandler completely overwrites the 'headersAccepted'-check of Monolog.

Commits
-------

c8efc4d [Logging] Add support for firefox in ChromePhpHandler
2016-04-05 16:28:06 +02:00
Arjen van der Meijden
c8efc4dfc2 [Logging] Add support for firefox in ChromePhpHandler 2016-04-04 20:48:53 +02:00
Michele Locati
5f5a71770b Windows 10 version check in just one line 2016-04-04 19:11:39 +02:00
Nicolas Grekas
01fb26b4d2 Merge branch '2.3' into 2.7
* 2.3:
  Detect CLI color support for Windows 10 build 10586
  [EventDispatcher] Try first if the event is Stopped
  [FrameworkBundle] fixes grammar in container:debug command manual.

Conflicts:
	src/Symfony/Component/EventDispatcher/EventDispatcher.php
	src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
2016-04-04 19:08:16 +02:00
Nicolas Grekas
5fbfcb05d5 bug #18385 Detect CLI color support for Windows 10 build 10586 (mlocati)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #18385).

Discussion
----------

Detect CLI color support for Windows 10 build 10586

Newer Windows 10 versions (builds starting from 10586) offer VT100 color support.
See http://www.nivot.org/blog/post/2016/02/04/Windows-10-TH2-(v1511)-Console-Host-Enhancements

| Q             | A
| ------------- | ---
| Branch?       | master - Maybe it could be backported to other branches too
| Bug fix?      | maybe 😉 - Do you you consider a bug not having colors on Windows?
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

472a7bf Detect CLI color support for Windows 10 build 10586
2016-04-04 19:01:24 +02:00
Michele Locati
472a7bffee Detect CLI color support for Windows 10 build 10586 2016-04-04 19:01:16 +02:00
Nicolas Grekas
18ddc88fb0 bug #18426 [EventDispatcher] Try first if the event is Stopped (lyrixx)
This PR was merged into the 2.3 branch.

Discussion
----------

[EventDispatcher] Try first if the event is Stopped

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

If you trigger 2 events with the same instance of Event and if a listener in the first dispatch stop the propagation, then the very first listener of the second dispatch is called. It should not IMHO.

Commits
-------

a30e166 [EventDispatcher] Try first if the event is Stopped
2016-04-04 18:56:17 +02:00