Commit Graph

39442 Commits

Author SHA1 Message Date
Roland Franssen
71aade3622 [WebProfiler] Detect empty file paths in file viewer 2018-11-26 08:36:52 +01:00
Fabien Potencier
511b070ed6 bug #29305 [EventDispatcher] Unwrap wrapped listeners internally (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] Unwrap wrapped listeners internally

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | partially #24275
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

I believe what happens is we re-register the listeners on the wrapped dispatcher, so in case of sub request we get those and wrap it again. The profiler seems to confirm this in case of an exception (default 404 here) and thus creates a sub-request.

## Before: (main request)

No exception: (OK)

![image](https://user-images.githubusercontent.com/1047696/48968597-295ec180-eff2-11e8-982c-756e9019e107.png)

Exception: (KO)

![image](https://user-images.githubusercontent.com/1047696/48968612-4abfad80-eff2-11e8-8556-37bfbd51bc3b.png)

## After (main request):

No exception: same

Exception: (OK)

![image](https://user-images.githubusercontent.com/1047696/48968636-9f632880-eff2-11e8-983e-b4099133600b.png)

I haven't furhter investigated if we should split events per request as done in #23659 for logs. It seems somewhere we deduplicate events.. so im not sure the profiler actually shows correct data.

Commits
-------

448e2e2445 [EventDispatcher] Unwrap wrapped listeners internally
2018-11-26 08:28:51 +01:00
Fabien Potencier
18b3a52389 fixed CS 2018-11-26 08:26:42 +01:00
Fabien Potencier
661225075c bug #29302 [Contracts][Cache] allow retrieving metadata of cached items (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Contracts][Cache] allow retrieving metadata of cached items

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

We added `ItemInterface::getMetadata()` because getting them in userland is useful to propagate to higher level caches (eg sending tags + remaining ttl to Varnish).
But we forgot to add a way to retrieve them when using the new `CacheInterface::get()`.
This PR fixes it by adding a 4th `&$metadata` to the method.

Commits
-------

302b8446a7 [Contracts][Cache] allow retrieving metadata of cached items
2018-11-26 08:23:01 +01:00
Fabien Potencier
14931b182f bug #29315 [DI] fix copying expression providers when analyzing the service graph (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DI] fix copying expression providers when analyzing the service graph

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

Courtesy of @mishal, thanks for providing all the details.

Commits
-------

246164f748 [DI] fix copying expression providers when analyzing the service graph
2018-11-26 08:21:08 +01:00
Fabien Potencier
8f2ad36ff4 bug #27314 [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider (PF4Public)
This PR was merged into the 2.8 branch.

Discussion
----------

[DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider

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

Commits
-------

0248d4f566 [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider
2018-11-26 08:16:44 +01:00
Fabien Potencier
d788976d7b bug #29310 [MonologBridge] Return empty list for unknown requests (ro0NL)
This PR was merged into the 4.1 branch.

Discussion
----------

[MonologBridge] Return empty list for unknown requests

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Small continuation of #23659. Currently if the specified request is unknown, you'll get all available requests merged. This fixes it.

Commits
-------

69be8e649e [MonologBridge] Return empty list for unknonwn requests
2018-11-26 08:13:50 +01:00
Fabien Potencier
22784d7037 bug #29316 [VarDumper] Fix ClassStub ellipsis (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarDumper] Fix ClassStub ellipsis

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

Confirmed by @nicolas-grekas this is the right fix.

Before:

![image](https://user-images.githubusercontent.com/1047696/48979309-56c27280-f0b9-11e8-85f8-5ce6837b58fc.png)

After:

![image](https://user-images.githubusercontent.com/1047696/48979310-617d0780-f0b9-11e8-8c43-b12febc1c859.png)

Commits
-------

88f4ba165f [VarDumper] Fix ClassStub ellipsis
2018-11-26 08:07:42 +01:00
Fabien Potencier
4ca1fe3f1b bug #29300 [Translation] fix dumping catalogues cache (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Translation] fix dumping catalogues cache

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

Commits
-------

4aab6e72c1 [Translation] fix dumping catalogues cache
2018-11-26 08:03:05 +01:00
Fabien Potencier
c0bfdeb5c5 bug #29308 [Translation] Use XLIFF source rather than resname when there's no target (thewilkybarkid)
This PR was merged into the 2.8 branch.

Discussion
----------

[Translation] Use XLIFF source rather than resname when there's no target

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

Relates to https://github.com/symfony/symfony/issues/20076#issuecomment-251552328. If there's no `<target>` in an XLIFF but there is a `@resname` then that's used rather than the `<source>`.

If I'm using translation keys and my source locale is `en`, then it's a bit redundant to duplicate the `<source>` in the `<target>` in the `en` file (since there is no translation).

This isn't changing the behaviour when `<target>` is present but empty.

(Caveat: I'm definitely not an expert on XLIFF.)

Commits
-------

8633ebbca0 Use XLIFF source rather than resname when there's no target
2018-11-26 08:01:16 +01:00
Fabien Potencier
8a60f9870f bug #26244 [BrowserKit] fixed BC Break for HTTP_HOST header (brizzz)
This PR was merged into the 2.8 branch.

Discussion
----------

[BrowserKit] fixed BC Break for HTTP_HOST header

| Q             | A
| ------------- | ---
| Branch?       | 2.7, 2.8, 3.x, 4.x
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #22933
| License       | MIT
| Doc PR        | n/a

The situation well described in the original issue. I will add only:

- #10549 - makes server parameters to take precedence over URI.
- #16265 - partially revererts  #10549. Makes server parameters do not affect URI. But this is only true for `Client::request()`. It is still possible to set host for URI by `Client::setServerParameters()` when URI is realative (see examples below).

I propose a compromise solution: add to HTTP_HOST header power to override URI when it is relative.

Proposed solution:
- if the request URI is relative, then use the HTTP_HOST header passed to Client::request() to generate an absolute URI
- if the request URI is absolute, then ignore the HTTP_HOST header (as it now works)
- do the same with HTTPS server parameter

Profit:
- fix BC Break
- the documentation will be correct
  - http://symfony.com/doc/2.8/routing/hostname_pattern.html#testing-your-controllers
  - https://symfony.com/doc/2.8/testing.html#testing-configuration

Before:

```
$client->setServerParameters(['HTTP_HOST' => 'example.com']);
$client->request('GET', '/');
$this->assertEquals('http://example.com/', $client->getRequest()->getUri());

$client->request('GET', '/', [], [], ['HTTP_HOST' => 'example.com']);
$this->assertEquals('http://localhost/', $client->getRequest()->getUri());
```

Fixed (see last line):

```
$client->setServerParameters(['HTTP_HOST' => 'example.com']);
$client->request('GET', '/');
$this->assertEquals('http://example.com/', $client->getRequest()->getUri());

$client->request('GET', '/', [], [], ['HTTP_HOST' => 'example.com']);
$this->assertEquals('http://example.com/', $client->getRequest()->getUri());
```

Commits
-------

8c4a59467f [BrowserKit] fixed BC Break for HTTP_HOST header; implemented same behaviour for HTTPS server parameter
2018-11-26 07:55:10 +01:00
Fabien Potencier
57c1432045 bug #28147 [DomCrawler] exclude fields inside "template" tags (Gorjunov)
This PR was merged into the 2.8 branch.

Discussion
----------

[DomCrawler] exclude fields inside "template" tags

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

Exclude fields values/files if fields are inside template tag. I think better to exclude values only instead of excluding fields at all (described in ticket #27285)

Commits
-------

19e3e154d7 [DomCrawler] exclude fields inside "template" tags
2018-11-26 07:47:09 +01:00
Fabien Potencier
f02874e70f minor #29295 [Request] [Documentation] clarify that isMethodCacheable() returns true only for GET & HEAD (tamc)
This PR was merged into the 2.8 branch.

Discussion
----------

[Request] [Documentation] clarify that isMethodCacheable() returns true only for GET & HEAD

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

The current documentation points to https://tools.ietf.org/html/rfc7231#section-4.2.3.

The spec says: "this specification defines GET, HEAD, and POST as cacheable, although the overwhelming majority of cache implementations only support GET and HEAD.".

This fix to the documentation clarifies that Symfony follows majority (excluding POST) rather than the spec (including POST).

Commits
-------

9da998005b Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
2018-11-26 07:39:41 +01:00
Fabien Potencier
145e9aa46b minor #29314 Changes for upcoming Travis' infra migration (sergeyklay)
This PR was merged into the 2.8 branch.

Discussion
----------

Changes for upcoming Travis' infra migration

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

Travis is deprecating the `sudo` keyword and moves everything to the same infrastructure (`sudo` really selects between two infrastructures).

See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration

Commits
-------

b3742694d9 Changes for upcoming Travis' infra migration
2018-11-26 07:36:04 +01:00
Fabien Potencier
e90fb68fd6 minor #29319 [WebProfilerBundle] Display messenger exception count instead of total count (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[WebProfilerBundle] Display messenger exception count instead of total count

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Each panel hides the count if zero, except messenger:

![image](https://user-images.githubusercontent.com/1047696/48981495-7ae07c80-f0d6-11e8-9dda-f40ce61844d6.png)

Now fixed.

Commits
-------

652c6eba89 [WebProfilerBundle] Hide messenger count if zero
2018-11-26 07:35:16 +01:00
Roland Franssen
652c6eba89 [WebProfilerBundle] Hide messenger count if zero 2018-11-25 17:27:13 +01:00
Serghei Iakovlev
b3742694d9
Changes for upcoming Travis' infra migration
Travis is deprecating the sudo keyword and moves everything to the same
infrastructure (sudo really selects between two infrastructures).

See:
https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
2018-11-25 15:56:12 +02:00
Roland Franssen
88f4ba165f [VarDumper] Fix ClassStub ellipsis 2018-11-25 13:50:42 +01:00
Tom Counsell
9da998005b Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
The current documentation points to https://tools.ietf.org/html/rfc7231#section-4.2.3.

The spec says: "this specification defines GET, HEAD, and POST as cacheable, although the overwhelming majority of cache implementations only support GET and HEAD.".

This fix to the documentation clarifies that Symfony follows majority (excluding POST) rather than the spec (including POST).
2018-11-25 12:27:05 +01:00
Nicolas Grekas
246164f748 [DI] fix copying expression providers when analyzing the service graph 2018-11-25 12:18:11 +01:00
Roland Franssen
69be8e649e [MonologBridge] Return empty list for unknonwn requests 2018-11-25 08:46:30 +01:00
Sergei Gorjunov
19e3e154d7 [DomCrawler] exclude fields inside "template" tags 2018-11-24 23:30:19 +01:00
Chris Wilkinson
8633ebbca0 Use XLIFF source rather than resname when there's no target 2018-11-24 21:16:41 +00:00
Alessandro Chitolina
61c4531292
[DoctrineBridge] catch errors while converting to db values in data collector 2018-11-24 18:30:29 +01:00
pf
0248d4f566 [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider 2018-11-24 18:17:47 +01:00
Roland Franssen
448e2e2445 [EventDispatcher] Unwrap wrapped listeners internally 2018-11-24 14:14:57 +01:00
Nicolas Grekas
f9414a8e81 bug #29260 [Lock] Fixed PdoStore::putOffExpiration(), PdoStore::getHashedKey() (PavelPrischepa)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Lock] Fixed PdoStore::putOffExpiration(), PdoStore::getHashedKey()

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

1. Fixed PDO Statement exception in PdoStore::putOffExpiration():

```
 An exception occurred while executing 'UPDATE lock_keys SET key_expiration = UNIX_TIMESTAMP() + 10, key_token = :token WHERE key_id = :id AND (key_token = :token OR key_expiration <= UNIX_TIMESTAMP())' with params ["dcfc5ff369bc1896563
  325c2e90478154eb670f6b6ebad3617e946ecb1f81517", "FRJOnftxRwPIgIRVb4EpOIVFwNjTmx0fwkBSTVJdViI="]:

  SQLSTATE[HY093]: Invalid parameter number
```

2. Added explicit casting `Key` to `string` in getHashedKey() to avoid error with `strict_types` enabled.

Commits
-------

a639301cd6 [Lock] Fixed PDOStatement exception "Invalid parameter number" in putOffExpiration()
2018-11-24 10:46:15 +01:00
Pavel Prischepa
a639301cd6 [Lock] Fixed PDOStatement exception "Invalid parameter number" in putOffExpiration() 2018-11-24 10:44:51 +01:00
Nicolas Grekas
302b8446a7 [Contracts][Cache] allow retrieving metadata of cached items 2018-11-24 10:35:08 +01:00
Nicolas Grekas
4aab6e72c1 [Translation] fix dumping catalogues cache 2018-11-24 09:35:00 +01:00
Fabien Potencier
7f310b4c77 bug #29222 [Dotenv] properly parse backslashes in unquoted env vars (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Dotenv] properly parse backslashes in unquoted env vars

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

Commits
-------

785fff56ce properly parse backslashes in unquoted env vars
2018-11-24 08:50:44 +01:00
Fabien Potencier
0f2d577ebd bug #29256 [HttpFoundation] Fixed absolute Request URI with default port (thomasbisignani)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Fixed absolute Request URI with default port

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

This PR fixes the #29234 issue, the request URI with default port was not properly generated.

Example :

```php
$request = Request::create('http://test.com:80/foo');
$request->server->set('REQUEST_URI', 'http://test.com:80/foo');
```

Before this fix, the `$request->getUri()` method returned `http://test.com/:80/foo` :

```diff
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'http://test.com/foo'
+'http://test.com/:80/foo'
```

Commits
-------

cddce2af61 [HttpFoundation] Fixed absolute Request URI with default port
2018-11-24 08:47:43 +01:00
Fabien Potencier
b178266bcd Merge branch '3.4' into 4.1
* 3.4:
  fix authorization checker variable name
  [Routing] Remove duplicate schemes and methods for invokable controllers
  [Bridge/PhpUnit] fix the fix
2018-11-24 08:45:31 +01:00
Fabien Potencier
812a878c47 bug #29274 [Routing] Remove duplicate schemes and methods for invokable controllers (claudusd)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Remove duplicate schemes and methods for invokable controllers

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

This PR backport for 3.4 branch the same issue than the PR #29225.

I add a test to check the fix when annotation are on the class and rename another one when the route annotation is on the invoke method.

Commits
-------

640ccdf069 [Routing] Remove duplicate schemes and methods for invokable controllers
2018-11-24 08:36:54 +01:00
Fabien Potencier
4c1e8bd836 bug #29285 [HttpKernel][WebProfilerBundle] Getting the cached client mime type instead of guessing it again (yceruto)
This PR was squashed before being merged into the 4.2-dev branch (closes #29285).

Discussion
----------

[HttpKernel][WebProfilerBundle] Getting the cached client mime type instead of guessing it again

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

The 1st commit fixes the bug based on the current implementation. But I'd like to improve this new feature a little bit with the 2nd commit:
 * <del>Renaming "Uploaded files" title by "FILES Parameters" and</del> (sub-section of POST parameters) changing the table using key/value structure (being consistent with other sections).
 * The above allow us also to show nested paramaters. (It is useful to know where this file(s) comes from)
 * And show all info about the `UploadedFile` object. (It might be useful too)

![files-parameters](https://user-images.githubusercontent.com/2028198/48918478-d3a3e100-ee5a-11e8-8ef7-a50ae4ee1550.png)

Commits
-------

38692a6e5f [HttpKernel][WebProfilerBundle] Getting the cached client mime type instead of guessing it again
2018-11-24 08:32:32 +01:00
Yonel Ceruto
38692a6e5f [HttpKernel][WebProfilerBundle] Getting the cached client mime type instead of guessing it again 2018-11-24 08:32:14 +01:00
Fabien Potencier
eb593823f8 minor #29292 [PropertyAccess] Removed the return type phpdoc (samnela)
This PR was merged into the 4.1 branch.

Discussion
----------

[PropertyAccess] Removed the return type phpdoc

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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

143597a2b9 Removed the return type phpdoc
2018-11-24 08:24:58 +01:00
Nicolas Grekas
6968000a3c [Routing] fix trailing slash redirection when using RedirectableUrlMatcher 2018-11-23 18:35:50 +01:00
Samuel NELA
143597a2b9 Removed the return type phpdoc 2018-11-23 14:03:00 +01:00
Fabien Potencier
e4a7fd8eed bug #29271 [HttpFoundation] Fix trailing space for mime-type with parameters (Sascha Dens)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] Fix trailing space for mime-type with parameters

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->
This PR fixes a minor issue that we've discovered by exposing our API towards mobile applications which where sending the header as following `content-type: application/json ;charset=UTF-8`. Request is unable to determine the `getContentType -> getFormat` as **json** due to the whitespace at the end.

```php
$request = Request::createFromGlobals();
$request->headers->set('CONTENT_TYPE', 'application/json ;charset=UTF-8'); // Forcing header for test
if ($request->getContentType() !== 'json') {
    // Return 415 (Unsupported Media Type) status code..
}
```

When checking https://tools.ietf.org/html/rfc7231#section-3.1.1.1 it seems that a space is part of the RFC spec. (Where OWS is abbreviated for Optional WhiteSpace)
```
media-type = type "/" subtype *( OWS ";" OWS parameter )
```
Current the following cases are supported:
* application/json; charset=UTF-8
* application/json;charset=UTF-8

The following are failing:
* application/json ; charset=UTF-8
* application/json ;charset=UTF-8

Commits
-------

f4866bc371 [HttpFoundation] Fix trailing space for mime-type with parameters
2018-11-22 11:33:55 +01:00
Fabien Potencier
d9f87b6f58 minor #29273 [Contracts] clarify the README (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Contracts] clarify the README

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

Hopefully removing some potential confusions or promises that might be difficult to fulfill.

Commits
-------

07e2cc2858 [Contracts] clarify the README
2018-11-22 11:29:02 +01:00
Fabien Potencier
d713671b80 minor #29278 [Workflow] fix authorization checker variable name (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] fix authorization checker variable name

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

Commits
-------

9f4032d20f fix authorization checker variable name
2018-11-22 11:26:16 +01:00
Christian Flothmann
9f4032d20f fix authorization checker variable name 2018-11-22 08:01:54 +01:00
Claude Dioudonnat
640ccdf069 [Routing] Remove duplicate schemes and methods for invokable controllers 2018-11-21 20:17:55 +01:00
Nicolas Grekas
07e2cc2858 [Contracts] clarify the README 2018-11-21 19:26:39 +01:00
Nicolas Grekas
0bb91f73a1 minor #29272 [Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php] Fix indentation error (ValentineBoineau)
This PR was merged into the 2.8 branch.

Discussion
----------

[Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php] Fix indentation error

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

Commits
-------

24264facaa Indentation error
2018-11-21 16:13:15 +01:00
ValentineBoineau
24264facaa
Indentation error 2018-11-21 15:20:20 +01:00
Sascha Dens
f4866bc371 [HttpFoundation] Fix trailing space for mime-type with parameters 2018-11-21 13:53:33 +01:00
Nicolas Grekas
227cf2cc22 feature #29167 [Messenger] Add a trait for synchronous query & command buses (ogizanagi)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Add a trait for synchronous query & command buses

| Q             | A
| ------------- | ---
| Branch?       | 4.2 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs/issues/10662

Commits
-------

6ba4e8aad5 [Messenger] Add a trait for synchronous query & command buses
2018-11-20 19:24:21 +01:00
Maxime Steinhausser
6ba4e8aad5 [Messenger] Add a trait for synchronous query & command buses 2018-11-20 19:19:09 +01:00