Commit Graph

39330 Commits

Author SHA1 Message Date
Maxime Steinhausser
3cd4477563 [Messenger] Mention HandleTrait in UPGRADE-4.2.md file 2018-11-28 16:09:38 +01:00
Nicolas Grekas
5e2e3fd56a Merge branch '4.1' into 4.2
* 4.1:
  Update PR template
  bumped Symfony version to 4.1.9
  updated VERSION for 4.1.8
  updated CHANGELOG for 4.1.8
  bumped Symfony version to 3.4.20
  updated VERSION for 3.4.19
  updated CHANGELOG for 3.4.19
  [Console] Move back root exception to stack trace in verbose mode
2018-11-27 08:40:44 +01:00
Nicolas Grekas
5e56cfc968 Merge branch '3.4' into 4.1
* 3.4:
  Update PR template
  bumped Symfony version to 3.4.20
  updated VERSION for 3.4.19
  updated CHANGELOG for 3.4.19
2018-11-27 08:36:34 +01:00
Nicolas Grekas
53f28bf34c Update PR template 2018-11-27 08:29:59 +01:00
Nicolas Grekas
12e1c9b9e5 bug #29344 Fixes sprintf(): Too few arguments in Translator (stephanedelprat)
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes #29344).

Discussion
----------

Fixes sprintf(): Too few arguments in Translator

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | related to a previous deprecation <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | ?
| Fixed tickets | none
| License       | MIT
| Doc PR        | none

Fixes the log produced when the method is called :

Before : "sprintf(): Too few arguments"

After : "The "Symfony\Component\Translation\Translator::transChoice()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%count%" parameter."

Reference : http://php.net/manual/function.sprintf.php

Commits
-------

45c3de044e Fixes sprintf(): Too few arguments in Translator
2018-11-27 08:20:38 +01:00
Stéphane Delprat
45c3de044e Fixes sprintf(): Too few arguments in Translator
Fixes the log produced when the method is called : 

Before : "sprintf(): Too few arguments"

After : "The "Symfony\Component\Translation\Translator::transChoice()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%count%" parameter."

Reference : http://php.net/manual/function.sprintf.php
2018-11-27 08:20:32 +01:00
Fabien Potencier
1aaf73e396
Merge pull request #29339 from fabpot/release-4.2.0-RC1
Release v4.2.0-RC1
2018-11-26 20:10:21 +01:00
Fabien Potencier
63ed84b75d minor #29337 [Cache] fix deps (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Cache] fix deps

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

Commits
-------

069693f1fd [Cache] fix deps
2018-11-26 19:45:02 +01:00
Nicolas Grekas
069693f1fd [Cache] fix deps 2018-11-26 19:33:39 +01:00
Fabien Potencier
b87acede97 updated CHANGELOG for 4.2.0-RC1 2018-11-26 17:12:03 +01:00
Fabien Potencier
9fba843a2a bumped Symfony version to 4.1.9 2018-11-26 16:00:55 +01:00
Fabien Potencier
231050f83a
Merge pull request #29335 from fabpot/release-4.1.8
released v4.1.8
2018-11-26 15:52:31 +01:00
Fabien Potencier
63201c518c updated VERSION for 4.1.8 2018-11-26 15:52:15 +01:00
Fabien Potencier
43cb7cfb23 updated CHANGELOG for 4.1.8 2018-11-26 15:52:06 +01:00
Fabien Potencier
acce087074 bumped Symfony version to 3.4.20 2018-11-26 15:50:31 +01:00
Fabien Potencier
a8ff5a5343
Merge pull request #29334 from fabpot/release-3.4.19
released v3.4.19
2018-11-26 15:07:44 +01:00
Fabien Potencier
ecb09280ef updated VERSION for 3.4.19 2018-11-26 15:04:48 +01:00
Fabien Potencier
70e05c643f updated CHANGELOG for 3.4.19 2018-11-26 15:04:35 +01:00
Fabien Potencier
c16d0d98fe Merge branch '3.4' into 4.1
* 3.4:
  [Console] Move back root exception to stack trace in verbose mode
2018-11-26 15:00:40 +01:00
Fabien Potencier
d6bbde5a36 bug #29318 [Console] Move back root exception to stack trace in verbose mode (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Move back root exception to stack trace in verbose mode

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

Commits
-------

63cd219a5c [Console] Move back root exception to stack trace in verbose mode
2018-11-26 14:57:20 +01:00
Robin Chalas
63cd219a5c [Console] Move back root exception to stack trace in verbose mode 2018-11-26 13:48:07 +01:00
Nicolas Grekas
721304eed4 Merge branch '4.1'
* 4.1:
  [PropertyAccess] make cache keys encoding bijective
2018-11-26 13:19:54 +01:00
Nicolas Grekas
97cca73de5 Merge branch '3.4' into 4.1
* 3.4:
  [PropertyAccess] make cache keys encoding bijective
2018-11-26 13:16:25 +01:00
Nicolas Grekas
1f59fa4d79 bug #29332 [PropertyAccess] make cache keys encoding bijective (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccess] make cache keys encoding bijective

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/29329#issuecomment-441585992
| License       | MIT
| Doc PR        | -

Commits
-------

4fe566bbc6 [PropertyAccess] make cache keys encoding bijective
2018-11-26 13:15:19 +01:00
Nicolas Grekas
4fe566bbc6 [PropertyAccess] make cache keys encoding bijective 2018-11-26 13:13:27 +01:00
Nicolas Grekas
124d07d878 Merge branch '4.1'
* 4.1:
  fix merge
2018-11-26 12:49:31 +01:00
Nicolas Grekas
4a717266c6 fix merge 2018-11-26 12:45:21 +01:00
Nicolas Grekas
2261e72896 Merge branch '4.1'
* 4.1: (23 commits)
  [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
  [PropertyAccessor] fix encoding of cache keys
  [WebProfiler] Detect empty file paths in file viewer
  fixed CS
  Changes for upcoming Travis' infra migration
  Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
  [MonologBridge] Return empty list for unknonwn requests
  [DomCrawler] exclude fields inside "template" tags
  Use XLIFF source rather than resname when there's no target
  [DoctrineBridge] catch errors while converting to db values in data collector
  [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider
  [EventDispatcher] Unwrap wrapped listeners internally
  [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
  Removed the return type phpdoc
  fix authorization checker variable name
  [Routing] Remove duplicate schemes and methods for invokable controllers
  Indentation error
  [HttpFoundation] Fix trailing space for mime-type with parameters
  [HttpFoundation] Fixed absolute Request URI with default port
  [Bridge/PhpUnit] fix the fix
  ...
2018-11-26 11:55:26 +01:00
Nicolas Grekas
9dc9d7e0b7 Merge branch '3.4' into 4.1
* 3.4:
  [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
  [PropertyAccessor] fix encoding of cache keys
  [WebProfiler] Detect empty file paths in file viewer
  fixed CS
  Changes for upcoming Travis' infra migration
  Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
  [DomCrawler] exclude fields inside "template" tags
  Use XLIFF source rather than resname when there's no target
  [DoctrineBridge] catch errors while converting to db values in data collector
  [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider
  [EventDispatcher] Unwrap wrapped listeners internally
  Indentation error
  [HttpFoundation] Fix trailing space for mime-type with parameters
  [HttpFoundation] Fixed absolute Request URI with default port
  properly parse backslashes in unquoted env vars
  Use intersection type when referring to ParentNodeDefinitionInterface
  [BrowserKit] fixed BC Break for HTTP_HOST header; implemented same behaviour for HTTPS server parameter
2018-11-26 11:26:29 +01:00
Nicolas Grekas
95ebc9f38f bug #29298 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher (nicolas-grekas)
This PR was merged into the 4.1 branch.

Discussion
----------

[Routing] fix trailing slash redirection when using RedirectableUrlMatcher

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

This is #29297 for 4.1

Commits
-------

6968000a3c [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
2018-11-26 11:24:14 +01:00
Nicolas Grekas
0878006e22 bug #29297 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] fix trailing slash redirection when using RedirectableUrlMatcher

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

This fixes #29287 by considering that the behavior of the dumped matcher is the correct one: lower priority routes never impact previous ones. I think it's what makes the most sense because that's what requires the most local knowledge to understand what's going on (ie that's the less surprising behavior).

Commits
-------

dc4c3f6927 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
2018-11-26 11:22:13 +01:00
Nicolas Grekas
11053c5e86 Merge branch '2.8' into 3.4
* 2.8:
  fixed CS
  Changes for upcoming Travis' infra migration
  Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
  [DomCrawler] exclude fields inside "template" tags
  Use XLIFF source rather than resname when there's no target
  [DoctrineBridge] catch errors while converting to db values in data collector
  [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider
  Indentation error
  [HttpFoundation] Fix trailing space for mime-type with parameters
  Use intersection type when referring to ParentNodeDefinitionInterface
  [BrowserKit] fixed BC Break for HTTP_HOST header; implemented same behaviour for HTTPS server parameter
2018-11-26 11:17:44 +01:00
Fabien Potencier
11fde69c4c bug #29313 [PropertyAccessor] fix encoding of cache keys (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccessor] fix encoding of cache keys

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

Commits
-------

4568a0c904 [PropertyAccessor] fix encoding of cache keys
2018-11-26 10:46:06 +01:00
Nicolas Grekas
e728edb7b8 bug #29328 [HttpKernel] handle anonymous classes when generating the dumped container class name (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[HttpKernel] handle anonymous classes when generating the dumped container class name

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

Commits
-------

ac84cb2fbe [HttpKernel] handle anonymous classes when generating the dumped container class name
2018-11-26 10:40:11 +01:00
Nicolas Grekas
7d99badff7 [Cache] fix typo 2018-11-26 10:38:19 +01:00
Fabien Potencier
316f96ea95 minor #28912 [Config] Use intersection type when referring to ParentNodeDefinitionInterface (thewilkybarkid)
This PR was merged into the 2.8 branch.

Discussion
----------

[Config] Use intersection type when referring to ParentNodeDefinitionInterface

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

Allows PHPStan to understand it correctly (refs https://github.com/libero/content-api-bundle/pull/2#discussion_r226237763).

PHPStorm 2018.3 will add support for it too, but to help older versions I've reversed the order (so `NodeDefinition` is recognised).

Commits
-------

e9cdabe570 Use intersection type when referring to ParentNodeDefinitionInterface
2018-11-26 10:38:12 +01:00
Fabien Potencier
7be8ca5079 bug #28917 [DoctrineBridge] catch errors while converting to db values in data collector (alekitto)
This PR was merged into the 2.8 branch.

Discussion
----------

[DoctrineBridge] catch errors while converting to db values in data collector

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

When the profiler is enabled and collecting doctrine queries data, if a query fails because of `ConversionException` or another error thrown while resolving parameters, the data collector is also throwing the same error.

This should fix this case. The tests for this case cannot be executed in 5.4 because Doctrine 2.5 fails with a fatal error in `DateType`.

Commits
-------

61c4531292 [DoctrineBridge] catch errors while converting to db values in data collector
2018-11-26 10:36:25 +01:00
Nicolas Grekas
ac84cb2fbe [HttpKernel] handle anonymous classes when generating the dumped container class name 2018-11-26 10:17:19 +01:00
Nicolas Grekas
dc4c3f6927 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher 2018-11-26 09:40:22 +01:00
Nicolas Grekas
4568a0c904 [PropertyAccessor] fix encoding of cache keys 2018-11-26 09:15:01 +01:00
Fabien Potencier
f747ea90a3 bug #29317 [WebProfiler] Detect non-file paths in file viewer (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfiler] Detect non-file paths in file viewer

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| 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 -->

We actually link directories sometimes :) now looks like:

![image](https://user-images.githubusercontent.com/1047696/48981263-7b2b4880-f0d3-11e8-9334-9e2f45d62c09.png)

Commits
-------

71aade3622 [WebProfiler] Detect empty file paths in file viewer
2018-11-26 08:39:17 +01:00
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