Commit Graph

39309 Commits

Author SHA1 Message Date
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
Thomas Bisignani
cddce2af61 [HttpFoundation] Fixed absolute Request URI with default port 2018-11-20 17:50:57 +01:00
Nicolas Grekas
dbb0f2ad77 [Bridge/PhpUnit] fix the fix 2018-11-20 17:47:12 +01:00
Nicolas Grekas
ce6d918baf fix cs 2018-11-20 17:23:41 +01:00
Nicolas Grekas
b634ed564a Merge branch '4.1'
* 4.1:
  fix cs
  fix cs
  fix cs
  SCA: consolidate non empty array checks across codebase
  [cs] correct invalid @param types
  [Bridge/PhpUnit] Use composer to download phpunit
  [DI] fix taking lazy services into account when dumping the container
  [Form] Fixed empty data for compound date interval
  [Cache] fix optimizing Psr6Cache for AdapterInterface pools
  deal with explicitly enabled workflow nodes
2018-11-20 17:22:05 +01:00
Nicolas Grekas
578f847c02 fix cs 2018-11-20 17:17:28 +01:00
Nicolas Grekas
d30b0814c8 Merge branch '3.4' into 4.1
* 3.4:
  fix cs
2018-11-20 17:14:53 +01:00
Nicolas Grekas
6a1701e574 fix cs 2018-11-20 17:14:23 +01:00
Nicolas Grekas
713b7986fe Merge branch '3.4' into 4.1
* 3.4:
  fix cs
  SCA: consolidate non empty array checks across codebase
  [cs] correct invalid @param types
  [Bridge/PhpUnit] Use composer to download phpunit
  [DI] fix taking lazy services into account when dumping the container
  [Form] Fixed empty data for compound date interval
  [Cache] fix optimizing Psr6Cache for AdapterInterface pools
  deal with explicitly enabled workflow nodes
2018-11-20 17:14:00 +01:00
Nicolas Grekas
f103b6b91d fix cs 2018-11-20 17:10:26 +01:00
Nicolas Grekas
36527634f2 minor #29231 SCA: consolidate non empty array checks across codebase (kalessil)
This PR was squashed before being merged into the 3.4 branch (closes #29231).

Discussion
----------

SCA: consolidate non empty array checks across codebase

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

This PR replaces `is_array(...) && count(...) > 0` with `... && is_array(...)` construct used in the codebase.

Commits
-------

2f1fd54dda SCA: consolidate non empty array checks across codebase
2018-11-20 17:02:07 +01:00
Vladimir Reznichenko
2f1fd54dda SCA: consolidate non empty array checks across codebase 2018-11-20 17:01:59 +01:00
Nicolas Grekas
ab51fa84a5 bug #29243 [Cache] fix optimizing Psr6Cache for AdapterInterface pools (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix optimizing Psr6Cache for AdapterInterface pools

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

As described by @Tobion in https://github.com/symfony/symfony/pull/29236/files#r234324045:
> The problem I have experienced is that in dev mode the cache is decorated with a TraceableCache. This means it loses this optimization and introduces https://github.com/symfony/symfony/issues/28918#issuecomment-432399481 again

Commits
-------

b8100a9df0 [Cache] fix optimizing Psr6Cache for AdapterInterface pools
2018-11-20 17:01:33 +01:00
Nicolas Grekas
73d98049fa bug #29247 [DI] fix taking lazy services into account when dumping the container (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix taking lazy services into account when dumping the container

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

This PR fixes issues found while working on #29246.
It *does* fix the infinite loop, ~but replaces it by an exception (reopening #29078)~:
> ~It's a requirement to specify a Metadata Driver and pass it to Doctrine\ORM\Configuration::setMetadataDriverImpl()~

The full fix is not immediately accessible as it needs some core changes to the dumping logic. Requiring `symfony/proxy-manager-bridge` works around the issue properly.

See #29251 for 4.2

Commits
-------

67d7623e72 [DI] fix taking lazy services into account when dumping the container
2018-11-20 17:00:44 +01:00
Nicolas Grekas
d0698b2ec3 bug #29249 [Form] Fixed empty data for compound date interval (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fixed empty data for compound date interval

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

Following #29182, since this type has been introduced in Symfony 3 but with the same limitation explained in #4715.
So for consistency this needs to be fixed here as well.

Commits
-------

38a2abc790 [Form] Fixed empty data for compound date interval
2018-11-20 16:59:47 +01:00
Nicolas Grekas
e166d96cf5 bug #29265 [Bridge/PhpUnit] Use composer to download phpunit (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Bridge/PhpUnit] Use composer to download phpunit

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

Commits
-------

e823f1df31 [Bridge/PhpUnit] Use composer to download phpunit
2018-11-20 16:58:54 +01:00
Nicolas Grekas
9e0f8e7804 Merge branch '2.8' into 3.4
* 2.8:
  [cs] correct invalid @param types
2018-11-20 16:57:17 +01:00
Nicolas Grekas
303cae1fec minor #29266 [cs] correct invalid @param types (TomasVotruba)
This PR was merged into the 2.8 branch.

Discussion
----------

[cs] correct invalid @param types

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

That's #29255 on 2.8

Commits
-------

40f26235eb [cs] correct invalid @param types
2018-11-20 16:56:52 +01:00
Tomas Votruba
40f26235eb [cs] correct invalid @param types 2018-11-20 16:55:20 +01:00
Nicolas Grekas
e823f1df31 [Bridge/PhpUnit] Use composer to download phpunit 2018-11-20 16:36:32 +01:00
Nicolas Grekas
67d7623e72 [DI] fix taking lazy services into account when dumping the container 2018-11-20 15:22:20 +01:00
Grégoire Pineau
b74a086ec2 bug #28769 [FrameworkBundle] deal with explicitly enabled workflow nodes (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] deal with explicitly enabled workflow nodes

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

Commits
-------

017fd56bd8 deal with explicitly enabled workflow nodes
2018-11-19 10:38:20 +01:00
Jules Pietri
38a2abc790 [Form] Fixed empty data for compound date interval 2018-11-18 13:25:16 +01:00
Nicolas Grekas
b8100a9df0 [Cache] fix optimizing Psr6Cache for AdapterInterface pools 2018-11-16 22:18:41 +01:00
Christian Flothmann
017fd56bd8 deal with explicitly enabled workflow nodes 2018-11-16 08:38:23 +01:00
Fabien Potencier
737726516e bumped Symfony version to 4.2.0 2018-11-16 06:21:36 +01:00
Fabien Potencier
33bb96aad6
Merge pull request #29237 from fabpot/release-4.2.0-BETA2
released v4.2.0-BETA2
2018-11-16 06:13:09 +01:00
Fabien Potencier
4c44f24f5c updated VERSION for 4.2.0-BETA2 2018-11-16 06:12:50 +01:00
Fabien Potencier
1e6f430774 updated CHANGELOG for 4.2.0-BETA2 2018-11-16 06:10:23 +01:00
Fabien Potencier
429f500cbc bug #29190 [Debug][HttpKernel] remove frames added by DebugClassLoader in stack traces (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Debug][HttpKernel] remove frames added by DebugClassLoader in stack traces

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

![image](https://user-images.githubusercontent.com/243674/48362054-14ee0100-e6a3-11e8-82e1-b185af45fb8b.png)

Commits
-------

76e7944460 [Debug][HttpKernel] remove frames added by DebugClassLoader in stack traces
2018-11-16 06:03:01 +01:00
Fabien Potencier
c1c38f5caa bug #29233 [FrameworkBundle] metadata_update_threshold default value must be an int (dunglas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] metadata_update_threshold default value must be an int

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

The type of the default config value is not in sync with the typehint added to `MetadataBag::__construct()`, so you get an error by default (at least when using strict types):

```
Type error: Argument 2 passed to Symfony\Component\HttpFoundation\Session\Storage\MetadataBag::__construct() must be of the type integer, string given, called in var/cache/test/ContainerEZ62jzd/getSession_Storage_MockFileService.php on line 23 (Behat\Testwork\Call\Exception\FatalThrowableError)
```

Commits
-------

b7e7c46f43 [FrameworkBundle] metadata_update_threshold default value must be an int
2018-11-16 05:59:42 +01:00