Commit Graph

42461 Commits

Author SHA1 Message Date
Nicolas Grekas
eb41911d88 Merge branch '3.4' into 4.2
* 3.4:
  Fix json-encoding when JSON_THROW_ON_ERROR is used
  [HttpFoundation] work around PHP 7.3 bug related to json_encode()
  [Security] added support for updated \"distinguished name\" format in x509 authentication
2019-06-05 15:22:46 +02:00
Fabien Potencier
e5b082acee bug #31850 [HttpClient] add $response->cancel() (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] add $response->cancel()

| Q             | A
| ------------- | ---
| Branch?       | 4.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-docs/pull/11668

An alternative to #31845 and #31842.
Same as  #31831 but considered as a bug fix (at the Contracts level), thus for 4.3.
I think we're early enough since 4.3/1.1 to do it.
That will save us some headaches in the short term.

Commits
-------

c402418723 [HttpClient] add $response->cancel()
2019-06-05 15:19:12 +02:00
Robin Chalas
07603da06c [Messenger] Add runtime check for ext redis version 2019-06-05 15:18:57 +02:00
Fabien Potencier
28fbf160ae bug #31871 [HttpClient] revert bad logic around JSON_THROW_ON_ERROR (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] revert bad logic around JSON_THROW_ON_ERROR

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

Same as #31869, reverts #31861

Commits
-------

846116edab [HttpClient] revert bad logic around JSON_THROW_ON_ERROR
2019-06-05 15:18:34 +02:00
Fabien Potencier
92e8514dbb bug #31869 Fix json-encoding when JSON_THROW_ON_ERROR is used (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix json-encoding when JSON_THROW_ON_ERROR is used

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

As hinted in #31860 by @lt

Commits
-------

d18f42c409 Fix json-encoding when JSON_THROW_ON_ERROR is used
2019-06-05 15:14:18 +02:00
Fabien Potencier
a80483cdb7 bug #31868 [HttpKernel] Fix handling non-catchable fatal errors (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[HttpKernel] Fix handling non-catchable fatal errors

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

This reverts PR #27519 this commit 18c2dde08e,
reversing changes made to ac1189a61e.

Right now, the listener is skipped on fatal errors.

Commits
-------

a1619ccb95 [HttpKernel] Fix handling non-catchable fatal errors
2019-06-05 15:12:48 +02:00
Nicolas Grekas
846116edab [HttpClient] revert bad logic around JSON_THROW_ON_ERROR 2019-06-05 13:58:47 +02:00
Tobias Schultze
5beb5f8bd5 [Routing] remove deprecations 2019-06-05 13:42:45 +02:00
Tobias Schultze
b332f9b4c0 Merge branch '4.4' 2019-06-05 13:37:49 +02:00
Tobias Schultze
a24f4db689 Merge branch '4.3' into 4.4 2019-06-05 13:37:18 +02:00
Tobias Schultze
3242392b1b minor #31866 [Routing] revert deprecation of Serializable in routing (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Routing] revert deprecation of Serializable in routing

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License       | MIT
| Doc PR        |

we still need to implement Serializable as long as we support PHP < 7.4. otherwise serialized data in php 7.2 would not work anymore when people upgrade to php 7.4. see discussion in https://github.com/symfony/symfony/pull/31792#discussion_r289626274
partly reverts #30286

Commits
-------

d32a29527b [Routing] revert deprecation of Serializable in routing
2019-06-05 13:36:12 +02:00
Nicolas Grekas
a1619ccb95 [HttpKernel] Fix handling non-catchable fatal errors
This reverts PR #27519 this commit 18c2dde08e,
reversing changes made to ac1189a61e.
2019-06-05 13:34:39 +02:00
Nicolas Grekas
d18f42c409 Fix json-encoding when JSON_THROW_ON_ERROR is used 2019-06-05 13:33:52 +02:00
Tobias Schultze
d32a29527b [Routing] revert deprecation of Serializable in routing
we still need to implement Serializable as long as we support PHP < 7.4. otherwise serialized data in php 7.2 would not work anymore when people upgrade to php 7.4
2019-06-05 11:16:20 +02:00
Ivo
b5e6c99a3b [HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor. 2019-06-05 10:24:41 +02:00
Nicolas Grekas
075076ffe8 [Contracts] fix min PHP version 2019-06-05 09:31:36 +02:00
Fabien Potencier
9736403928 minor #31824 [Workflow] Remove BC layers and deprecated codes (lyrixx)
This PR was squashed before being merged into the 5.0-dev branch (closes #31824).

Discussion
----------

[Workflow] Remove BC layers and deprecated codes

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

* [x] Component
* [x] Framework intergration

Commits
-------

cbb8b22753 [FrameworkBundle][Workflow] Remove BC layers and deprecated codes
08dc494294 [Workflow] Remove BC layers and deprecated codes
2019-06-05 08:19:46 +02:00
Amrouche Hamza
e05de9ee56
[BrowserKit] remove deprecated code 2019-06-05 08:01:57 +02:00
Fabien Potencier
d2909caa9b Merge branch '4.4'
* 4.4:
  [Console] Add check for Konsole/Yakuake to disable hyperlinks
  [HTTP Foundation] Deprecate passing argument to method Request::isMethodSafe()
  [HttpClient] work around PHP 7.3 bug related to json_encode()
  [VarDumper] fix dumping the cloner itself
  Rename the Symfony Mailer service config to avoid conflict with SwitMailer
  Set default crypto method - Fix #31105
  [Form] add missing symfony/service-contracts dependency
  [HttpClient] Don't throw InvalidArgumentException on bad Location header
2019-06-05 04:28:25 +02:00
Fabien Potencier
7207849037 Merge branch '4.3' into 4.4
* 4.3:
  [Console] Add check for Konsole/Yakuake to disable hyperlinks
  [HttpClient] work around PHP 7.3 bug related to json_encode()
  [VarDumper] fix dumping the cloner itself
  Rename the Symfony Mailer service config to avoid conflict with SwitMailer
  Set default crypto method - Fix #31105
  [Form] add missing symfony/service-contracts dependency
  [HttpClient] Don't throw InvalidArgumentException on bad Location header
2019-06-05 04:26:21 +02:00
Fabien Potencier
d90dd8da98 bug #31834 [HttpClient] Don't throw InvalidArgumentException on bad Location header (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Don't throw InvalidArgumentException on bad Location header

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

Instead, just stop following redirections and throw a `RedirectionExceptionInterface` as usual when throwing is not disabled.

Commits
-------

4acca42330 [HttpClient] Don't throw InvalidArgumentException on bad Location header
2019-06-05 04:18:50 +02:00
Fabien Potencier
036d7b69a4 bug #31846 [Mailer] Set default crypto method (bpolaszek)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] Set default crypto method

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

This PR fixes #31105 by providing `STREAM_CRYPTO_METHOD_TLS_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT` as  default crypto method when none is defined in user options and TLS is enabled.

Commits
-------

4f0ad25fab Set default crypto method - Fix #31105
2019-06-05 04:15:36 +02:00
Fabien Potencier
455a1aa08e minor #31823 [TwigBundle] remove legacy template dirs from iterator (Tobion)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[TwigBundle] remove legacy template dirs from iterator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | yes
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License       | MIT
| Doc PR        |

Some leftovers from #31667

Commits
-------

d1137f96c8 [TwigBundle] remove legacy template dirs from iterator
2019-06-05 04:11:30 +02:00
Fabien Potencier
ed59830f55 bug #31849 [Console] Add check for Konsole/Yakuake to disable hyperlinks (belinde)
This PR was squashed before being merged into the 4.3 branch (closes #31849).

Discussion
----------

[Console] Add check for Konsole/Yakuake to disable hyperlinks

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

Added check for environment variable set by Konsole and other relateds terminal emulators.

A ticket has been opened to Konsole team to support this feature someday: https://bugs.kde.org/show_bug.cgi?id=408288

Commits
-------

14b27b7d02 [Console] Add check for Konsole/Yakuake to disable hyperlinks
2019-06-05 04:08:12 +02:00
Franco Traversaro
14b27b7d02 [Console] Add check for Konsole/Yakuake to disable hyperlinks 2019-06-05 04:08:03 +02:00
Fabien Potencier
e6e63c7d32 bug #31854 Rename the Symfony Mailer service implementation to avoid conflict with SwitMailer (tgalopin)
This PR was merged into the 4.3 branch.

Discussion
----------

Rename the Symfony Mailer service implementation to avoid conflict with SwitMailer

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

When you install Symfony Mailer as well as SwitMailer and try to typehint MailerInterface, the autowiring alias is aliased to the "mailer" service which is overriden by SwitMailer, thus making the injection fail.

Commits
-------

e7c96d3b43 Rename the Symfony Mailer service config to avoid conflict with SwitMailer
2019-06-05 04:04:45 +02:00
Fabien Potencier
a8aad15639 bug #31856 [VarDumper] fix dumping the cloner itself (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[VarDumper] fix dumping the cloner itself

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

Having PHP references inside the cloner badly breaks it when it finds itself in the dumped graph.
Let's remove this optimization, and skip dumping cloners by default as a bonus.

Commits
-------

3cd56cb018 [VarDumper] fix dumping the cloner itself
2019-06-05 04:03:00 +02:00
Fabien Potencier
4f7c614ef0 bug #31861 [HttpClient] work around PHP 7.3 bug related to json_encode() (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] work around PHP 7.3 bug related to json_encode()

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

This is the remaining of ##31860 for upper branches.

Commits
-------

42904e34e6 [HttpClient] work around PHP 7.3 bug related to json_encode()
2019-06-05 04:00:18 +02:00
Fabien Potencier
2ae0580eea bug #31860 [HttpFoundation] work around PHP 7.3 bug related to json_encode() (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] work around PHP 7.3 bug related to json_encode()

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

I know, this doesn't make any sense.
`json_encode` embeds global state behind the scene :(

For reference, I asked on php-internals what they think about this:
https://externals.io/message/105653#105838

Commits
-------

e6e63017f0 [HttpFoundation] work around PHP 7.3 bug related to json_encode()
2019-06-05 03:57:52 +02:00
Fabien Potencier
5c8fb7b33c feature #31658 [HTTP Foundation] Deprecate passing argument to method Request::isMethodSafe() (dFayet)
This PR was squashed before being merged into the 4.4 branch (closes #31658).

Discussion
----------

[HTTP Foundation] Deprecate passing argument to method Request::isMethodSafe()

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31323    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |  <!-- required for new features -->

Passing argument to `Request::isMethodSafe()` should have been deprecated in 4.1. As mentionned there:  https://github.com/symfony/http-foundation/blob/master/Request.php#L1435-L1452

We also remove Exceptions throwed when you call `Request::isMethodSafe()`  or `Request::isMethodSafe(true)`

Commits
-------

59fa1bd127 [HTTP Foundation] Deprecate passing argument to method Request::isMethodSafe()
2019-06-05 03:45:34 +02:00
dFayet
59fa1bd127 [HTTP Foundation] Deprecate passing argument to method Request::isMethodSafe() 2019-06-05 03:45:23 +02:00
Nicolas Grekas
42904e34e6 [HttpClient] work around PHP 7.3 bug related to json_encode() 2019-06-04 21:00:49 +02:00
Nicolas Grekas
e6e63017f0 [HttpFoundation] work around PHP 7.3 bug related to json_encode() 2019-06-04 20:52:06 +02:00
Nicolas Grekas
f605b0a0c9 [Contracts] fix branch alias 2019-06-04 19:36:04 +02:00
Nicolas Grekas
3cd56cb018 [VarDumper] fix dumping the cloner itself 2019-06-04 19:28:31 +02:00
Titouan Galopin
e7c96d3b43 Rename the Symfony Mailer service config to avoid conflict with SwitMailer 2019-06-04 17:17:31 +02:00
Tobias Schultze
d1137f96c8 [TwigBundle] remove legacy template dirs from iterator 2019-06-04 17:16:43 +02:00
Beno!t POLASZEK
4f0ad25fab Set default crypto method - Fix #31105 2019-06-04 15:59:49 +02:00
Fabien Potencier
04e2026b98 bug #31852 [Form] add missing symfony/service-contracts dependency (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Form] add missing symfony/service-contracts dependency

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

`ResetInterface` is needed by `CachingFactoryDecorator`, which is used in `CoreExtension`, so this is a mandatory dep.

Commits
-------

8639bcca3d [Form] add missing symfony/service-contracts dependency
2019-06-04 15:54:26 +02:00
Nicolas Grekas
8639bcca3d [Form] add missing symfony/service-contracts dependency 2019-06-04 15:28:20 +02:00
Nicolas Grekas
ebd8f21ced minor #31782 [Security][Http] Remove BC layers (chalasr)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[Security][Http] Remove BC layers

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

Commits
-------

81e9974855 [Security][Http] Remove BC layers
2019-06-04 15:22:34 +02:00
Robin Chalas
81e9974855 [Security][Http] Remove BC layers 2019-06-04 14:59:47 +02:00
Grégoire Pineau
cbb8b22753 [FrameworkBundle][Workflow] Remove BC layers and deprecated codes 2019-06-04 14:36:31 +02:00
Grégoire Pineau
08dc494294 [Workflow] Remove BC layers and deprecated codes 2019-06-04 14:35:48 +02:00
Fabien Potencier
1177a2aeed Merge branch '4.4'
* 4.4:
  Fix inconsistency in json format regarding DST value
  changed type hints
  conflict with HttpKernel component 5.0
  do not process private properties from parent class
  [HttpClient] fix unregistering the debug buffer when using curl
  don't add embedded properties to wrapping class metadata
  [Messenger] set amqp content_type based on serialization format
  [Mailer] fixed the possibility to set a From header from MessageListener
2019-06-04 14:24:56 +02:00
Fabien Potencier
926ded8ea5 Merge branch '4.3' into 4.4
* 4.3:
  Fix inconsistency in json format regarding DST value
  changed type hints
  do not process private properties from parent class
  [HttpClient] fix unregistering the debug buffer when using curl
  don't add embedded properties to wrapping class metadata
  [Messenger] set amqp content_type based on serialization format
  [Mailer] fixed the possibility to set a From header from MessageListener
2019-06-04 14:24:01 +02:00
Fabien Potencier
33f3933a90 Merge branch '4.2' into 4.3
* 4.2:
  Fix inconsistency in json format regarding DST value
2019-06-04 14:23:51 +02:00
Fabien Potencier
846f721cc4 minor #31640 Fix inconsistency in json format regarding DST value (mmokhi)
This PR was merged into the 4.2 branch.

Discussion
----------

Fix inconsistency in json format regarding DST value

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

In absence of a known time zone we might or might not have DST.
If DST doesn't exist (eg, server has timezone set on GMT) the current test fails,
Becasue PHP doesn't dump `dst_savings` in the `IntlTimeZone` objects.

This patch takes care of this known point.

Sponsored-by: Platform.sh

Commits
-------

38a5b2c943 Fix inconsistency in json format regarding DST value
2019-06-04 14:23:06 +02:00
mmokhi
38a5b2c943 Fix inconsistency in json format regarding DST value
The `$expected` template seems not to be consistent.
It will change when the DST value is 0 (it'll not have `dst_savings` for
example)

This patch takes care of the issue, by adding proper condition.

Sponsored-by: Platform.sh
2019-06-04 13:59:41 +02:00
Nicolas Grekas
c402418723 [HttpClient] add $response->cancel() 2019-06-04 13:36:30 +02:00