Commit Graph

27142 Commits

Author SHA1 Message Date
Grégoire Pineau
8f245493f4 [Debug] Better error handling
1. Send the raw exception in the log context instead of custom formatting
2. Add config option to log in Symfony all PHP errors
2016-08-17 17:20:26 +02:00
Fabien Potencier
cf307507ee minor #19624 [Bridge/Twig] Simplify dumping snippet (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Bridge/Twig] Simplify dumping snippet

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

Commits
-------

ef7122e [Bridge/Twig] Simplify dumping snippet
2016-08-16 10:16:30 -07:00
Fabien Potencier
3bf89b628e bug #19640 [Cache] Minor fixes after merging 3.1 (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Cache] Minor fixes after merging 3.1

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

0f9e54a [Cache] Minor fixes after merging 3.1
2016-08-16 10:14:58 -07:00
Nicolas Grekas
0f9e54a590 [Cache] Minor fixes after merging 3.1 2016-08-16 18:59:36 +02:00
Nicolas Grekas
ef7122eb4f [Bridge/Twig] Simplify dumping snippet 2016-08-16 18:19:38 +02:00
Nicolas Grekas
77e0161870 Merge branch '3.1'
* 3.1:
  [Routing] Add missing options in docblock
  [VarDumper] Fix dumping continuations
  [PropertyInfo] Fix an error in PropertyInfoCacheExtractor
  [HttpFoundation] fixed Request::getContent() reusage bug
  [Form] Skip CSRF validation on form when POST max size is exceeded
  Use try-finally where it possible
  [DependencyInjection] ContainerBuilder: Remove obsolete definitions
  Enhance the phpDoc return types so IDEs can handle the configuration tree.
  fixes
  Remove 3.0 from branch suggestions for fixes in PR template
  [Process] Strengthen Windows pipe files opening (again...)
  [Cache] Handle unserialize() failures gracefully
  Fix #19531 [Form] DateType fails parsing when midnight is not a valid time
2016-08-16 18:09:30 +02:00
Fabien Potencier
5ace4fd24e feature #19552 [HttpFoundation] Add named constructor on JsonResponse (tyx)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[HttpFoundation] Add named constructor on JsonResponse

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

To make easier construction with raw json. It is a simple addition but having something like :
```php
return new JsonResponse($content, Response::HTTP_OK, [], true);
```

and
```php
return new JsonResponse($content, Response::HTTP_OK, []);
```

is not very obvious to get the difference without going to read the JsonResponse constructor.

Commits
-------

6d5a65d Add named constructor on JsonResponse
2016-08-16 08:48:13 -07:00
Fabien Potencier
d7f8ca72e8 Merge branch '2.8' into 3.1
* 2.8:
  [Routing] Add missing options in docblock
  [VarDumper] Fix dumping continuations
  [HttpFoundation] fixed Request::getContent() reusage bug
  [Form] Skip CSRF validation on form when POST max size is exceeded
  Enhance the phpDoc return types so IDEs can handle the configuration tree.
  fixes
  Remove 3.0 from branch suggestions for fixes in PR template
  [Process] Strengthen Windows pipe files opening (again...)
  Fix #19531 [Form] DateType fails parsing when midnight is not a valid time
2016-08-16 07:58:24 -07:00
Fabien Potencier
609ee2df0a Merge branch '2.7' into 2.8
* 2.7:
  [Routing] Add missing options in docblock
  [VarDumper] Fix dumping continuations
  [HttpFoundation] fixed Request::getContent() reusage bug
  [Form] Skip CSRF validation on form when POST max size is exceeded
  Enhance the phpDoc return types so IDEs can handle the configuration tree.
  fixes
  Remove 3.0 from branch suggestions for fixes in PR template
  [Process] Strengthen Windows pipe files opening (again...)
  Fix #19531 [Form] DateType fails parsing when midnight is not a valid time
2016-08-16 07:56:08 -07:00
Fabien Potencier
adb7033fc2 bug #19623 [VarDumper] Fix dumping continuations (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix dumping continuations

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

Dumping twice on the same destination shouldn't dump headers again.

Commits
-------

da96719 [VarDumper] Fix dumping continuations
2016-08-16 07:52:15 -07:00
Fabien Potencier
f56ba630db feature #19630 [VarDumper] Enhance dumping __PHP_Incomplete_Class objects (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Enhance dumping __PHP_Incomplete_Class objects

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

Before:
```
__PHP_Incomplete_Class {
  +"__PHP_Incomplete_Class_Name": "Foo\Buzz"
}
```

after:
```
__PHP_Incomplete_Class(Foo\Buzz) {}
```

The new output is less confusing: no dynamic property exists on incomplete class objects, yet the `+` prefix suggests that.

Commits
-------

ee20d15 [VarDumper] Enhance dumping __PHP_Incomplete_Class objects
2016-08-16 07:48:30 -07:00
Fabien Potencier
e34426e105 minor #19617 Use try-finally where it possible (Koc)
This PR was merged into the 3.1 branch.

Discussion
----------

Use try-finally where it possible

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

Just a minior refactoring for using PHP 5.5 feature.

Commits
-------

747ddf6 Use try-finally where it possible
2016-08-16 07:44:38 -07:00
Fabien Potencier
d62ac4d809 minor #19628 [Routing] Add missing options in docblock (c960657)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Add missing options in docblock

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

Courtesy of @c960657 in #19562

Commits
-------

f45da32 [Routing] Add missing options in docblock
2016-08-16 07:32:36 -07:00
Nicolas Grekas
ee20d15b50 [VarDumper] Enhance dumping __PHP_Incomplete_Class objects 2016-08-16 14:42:25 +02:00
Christian Schmidt
f45da32488 [Routing] Add missing options in docblock 2016-08-16 12:55:04 +02:00
Nicolas Grekas
da96719b94 [VarDumper] Fix dumping continuations 2016-08-16 10:33:51 +02:00
Fabien Potencier
ac528c7cff bug #19437 [PropertyInfo] Fix an error in PropertyInfoCacheExtractor (Ener-Getick)
This PR was squashed before being merged into the 3.1 branch (closes #19437).

Discussion
----------

[PropertyInfo] Fix an error in PropertyInfoCacheExtractor

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

An argument was forgotten in the ``PropertyInfoCacheExtractor`` class leading to exceptions such as
```
PHP Warning:  ucfirst() expects parameter 1 to be string, array given in /home/guilhem/github/ast-test/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php on line 318
```
and making it unusable.

ping @dunglas

Commits
-------

d19b151 [PropertyInfo] Fix an error in PropertyInfoCacheExtractor
2016-08-15 16:12:25 -07:00
Guilhem N
d19b1515a3 [PropertyInfo] Fix an error in PropertyInfoCacheExtractor 2016-08-15 16:12:15 -07:00
Fabien Potencier
2345ec1210 bug #19549 [HttpFoundation] fixed Request::getContent() reusage bug (1ma)
This PR was squashed before being merged into the 2.7 branch (closes #19549).

Discussion
----------

[HttpFoundation] fixed Request::getContent() reusage bug

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

After calling ```Request::getContent(true)```, subsequent calls to the
same instance method (withouth the ```$asResource``` flag) always returned
```false``` instead of the request body as a plain string.

A unit test already existed to guard against this behaviour (the 'Resource then fetch' case) but it
yielded a false positive because it was comparing ```''``` to ```false``` using
PHPUnit's ```assertEquals``` method instead of ```assertSame```.

For completeness sake I also added the missing usage permutations in
the data provider, which already worked OK.

Commits
-------

c42ac66 [HttpFoundation] fixed Request::getContent() reusage bug
2016-08-15 16:08:50 -07:00
Marcel Hernandez
c42ac660cb [HttpFoundation] fixed Request::getContent() reusage bug 2016-08-15 16:08:46 -07:00
Fabien Potencier
9784301b1f minor #19608 [DependencyInjection] ContainerBuilder: Remove obsolete definitions (ogizanagi)
This PR was merged into the 3.1 branch.

Discussion
----------

[DependencyInjection] ContainerBuilder: Remove obsolete definitions

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

IIUC, [the obsolete definitions thing was tied to scoped & sync services](https://github.com/symfony/symfony/pull/7007).
Thus, this code [is not meant to be used since 3.0 and can be removed](https://github.com/symfony/symfony/pull/13289).

However, it may be considered as a BC break and would require introducing a new deprecation instead, because the current code allows to set a service on a frozen container if it has an obsolete synthetic definition...which is weird, isn't it ? (I doubt this feature was explicitly intended to allow setting a synthetic service more than once, and it wasn't before sync services introduction)

I suggest this as a patch for 3.1, under the pretext of forgotten code tied to a previous deprecation & feature removal, but let me know if it should be considered differently.

Commits
-------

daa7d00 [DependencyInjection] ContainerBuilder: Remove obsolete definitions
2016-08-15 16:00:31 -07:00
Fabien Potencier
1a059e54cf bug #19373 [Form] Skip CSRF validation on form when POST max size is exceeded (jameshalsall)
This PR was squashed before being merged into the 2.7 branch (closes #19373).

Discussion
----------

[Form] Skip CSRF validation on form when POST max size is exceeded

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

In #19140 the CSRF validation listener was not aware that the POST max size had exceeded, and was adding a form error message that wasn't relevant to the actual error.

This introduces the `ServerParams` utility class into the `CsrfValidationListener` and checks that the POST max size has not been exceeded. If it has then it won't bother trying to validate the CSRF token.

My main concern with this change is that it opens up an attack vector around tokens, but I've encapsulated the request size validation in a single method in `ServerParams` now so that the request handlers are using the same logic.

Commits
-------

289531f [Form] Skip CSRF validation on form when POST max size is exceeded
2016-08-15 15:45:28 -07:00
James Halsall
289531f0d0 [Form] Skip CSRF validation on form when POST max size is exceeded 2016-08-15 15:45:25 -07:00
Konstantin.Myakshin
747ddf6b0b Use try-finally where it possible 2016-08-15 16:15:28 +03:00
Maxime Steinhausser
daa7d005ef [DependencyInjection] ContainerBuilder: Remove obsolete definitions 2016-08-14 11:06:18 +02:00
Fabien Potencier
5cc9ed2048 feature #19515 [Cache] Drop TaggedCacheItemInterface (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Cache] Drop TaggedCacheItemInterface

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

Introducing this interface was a mistake, we should drop it: the CacheItem class is final, and it can be instantiated only through a cache adapter. Which means there is no way to reuse this interface in any meaningful way as far as extensibility/interoperability is concerned.

Commits
-------

624890b [Cache] Drop TaggedCacheItemInterface
2016-08-13 11:51:17 -07:00
Fabien Potencier
f208ac8a69 minor #19538 [Yaml] update changelog and upgrade files (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Yaml] update changelog and upgrade files

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

Commits
-------

3cd2932 [Yaml] update changelog and upgrade files
2016-08-13 11:49:42 -07:00
Fabien Potencier
b405df0925 bug #19541 Fix #19531 [Form] DateType fails parsing when midnight is not a valid time (mbeccati)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix #19531 [Form] DateType fails parsing when midnight is not a valid time

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

Commits
-------

c951bb6 Fix #19531 [Form] DateType fails parsing when midnight is not a valid time
2016-08-13 11:47:46 -07:00
Fabien Potencier
4d3411bd6d minor #19565 Make IDEs handle the configuration tree (leofeyer)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #19565).

Discussion
----------

Make IDEs handle the configuration tree

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

When defining a configuration tree, my IDE (PhpStorm) gives me a lot of `Method 'scalarNode' not found in null|\Symfony\Component\Config\Definition\Builder\NodeParentInterface` warnings. This can easily be fixed by adding more return types to the phpDoc comments of the `end()` methods of the `NodeBuilder` and `NodeDefinition` classes.

Commits
-------

4e8bfc6 Enhance the phpDoc return types so IDEs can handle the configuration tree.
2016-08-13 11:45:48 -07:00
Leo Feyer
4e8bfc65af Enhance the phpDoc return types so IDEs can handle the configuration tree. 2016-08-13 11:45:47 -07:00
Fabien Potencier
ab1c76ca6b minor #19563 [Validator] Dutch translation fixes (ro0NL)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #19563).

Discussion
----------

[Validator] Dutch translation fixes

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

Some dutch translation fixes. I probably can rebase this against 2.*, but maybe someone wants to comment first or spots any other spelling errors.

Ignore fabbot.io :)

Commits
-------

359204f fixes
2016-08-13 11:43:48 -07:00
Roland Franssen
359204f056 fixes 2016-08-13 11:43:48 -07:00
Fabien Potencier
74b856166f bug #19567 [Cache] Handle unserialize() failures gracefully (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Handle unserialize() failures gracefully

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

This makes fetching cached items more resilient: `__PHP_Incomplete_Class` "objects" and other errors triggered by unserialize should be turned to cache misses.

Commits
-------

47db638 [Cache] Handle unserialize() failures gracefully
2016-08-13 11:41:51 -07:00
Fabien Potencier
6f10550574 bug #19579 [Process] Strengthen Windows pipe files opening (again...) (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Strengthen Windows pipe files opening (again...)

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

A nightmare...
See https://ci.appveyor.com/project/fabpot/symfony/build/1.0.11427#L965

Commits
-------

a7a2d16 [Process] Strengthen Windows pipe files opening (again...)
2016-08-13 11:38:39 -07:00
Fabien Potencier
7022f8c434 minor #19602 [Workflow] Updated link to the documentation (Nyholm)
This PR was squashed before being merged into the 3.2-dev branch (closes #19602).

Discussion
----------

[Workflow] Updated link to the documentation

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

The link to the docs was broken because of the big documentation restructure a couple of weeks back.

Commits
-------

d96e861 [Workflow] Updated link to the documentation
2016-08-13 11:35:55 -07:00
Tobias Nyholm
d96e861bc7 [Workflow] Updated link to the documentation 2016-08-13 11:35:54 -07:00
Fabien Potencier
5d467ef59f minor #19610 Remove 3.0 from branch suggestions for fixes in PR template (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

Remove 3.0 from branch suggestions for fixes in PR template

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

Appart from security fixes, the 3.0.9 patch release was the last one for the 3.0 branch.
I'd suggest not proposing anymore to submit fixes on this branch.

Commits
-------

3265932 Remove 3.0 from branch suggestions for fixes in PR template
2016-08-13 11:33:11 -07:00
Maxime Steinhausser
3265932cc7 Remove 3.0 from branch suggestions for fixes in PR template 2016-08-13 20:12:16 +02:00
Nicolas Grekas
a7a2d16511 [Process] Strengthen Windows pipe files opening (again...) 2016-08-11 08:52:50 +02:00
Nicolas Grekas
47db638fa1 [Cache] Handle unserialize() failures gracefully 2016-08-10 19:24:03 +02:00
Nicolas Grekas
904279e142 Merge branch '3.1'
* 3.1:
  [appveyor] Fix cache handling
2016-08-10 13:10:50 +02:00
Nicolas Grekas
8e3967dd12 Merge branch '2.8' into 3.1
* 2.8:
  [appveyor] Fix cache handling
2016-08-10 13:09:50 +02:00
Nicolas Grekas
4009b5e54d Merge branch '2.7' into 2.8
* 2.7:
  [appveyor] Fix cache handling
2016-08-10 13:08:29 +02:00
Nicolas Grekas
f8764736bd minor #19587 [appveyor] Fix cache handling (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[appveyor] Fix cache handling

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

I noticed that the cache for the c:\php dir was almost always skipped. After looking more carefully at appveyor's doc, there is only one cache for all branches/PRs.
Which means we can't have variations for cached items in the same way we have on travis.
Thus, we can only cache things that are the same across all branches. Namely our phpunit wrapper and composer.phar.

Commits
-------

fb828d7 [appveyor] Fix cache handling
2016-08-10 13:07:10 +02:00
Nicolas Grekas
fb828d7796 [appveyor] Fix cache handling 2016-08-10 10:30:49 +02:00
Nicolas Grekas
deb527d2dd Merge branch '3.1'
* 3.1:
  [travis] fix after box updates
  Console: Fix indentation of Help: section of txt usage help
  [Intl] Update ICU data to 57.1
  [Config] Improved test
  Added class existence check if is_subclass_of() fails in compiler passes
2016-08-10 09:06:11 +02:00
Nicolas Grekas
0416b8ab02 Merge branch '2.8' into 3.1
* 2.8:
  [travis] fix after box updates
  Console: Fix indentation of Help: section of txt usage help
  [Intl] Update ICU data to 57.1
  [Config] Improved test
  Added class existence check if is_subclass_of() fails in compiler passes
2016-08-10 08:57:07 +02:00
Nicolas Grekas
b974c20394 Merge branch '2.7' into 2.8
* 2.7:
  [travis] fix after box updates
  Console: Fix indentation of Help: section of txt usage help
  [Intl] Update ICU data to 57.1
  [Config] Improved test
  Added class existence check if is_subclass_of() fails in compiler passes
2016-08-10 08:52:43 +02:00
Nicolas Grekas
4d1be15f87 minor #19585 [travis] fix after box updates (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[travis] fix after box updates

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

Commits
-------

aeb3fa3 [travis] fix after box updates
2016-08-10 08:52:27 +02:00
Nicolas Grekas
aeb3fa3ce1 [travis] fix after box updates 2016-08-10 08:41:52 +02:00