Commit Graph

36317 Commits

Author SHA1 Message Date
Nicolas Grekas
c8389f788d Merge branch '2.7' into 2.8
* 2.7:
  fix CI
2018-12-06 11:51:03 +00:00
Nicolas Grekas
9b10db2207 fix CI 2018-12-06 11:49:24 +00:00
Nicolas Grekas
3aaa5aba1b Merge branch '2.8' into 3.4
* 2.8:
  [Security\Http] detect bad redirect targets using backslashes
  [Form] Filter file uploads out of regular form types
  Fix CI
  minor #28258 [travis] fix composer.lock invalidation for deps=low (nicolas-grekas)
  [travis] fix composer.lock invalidation for PRs patching several components
  [travis] fix composer.lock invalidation for deps=low
  minor #28199 [travis][appveyor] use symfony/flex to accelerate builds (nicolas-grekas)
  [travis] ignore ordering when validating composer.lock files for deps=low
  minor #28146 [travis] cache composer.lock files for deps=low (nicolas-grekas)
  fix ci
  [travis] fix requiring mongodb/mongodb before composer up
  minor #28114 [travis] merge "same Symfony version" jobs in one (nicolas-grekas)
  [2.7] Make CI green
  updated VERSION for 2.7.49
  updated CHANGELOG for 2.7.49
  [HttpKernel] fix trusted headers management in HttpCache and InlineFragmentRenderer
  [HttpFoundation] Remove support for legacy and risky HTTP headers
  updated VERSION for 2.7.48
  update CONTRIBUTORS for 2.7.48
  updated CHANGELOG for 2.7.48
2018-12-06 11:25:03 +00:00
Nicolas Grekas
410ed830c5 Merge branch '2.7' into 2.8
* 2.7:
  [Security\Http] detect bad redirect targets using backslashes
  [Form] Filter file uploads out of regular form types
  Fix CI
  minor #28258 [travis] fix composer.lock invalidation for deps=low (nicolas-grekas)
  [travis] fix composer.lock invalidation for PRs patching several components
  [travis] fix composer.lock invalidation for deps=low
  minor #28199 [travis][appveyor] use symfony/flex to accelerate builds (nicolas-grekas)
  [travis] ignore ordering when validating composer.lock files for deps=low
  minor #28146 [travis] cache composer.lock files for deps=low (nicolas-grekas)
  fix ci
  [travis] fix requiring mongodb/mongodb before composer up
  minor #28114 [travis] merge "same Symfony version" jobs in one (nicolas-grekas)
  [2.7] Make CI green
  updated VERSION for 2.7.49
  updated CHANGELOG for 2.7.49
  [HttpKernel] fix trusted headers management in HttpCache and InlineFragmentRenderer
  [HttpFoundation] Remove support for legacy and risky HTTP headers
  updated VERSION for 2.7.48
  update CONTRIBUTORS for 2.7.48
  updated CHANGELOG for 2.7.48
2018-12-06 11:12:46 +00:00
Nicolas Grekas
f27dd4b5be security #cve-2018-19790 [Security\Http] detect bad redirect targets using backslashes (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security\Http] detect bad redirect targets using backslashes

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

Commits
-------

99a0cec0a6 [Security\Http] detect bad redirect targets using backslashes
2018-12-06 11:09:35 +00:00
Nicolas Grekas
b65e6f1a47 security #cve-2018-19789 [Form] Filter file uploads out of regular form types (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Filter file uploads out of regular form types

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

This PR filters uploaded files out of the data processed by any form type except `FileType`.

Commits
-------

205a44ea7d [Form] Filter file uploads out of regular form types
2018-12-06 11:08:15 +00:00
Nicolas Grekas
922e13c2b2 bug #29436 [Cache] Fixed Memcached adapter doClear()to call flush() (raitocz)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #29436).

Discussion
----------

[Cache] Fixed Memcached adapter doClear()to call flush()

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29435
| License       | MIT
| Doc PR        | symfony/symfony-docs

MemcachedTrait now calls Memcached::flush via its client instead of just returning false.

Commits
-------

447baacbad [Cache] Fixed Memcached adapter doClear()to call flush()
2018-12-06 10:55:16 +00:00
Raito Akehanareru
447baacbad [Cache] Fixed Memcached adapter doClear()to call flush() 2018-12-06 10:54:02 +00:00
Nicolas Grekas
317a2f9787 bug #29441 [Routing] ignore trailing slash for non-GET requests (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] ignore trailing slash for non-GET requests

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

Another test case provided by @peterrehm in the linked issue - the dumped matcher already passes this test - but the non-dumped one doesn't (neither does the dumped one in 4.1 - I'll fix while merging up)

Commits
-------

7521af7ea0 [Routing] ignore trailing slash for non-GET requests
2018-12-03 22:36:45 +01:00
Nicolas Grekas
7521af7ea0 [Routing] ignore trailing slash for non-GET requests 2018-12-03 14:20:34 +01:00
Jérôme Vasseur
5196dac7a8 Fix HeaderBag::get phpdoc
When setting $first to false, the default value is wrapped into an array
meaning you need to pass a string as the default value instead of an
array of strings.
2018-12-03 11:46:14 +01:00
Nicolas Grekas
0ca1614aa2 bug #29432 [DI] dont inline when lazy edges are found (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] dont inline when lazy edges are found

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

I'm not able to create a reproducer to hit this situation, but on 4.2, this check makes the difference.
I'm merging to fix the issue as that's still the proper fix.

Commits
-------

484c49edb3 [DI] dont inline when lazy edges are found
2018-12-02 16:55:40 +01:00
Nicolas Grekas
484c49edb3 [DI] dont inline when lazy edges are found 2018-12-02 16:50:25 +01:00
Nicolas Grekas
c2d2f5bd16 bug #29413 [Serializer] fixed DateTimeNormalizer to maintain microseconds when a different timezone required (rvitaliy)
This PR was squashed before being merged into the 3.4 branch (closes #29413).

Discussion
----------

[Serializer] fixed DateTimeNormalizer to maintain microseconds when a different timezone required

| Q             | A
| ------------- | ---
| Branch?       | 3.4 up to 4.2 for bug fixes
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #
| License       | MIT
| Doc PR        | none

fixed `DateTimeNormalizer::normalizer()` when `$object` is mutated internally to change timezone we lost microseconds of origina `$object`

Commits
-------

2bf8a1cae6 [Serializer] fixed DateTimeNormalizer to maintain microseconds when a different timezone required
2018-12-02 14:20:28 +01:00
Vitaliy Ryaboy
2bf8a1cae6 [Serializer] fixed DateTimeNormalizer to maintain microseconds when a different timezone required 2018-12-02 14:20:19 +01:00
Nicolas Grekas
17874f6ef2 minor #29415 [WebProfilerBundle] Split form field heading (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Split form field heading

| 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

By default the data class 9/10 breaks inline, making it harder to read. This fixes it.

Before

![image](https://user-images.githubusercontent.com/1047696/49332204-02cbf800-f5a9-11e8-8565-f0f084fa76dd.png)

After

![image](https://user-images.githubusercontent.com/1047696/49332202-f47ddc00-f5a8-11e8-8a97-80f002c9bfc2.png)

Commits
-------

3855d5af01 [WebProfilerBundle] Split form field heading
2018-12-02 14:17:24 +01:00
Nicolas Grekas
46eee7e1fa bug #29424 [Routing] fix taking verb into account when redirecting (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] fix taking verb into account when redirecting

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

Commits
-------

6b65fac2cf [Routing] fix taking verb into account when redirecting
2018-12-02 14:14:14 +01:00
Nicolas Grekas
6b65fac2cf [Routing] fix taking verb into account when redirecting 2018-12-02 14:02:40 +01:00
Nicolas Grekas
6b38491fc1 bug #29414 [DI] Fix dumping expressions accessing single-use private services (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix dumping expressions accessing single-use private services

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

Introduced in #27268, see fixed ticket

Commits
-------

d1e84aa137 [DI] Fix dumping expressions accessing single-use private services
2018-12-02 10:36:23 +01:00
Robin Chalas
d1e84aa137 [DI] Fix dumping expressions accessing single-use private services 2018-12-02 10:33:42 +01:00
Roland Franssen
3855d5af01 [WebProfilerBundle] Split form field heading 2018-12-01 20:42:50 +01:00
Nicolas Grekas
51d78b5eca fix cs 2018-12-01 09:50:52 +01:00
Nicolas Grekas
705445db5e minor #29371 Update HttpKernel.php (shreypuranik)
This PR was merged into the 3.4 branch.

Discussion
----------

Update HttpKernel.php

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

This update adds a docblock to varToString method in HttpKernel Class

Commits
-------

3324e2a2a6 Update HttpKernel.php
2018-12-01 09:22:50 +01:00
Nicolas Grekas
1905cde840 bug #29375 [Validator] Allow ConstraintViolation::__toString() to expose codes that are not null or emtpy strings (phansys)
This PR was squashed before being merged into the 3.4 branch (closes #29375).

Discussion
----------

[Validator] Allow `ConstraintViolation::__toString()` to expose codes that are not null or emtpy strings

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

Allow to expose `0` or `"0"` validation codes.

Commits
-------

7bb0fb5cc3 [Validator] Allow `ConstraintViolation::__toString()` to expose codes that are not null or emtpy strings
2018-12-01 09:21:59 +01:00
Javier Spagnoletti
7bb0fb5cc3 [Validator] Allow ConstraintViolation::__toString() to expose codes that are not null or emtpy strings 2018-12-01 09:21:51 +01:00
Nicolas Grekas
fb4b75db1b bug #29376 [EventDispatcher] Fix eventListener wrapper loop in TraceableEventDispatcher (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] Fix eventListener wrapper loop in TraceableEventDispatcher

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

The `TracableEventDispatcher` wrap decorate (in the method `preProcess`) each listeners in a `WrappedListener` before delegating the dispatch to the real dispatcher, then remove the wrapper (in the method `postProcess`.

But, if a listener triggers an exception, the `postProcess` method is not called, and the wrapper in not removed.
If the same event is triggered a second time, the listeners will be decorated twice, etc, etc..
This is an issue with php-pm where the same event is triggered hundred of times within the same process.

This PR moves the `postProcess` in a finally block in order to be called even if an exception in thrown.

Commits
-------

3830a9e376 Fix wrapped loop of event listener
2018-12-01 09:20:40 +01:00
Nicolas Grekas
5d0c93b214 minor #29396 fix type for $value in DocBlock (rudidude86)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #29396).

Discussion
----------

fix type for $value in DocBlock

`$value` is supposed to be a string, not an int, according to [`NumberFormatter::setTextAttribute()` documentation](https://secure.php.net/manual/en/numberformatter.settextattribute.php)

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4 up to 4.2 for bug fixes <!-- see below -->
| Bug fix?      | yes/no
| New feature?  | yes/no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes/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.
-->

Commits
-------

ff2431a512 fix type for $value in DocBlock
2018-12-01 09:05:47 +01:00
Ryan Rud
ff2431a512 fix type for $value in DocBlock
`$value` is supposed to be a string, not an int, according to [`NumberFormatter::setTextAttribute()` documentation](https://secure.php.net/manual/en/numberformatter.settextattribute.php)
2018-12-01 09:05:41 +01:00
Jérémy Derussé
3830a9e376
Fix wrapped loop of event listener 2018-11-30 19:07:24 +01:00
Nicolas Grekas
6c3c47e550 bug #29343 [Form] Handle all case variants of "nan" when parsing a number (mwhudson, xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Handle all case variants of "nan" when parsing a number

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

NumberToLocalizedStringTransformer::reverseTransform now special cases all case variants of "NaN", not just "NaN" specifically to insulate itself from changing behaviour in ICU.

Commits
-------

85af682834 add a test case
d903dcbac5 [Form] Handle all case variants of "nan" when parsing a number
2018-11-29 17:53:21 +01:00
Nicolas Grekas
f25575ecee minor #29370 typo (OskarStark)
This PR was merged into the 3.4 branch.

Discussion
----------

typo

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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        |

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

977a007e3a typo
2018-11-29 17:50:50 +01:00
Christian Flothmann
99a0cec0a6 [Security\Http] detect bad redirect targets using backslashes 2018-11-29 16:25:45 +01:00
Nicolas Grekas
205a44ea7d [Form] Filter file uploads out of regular form types 2018-11-29 16:24:44 +01:00
Nicolas Grekas
cb8302cb76 Fix CI 2018-11-29 16:06:32 +01:00
Nicolas Grekas
54f285d8df Merge branch '2.8' into 3.4
* 2.8:
  updated VERSION for 2.8.48
  update CONTRIBUTORS for 2.8.48
  updated CHANGELOG for 2.8.48
2018-11-29 13:30:12 +01:00
Nicolas Grekas
35df3b5d6d bug #29355 [PropertyAccess] calculate cache keys for property setters depending on the value (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccess] calculate cache keys for property setters depending on the value

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

Commits
-------

fa234378ff calculate cache keys for property setters depending on the value
2018-11-29 13:24:43 +01:00
Christian Flothmann
fa234378ff calculate cache keys for property setters depending on the value 2018-11-29 13:09:28 +01:00
Shrey Puranik
3324e2a2a6
Update HttpKernel.php
Adding docblock to varToString method in HttpKernel Class
2018-11-29 08:43:48 +00:00
Oskar Stark
977a007e3a
typo 2018-11-29 09:33:43 +01:00
Nicolas Grekas
27c17be552 bug #29369 [DI] fix combinatorial explosion when analyzing the service graph (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix combinatorial explosion when analyzing the service graph

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

and a few minor things found meanwhile.

Commits
-------

0d0be12e07 [DI] fix combinatorial explosion when analyzing the service graph
2018-11-28 19:21:41 +01:00
Nicolas Grekas
0d0be12e07 [DI] fix combinatorial explosion when analyzing the service graph 2018-11-28 19:09:44 +01:00
Christian Flothmann
85af682834 add a test case 2018-11-28 11:23:21 +01:00
Michael Hudson-Doyle
d903dcbac5 [Form] Handle all case variants of "nan" when parsing a number
Fixes #29321
2018-11-28 11:23:21 +01:00
Nicolas Grekas
d129e197fe bug #29349 [Debug] workaround opcache bug mutating "$this" !?! (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] workaround opcache bug mutating "$this" !?!

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

This makes absolutely no sense but works around an OPcache bug.

Commits
-------

e2b4c8d3c9 [Debug] workaround opcache bug mutating "$this" !?!
2018-11-27 13:45:32 +01:00
Nicolas Grekas
e2b4c8d3c9 [Debug] workaround opcache bug mutating "$this" !?! 2018-11-27 13:43:10 +01:00
Nicolas Grekas
53f28bf34c Update PR template 2018-11-27 08:29:59 +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