Commit Graph

18353 Commits

Author SHA1 Message Date
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
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
Fabien Potencier
eb06632b1d minor #18361 Get ICU/intl from github instead of nebm.ist.utl.pt/~glopes (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Get ICU/intl from github instead of nebm.ist.utl.pt/~glopes

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

github.com should be more reliable

Commits
-------

8814ed0 [ci] Get ICU/intl from github instead of nebm.ist.utl.pt/~glopes
2016-03-30 12:01:59 +02:00
Nicolas Grekas
8814ed023d [ci] Get ICU/intl from github instead of nebm.ist.utl.pt/~glopes 2016-03-30 11:42:40 +02:00
Nicolas Grekas
b032096763 [Debug] Fix handling of php7 throwables 2016-03-30 11:02:35 +02:00
Nicolas Grekas
f5ed09c64c [Form] NumberToLocalizedStringTransformer should return floats when possible 2016-03-30 09:21:26 +02:00
Fabien Potencier
8110612a46 minor #18348 [Process] remove dead code (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] remove dead code

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

d5e8f6f [Process] remove dead code
2016-03-29 22:11:02 +02:00
Nicolas Grekas
d5e8f6f20a [Process] remove dead code 2016-03-29 16:17:20 +02:00
Christian Flothmann
eca25ba3ea minor #18325 [Form] cs fixes in date types (HeahDude)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] cs fixes in date types

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

Commits
-------

bc21828 [Form] cs fixes in date types
2016-03-29 15:20:02 +02:00
Tobias Schultze
666dc41d0e bug #18312 [ClassLoader] Fix storing not-found classes in APC cache (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[ClassLoader] Fix storing not-found classes in APC cache

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

106ed06 [ClassLoader] Fix storing not-found classes in APC cache
2016-03-28 21:27:59 +02:00
Nicolas Grekas
106ed0660c [ClassLoader] Fix storing not-found classes in APC cache 2016-03-28 10:34:42 +02:00
Jules Pietri
bc21828838 [Form] cs fixes in date types 2016-03-27 14:59:14 +02:00
Fabien Potencier
bbf00d22dc minor #18304 [phpunit] disable prophecy (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[phpunit] disable prophecy

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

Both Prophecy and Symfony require some phpdocumentor dependencies, but incompatible versions.
Since we don't use Prophecy, let's disable it.
phpunit-mock-objects is forced to v3.1.1 until we fix our test suite (see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/299).

Commits
-------

ae9bae7 [phpunit] disable prophecy
2016-03-27 12:05:51 +02:00
Fabien Potencier
09cc0b20d5 bug #18255 [HttpFoundation] Fix support of custom mime types with parameters (Ener-Getick)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Fix support of custom mime types with parameters

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/FriendsOfSymfony/FOSRestBundle/issues/1399
| License       | MIT

When using mime types with parameters, ``getFormat`` won't return the expected format as illustrated:
```php
$request = new Request();
$request->setFormat('custom', 'app/foo;param=bar');

$request->getFormat('app/foo;param=bar');
// will return null as the parameters are removed
```

So my proposal is to search the format corresponding to a mime type with its raw value or with the its parameters removed.

Commits
-------

f7ad285 [Request] Fix support of custom mime types with parameters
2016-03-25 17:26:41 +01:00
Ener-Getick
f7ad285746 [Request] Fix support of custom mime types with parameters 2016-03-25 17:13:36 +01:00
Nicolas Grekas
ae9bae7e16 [phpunit] disable prophecy 2016-03-25 10:58:58 +01:00
Nicolas Grekas
37dd041cda minor #18306 [2.3] fix mocks (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] fix mocks

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

* fix a typo in a method name (`setResponse` instead of `seetResopnse`)
* fix mocking a method that is not part of the `DomainObjectInterface`

Commits
-------

c211523 fix mocks
2016-03-25 10:57:13 +01:00
Christian Flothmann
c211523f6e fix mocks
* fix a typo in a method name (`setResponse` instead of `seetResopnse`)
* fix mocking a method that is not part of the `DomainObjectInterface`
2016-03-25 10:45:26 +01:00
Tobias Schultze
89f1c35e58 minor #18291 Fix copy-paste in PHPDoc comment text (guilliamxavier)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix copy-paste in PHPDoc comment text

| Q             | A
| ------------- | ---
| Branch?       | 2.3+ (actually all branches from 2.0)
| License       | MIT

In http://api.symfony.com/2.3/Symfony/Component/Form/DataTransformerInterface.html, compare the documentation (*emphasis* mine) respectively for `transform` and for `reverseTransform`:

> Usually this will be *NULL*, but […] other empty values are possible as well (such as *empty strings*).
> Usually this will be *an empty string*, but […] other empty values are possible as well (such as *empty strings*).

This PR corrects the repetition in the latter, giving symmetry:

> Usually this will be *NULL*, but […] other empty values are possible as well (such as *empty strings*).
> Usually this will be *an empty string*, but […] other empty values are possible as well (such as *NULL*).

_Note:_ For now I just changed `empty strings` to `NULL`, which is 9 characters shorter, should I also reformat the affected comment paragraph so that this line and the subsequent ones fill up to 80 columns (as was the case before the change, and is for `transform`)?

Commits
-------

3f6e37e Fix copy-paste in PHPDoc comment text
2016-03-24 12:17:56 +01:00
Guilliam Xavier
3f6e37efe6 Fix copy-paste in PHPDoc comment text 2016-03-24 10:50:31 +01:00
Tobias Schultze
e375161784 minor #18284 [2.3] fix mocking of some methods (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] fix mocking of some methods

| Q             | A
| ------------- | ---
| Branch?       | 2.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? |no
| Tests pass?   | yes
| Fixed tickets | items 3, 4, 5, and 7 of https://github.com/sebastianbergmann/phpunit-mock-objects/issues/299#issuecomment-200443756
| License       | MIT
| Doc PR        |

Commits
-------

542cf6b [2.3] fix mocking of some methods
2016-03-24 00:07:02 +01:00