Commit Graph

27192 Commits

Author SHA1 Message Date
Nicolas Grekas
703db1e3b5 Merge branch '3.1'
* 3.1:
  [travis] Use 7.0 until 7.1 is fixed
  [DIC] Fix service autowiring inheritance
  [Serializer] Fix denormalization of arrays
  [SecurityBundle] Add missing deprecation notice for form_login.intention
  Verify explicitly that the request IP is a valid IPv4 address
  [WebProfilerBundle] replaces tabs characters by spaces.
2016-08-22 14:11:39 +02:00
Nicolas Grekas
298a680ea0 Merge branch '2.8' into 3.1
* 2.8:
  [travis] Use 7.0 until 7.1 is fixed
  [DIC] Fix service autowiring inheritance
  [SecurityBundle] Add missing deprecation notice for form_login.intention
  Verify explicitly that the request IP is a valid IPv4 address
2016-08-22 14:11:19 +02:00
Nicolas Grekas
909649ff5f Merge branch '2.7' into 2.8
* 2.7:
  [travis] Use 7.0 until 7.1 is fixed
  Verify explicitly that the request IP is a valid IPv4 address
2016-08-22 14:09:58 +02:00
Nicolas Grekas
386e5e78b4 minor #19700 [travis] Use PHP 7.0 until 7.1 is fixed (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[travis] Use PHP 7.0  until 7.1 is fixed

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Tests pass?   | let's see
| License       | MIT

Commits
-------

107a9e5 [travis] Use 7.0 until 7.1 is fixed
2016-08-22 13:52:33 +02:00
Nicolas Grekas
107a9e50e3 [travis] Use 7.0 until 7.1 is fixed 2016-08-22 13:42:47 +02:00
Fabien Potencier
94078a09ac minor #19676 [Bridge] [Twig] replaces tabs by spaces in Twig form themes templates. (hhamon)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Bridge] [Twig] replaces tabs by spaces in Twig form themes templates.

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

Commits
-------

d88f2a4 [Bridge] [Twig] replaces tabs by spaces in Twig form themes templates.
2016-08-20 08:15:38 -07:00
Hugo Hamon
d88f2a483f [Bridge] [Twig] replaces tabs by spaces in Twig form themes templates. 2016-08-20 11:50:01 +02:00
Fabien Potencier
5603bffdd9 feature #19519 [Cache] Add PDO + Doctrine DBAL adapter (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Cache] Add PDO + Doctrine DBAL adapter

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/6858

This PR adds a PDO adapter for our PSR-6 cache items. The implementation heavily borrows from PdoSessionHandler.

Commits
-------

82a0de2 [Cache] Add PDO + Doctrine DBAL adapter
2016-08-19 09:48:56 -07:00
Fabien Potencier
640c6208ef feature #19672 [VarDumper] Allow dumping subparts of cloned Data structures (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Allow dumping subparts of cloned Data structures

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| License       | MIT
| Doc PR     | https://github.com/symfony/symfony-docs/pull/6891

ping @wouterj: with this, we'll be able to dump only the trace for deprecations in #19614 instead of being forced to dump the full exception right now. See test case.
We'd do `{{ profiler_dump(log.context.seek('trace')) }}` in `logger.html.twig`.

Commits
-------

8f2f440 [VarDumper] Allow dumping subparts of cloned Data structures
2016-08-19 09:43:43 -07:00
Fabien Potencier
fc483cf432 bug #19643 [DependencyInjection] Fix service autowiring inheritance (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] Fix service autowiring inheritance

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

This makes services inherit the `autowire` attribute from their parent and fix the ability to override it from the child.

Fixed cases:

- Simple inheritance
```yaml
parent:
    class: Foo
    abstract: true
    autowire: true

child:
    class: Foo
```

- Set in the child (only)
```yaml
parent:
    class: Foo
    abstract: true

child:
    class: Foo
    autowire: true
```

- Set in the parent, changed in the child
```yaml
parent:
    class: Foo
    abstract: true
    autowire: true

child:
    class: Foo
    autowire: false
```

Commits
-------

fb95bdc [DIC] Fix service autowiring inheritance
2016-08-19 08:59:07 -07:00
Robin Chalas
fb95bdc965 [DIC] Fix service autowiring inheritance
Update Changelog
2016-08-19 17:56:42 +02:00
Fabien Potencier
3ab6d4ee44 bug #19649 [Serializer] Fix denormalization of arrays (dunglas)
This PR was squashed before being merged into the 3.1 branch (closes #19649).

Discussion
----------

[Serializer] Fix denormalization of arrays

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

ping @hensoko @theofidry

Commits
-------

99c582b [Serializer] Fix denormalization of arrays
2016-08-19 08:12:53 -07:00
Kévin Dunglas
99c582b432 [Serializer] Fix denormalization of arrays 2016-08-19 08:12:52 -07:00
Fabien Potencier
fad374e62a bug #19667 [SecurityBundle] Add missing deprecation notice for form_login.intention (ro0NL)
This PR was squashed before being merged into the 2.8 branch (closes #19667).

Discussion
----------

[SecurityBundle] Add missing deprecation notice for form_login.intention

| Q             | A
| ------------- | ---
| Branch?       |  2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #19664, #19661, #19652
| License       | MIT
| Doc PR        | -
By the grace of @chalasr

ping @fabpot

Commits
-------

2a7bbd1 [SecurityBundle] Add missing deprecation notice for form_login.intention
2016-08-19 08:06:18 -07:00
Roland Franssen
2a7bbd124b [SecurityBundle] Add missing deprecation notice for form_login.intention 2016-08-19 08:05:57 -07:00
Fabien Potencier
7b383a9788 bug #19666 Verify explicitly that the request IP is a valid IPv4 address (nesk)
This PR was squashed before being merged into the 2.7 branch (closes #19666).

Discussion
----------

Verify explicitly that the request IP is a valid IPv4 address

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

Take the following base code (the array is based on [CloudFlare IP Ranges](https://www.cloudflare.com/ips/)):

```php
use Symfony\Component\HttpFoundation\IpUtils;

$ips = [
   "103.21.244.0/22",
   "103.22.200.0/22",
   "103.31.4.0/22",
   "104.16.0.0/12",
   "108.162.192.0/18",
   "131.0.72.0/22",
   "141.101.64.0/18",
   "162.158.0.0/15",
   "172.64.0.0/13",
   "173.245.48.0/20",
   "188.114.96.0/20",
   "190.93.240.0/20",
   "197.234.240.0/22",
   "198.41.128.0/17",
   "199.27.128.0/21",
   "2400:cb00::/32",
   "2405:8100::/32",
   "2405:b500::/32",
   "2606:4700::/32",
   "2803:f800::/32",
   "2c0f:f248::/32",
   "2a06:98c0::/29",
];
```

Before this PR, the following code would have returned `true` instead of the expected `false` value:

```php
IpUtils::checkIp('blablabla', $ips);
```

This due to the `ip2long` function returning `false` for an invalid IP address, thus returning `"00000000000000000000000000000000"` with the following code:

```php
sprintf('%032b', ip2long('blablabla'));
```

To fix this I simply check if the `$requestIp` variable contains a valid IP address.

Commits
-------

17e418c Verify explicitly that the request IP is a valid IPv4 address
2016-08-19 08:01:17 -07:00
Johann Pardanaud
17e418caf0 Verify explicitly that the request IP is a valid IPv4 address 2016-08-19 08:01:16 -07:00
Fabien Potencier
9c52f49bc6 minor #19669 fixed 3.2 UPGRADE notes for Yaml (eXtreme)
This PR was merged into the 3.2-dev branch.

Discussion
----------

fixed 3.2 UPGRADE notes for Yaml

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Tests pass?   | yes
| License       | MIT

Noticed that during browsing upgrade notes, probably caused by some git merging stuff messing up with lines.

Commits
-------

37ead22 fixed 3.2 UPGRADE notes for Yaml
2016-08-19 07:53:12 -07:00
Christophe Coevoet
19da52a433 minor #19675 [WebProfilerBundle] replaces tabs characters by spaces. (hhamon)
This PR was merged into the 3.1 branch.

Discussion
----------

[WebProfilerBundle] replaces tabs characters by spaces.

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

Commits
-------

dd10034 [WebProfilerBundle] replaces tabs characters by spaces.
2016-08-19 16:31:03 +02:00
Hugo Hamon
dd10034ef8 [WebProfilerBundle] replaces tabs characters by spaces. 2016-08-19 15:59:39 +02:00
Nicolas Grekas
8f2f440b77 [VarDumper] Allow dumping subparts of cloned Data structures 2016-08-19 15:47:08 +02:00
Nicolas Grekas
eaeeeaa91f Merge branch '3.1'
* 3.1:
  [HttpKernel] Fix too strict test
2016-08-19 15:46:39 +02:00
Nicolas Grekas
1eb8e1e13d Merge branch '2.8' into 3.1
* 2.8:
  [HttpKernel] Fix too strict test
2016-08-19 15:46:22 +02:00
Nicolas Grekas
b90139a7e9 Merge branch '2.7' into 2.8
* 2.7:
  [HttpKernel] Fix too strict test
2016-08-19 15:46:11 +02:00
Nicolas Grekas
8f18c3bd13 minor #19674 [HttpKernel] Fix too strict test (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix too strict test

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Tests pass?   | yes
| License       | MIT

This test is too strict and prevents adding properties to Data objects for no reason.

Commits
-------

2e7301d [HttpKernel] Fix too strict test
2016-08-19 15:45:43 +02:00
Nicolas Grekas
2e7301dabf [HttpKernel] Fix too strict test 2016-08-19 15:31:18 +02:00
Jacek Jędrzejewski
37ead22f95 fixed 3.2 UPGRADE notes for Yaml 2016-08-19 11:38:24 +02:00
Nicolas Grekas
72dfda914d Merge branch '3.1'
* 3.1:
  Disable CLI color for Windows 10 greater than 10.0.10586
  Exception details break the layout
  [HttpKernel] Remove wrong docblock
  [HttpKernel] Fix HttpCache validation HTTP method
  [FrameworkBundle] Fix default lifetime of cache pools
  Move space from the before 'if' to the after 'if'
  [TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')
2016-08-19 08:48:55 +02:00
Nicolas Grekas
36b5716303 Merge branch '2.8' into 3.1
* 2.8:
  Disable CLI color for Windows 10 greater than 10.0.10586
  Exception details break the layout
  [HttpKernel] Remove wrong docblock
  [HttpKernel] Fix HttpCache validation HTTP method
  Move space from the before 'if' to the after 'if'
  [TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')
2016-08-19 08:48:39 +02:00
Nicolas Grekas
93e8b1df5e Merge branch '2.7' into 2.8
* 2.7:
  Disable CLI color for Windows 10 greater than 10.0.10586
  Exception details break the layout
  [HttpKernel] Remove wrong docblock
  [HttpKernel] Fix HttpCache validation HTTP method
  Move space from the before 'if' to the after 'if'
  [TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')
2016-08-19 08:48:01 +02:00
Nicolas Grekas
2909e4b04d bug #19660 Disable CLI color for Windows 10 greater than 10.0.10586 (mlocati)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #19660).

Discussion
----------

Disable CLI color for Windows 10 greater than 10.0.10586

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

The command prompt in Windows 10.0.10586 had enabled color support by default.
But in the next Windows versions they disabled it ([reference](https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/15617610--re-enable-enable-virtual-terminal-processing-by)): every exe now needs to explicitly turn on the color support.

I [already asked](https://bugs.php.net/bug.php?id=72768) the PHP dev team to enable it for php.exe, but they said they are busy for now.

So, let's turn off colors for Windows, until we'll have new PHP versions with color support enabled.

Commits
-------

255c59f Disable CLI color for Windows 10 greater than 10.0.10586
2016-08-19 08:41:18 +02:00
Michele Locati
255c59f670 Disable CLI color for Windows 10 greater than 10.0.10586 2016-08-19 08:41:18 +02:00
Nicolas Grekas
39cd984d7b bug #19663 Exception details break the layout (Dionysis Arvanitis)
This PR was merged into the 2.7 branch.

Discussion
----------

Exception details break the layout

Exception details break the layout

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| License       | MIT

By adding `word-wrap: break-word;` the exception details will wrap inside the block.

Commits
-------

00b4ecb Exception details break the layout
2016-08-18 22:08:23 +02:00
Dionysis Arvanitis
00b4ecb97a Exception details break the layout 2016-08-18 21:55:40 +03:00
Fabien Potencier
58cdb047fa feature #19657 [VarDumper] Add line in trace indexes (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Add line in trace indexes

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Allows seeing the line number when the frames are collapsed, e.g.:
![capture du 2016-08-18 13-48-27](https://cloud.githubusercontent.com/assets/243674/17772691/872c6bd0-654a-11e6-9886-95fe57baca61.png)

Commits
-------

0b13016 [VarDumper] Add line in trace indexes
2016-08-18 08:49:40 -07:00
Nicolas Grekas
0b13016d2e [VarDumper] Add line in trace indexes 2016-08-18 17:46:51 +02:00
Fabien Potencier
12d0442582 removed obsolete code 2016-08-18 08:27:21 -07:00
Fabien Potencier
56cdaf96d6 minor #19659 [HttpKernel] Remove wrong docblock (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Remove wrong docblock

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Tests pass?   | yes
| License       | MIT

The doc block must come from a bad merge...
Meanwhile, let's group "count*" methods together.

Commits
-------

1972a8f [HttpKernel] Remove wrong docblock
2016-08-18 07:25:28 -07:00
Nicolas Grekas
1972a8f906 [HttpKernel] Remove wrong docblock 2016-08-18 14:31:26 +02:00
Fabien Potencier
885c388917 feature #19639 [Routing] Generate URLs in compliance with PHP_QUERY_RFC3986 (jameshalsall)
This PR was submitted for the 2.7 branch but it was merged into the 3.2-dev branch instead (closes #19639).

Discussion
----------

[Routing] Generate URLs in compliance with PHP_QUERY_RFC3986

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

Commits
-------

ce724e2 [Routing] Generate URLs in compliance with PHP_QUERY_RFC3986
2016-08-17 18:15:16 -07:00
James Halsall
ce724e26b5 [Routing] Generate URLs in compliance with PHP_QUERY_RFC3986 2016-08-17 18:15:09 -07:00
Fabien Potencier
c5ca5f3ed7 bug #19651 [HttpKernel] Fix HttpCache validation HTTP method (tgalopin)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix HttpCache validation HTTP method

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

Commits
-------

1a8a8af [HttpKernel] Fix HttpCache validation HTTP method
2016-08-17 11:31:09 -07:00
Titouan Galopin
1a8a8afdc6 [HttpKernel] Fix HttpCache validation HTTP method 2016-08-17 20:25:22 +02:00
Fabien Potencier
f12d2b75f3 minor #19574 [TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes') (Evgeniy Tetenchuk, johnatannvmd)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')

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

Remove unnecessary block calling for choices without "choice_attr" option. This check gain the performance on a large datasets.

Previous Pull to master #19527

Commits
-------

bf6748d Move space from the before 'if' to the after 'if'
d1cf4d1 [TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')
2016-08-17 10:53:54 -07:00
Fabien Potencier
a7bd13559f bug #19650 [FrameworkBundle] Fix default lifetime of cache pools (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[FrameworkBundle] Fix default lifetime of cache pools

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

Commits
-------

ec603d3 [FrameworkBundle] Fix default lifetime of cache pools
2016-08-17 10:52:43 -07:00
Nicolas Grekas
f2200f7cad feature #19568 [Debug] Better error handling (lyrixx)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Debug] Better error handling

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | -
| Fixed tickets | -
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/6870

1. Send the raw exception in the log context instead of custom formatting
2. Add config option to log/throw in Symfony all PHP errors
3. Always use an exception when a PHP error occurs
4. Expand exception in the log context in the web developer toolbar
5. Use the dumper to dump log context in the web developer toolbar

---

I used the following code to produce screenshots:

```php
public function indexAction(Request $request)
    {
        $this->get('logger')->info('A log message with an exception', ['exception' => new \Exception('this exception will be logged')]);

        error_reporting(0);
        for ($i=0; $i < 15; $i++) {
            if ($i == 5) {
                error_reporting(E_ALL);
            }
            if ($i == 10) {
                error_reporting(0);
            }

            trigger_error("Trigger error avec E_USER_NOTICE", E_USER_NOTICE);
        }

        error_reporting(E_ALL);

        @trigger_error("trigger_error avec E_USER_DEPRECATED", E_USER_DEPRECATED);
        trigger_error("trigger_error avec E_USER_DEPRECATED (not silent)", E_USER_DEPRECATED);
// ...
```

![screenshot16](https://cloud.githubusercontent.com/assets/408368/17582279/2c4239b0-5fab-11e6-8428-2eaa7372cce3.png)

![screenshot17](https://cloud.githubusercontent.com/assets/408368/17582287/30cad1ea-5fab-11e6-9b0b-de0fa9f3913b.png)

![screenshot18](https://cloud.githubusercontent.com/assets/408368/17582291/348bb574-5fab-11e6-83b0-5bfaac080838.png)

Commits
-------

8f24549 [Debug] Better error handling
2016-08-17 17:35:28 +02:00
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
Nicolas Grekas
ec603d3c7f [FrameworkBundle] Fix default lifetime of cache pools 2016-08-17 13:39:34 +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