Commit Graph

25578 Commits

Author SHA1 Message Date
Guido Donnari
e7a4002b4f Fixes for Oracle in PdoSessionHandler 2017-12-31 06:59:49 +01:00
Fabien Potencier
b316e11836 fixed some deprecation messages 2017-12-31 05:55:05 +01:00
Fabien Potencier
0798e1922a minor #25639 Fix some deprecation messages (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix some deprecation messages

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

Some messages were forgotten in #25565

Commits
-------

dc554562c8 fixed some deprecation messages
2017-12-31 05:46:38 +01:00
Fabien Potencier
dc554562c8 fixed some deprecation messages 2017-12-31 05:27:30 +01:00
Fabien Potencier
7b4d519885 minor #25565 [2.7][DX] Use constant message contextualisation for deprecations (romainneutron)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7][DX] Use constant message contextualisation for deprecations

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

Since many projects are using this mechanism for deprecating feature, it is sometimes difficult to understand which vendor triggers a deprecation.
Sometimes we're using `since Symfony x.y` format, sometimes we are using `since x.y`. I propose to always use `since Symfony x.y` format.

Commits
-------

c2338cbd7a [2.7][DX] Use constant message contextualisation for deprecations
2017-12-31 05:14:56 +01:00
Nicolas Grekas
2f2a47becc bug #25599 Add application/ld+json format associated to json (vincentchalamon)
This PR was squashed before being merged into the 2.7 branch (closes #25599).

Discussion
----------

Add application/ld+json format associated to json

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

Add `application/ld+json` Content-Type as json format in Request.

Commits
-------

0917c4c Add application/ld+json format associated to json
2017-12-29 21:47:51 +01:00
Vincent CHALAMON
0917c4c2ae Add application/ld+json format associated to json 2017-12-29 21:47:49 +01:00
Nicolas Grekas
b1aba41764 minor #25614 [Serializer] Correct typing mistake in DocBlock (expertcoder)
This PR was submitted for the 2.1 branch but it was merged into the 2.7 branch instead (closes #25614).

Discussion
----------

[Serializer] Correct typing mistake in DocBlock

| Q             | A
| ------------- | ---
| Branch?       | 2.1 to 4.0
| Bug fix?      | yes (comment only)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | na
| Fixed tickets | na
| License       | MIT
| Doc PR        |

DocBlock comment referred to `NormalizableInterface` but code was using `DenormalizableInterface`

Commits
-------

29486a4 [Serializer] Correct typing mistake in DocBlock
2017-12-28 12:22:05 +01:00
Sam Anthony
29486a431c [Serializer] Correct typing mistake in DocBlock
| Q             | A
| ------------- | ---
| Branch?       | 2.1 to 4.0
| Bug fix?      | yes (comment only)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | na
| Fixed tickets | na
| License       | MIT
| Doc PR        |

DocBlock comment referred to `NormalizableInterface` but code was using `DenormalizableInterface`
2017-12-28 12:22:04 +01:00
Nicolas Grekas
ff630e19bb minor #25608 [Config] Fix closure CS (issei-m)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #25608).

Discussion
----------

[Config] Fix closure CS

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

d4a428c [Config] Fix closure CS
2017-12-27 11:12:36 +01:00
Issei.M
d4a428c20d [Config] Fix closure CS 2017-12-27 11:12:35 +01:00
Nicolas Grekas
8f6041819f minor #25556 PHP CS Fixer: use PHPUnit Migration ruleset (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #25556).

Discussion
----------

PHP CS Fixer: use PHPUnit Migration ruleset

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

replaces #25553

Commits
-------

a5bc7d6 PHP CS Fixer: use PHPUnit Migration ruleset
2017-12-22 23:38:09 +01:00
Dariusz Ruminski
a5bc7d649b PHP CS Fixer: use PHPUnit Migration ruleset 2017-12-22 23:38:07 +01:00
Robin Chalas
4bd9c79e93 bug #25407 [Console] Commands with an alias should not be recognized as ambiguous (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Commands with an alias should not be recognized as ambiguous

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | no
| Fixed tickets | no <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

When having two commands with the same starting name and an alias equal to the starting name, we should not have an ambiguous error because we are setting the alias.

Commits
-------

863f632 [Console] Commands with an alias should not be recognized as ambiguous
2017-12-22 03:12:01 +01:00
Romain Neutron
c2338cbd7a
[2.7][DX] Use constant message contextualisation for deprecations 2017-12-20 15:36:51 +01:00
Nicolas Grekas
f6fc785262 minor #25553 Add php_unit_dedicate_assert to PHPCS (carusogabriel)
This PR was merged into the 2.7 branch.

Discussion
----------

Add php_unit_dedicate_assert to PHPCS

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

Forgot to add this in #25420 😅

Commits
-------

e913b68 Add php_unit_dedicate_assert to PHPCS
2017-12-20 11:22:17 +01:00
Nicolas Grekas
f99eb657d2 minor #25558 [2.7] Fix issues found by PHPStan (dkarlovi)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] Fix issues found by PHPStan

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

This is the subpart of #25536 that applies on 2.7.
ping @dkarlovi FYI.

Commits
-------

afa1f14 [2.7] Fix issues found by PHPStan
2017-12-20 10:47:57 +01:00
Dalibor Karlović
afa1f149a3 [2.7] Fix issues found by PHPStan 2017-12-20 10:28:52 +01:00
Gabriel Caruso
e913b68a08 Add php_unit_dedicate_assert to PHPCS 2017-12-19 11:13:57 -02:00
Nicolas Grekas
98bfe80408 bug #25521 [Console] fix a bug when you are passing a default value and passing -n would output the index (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] fix a bug when you are passing a default value and passing -n would output the index

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #25470
| License       | MIT
| Doc PR        |

We are fixing a bug when you are using a default value with -n, it would output the index instead of the value.

Simple reproducer 5079dd19d5 (diff-77efcc28bc5309e1af9ac07a1e073009R40)

Commits
-------

41ffc69 [Console] fix a bug when you are passing a default value and passing -n would ouput the index
2017-12-18 20:55:28 +01:00
Jakub Zalas
11bee7fdfd [Intl] Update ICU data to 60.2
Not much has changed in data we actually use in Symfony.
However, the extension compiled for ICU 60.2 behaves slightly differently in some cases.
This can be observed on one assertion that had to be disabled. There's no point in keeping it since the Symfony implementation does not support the behaviour.
2017-12-18 08:24:54 -08:00
Gabriel Ostrolucký
b18cdcf417 [Validator] Fix access to root object when using composite constraint 2017-12-17 19:21:24 +01:00
Amrouche Hamza
41ffc69fa0
[Console] fix a bug when you are passing a default value and passing -n would ouput the index 2017-12-16 13:12:20 +01:00
Amrouche Hamza
863f632054
[Console] Commands with an alias should not be recognized as ambiguous 2017-12-16 05:47:12 +01:00
Fabien Potencier
76b7cacdd3 bug #25489 [FrameworkBundle] remove esi/ssi renderers if inactive (dmaicher)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] remove esi/ssi renderers if inactive

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

As found out within #25246 the esi/ssi fragment renderer services were registered for < 3.4 even when the framework config for it was disabled.

On 3.4+ this has been fixed already and the service definitions are removed.

With this fix the usual exception message appears when `framework.esi` or `framework.ssi` are disabled and using `render_esi(...)` or `render_ssi(...)`:

```
An exception has been thrown during the rendering of a template ("The "esi" renderer does not exist.").
```

**Note: Some people may see this exception when updating to this patch but this just means they are using esi/ssi without enabling it.**

Commits
-------

e1c36525fd [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 11:54:21 -08:00
Fabien Potencier
01229fb8aa bug #25427 Preserve percent-encoding in URLs when performing redirects in the UrlMatcher (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #25427).

Discussion
----------

Preserve percent-encoding in URLs when performing redirects in the UrlMatcher

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

While investigating #25373, I found that when the *dumped* `UrlMatcher` performs redirections due to missing trailing slashes on URLs, it does so using an url*de*coded URL.

This is wrong, as it may lead to wrong interpretations of URLs upon the next request. For example, think of an URL that contains `%23` in the middle of the path info. Upon redirection, this will be turned into `#` with an obvious effect.

Commits
-------

8146510304 Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
2017-12-14 10:48:49 -08:00
Matthias Pigulla
8146510304 Preserve percent-encoding in URLs when performing redirects in the UrlMatcher 2017-12-14 10:48:47 -08:00
Fabien Potencier
9ff3776b78 bug #25480 [FrameworkBundle] add missing validation options to XSD file (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] add missing validation options to XSD file

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

Commits
-------

e7d8e1783b add missing validation options to XSD file
2017-12-14 10:38:41 -08:00
Fabien Potencier
ccc93678fd bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix a bug when passing a letter that could be an alias

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | see https://github.com/symfony/symfony/pull/24987#issuecomment-351482175
| License       | MIT
| Doc PR        |

Fixing the global in console commands I've introduced a bug where when you pass -e=test it finds it a --shell, this fix the wrong behaviour.
cc @Zwartpet

Commits
-------

a8871de263 [Console] Fix a bug when passing a letter that could be an alias
2017-12-13 16:23:07 -08:00
David Maicher
e1c36525fd [FrameworkBundle] remove esi/ssi renderers if inactive 2017-12-13 20:39:50 +01:00
Amrouche Hamza
a8871de263
[Console] Fix a bug when passing a letter that could be an alias 2017-12-13 20:20:50 +01:00
Christian Flothmann
e7d8e1783b add missing validation options to XSD file 2017-12-13 08:51:34 +01:00
Nicolas Grekas
e77545ab8d minor #25420 Refactoring tests (carusogabriel)
This PR was merged into the 2.7 branch.

Discussion
----------

Refactoring tests

| 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've refactored some tests, using:
- `assertCount` instead of `count` function;
- `assertArrayHasKey`, `assertArrayNotHasKey`, `assertObjectHasAttribute` and `assertObjectNotHasAttribute` instead of `isset` function;
- `assertContains` instead of `in_array` function;
- `assertSame` and `assertNotSame` instead os strict comparisons `===`;
- `assertNotFalse` instead of strict comparisons `!==` with `false` keyword;
- `assertGreaterThan`, `assertLessThan` and `assertLessThanOrEqual` for mathematical comparisons;

Commits
-------

567e0ab Refactoring tests.
2017-12-12 12:07:15 +01:00
Gabriel Caruso
567e0ab7e6 Refactoring tests. 2017-12-12 05:05:30 -02:00
Fabien Potencier
9ac08e8770 bug #25233 [TwigBridge][Form] Fix hidden currency element with Bootstrap 3 theme (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge][Form] Fix hidden currency element with Bootstrap 3 theme

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

When using a `MoneyType` field, one can pass `currency=false` option to hide the currency symbol. This does not work well when using the Bootstrap 3 theme: the symbol is not displayed but HTML elements that are supposed to contain it are still rendered.

Commits
-------

c5af7fd938 Fix hidden currency element with Bootstrap 3 theme
2017-12-11 13:56:00 -08:00
Fabien Potencier
891b321f6b bug #25408 [Debug] Fix catching fatal errors in case of nested error handlers (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Fix catching fatal errors in case of nested error handlers

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

Fixing a bug from 2013 :)

Commits
-------

27dc9a6c7c [Debug] Fix catching fatal errors in case of nested error handlers
2017-12-11 13:15:46 -08:00
Fabien Potencier
0a7c6594c3 bug #25330 [HttpFoundation] Support 0 bit netmask in IPv6 (::/0) (stephank)
This PR was squashed before being merged into the 2.7 branch (closes #25330).

Discussion
----------

[HttpFoundation] Support 0 bit netmask in IPv6 (`::/0`)

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

Proxy settings allow `0.0.0.0/0` but not `::/0`. This PR adds IpUtils support for 0 masked bits in IPv6.

Tests pass in the sense that results before and after are unchanged on my local PHP 7.2 / macOS setup. The IpUtils test cases were extended for the changes in this PR.

I've rebased on 2.7, but the issue is present up to 4.0 and master.

Commits
-------

9f1c9bd964 [HttpFoundation] Support 0 bit netmask in IPv6 ()
2017-12-11 13:06:42 -08:00
Stéphan Kochen
9f1c9bd964 [HttpFoundation] Support 0 bit netmask in IPv6 () 2017-12-11 13:06:40 -08:00
Fabien Potencier
b78c0ae039 bug #25410 [HttpKernel] Fix logging of post-terminate errors/exceptions (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix logging of post-terminate errors/exceptions

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

After terminate, the request stack is empty, thus `terminateWithException` currently fails, preventing listeners to know about the failure.

Commits
-------

e85b371d72 [HttpKernel] Fix logging of post-terminate errors/exceptions
2017-12-11 12:54:46 -08:00
Javier Eguiluz
500e881dd4 minor #25433 [WebProfilerBundle] Fix Image/SVG display in WebProfiler toolbar. (bobdenotter)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] Fix Image/SVG display in WebProfiler toolbar.

| 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 small fix prevents widths from "creeping in" from previously defined CSS rules into the WebProfiler toolbar. See before/after screenshot:

![screen_shot_2017-12-11_at_11_56_06](https://user-images.githubusercontent.com/1833361/33828617-1e59c2c2-de6d-11e7-8c5e-560eee847205.png)

Note: This PR fixes an other issue than #18469, which landed in SF 2.8.

Commits
-------

62f5eaef11 Set `width: auto` on WebProfiler toolbar's reset.
2017-12-11 17:10:56 +01:00
Bob den Otter
62f5eaef11
Set width: auto on WebProfiler toolbar's reset. 2017-12-11 12:11:10 +01:00
Nicolas Grekas
e85b371d72 [HttpKernel] Fix logging of post-terminate errors/exceptions 2017-12-09 20:51:32 +01:00
Nicolas Grekas
27dc9a6c7c [Debug] Fix catching fatal errors in case of nested error handlers 2017-12-09 18:06:03 +01:00
Nicolas Grekas
40ced3ad07 minor #25391 [2.7] Remove some unused variables, properties and methods (tgalopin)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] Remove some unused variables, properties and methods

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

Analyzing symfony/symfony using https://insight.sensiolabs.com, I found several chunks of dead code. This PR removes them in the 2.7 branch.

fabbot failure is unrelated.

Commits
-------

30e2273 Remove some unused variables, properties and methods
2017-12-08 13:30:47 +01:00
Titouan Galopin
30e227392a Remove some unused variables, properties and methods 2017-12-08 13:09:58 +01:00
Fabien Potencier
87c5c2c06d minor #25384 [HttpKernel] remove noisy frame in controller stack traces (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] remove noisy frame in controller stack traces

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

520cc97e18 [HttpKernel] remove noisy frame in controller stack traces
2017-12-07 18:40:29 -08:00
Fabien Potencier
ed60a8b9a2 minor #25385 [ExpressionLanguage] Fix parse error on 5.3 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[ExpressionLanguage] Fix parse error on 5.3

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

2249f43c02 [ExpressionLanguage] Fix parse error on 5.3
2017-12-07 11:36:43 -08:00
Nicolas Grekas
2249f43c02 [ExpressionLanguage] Fix parse error on 5.3 2017-12-07 20:30:27 +01:00
Nicolas Grekas
520cc97e18 [HttpKernel] remove noisy frame in controller stack traces 2017-12-07 19:55:09 +01:00
Fabien Potencier
7ba6000dd5 bug #25323 [ExpressionLanguage] throw an SyntaxError instead of an undefined index notice (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[ExpressionLanguage] throw an SyntaxError instead of an undefined index notice

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #25214
| License       | MIT
| Doc PR        | none

I think this is a bug when the components throws a notice instead of an exception.

it's too early and too dark to see something outside so here is my couch :
![img_2915-2](https://user-images.githubusercontent.com/3451634/33592448-6b514050-d98b-11e7-8086-bc6e6b6e6e82.jpg)

Commits
-------

78abc89648 [ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
2017-12-07 08:13:11 -08:00