Commit Graph

25943 Commits

Author SHA1 Message Date
Fabien Potencier
16ac46be44 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Improve phpdoc
  [Logging] Add support for firefox in ChromePhpHandler
  Windows 10 version check in just one line
  Detect CLI color support for Windows 10 build 10586
  [Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
  [EventDispatcher] Try first if the event is Stopped
  [FrameworkBundle] fixes grammar in container:debug command manual.
  [Form] fix "prototype" not required when parent form is not required
2016-04-05 18:36:54 +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
Fabien Potencier
45b557a5a7 minor #18373 [FrameworkBundle] Upgrade notice for the Controller::json() method (derrabus)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[FrameworkBundle] Upgrade notice for the Controller::json() method

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

PR #17642 added a `json()` method to the `Controller` class. This might break existing code extending the class. This PR adds a note about this to the UPGRADE-3.1 document.

Commits
-------

ca6694a Upgrade notice for the Controller::json() method.
2016-04-05 18:21: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
714b916d5d [FrameworkBundle] Add & use Psr6CacheClearer 2016-04-05 16:36:41 +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
Alexander M. Turek
ca6694ab19 Upgrade notice for the Controller::json() method. 2016-04-05 15:02:01 +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
Nicolas Grekas
6dbda505bf minor #18419 [Process] Fixes & testNonBlockingNorClearingIteratorOutput (nicolas-grekas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Process] Fixes & testNonBlockingNorClearingIteratorOutput

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

hasCallback (added on master in #17427) always returns true currently.

Commits
-------

3a109a2 [Process] Fixes & testNonBlockingNorClearingIteratorOutput
2016-04-04 17:07:09 +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
Nicolas Grekas
3a109a296c [Process] Fixes & testNonBlockingNorClearingIteratorOutput 2016-04-04 12:18:36 +02:00
Nicolas Grekas
4740c5ccfb [FrameworkBundle] use abstract cache.pool decoration and aliases 2016-04-04 11:49:17 +02:00
Christian Flothmann
92b1a20613 [FrameworkBundle] Fix and add tests for cache pool wiring 2016-04-04 11:41:15 +02:00
Nicolas Grekas
e44bfdcde9 [FrameworkBundle] Add cache-pool tag and wiring 2016-04-04 11:41:14 +02:00
Christian Flothmann
281eafa5cb [FrameworkBundle] Integrate the Cache component 2016-04-04 11:41:14 +02:00
Nicolas Grekas
bc51fdeec3 [Cache] Normalize constructor arguments order 2016-04-04 11:41:14 +02:00
Nicolas Grekas
a9dcce1f51 minor #18422 [DependencyInjection] Fix tests of #18144 (HeahDude)
This PR was squashed before being merged into the 3.1-dev branch (closes #18422).

Discussion
----------

[DependencyInjection] Fix tests of #18144

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

Commits
-------

5e7dbae [DependencyInjection] Fix tests of #18144
2016-04-04 11:35:18 +02:00
Jules Pietri
5e7dbae9a3 [DependencyInjection] Fix tests of #18144 2016-04-04 11:35:16 +02:00
JhonnyL
b2d10382f7 [FrameworkBundle] Calls support for debug:container 2016-04-04 11:34:26 +02:00
Nicolas Grekas
85506a0cbe minor #18432 [Cache] Fix tests (nicolas-grekas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Cache] Fix tests

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

Commits
-------

41f3f82 [Cache] Fix tests
2016-04-04 11:31:10 +02:00
Nicolas Grekas
41f3f82faa [Cache] Fix tests 2016-04-04 11:25:57 +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
Fabien Potencier
cef7e5b1b0 feature #18308 Added an ArgumentResolver with clean extension point (iltar, HeahDude)
This PR was merged into the 3.1-dev branch.

Discussion
----------

Added an ArgumentResolver with clean extension point

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #17933 (pre-work), #1547, #10710
| License       | MIT
| Doc PR        | symfony/symfony-docs#6422

**This PR is a follow up for and blocked by: #18187**, relates to #11457 by @WouterJ. When reviewing, please take the last commit: [Added an ArgumentResolver with clean extension point](4c092b31f9)

This PR provides:
- The ability to tag your own `ArgumentValueResolverInterface`. This means that you can effectively expand on the argument resolving in the `HttpKernel` without having to implement your own `ArgumentResolver`.

- The possibility to cache away argument metadata via a new `ArgumentMetadataFactory` which simply fetches the data from the cache, effectively omitting 1 reflection call per request. *Not implemented in this PR, but possible once this is merged.*

- The possibility to add a PSR-7 adapter to resolve the correct request, avoids the paramconverters
- The possibility to add a value resolver to fetch stuff from $request->query
- Drupal could simplify [their argument resolving](https://github.com/drupal/drupal/blob/8.1.x/core/lib/Drupal/Core/Controller/ControllerResolver.php) by a lot
- etc.

The aim for this PR is to provide a 100% BC variant to add argument resolving in a clean way, this is shown by the 2 tests: `LegacyArgumentResolverTest` and `ArgumentResolverTest`.

/cc @dawehner @larowlan if you have time, can you check the impact for Drupal? I think this should be a very simple change which should make it more maintainable.

Commits
-------

1bf80c9 Improved DX for the ArgumentResolver
f29bf4c Refactor ArgumentResolverTest
cee5106 cs fixes
cfcf764 Added an ArgumentResolver with clean extension point
360fc5f Extracting arg resolving from ControllerResolver
2016-04-03 18:53:12 +02:00
Fabien Potencier
162338e793 minor #18408 [Ldap] [Doc] Update README.md (csarrazi)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Ldap] [Doc] Update README.md

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

Fixes a typo from #18387

Commits
-------

579e8d4 Update README.md
2016-04-03 14:54:31 +02:00
Fabien Potencier
22e0eaeffe feature #18414 [Process] Implement IteratorAggregate to stream output (nicolas-grekas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Process] Implement IteratorAggregate to stream output

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

Sibling to #18386 for iterating of the output streams.

Commits
-------

5947f5d [Process] Implement IteratorAggregate to stream output
2016-04-03 13:22:10 +02:00
Fabien Potencier
804b92414b fixed CS 2016-04-03 09:41:26 +02:00
Fabien Potencier
c130bd634c feature #18144 [DI] Only rebuild autowiring cache when actually needed (weaverryan)
This PR was squashed before being merged into the 3.1-dev branch (closes #18144).

Discussion
----------

[DI] Only rebuild autowiring cache when actually needed

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

With autowiring, the container is currently rebuilt when an autowired class is modified in any way. That makes it unusable for large systems. However, this doesn't need to be true: we only need to rebuild the cache if a construct argument changes. This adds that change, and it's quite simple

This idea can/should also be adapted easily to the `@Route` cache (I don't believe it has something "smart" like this).

Thanks!

Commits
-------

3e97626 [DI] Only rebuild autowiring cache when actually needed
2016-04-03 09:35:23 +02:00
Ryan Weaver
3e976267c0 [DI] Only rebuild autowiring cache when actually needed 2016-04-03 09:35:21 +02:00
Nicolas Grekas
5947f5d8b1 [Process] Implement IteratorAggregate to stream output 2016-04-02 15:13:12 +02:00
Iltar van der Berg
1bf80c92ee Improved DX for the ArgumentResolver 2016-04-02 13:06:02 +02:00
Fabien Potencier
dc189f0793 feature #18386 [Process] Add InputStream to seamlessly feed running processes (nicolas-grekas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Process] Add InputStream to seamlessly feed running processes

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18262
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/6424

Look at the tests, beautiful, isn't it?

Commits
-------

3d20b6c [Process] Add InputStream to seamlessly feed running processes
2016-04-02 10:44:52 +02:00
Nicolas Grekas
82f0acfd5e Merge branch '3.0'
* 3.0:
  [travis] Disable hirak/prestissimo for deps=low/high tests
  Fixed the "hover" state of the profiler sidebar menu
  [HttpFoundation] fix phpdoc of UploadedFile
  Lower complexity of Form:isValid()
  skipped dns-sensitive tests when DnsMock is not found
  fixed typo
  [FrameworkBundle] Return the invokable service if its name is the class name
  [ci] Skip dns-sensitive tests when DnsMock is not found
  Exclude Bridge\PhpUnit from composer.json by default
  fixed CS
  Optimize ReplaceAliasByActualDefinitionPass
  [Process] use __METHOD__ where applicable
  [Routing] Don't needlessly execute strtr's as they are fairly expensive

Conflicts:
	.travis.yml
2016-04-02 10:08:03 +02:00
Nicolas Grekas
f990f1bea0 Merge branch '2.8' into 3.0
* 2.8:
  [travis] Disable hirak/prestissimo for deps=low/high tests
  Fixed the "hover" state of the profiler sidebar menu
  [HttpFoundation] fix phpdoc of UploadedFile
  Lower complexity of Form:isValid()
  skipped dns-sensitive tests when DnsMock is not found
  [FrameworkBundle] Return the invokable service if its name is the class name
  [ci] Skip dns-sensitive tests when DnsMock is not found
  Exclude Bridge\PhpUnit from composer.json by default
  fixed CS
  Optimize ReplaceAliasByActualDefinitionPass
  [Process] use __METHOD__ where applicable
  [Routing] Don't needlessly execute strtr's as they are fairly expensive

Conflicts:
	.travis.yml
	src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php
2016-04-02 10:04:34 +02:00
Nicolas Grekas
e7d7e1ee38 Merge branch '2.7' into 2.8
* 2.7:
  [travis] Disable hirak/prestissimo for deps=low/high tests
  [HttpFoundation] fix phpdoc of UploadedFile
  Lower complexity of Form:isValid()
  skipped dns-sensitive tests when DnsMock is not found
  [FrameworkBundle] Return the invokable service if its name is the class name
  [ci] Skip dns-sensitive tests when DnsMock is not found
  Exclude Bridge\PhpUnit from composer.json by default
  fixed CS
  Optimize ReplaceAliasByActualDefinitionPass
  [Process] use __METHOD__ where applicable
  [Routing] Don't needlessly execute strtr's as they are fairly expensive
2016-04-02 09:57:47 +02:00
Nicolas Grekas
eb23f056f0 Merge branch '2.3' into 2.7
* 2.3:
  [travis] Disable hirak/prestissimo for deps=low/high tests
  [HttpFoundation] fix phpdoc of UploadedFile
  [ci] Skip dns-sensitive tests when DnsMock is not found
  Optimize ReplaceAliasByActualDefinitionPass
  [Process] use __METHOD__ where applicable

Conflicts:
	.travis.yml
	src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php
	src/Symfony/Component/Process/Process.php
	src/Symfony/Component/Process/ProcessBuilder.php
2016-04-02 09:48:01 +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
Nicolas Grekas
3d20b6c46b [Process] Add InputStream to seamlessly feed running processes 2016-04-01 20:36:34 +02:00
Charles Sarrazin
579e8d4d6c Update README.md 2016-04-01 19:25:50 +02:00