Commit Graph

18373 Commits

Author SHA1 Message Date
Nicolas Grekas c1cb357d3a bug #18603 [PropertyAccess] ->getValue() should be read-only (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccess] ->getValue() should be read-only

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

Commits
-------

fa68529 [PropertyAccess] ->getValue() should be read-only
2016-04-20 20:37:31 +02:00
Nicolas Grekas fa6852968b [PropertyAccess] ->getValue() should be read-only 2016-04-20 17:25:54 +02:00
Christophe Coevoet 40b4cb2c4a minor #18591 [Config] Fix XmlUtilsTest namespace (JhonnyL)
This PR was merged into the 2.3 branch.

Discussion
----------

[Config] Fix XmlUtilsTest namespace

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

58425eb [Config] Fix XmlUtilsTest namespace
2016-04-19 15:42:43 +02:00
jhonnyL 58425eb44c [Config] Fix XmlUtilsTest namespace 2016-04-19 13:29:13 +00:00
Fabien Potencier 2528ec48cc bug #18280 [Routing] add query param if value is different from default (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] add query param if value is different from default

| Q             | A
| ------------- | ---
| Branch?       | 2.3
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | most likely not
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | #10940, #18111, #18035
| License       | MIT
| Doc PR        | -

Commits
-------

1ef2edf [Routing] add query param if value is different from default
2016-04-15 11:53:50 +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 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
JhonnyL 46ea9cc453 [DependencyInjection] fix phpDoc 2016-04-11 16:45:49 +02: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 87c4f23764 [DependencyInjection] Add coverage for all invalid arguments in exportParameters 2016-04-10 20:31:05 +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 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 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
Nicolas Grekas 2b30d486db [PropertyAccess] Fix regression 2016-04-05 18:42:48 +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
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
Grégoire Pineau 59fea72a43 [Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
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 ?
2016-04-04 14:27:18 +02:00
Grégoire Pineau a30e1662d8 [EventDispatcher] Try first if the event is Stopped 2016-04-04 11:22:54 +02:00
Nicolas Grekas 41fd14a564 minor #18430 [FrameworkBundle] fixes grammar in container:debug command manual. (hhamon)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] fixes grammar in container:debug command manual.

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

c3c092d [FrameworkBundle] fixes grammar in container:debug command manual.
2016-04-04 11:11:32 +02:00
Hugo Hamon c3c092de0f [FrameworkBundle] fixes grammar in container:debug command manual. 2016-04-04 10:38:46 +02:00
Nicolas Grekas 131436525f minor #18404 [HttpFoundation] fix phpdoc of UploadedFile (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] fix phpdoc of UploadedFile

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

cbcac56 [HttpFoundation] fix phpdoc of UploadedFile
2016-04-02 09:17:49 +02:00
Nicolas Grekas 2ce5d54fbe minor #18410 [travis] Disable hirak/prestissimo for deps=low/high tests (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Disable hirak/prestissimo for deps=low/high tests

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

Concurrent composer updates + prestissimo for deps=low/high matrix lines make tests transient.
Lets test each component in its own `$HOME`.

Commits
-------

b8205a8 [travis] Disable hirak/prestissimo for deps=low/high tests
2016-04-02 09:17:12 +02:00
Nicolas Grekas b8205a8330 [travis] Disable hirak/prestissimo for deps=low/high tests 2016-04-02 09:08:03 +02:00
Tobias Schultze cbcac5632b [HttpFoundation] fix phpdoc of UploadedFile 2016-04-01 13:54:44 +02:00
Fabien Potencier 9d45acc6a5 minor #18392 [ci] Skip dns-sensitive tests when DnsMock is not found (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[ci] Skip dns-sensitive tests when DnsMock is not found

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

Commits
-------

7e01187 [ci] Skip dns-sensitive tests when DnsMock is not found
2016-04-01 08:07:56 +02:00
Nicolas Grekas 7e01187781 [ci] Skip dns-sensitive tests when DnsMock is not found 2016-03-31 22:06:39 +02:00
Jules Pietri 7df9ca2aeb [Form] fix "prototype" not required when parent form is not required 2016-03-31 14:29:18 +02:00
Fabien Potencier 9945d8a159 bug #18265 Optimize ReplaceAliasByActualDefinitionPass (ajb-in)
This PR was merged into the 2.3 branch.

Discussion
----------

Optimize ReplaceAliasByActualDefinitionPass

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

Previous implementation passed over every definition for every alias (n*m runtime).
New implementation passes once over all aliases and once over all definitions (n+m).
Also removing needless "restart" logic.

Commits
-------

ab8dc0c Optimize ReplaceAliasByActualDefinitionPass
2016-03-31 11:36:43 +02:00
Ariel J. Birnbaum ab8dc0c9d3 Optimize ReplaceAliasByActualDefinitionPass
Previous implementation passed over every alias and every definition, for every
alias (n*(n+m) runtime). New implementation passes once over all aliases and
once over all definitions (n+m).

Also removing needless "restart" logic --- it has no real effect in either case.
2016-03-31 11:29:03 +02:00
Fabien Potencier f1a87dbb58 minor #18375 [Process] use __METHOD__ where applicable (annesosensio)
This PR was squashed before being merged into the 2.3 branch (closes #18375).

Discussion
----------

[Process] use __METHOD__ where applicable

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

5fd054e [Process] use __METHOD__ where applicable
2016-03-31 10:39:44 +02:00
annesosensio 5fd054e282 [Process] use __METHOD__ where applicable 2016-03-31 10:39:43 +02:00
Fabien Potencier 56d3c264a9 bug #18358 [Form] NumberToLocalizedStringTransformer should return floats when possible (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] NumberToLocalizedStringTransformer should return floats when possible

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

Commits
-------

f5ed09c [Form] NumberToLocalizedStringTransformer should return floats when possible
2016-03-30 15:48:39 +02:00
Fabien Potencier 39b164219b bug #17926 [DependencyInjection] Enable alias for service_container (hason)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Enable alias for service_container

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

Commits
-------

6161438 [DependencyInjection] Enabled alias for service_container
2016-03-30 12:50:22 +02:00
Fabien Potencier 3c3e543fb1 bug #18336 [Debug] Fix handling of php7 throwables (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Debug] Fix handling of php7 throwables

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

Should not be merged into 2.7 because 2.7 already has the required logic.

Commits
-------

b032096 [Debug] Fix handling of php7 throwables
2016-03-30 12:04:02 +02:00