Commit Graph

31598 Commits

Author SHA1 Message Date
Nicolas Grekas
9deef61700 minor #23047 [Security] explain that a role can be an instance of Role (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[Security] explain that a role can be an instance of Role

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

Only mentioning the RoleInterface seems to be confusing as it is
deprecated since Symfony 3.3.

Commits
-------

0068968 explain that a role can be an instance of Role
2017-06-03 10:38:50 +02:00
Maxime Steinhausser
6c87863a0e [Profiler] Never wrap in code excerpts 2017-06-03 10:37:07 +02:00
Nicolas Grekas
3e92637635 minor #23048 [Form][FrameworkBundle] Remove non-existing arg for data_collector.form (ogizanagi)
This PR was merged into the 3.2 branch.

Discussion
----------

[Form][FrameworkBundle] Remove non-existing arg for data_collector.form

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

Commits
-------

479895f [Form][FrameworkBundle] Remove non-existing arg for data_collector.form
2017-06-03 10:32:43 +02:00
Maxime Steinhausser
479895f667 [Form][FrameworkBundle] Remove non-existing arg for data_collector.form 2017-06-03 10:06:02 +02:00
Christian Flothmann
0068968dcc explain that a role can be an instance of Role
Only mentioning the RoleInterface seems to be confusing as it is
deprecated since Symfony 3.3.
2017-06-03 10:00:53 +02:00
Christian Flothmann
61685c7106 [Cache] fix Redis scheme detection 2017-06-03 09:31:39 +02:00
Fabien Potencier
d0aa4d93dd minor #23031 [Yaml] Clarify "incompatible key casting" deprecation message (rvanlaak)
This PR was squashed before being merged into the 3.3 branch (closes #23031).

Discussion
----------

[Yaml] Clarify "incompatible key casting" deprecation message

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

In the process of upgrading to Symfony 3.3 our Yaml linter tests started throwing errors. The exception was a bit unclear to us, so hope this message will help others with fixing their deprecations as well.

Commits
-------

67895f4dd3 [Yaml] Clarify "incompatible key casting" deprecation message
2017-06-02 15:05:06 -07:00
Richard van Laak
67895f4dd3 [Yaml] Clarify "incompatible key casting" deprecation message 2017-06-02 15:05:04 -07:00
Fabien Potencier
f0519486f2 bug #23013 Parse the _controller format in sub-requests (weaverryan)
This PR was merged into the 3.3 branch.

Discussion
----------

Parse the _controller format in sub-requests

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | possibly (edge case)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22966
| License       | MIT
| Doc PR        | n/a

As mentioned on the issue (https://github.com/symfony/symfony/issues/22966#issuecomment-305289227), the new "controller service args" functionality relies on the `_controller` attribute to be in either the service format `App\Controller\Foo:bar` or at least the final parsed format `App\Controller\Foo::bar`. But when you make a sub-request with the `App:Foo:bar` format, the `ControllerResolver` correctly parses this, but the `_controller` request attribute will always contain the original `App:Foo:bar` format. That causes the `ServiceValueResolver` to fail.

The only way I can think to fix this - reliably - is to parse the `_controller` attribute in a listener. And this, works great! Notes:

A) There is a small chance for a BC break: if you were relying on the `_controller` old format in a `kernel.request` format in the framework, in a listener between the priority of 25 and 31 for sub-requests (because normal requests have `_controller` normalized during routing)... then you will see a behavior change.

B) We could load the `ControllerNameParser` lazily via a service locator.

C) We could deprecate calling the parser in the FW's `ControllerResolver`. Along with (B), I think it would (in 4.0) mean that the `ControllerNameParser` is not instantiated at runtime (except for sub-requests).

If someone can think of a different/better solution, please let me know!

Cheers!

Commits
-------

9578fd3eb6 Adding a new event subscriber that "parses" the _controller attribute in the FW
2017-06-02 14:53:18 -07:00
Fabien Potencier
c88a00611a bug #23015 [PhpUnitBridge] Fix detection of PHPUnit 5 (enumag)
This PR was merged into the 3.3 branch.

Discussion
----------

[PhpUnitBridge] Fix detection of PHPUnit 5

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

Codeception 2.3 supports both PHPUnit 5 and PHPUnit 6 by defining [aliases](https://github.com/Codeception/Codeception/blob/2.3/shim.php). This confuses symfony/phpunit-bridge and it tries to load  BC code for PHPUnit 5 even though I'm using PHPUnit 6.

Commits
-------

dfb5549f63 [PhpUnitBridge] Fix detection of PHPUnit 5
2017-06-02 14:49:52 -07:00
Fabien Potencier
3594bb49d6 minor #23043 minor #23043 add \ to PHP_VERSION_ID fixes #22650 (vincentaubert)
This PR was squashed before being merged into the 3.3 branch (closes #23043).

Discussion
----------

minor #23043 add \ to PHP_VERSION_ID fixes #22650

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

this PR is the last one fixing the \ before PHP_VERSION_ID closes definitively #22650

Commits
-------

d3e6a2d6f6 minor #23043 add \ to PHP_VERSION_ID fixes #22650
2017-06-02 13:45:37 -07:00
Vincent AUBERT
d3e6a2d6f6 minor #23043 add \ to PHP_VERSION_ID fixes #22650 2017-06-02 13:45:37 -07:00
Nicolas Grekas
2a293692f2 [Console] Add missing dev-dep 2017-06-02 21:24:58 +02:00
Fabien Potencier
c21e825b43 bug #23041 [Config] Always protected ClassExistenceResource against bad parents (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[Config] Always protected ClassExistenceResource against bad parents

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | (new hidden feat)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Let's always protected against bad or missing parents. The protection was conditional because the protection adds some perf overhead, but this was a micro optim really...

BC break is for a new feat, better not maintain this.

Commits
-------

86bf26c466 [Config] Always protect ClassExistenceResource against bad parents
2017-06-02 11:29:45 -07:00
Nicolas Grekas
86bf26c466 [Config] Always protect ClassExistenceResource against bad parents 2017-06-02 20:07:20 +02:00
Nicolas Grekas
349e5fe9b8 Merge branch '3.2' into 3.3
* 3.2:
  typo
  CS: adjust chaining indentation
2017-06-02 16:38:05 +02:00
Nicolas Grekas
89c3f5cccb Merge branch '2.8' into 3.2
* 2.8:
  typo
  CS: adjust chaining indentation
2017-06-02 16:37:52 +02:00
Nicolas Grekas
0057459882 Merge branch '2.7' into 2.8
* 2.7:
  CS: adjust chaining indentation
2017-06-02 16:36:56 +02:00
Nicolas Grekas
1542925d8d minor #22986 CS: adjust chaining indentation (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

CS: adjust chaining indentation

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

Commits
-------

8c3c0fe CS: adjust chaining indentation
2017-06-02 16:34:38 +02:00
Nicolas Grekas
d89670461d Fix composer deps 2017-06-02 14:59:20 +02:00
Nicolas Grekas
1945bcf6c7 typo 2017-06-02 12:45:29 +02:00
Nicolas Grekas
4ad0dbf584 Merge branch '3.2' into 3.3
* 3.2:
  Fix optional cache warmers are always instantiated whereas they should be lazy-loaded
  add some \ on PHP_VERSION_ID for 2.8
  [PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string
2017-06-02 11:51:43 +02:00
Nicolas Grekas
fe4d885c4c Merge branch '2.8' into 3.2
* 2.8:
  Fix optional cache warmers are always instantiated whereas they should be lazy-loaded
  add some \ on PHP_VERSION_ID for 2.8
  [PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string
2017-06-02 11:43:35 +02:00
Nicolas Grekas
7632bed9ee bug #22988 [PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string

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

According to the Doctrine's docs, the `bigint` type is converted to a `string`: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html#bigint

/cc @clementtalleu

Commits
-------

47d5e6b [PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string
2017-06-02 11:24:55 +02:00
Nicolas Grekas
ec6b88257b minor #23028 add some \ on PHP_VERSION_ID for 2.8 (vincentaubert)
This PR was merged into the 2.8 branch.

Discussion
----------

add some \ on PHP_VERSION_ID for 2.8

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22650
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Commits
-------

7f4824c add some \ on PHP_VERSION_ID for 2.8
2017-06-02 11:17:34 +02:00
Nicolas Grekas
7a57644a8f bug #23014 [2.8]Fix optional cache warmers are always instantiated whereas they should be lazy-loaded (romainneutron)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8]Fix optional cache warmers are always instantiated whereas they should be lazy-loaded

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

Since version 2.8, if a Twig extension throws an exception in constructor, then the Kernel can not boot anymore because a service used by the Twig cache warmer instantiates Twig. As Twig cache warmer is optional, Twig should not be loaded at Kernel boot, and this patch fixes the issue

Commits
-------

3371db9 Fix optional cache warmers are always instantiated whereas they should be lazy-loaded
2017-06-02 11:15:27 +02:00
Nicolas Grekas
018b1a3d2d feature #23022 [Di] Remove closure-proxy arguments (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[Di] Remove closure-proxy arguments

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

With #23008, we don't need this in core anymore.
Let's drop it now.
Technically that's a BC break, but for a feature that is very new, and still quite hidden.
Doing this now would save us from maintaining this code, and help reduce the overall complexity.

Basically reverts #20953

Commits
-------

57daadb [Di] Remove closure-proxy arguments
2017-06-02 11:10:29 +02:00
Nicolas Grekas
4a6804cbfd Merge branch '3.2' into 3.3
* 3.2:
  fix merge
2017-06-02 11:00:50 +02:00
Nicolas Grekas
8d609d9bba fix merge 2017-06-02 11:00:03 +02:00
Nicolas Grekas
e5a698e215 Merge branch '3.2' into 3.3
* 3.2:
  typo
  [EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null)
  Use namespaced Twig
2017-06-02 10:55:39 +02:00
Nicolas Grekas
59751226e2 Merge branch '2.8' into 3.2
* 2.8:
  typo
2017-06-02 10:29:21 +02:00
Nicolas Grekas
99e0836fd4 typo 2017-06-02 10:28:06 +02:00
Nicolas Grekas
a6b525e136 Merge branch '2.8' into 3.2
* 2.8:
  [EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null)
  Use namespaced Twig
2017-06-02 10:26:05 +02:00
Romain Neutron
3371db9f8c
Fix optional cache warmers are always instantiated whereas they should be lazy-loaded 2017-06-02 09:53:17 +02:00
Nicolas Grekas
434c8334ed Merge branch '2.7' into 2.8
* 2.7:
  [EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null)
  Use namespaced Twig
2017-06-02 09:47:27 +02:00
Nicolas Grekas
36f00509bc minor #22962 Use namespaced Twig (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Use namespaced Twig

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | needs https://github.com/twigphp/Twig/pull/2490 and https://github.com/twigphp/Twig/pull/2491
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

c3d1262 Use namespaced Twig
2017-06-02 09:20:11 +02:00
Vincent AUBERT
7f4824c987 add some \ on PHP_VERSION_ID for 2.8 2017-06-02 07:32:06 +02:00
Fabien Potencier
32f65347f2 bug #23024 [EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null) (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null)

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

e7c4149e78 [EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null)
2017-06-01 15:38:21 -07:00
Nicolas Grekas
e7c4149e78 [EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null) 2017-06-01 23:49:12 +02:00
Nicolas Grekas
c3d1262208 Use namespaced Twig 2017-06-01 23:44:38 +02:00
Fabien Potencier
60b89bb67f Merge branch '3.2' into 3.3
* 3.2:
  Using FQ name for PHP_VERSION_ID
  [Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
  Harden the debugging of Twig filters and functions
  bumped Symfony version to 3.2.10
  updated VERSION for 3.2.9
  updated CHANGELOG for 3.2.9
  bumped Symfony version to 2.8.22
  updated VERSION for 2.8.21
  updated CHANGELOG for 2.8.21
  bumped Symfony version to 2.7.29
  updated VERSION for 2.7.28
  update CONTRIBUTORS for 2.7.28
  updated CHANGELOG for 2.7.28
2017-06-01 14:01:25 -07:00
Fabien Potencier
2c57bf20ad Merge branch '2.8' into 3.2
* 2.8:
  Using FQ name for PHP_VERSION_ID
  [Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
  Harden the debugging of Twig filters and functions
  bumped Symfony version to 2.8.22
  updated VERSION for 2.8.21
  updated CHANGELOG for 2.8.21
  bumped Symfony version to 2.7.29
  updated VERSION for 2.7.28
  update CONTRIBUTORS for 2.7.28
  updated CHANGELOG for 2.7.28
2017-06-01 14:00:24 -07:00
Nicolas Grekas
57daadbf67 [Di] Remove closure-proxy arguments 2017-06-01 22:59:07 +02:00
Fabien Potencier
bd62b148db Merge branch '2.7' into 2.8
* 2.7:
  Using FQ name for PHP_VERSION_ID
  [Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
  Harden the debugging of Twig filters and functions
  bumped Symfony version to 2.7.29
  updated VERSION for 2.7.28
  update CONTRIBUTORS for 2.7.28
  updated CHANGELOG for 2.7.28
2017-06-01 13:52:29 -07:00
Fabien Potencier
78c4a5ff43 minor #23021 Using FQ name for PHP_VERSION_ID (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Using FQ name for PHP_VERSION_ID

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

Commits
-------

f91a020b84 Using FQ name for PHP_VERSION_ID
2017-06-01 13:48:21 -07:00
Fabien Potencier
3fc1189910 bug #23008 [EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument

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

If we decide to go this way, we might drop ClosureProxyArgument entirely because we won't need it internally. I'll propose it in another PR for discussion if this one is accepted.

This PR allows "high-order" listeners, as `array(Closure, method)`. Closure is called to get the actual instance when needed only.

How does it look to you? (I'll add tests once confirmed)

Commits
-------

c17a009d66 [EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument
2017-06-01 13:46:45 -07:00
Fabien Potencier
f91a020b84 Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
Nicolas Grekas
c17a009d66 [EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument 2017-06-01 20:27:22 +02:00
Fabien Potencier
156a50d124 bug #23018 [FrameworkBundle] Fix CacheCollectorPass priority (chalasr)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] Fix CacheCollectorPass priority

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

It was run before optimization, so child definitions were not resolved yet.

Commits
-------

28b253ab40 Fix CacheCollectorPass priority
2017-06-01 10:43:34 -07:00
Fabien Potencier
f32ec458be bug #23009 [Routing] Allow GET requests to be redirected. Fixes #23004 (frankdejonge)
This PR was merged into the 3.3 branch.

Discussion
----------

[Routing] Allow GET requests to be redirected. Fixes #23004

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

GET requests didn't get the same redirect treatment as HEAD requests. I've also added tests cases for all the different trailing/non-trailing slash situations.

Commits
-------

71d4e366a9 [Routing] Allow GET requests to be redirected. Fixes #23004
2017-06-01 10:33:26 -07:00