Commit Graph

34838 Commits

Author SHA1 Message Date
Fabien Potencier
f8b0bfd332 bug #32131 [Mailgun Mailer] fixed issue when using html body (alOneh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailgun Mailer] fixed issue when using html body

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

I tested the `symfony/mailgun-mailer` and get an issue when using the `api` scheme with a templated email cause we try to manipulate a stream whereas the `Symfony\Component\Mime\Email::getHtmlBody()` could return also a string (in my case it is one).

The issue :

```
stream_get_meta_data() expects parameter 1 to be resource, string given
```

Commits
-------

afbefe131b [Mailgun Mailer] fixed issue when using html body
2019-06-26 10:48:20 +02:00
Nicolas Grekas
0c9b3c08b7 [Bridge/PhpUnit] Fix PHP5.5 compat 2019-06-26 10:33:58 +02:00
Fabien Potencier
64b68d4922 bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)
This PR was squashed before being merged into the 4.3 branch (closes #31730).

Discussion
----------

[PhpUnitBridge] More accurate grouping

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

Sometimes, you cannot easily know if code was written by a vendor or
directly in the application, for instance if the code comes from a file
in the cache. In that case, it is better not to classify the deprecation
as direct or indirect.

@jmsche please test this on your application when you can, I think you might be having that issue.

Commits
-------

d9f0ba386a [PhpUnitBridge] More accurate grouping
2019-06-26 10:11:14 +02:00
Grégoire Paris
d9f0ba386a [PhpUnitBridge] More accurate grouping 2019-06-26 10:11:05 +02:00
Fabien Potencier
3cd795fdde fixed CS 2019-06-26 09:55:28 +02:00
Fabien Potencier
bd2356d8e5 bug #31966 [Messenger] Doctrine Connection find and findAll now correctly decode headers (TimoBakx)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Doctrine Connection find and findAll now correctly decode headers

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

The Doctrine transport `Connection` class methods `find` and `findAll` did not JSON-decode the headers of the envelope after retrieving it from Doctrine. The `get` method, however, did this correctly.

I added two tests to verify the results of `find` and `findAll` and then added the JSON-decoding to the `Connection` class. I moved the JSON-decoding to a separate method to avoid duplicate code.

Commits
-------

3aec2acce5 [Messenger] Doctrine Connection find and findAll now correctly decode headers
2019-06-26 09:44:37 +02:00
Fabien Potencier
6437c5a0fe bug #31972 Add missing rendering of form help block. (alexsegura)
This PR was merged into the 4.2 branch.

Discussion
----------

Add missing rendering of form help block.

| Q             | A
| ------------- | ---
| Branch?       | 4.2 <!-- see below -->
| Bug fix?      | yes
| 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 -->
| License       | MIT

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

When using `bootstrap_3_layout.html.twig` form theme, the help blocks are not rendered.

```twig
{% form_theme form 'bootstrap_3_layout.html.twig' %}

{{ form_start(form) }}
  {{ form_row(form.some_field) }} {# <-- no help text is rendered #}
{{ form_end(form) }}
```

Commits
-------

ff5517e554 Add missing rendering of form help block.
2019-06-26 09:37:26 +02:00
Fabien Potencier
bd8ad3f717 feature #32126 [Process] Allow writing portable "prepared" command lines (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Process] Allow writing portable "prepared" command lines

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes <!-- 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 | #23778  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/11802 <!-- required for new features -->

Hey here, it's me, again !

I've talked with @nicolas-grekas and he gave me a new way of writing this feature that will not be a problem for people using things like {{ toto }} since we are using the linux style of using envvar, the replaced arguments is only replaced when using windows.

This should not break anything and work as expected!

see https://github.com/symfony/symfony/pull/24763

This makes `"$FOO"` work seamlessly on Linux and on Windows to reference an env var (that can be provided when calling e.g. the "run" method)

Commits
-------

3f8354f58f [Process] Allow writing portable "prepared" command lines
2019-06-26 09:34:54 +02:00
Fabien Potencier
0219834a2d bug #32141 [HttpClient] fix dealing with 1xx informational responses (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix dealing with 1xx informational responses

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

I never had a look at 1xx status codes until today.
This PR fixes reading them when using curl.

If one wonders:
- `NativeHttpClient` uses `fopen()`, which skips informational parts as allowed by the HTTP spec and doesn't give any way to access their response headers.
- `CurlHttpClient` allows reading informational responses using the progress callback or via the getInfo() method. That's the way if you need to implement e.g. HTTP 103 early hints.

Commits
-------

412411d795 [HttpClient] fix dealing with 1xx informational responses
2019-06-26 09:29:23 +02:00
Fabien Potencier
c245f7c681 bug #32138 [Filesystem] fix mirroring directory into parent directory (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Filesystem] fix mirroring directory into parent directory

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

Commits
-------

b58a806340 fix mirroring directory into parent directory
2019-06-26 09:23:20 +02:00
Fabien Potencier
f15722dd84 minor #32143 use proper return types in ErrorHandler and ArgumentResolver (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

use proper return types in ErrorHandler and ArgumentResolver

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | tiny
| 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        |

Found those things while reviewing #31996 which missed some return types due to using `return` instead of `return null`.
It's part of fixing #17201 (due to #10717). See also #30869 that somebody was stumbling over.

Commits
-------

2f9121b74d use proper return types in ErrorHandler and ArgumentResolver
2019-06-26 09:20:55 +02:00
Fabien Potencier
c042b5b6a5 bug #32137 [HttpFoundation] fix accessing session bags (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] fix accessing session bags

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

Commits
-------

7a4570dcac fix accessing session bags
2019-06-26 09:16:02 +02:00
Fabien Potencier
a59082937f bug #32147 [HttpClient] fix timing measurements with NativeHttpClient (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix timing measurements with NativeHttpClient

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

Align to what curl does.

Commits
-------

c5c3332400 [HttpClient] fix timing measurements with NativeHttpClient
2019-06-26 09:10:28 +02:00
Fabien Potencier
6b83861ac3 minor #32161 [Lock] fix missing inherit docs in RedisStore (Simperfit)
This PR was merged into the 4.2 branch.

Discussion
----------

[Lock] fix missing inherit docs in RedisStore

| 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? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |  <!-- required for new features -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

This is a missing inheritdoc in the RedisStore for the waitAndSave method.

Commits
-------

71eb8cfe99 [Lock] fix missing inherit docs in RedisStore
2019-06-26 09:07:36 +02:00
Fabien Potencier
e8c68d533d bug #32165 revert #30525 due to performance penalty (bendavies)
This PR was merged into the 4.3 branch.

Discussion
----------

revert #30525 due to performance penalty

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| 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 |   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

This reverts #30525, because it introduced a large performance penalty.

Here is the effect of that PR when I upgrade my Api Platform project from 4.2.9 to 4.3.1:
https://blackfire.io/profiles/compare/28bfbc61-3649-4896-bd03-7201239134cd/graph?settings%5Bdimension%5D=wt&settings%5Bdisplay%5D=landscape&settings%5BtabPane%5D=nodes&selected=Symfony%5CComponent%5CVarExporter%5CInternal%5CExporter%3A%3Aexport%403&callname=main()

The reverted PR targeted master. This should go in 4.3?

Commits
-------

3d37cc98f6 revert #30525 due to performance penalty
2019-06-26 09:06:13 +02:00
Fabien Potencier
32fd8e0409 Merge branch '4.2' into 4.3
* 4.2:
  [FrameworkBundle] Fix calling Client::getProfile() before sending a request
  Fix type error
  [Security/Core] Don't use ParagonIE_Sodium_Compat
  collect called listeners information only once
  add test to avoid regressions
  fix typos
  Turkish translation added to Form Component
2019-06-26 08:50:02 +02:00
Fabien Potencier
f0acaff850 Merge branch '3.4' into 4.2
* 3.4:
  [FrameworkBundle] Fix calling Client::getProfile() before sending a request
  Fix type error
  [Security/Core] Don't use ParagonIE_Sodium_Compat
  collect called listeners information only once
  add test to avoid regressions
  fix typos
  Turkish translation added to Form Component
2019-06-26 08:46:55 +02:00
Fabien Potencier
c511e46c73 bug #32164 [EventDispatcher] collect called listeners information only once (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] collect called listeners information only once

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

Commits
-------

2ad32df6e0 collect called listeners information only once
2019-06-26 08:45:17 +02:00
Fabien Potencier
7cc4cabd47 bug #32173 [FrameworkBundle] Fix calling Client::getProfile() before sending a request (dunglas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix calling Client::getProfile() before sending a request

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

Prevent throwing an error when calling getProfile before a request has been sent.

Commits
-------

9e6f4b2122 [FrameworkBundle] Fix calling Client::getProfile() before sending a request
2019-06-26 08:42:52 +02:00
Fabien Potencier
28b20b8a73 bug #32163 [DoctrineBridge] Fix type error (norkunas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge] Fix type error

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | yes
| 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 | -  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

See discussion here: https://github.com/doctrine/DoctrineBundle/pull/984

> Having SET sql_mode=(SELECT REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', '')) query and when clicking on explain currently it throws:

> Argument 2 passed to Doctrine\DBAL\Connection::resolveParams() must be of the type array, null given, called in /vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php on line 911

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

7b8ee3ece8 Fix type error
2019-06-26 08:19:19 +02:00
Tobias Schultze
b80ce9ad18 [Form] remove comment about to-be-removed method as it is used in master by ButtonBuilder 2019-06-26 00:51:39 +02:00
Tobias Schultze
6a2f4dc67a Extract unrecoverable exception to interface 2019-06-26 00:15:30 +02:00
Kévin Dunglas
9e6f4b2122
[FrameworkBundle] Fix calling Client::getProfile() before sending a request 2019-06-25 17:43:39 +02:00
Tomas
7b8ee3ece8 Fix type error 2019-06-25 17:06:32 +03:00
Fabien Potencier
b68a6b3e16 bug #32154 [Messenger] fix retrying handlers using DoctrineTransactionMiddleware (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] fix retrying handlers using DoctrineTransactionMiddleware

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| 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        |

The retry logic only executes handlers that didn't fail using the HandledStamp. But in case of using the DoctrineTransactionMiddleware using several handlers, we need to remove the HandledStamp because those handlers got rolled back again.

Commits
-------

66c2e8483a [Messenger] fix retrying handlers using DoctrineTransactionMiddleware
2019-06-25 15:53:13 +02:00
Fabien Potencier
4e6951b1d3 bug #32169 [Security/Core] require libsodium >= 1.0.14 (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Security/Core] require libsodium >= 1.0.14

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

- bump libsodium to >=1.0.14
- Minimum opscost must be 3, as described in https://wiki.php.net/rfc/libsodium and in https://github.com/jedisct1/libsodium/releases/tag/1.0.15
- ParagonIE_Sodium_Compat [explicitly doesn't implement Argon2](https://github.com/paragonie/sodium_compat#features-excluded-from-this-polyfill), so it makes no sense to check for it.

Commits
-------

4fed5d3813 [Security/Core] require libsodium >= 1.0.14
2019-06-25 15:28:12 +02:00
Nicolas Grekas
4fed5d3813 [Security/Core] require libsodium >= 1.0.14 2019-06-25 15:09:11 +02:00
Fabien Potencier
9830c64db0 bug #32156 [Workflow] re-add workflow.definition tag to workflow services (nikossvnk)
This PR was squashed before being merged into the 4.3 branch (closes #32156).

Discussion
----------

[Workflow] re-add workflow.definition tag to workflow services

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| 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 | #32155   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

Add again the `workflow.definition` tag in workflow services.

Commits
-------

4df2dc5aaa [Workflow] re-add workflow.definition tag to workflow services
2019-06-25 14:31:05 +02:00
nikos.sotiropoulos
4df2dc5aaa [Workflow] re-add workflow.definition tag to workflow services 2019-06-25 14:30:50 +02:00
Nicolas Grekas
61ea53d57f [Security/Core] Don't use ParagonIE_Sodium_Compat 2019-06-25 14:22:47 +02:00
Ben Davies
3d37cc98f6 revert #30525 due to performance penalty 2019-06-25 10:08:34 +01:00
Christian Flothmann
2ad32df6e0 collect called listeners information only once 2019-06-25 09:45:31 +02:00
Amrouche Hamza
71eb8cfe99
[Lock] fix missing inherit docs in RedisStore 2019-06-25 07:47:15 +02:00
Robin Chalas
efaa154c74 minor #32146 [Security] add return type declaration (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] add return type declaration

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

Commits
-------

9fe532d657 add return type declaration
2019-06-25 03:46:17 +02:00
Tobias Schultze
8124159052 minor #32078 [Messenger] make all stamps final and mark stamp not meant to be sent (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] make all stamps final and mark stamp not meant to be sent

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| 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 newer stamps were already final. This makes all of them final. Also marks all stamps that are not meant to be sent using the new `NonSendableStampInterface`. This makes it easier to see which stamps are actually important and required to persist in a queue for certain functionality, like the `BusNameStamp` for the `RoutableMessageBus`

Commits
-------

013904b081 [Messenger] make all stamps final and mark stamp not meant to be sent
2019-06-24 23:33:22 +01:00
Tobias Schultze
67af93f3b0 bug #32053 [Messenger] No need for retry to require SentStamp (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] No need for retry to require SentStamp

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| 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        |

Fixes 2) in #32049
@weaverryan the SentStamp in the worker seems totally irrelevant. You always want to send messages back to the transport where they came from for retry. The only relevance I can potentially see is for the SyncTransport. Messages received async from worker might be routed to the SyncTransport. Using the SentStamp would redeliver the messages into the SyncTransport instead of the async. But that doesn't seem to have any use-case. I'm running the worker which handles the messages immediately. So basically there is no difference if they go to the Sync or Async transport from within the worker.

Commits
-------

0034dee641 [Messenger] make retry logic work without SentStamp
2019-06-24 23:32:13 +01:00
Tobias Schultze
66c2e8483a [Messenger] fix retrying handlers using DoctrineTransactionMiddleware 2019-06-24 15:34:54 +01:00
Hippolyte Alain
afbefe131b [Mailgun Mailer] fixed issue when using html body 2019-06-24 16:09:08 +02:00
Tobias Schultze
013904b081 [Messenger] make all stamps final and mark stamp not meant to be sent 2019-06-24 14:58:45 +01:00
Nicolas Grekas
c5c3332400 [HttpClient] fix timing measurements with NativeHttpClient 2019-06-24 10:59:29 +02:00
Christian Flothmann
9fe532d657 add return type declaration 2019-06-24 10:10:57 +02:00
Tobias Schultze
2f9121b74d use proper return types in ErrorHandler and ArgumentResolver 2019-06-24 02:04:42 +01:00
Amrouche Hamza
3f8354f58f
[Process] Allow writing portable "prepared" command lines 2019-06-23 21:19:36 +02:00
Nicolas Grekas
412411d795 [HttpClient] fix dealing with 1xx informational responses 2019-06-23 19:42:15 +02:00
Nicolas Grekas
698601140b minor #31993 [Mailer] Catch missing scheme in DSN (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] Catch missing scheme in DSN

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

The `Symfony\Component\Mailer\Transport::createTransport()` method parses and validates a passed DSN. I noticed that we never check if the DSN contains a valid scheme, but we always assume that the scheme is present in then parse result. If someone passes a DSN without a scheme to that method, they would almost certainly run into a PHP notice.

This PR makes sure that a scheme is present in the URL and throws a proper exception otherwise.

Commits
-------

3eba36c088 [Mailer] Catch missing scheme in DSN.
2019-06-23 17:43:40 +02:00
Nicolas Grekas
b56591c92d bug #32083 [HttpClient] fixing passing debug info to progress callback (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fixing passing debug info to progress callback

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

NativeHttpClient already has it.

Commits
-------

dc55cf826a [HttpClient] fixing passing debug info to progress callback
2019-06-23 17:19:50 +02:00
Nicolas Grekas
57d73fcac3 minor #32140 [Filesystem] add test to avoid regressions (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Filesystem] add test to avoid regressions

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

Commits
-------

0d7d1f81bc add test to avoid regressions
2019-06-23 17:08:29 +02:00
Nicolas Grekas
6d02c89c21 bug #32129 [DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service (alekitto)
This PR was merged into the 4.3 branch.

Discussion
----------

[DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service

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

Non-existent class was checked by `method_exists` in Debug bundle.
This should fix (and correctly register) the caster while loading `DebugExtension` from `DebugBundle`

Commits
-------

860164ee7e [DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service
2019-06-23 16:55:14 +02:00
Christian Flothmann
0d7d1f81bc add test to avoid regressions 2019-06-23 11:29:17 +02:00
Gabriel Ostrolucký
83edac321e [Console] Add ProgressBar::preventRedrawFasterThan() and forceRedrawSlowerThan() methods 2019-06-23 11:16:35 +02:00
Christian Flothmann
b58a806340 fix mirroring directory into parent directory 2019-06-23 10:51:25 +02:00
Christian Flothmann
196ee5599d fix typos 2019-06-23 10:10:04 +02:00
Emre Akinci
a030e393c5 Turkish translation added to Form Component 2019-06-23 09:45:21 +02:00
Tobias Schultze
7822b3cbc0 bug #32027 [Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue (Nyholm)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue

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

This will fix #32009.

Thank you @brpauwels for the report.

I consider it safe to remove the `DispatchAfterCurrentBusStamp` because its meaning disappear after we handled the "current bus".

T0: We add the stamp
T1: We put the envelope on an internal queue in `DispatchAfterCurrentBusMiddleware`
T2: We handle the current bus.
T3: We start processing our internal queue.

At T3 there we are "after current bus", that is why we dont need the stamp any more.

Commits
-------

91f1680b3f [Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue
2019-06-22 23:18:30 +01:00
Christian Flothmann
7a4570dcac fix accessing session bags 2019-06-22 22:10:25 +02:00
Fabien Potencier
3634390a27 Merge branch '4.2' into 4.3
* 4.2:
  Fix link to documentation
  [Validator] Use LogicException for missing Property Access Component in comparison constraints
2019-06-22 10:39:44 +02:00
Fabien Potencier
aa4385dc12 feature #31532 [Ldap] Add users extraFields in ldap component (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Add users extraFields in ldap component

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- 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 | #28873, #19329 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo when validated, before merge <!-- required for new features -->

As I'm using ldap too in some personal project, It seems that this feature is a really good nice to have IMHO.

Adding the wanted field in the `user_metadata` array transform them as field -> value in the `metadata` field of the user.

Commits
-------

bcfff04797 [Ldap] Add users extra_fields in ldap component
2019-06-22 10:38:33 +02:00
Amrouche Hamza
bcfff04797
[Ldap] Add users extra_fields in ldap component 2019-06-22 10:34:40 +02:00
Fabien Potencier
115e67b92a feature #32104 Add autowiring for HTTPlug (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Add autowiring for HTTPlug

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

Commits
-------

f76e77d58f Add autowiring for HTTPlug
2019-06-22 10:32:12 +02:00
Fabien Potencier
0dbf4775e2 bug #32125 [Form] accept floats for input="string" in NumberType (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Form] accept floats for input="string" in NumberType

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

Commits
-------

2abf85599d accept floats for input="string" in NumberType
2019-06-22 10:27:15 +02:00
Fabien Potencier
b9ad880792 feature #32130 [Form] deprecate int/float for string input in NumberType (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] deprecate int/float for string input in NumberType

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

Commits
-------

d8c008aa4d deprecate int/float for string input in NumberType
2019-06-22 10:21:37 +02:00
Alex Nostadt
e0d2c58bc2 Fix link to documentation 2019-06-22 10:17:17 +02:00
Fabien Potencier
5471867efc bug #32094 [Validator] Use LogicException for missing Property Access Component in comparison constraints (Lctrs)
This PR was merged into the 4.2 branch.

Discussion
----------

[Validator] Use LogicException for missing Property Access Component in comparison constraints

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

For consistency.

Commits
-------

6ac2316993 [Validator] Use LogicException for missing Property Access Component in comparison constraints
2019-06-22 10:13:40 +02:00
Fabien Potencier
f429986dbb feature #31547 [Ldap] Add exception for mapping ldap errors (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Add exception for mapping ldap errors

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- 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 | #28677   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | <!-- required for new features -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Maybe we could add more exception code since the list has a lot of errors, maybe we could add a class that maps the error to the right exeptions. see https://www.php.net/manual/en/function.ldap-errno.php

Commits
-------

1b29cb1a5f [Ldap] Add exception for mapping ldap errors
2019-06-22 10:08:21 +02:00
Fabien Potencier
04b2f7f3ef bug #32136 [FrameworkBundle] sync require-dev and conflict constraints (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] sync `require-dev` and `conflict` constraints

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

The `conflict` section already prevents the Translation component 4.2 to be installed.

Commits
-------

47f9235568 sync `require-dev` and `conflict` constraints
2019-06-22 10:05:56 +02:00
Christian Flothmann
d8c008aa4d deprecate int/float for string input in NumberType 2019-06-21 23:21:11 +02:00
Christian Flothmann
47f9235568 sync require-dev and conflict constraints 2019-06-21 23:08:55 +02:00
Christian Flothmann
48664445ba fix typo 2019-06-21 22:46:43 +02:00
Amrouche Hamza
905bec4577
[DI] throw an exception when the kernel has been booted twices 2019-06-21 22:24:55 +02:00
Alessandro Chitolina
860164ee7e
[DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service 2019-06-21 12:18:42 +02:00
Christian Flothmann
431a769307 Merge branch '4.3' into 4.4
* 4.3:
  fix translation domain
  tag the FileType service as a form type
  don't validate IP addresses from env var placeholders
  [Validator] Fix GroupSequenceProvider annotation
  [Messenger] fix delay exchange recreation after disconnect
  Update ajax security cheat sheet link
  Fix AuthenticationException::getToken typehint
2019-06-21 12:14:40 +02:00
Christian Flothmann
a25c2af559 Merge branch '4.2' into 4.3
* 4.2:
  fix translation domain
  tag the FileType service as a form type
  [Validator] Fix GroupSequenceProvider annotation
  Update ajax security cheat sheet link
  Fix AuthenticationException::getToken typehint
2019-06-21 12:01:08 +02:00
Christian Flothmann
6821850183 Merge branch '3.4' into 4.2
* 3.4:
  fix translation domain
  tag the FileType service as a form type
  [Validator] Fix GroupSequenceProvider annotation
  Update ajax security cheat sheet link
  Fix AuthenticationException::getToken typehint
2019-06-21 11:59:02 +02:00
Christian Flothmann
2abf85599d accept floats for input="string" in NumberType 2019-06-21 11:58:40 +02:00
Christian Flothmann
74387cf21f fix translation domain 2019-06-20 22:29:36 +02:00
Yonel Ceruto
7057244890 Added ErrorHandler component 2019-06-20 11:01:49 -04:00
Christian Flothmann
ea5b1f4d67 tag the FileType service as a form type 2019-06-20 12:19:18 +02:00
Christian Flothmann
f23a7f60cf don't validate IP addresses from env var placeholders 2019-06-20 12:11:09 +02:00
Nicolas Grekas
f76e77d58f Add autowiring for HTTPlug 2019-06-20 09:09:07 +02:00
Fabien Potencier
6fcd319d78 minor #32044 [Validator] Fix GroupSequenceProvider annotation (enumag)
This PR was squashed before being merged into the 3.4 branch (closes #32044).

Discussion
----------

[Validator] Fix GroupSequenceProvider annotation

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

The possibility was added in https://github.com/symfony/symfony/pull/19982, just forgot to fix this annotation back then.

Commits
-------

bf6d2532de [Validator] Fix GroupSequenceProvider annotation
2019-06-20 08:43:36 +02:00
Jáchym Toušek
bf6d2532de [Validator] Fix GroupSequenceProvider annotation 2019-06-20 08:43:29 +02:00
Nicolas Grekas
8a1813a095 Revert "minor #32054 Prepare for PHP 7.4 preload (nicolas-grekas)"
This reverts commit a0aa94114a, reversing
changes made to 8496003634.
2019-06-20 08:42:33 +02:00
Tobias Schultze
c1c3b54a0f [Messenger] fix delay exchange recreation after disconnect 2019-06-20 03:38:05 +01:00
Kévin Dunglas
e0ef35973d
[FrameworkBundle] Use default_locale as default value for translator.fallbacks 2019-06-19 22:36:28 +02:00
Robin Chalas
8ad74a859d minor #32001 [Security] Fix AuthenticationException::getToken typehint (norkunas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Fix AuthenticationException::getToken typehint

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

The token may be not set when throwing AuthenticationException.

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

a9705a0143 Fix AuthenticationException::getToken typehint
2019-06-19 19:38:48 +02:00
Alex Bowers
c266d6c737
Update Request.php 2019-06-19 17:03:11 +01:00
Nicolas Grekas
d31b71677d Merge branch '4.3' into 4.4
* 4.3:
  [FrameworkBundle] minor: fix typo in SessionTest
  [Debug] workaround BC break in PHP 7.3
2019-06-19 17:27:23 +02:00
Nicolas Grekas
2fa52989db Merge branch '4.2' into 4.3
* 4.2:
  [FrameworkBundle] minor: fix typo in SessionTest
  [Debug] workaround BC break in PHP 7.3
2019-06-19 17:27:09 +02:00
Nicolas Grekas
b2eeaea00c Merge branch '3.4' into 4.2
* 3.4:
  [FrameworkBundle] minor: fix typo in SessionTest
  [Debug] workaround BC break in PHP 7.3
2019-06-19 17:26:44 +02:00
Fabien Potencier
df210194e0 minor #32100 Update ajax security cheat sheet link (steef)
This PR was merged into the 3.4 branch.

Discussion
----------

Update ajax security cheat sheet link

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

# Description
After looking in the `JsonResponse` class I found an old OWASP [link](https://www.owasp.org/index.php/AJAX_Security_Cheat_Sheet#Always_return_JSON_with_an_Object_on_the_outside). As the cheat sheet series project is moved to GitHub the link can be updated to the [following](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/AJAX_Security_Cheat_Sheet.md).

## Screenshot
<img width="552" alt="Screenshot 2019-06-19 at 16 52 19" src="https://user-images.githubusercontent.com/34915382/59776184-a7e2bf80-92b2-11e9-8d23-802acfddfb1d.png">

Commits
-------

32d02d6141 Update ajax security cheat sheet link
2019-06-19 17:25:42 +02:00
Stefano Degenkamp
32d02d6141
Update ajax security cheat sheet link
As the cheat sheet series project has been moved to github.
2019-06-19 17:21:12 +02:00
Alex Bowers
23db9be884
Don't assume port 0 for X-Forwarded-Port 2019-06-19 12:46:55 +01:00
Fabien Potencier
eb4026b3f4 bug #32090 [Debug] workaround BC break in PHP 7.3 (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] workaround BC break in PHP 7.3

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony-standard/issues/1138 https://github.com/symfony/website-skeleton/issues/231
| License       | MIT
| Doc PR        | -

A new warning has been added in PHP 7.3 that is breaking BC with Symfony, since we turn warnings into exceptions.
This PR turns the new warning into a deprecation, so that we will be able to remove the added "if" in 5.0.

I noticed a few other similar BC breaks in 7.1 and 7.2, but *unless someone reports that they block them*, I don't think we need to care.
- 7.1 A non well formed numeric value encountered E_NOTICE
- 7.1 A non-numeric value encountered E_WARNING
- 7.2 count() now raises a warning when an invalid parameter is passed.

See https://github.com/php/php-src/blob/PHP-7.1/UPGRADING + same in upper branches.

Commits
-------

d8d43e6195 [Debug] workaround BC break in PHP 7.3
2019-06-19 12:21:41 +02:00
Amrouche Hamza
494281465d [FrameworkBundle] minor: fix typo in SessionTest 2019-06-19 10:53:48 +02:00
Lctrs
6ac2316993 [Validator] Use LogicException for missing Property Access Component in comparison constraints 2019-06-19 10:51:43 +02:00
Nicolas Grekas
d8d43e6195 [Debug] workaround BC break in PHP 7.3 2019-06-18 23:26:03 +02:00
Nicolas Grekas
dc55cf826a [HttpClient] fixing passing debug info to progress callback 2019-06-18 14:13:04 +02:00
Anderson Müller
d04a3b3ff9
[CACHE] Correct required file added in #32054 2019-06-18 13:39:39 +02:00
Fabien Potencier
411ad9752a feature #31764 [FrameworkBundle] add attribute stamps (walidboughdiri)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] add attribute stamps

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes<!-- 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 | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a <!-- required for new features -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

8a09579d35 remove bc break code
2019-06-18 06:47:21 +02:00
walidboughdiri
8a09579d35 remove bc break code 2019-06-18 02:21:11 +02:00
Nicolas Grekas
561ad17d16 minor #32074 Add BC layer for updated constructor types (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Add BC layer for updated constructor types

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

Reverts some CS changes done in #32066 + replaces its BC breaks by a BC layer.
Our CI is too good, it bites us hard when we break our own rules :)

Commits
-------

c34fcd91d1 Add BC layer for updated constructor types
2019-06-17 21:43:44 +02:00
Nicolas Grekas
67f99ce226 Merge branch '4.3' into 4.4
* 4.3:
  Fix PDO prune not called
  Fix Expiring lock in PDO and ZooKeeper
  [Lock] fix bad merge
2019-06-17 21:43:06 +02:00
Nicolas Grekas
5af1e9e1a5 minor #32075 [Lock] Fix expired lock not cleaned in ZooKeeper (jderusse)
This PR was merged into the 4.3 branch.

Discussion
----------

[Lock] Fix expired lock not cleaned in ZooKeeper

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | ,p
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #31426
| License       | MIT
| Doc PR        | NA

Following #32071 for 4.3 branch

context:
When a lock is acquired BUT not as fast as expected, a LockExpiredException is thrown.
Issue is, that the lock is not removed which avoid other process to acquire that lock.

This PR clean state of store when a LockExpiredException is triggered in PDO and ZooKeepeer.

Commits
-------

4f808ef4f4 Fix Expiring lock in PDO and ZooKeeper
2019-06-17 21:42:39 +02:00
Nicolas Grekas
15652e3373 Merge branch '4.2' into 4.3
* 4.2:
  Fix PDO prune not called
2019-06-17 21:41:54 +02:00
Jérémy Derussé
fc2dc14924
Fix PDO prune not called 2019-06-17 21:38:43 +02:00
Jérémy Derussé
4f808ef4f4
Fix Expiring lock in PDO and ZooKeeper 2019-06-17 21:08:41 +02:00
Nicolas Grekas
c34fcd91d1 Add BC layer for updated constructor types 2019-06-17 20:49:26 +02:00
Nicolas Grekas
1337dbff81 Merge branch '4.2' into 4.3
* 4.2:
  [Lock] fix bad merge
2019-06-17 20:45:40 +02:00
Nicolas Grekas
432c21f83c [Lock] fix bad merge 2019-06-17 20:45:27 +02:00
Nicolas Grekas
651de173df Merge branch '4.3' into 4.4
* 4.3:
  [Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait
  [Cache] fix versioning with SimpleCacheAdapter
  [Messenger] fix AMQP delay queue to be per exchange
  Fix expired lock not cleaned
  [HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error
  [HttpFoundation] Fix SA/phpdoc JsonResponse
  [DI] Show the right class autowired when providing a non-existing class in constructor
  SimpleCacheAdapter fails to cache any item if a namespace is used
  validate composite constraints in all groups
  [Serializer] Handle true and false appropriately in CSV encoder
  [Messenger] improve logs
  [Messenger] fix delay delivery for non-fanout exchanges
  Parameterize Mailgun's region
  Fix binary operation `+`, `-` or `*` on string
  [VarDumper] fix dumping objects that implement __debugInfo()
  [HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set
  Add statement to fileLink to ignore href code when no fileLink.
  [Routing] fix absolute url generation when scheme is not known
2019-06-17 19:38:10 +02:00
Nicolas Grekas
953ac3e77f Merge branch '4.2' into 4.3
* 4.2:
  [Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait
  [Cache] fix versioning with SimpleCacheAdapter
  Fix expired lock not cleaned
  [HttpFoundation] Fix SA/phpdoc JsonResponse
  SimpleCacheAdapter fails to cache any item if a namespace is used
  validate composite constraints in all groups
  [Serializer] Handle true and false appropriately in CSV encoder
  Fix binary operation `+`, `-` or `*` on string
  [VarDumper] fix dumping objects that implement __debugInfo()
  [Routing] fix absolute url generation when scheme is not known
2019-06-17 19:37:00 +02:00
Nicolas Grekas
6b61439fb9 Merge branch '3.4' into 4.2
* 3.4:
  [Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait
  [Cache] fix versioning with SimpleCacheAdapter
2019-06-17 19:31:01 +02:00
Nicolas Grekas
2bf5da51da [Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait 2019-06-17 19:26:15 +02:00
Nicolas Grekas
02a6f248b5 [Cache] fix versioning with SimpleCacheAdapter 2019-06-17 19:18:24 +02:00
Nicolas Grekas
06c17cdaa9 Merge branch '3.4' into 4.2
* 3.4:
  Fix expired lock not cleaned
  [HttpFoundation] Fix SA/phpdoc JsonResponse
  SimpleCacheAdapter fails to cache any item if a namespace is used
  validate composite constraints in all groups
  [Serializer] Handle true and false appropriately in CSV encoder
  Fix binary operation `+`, `-` or `*` on string
  [VarDumper] fix dumping objects that implement __debugInfo()
  [Routing] fix absolute url generation when scheme is not known
2019-06-17 19:15:38 +02:00
Fabien Potencier
12b852f7ab bug #32052 [Messenger] fix AMQP delay queue to be per exchange (Tobion)
This PR was squashed before being merged into the 4.3 branch (closes #32052).

Discussion
----------

[Messenger] fix AMQP delay queue to be per exchange

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| 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 | #32050
| License       | MIT
| Doc PR        |

this makes the delay/retry work when having several exchanges or renaming your exchange.

also the delay setup did not declare the target exchange. so if you only do delayed messages for a connection, auto-setup forgot to actually create the target exchange.

Commits
-------

5bc3364167 [Messenger] fix AMQP delay queue to be per exchange
2019-06-17 18:44:05 +02:00
Tobias Schultze
5bc3364167 [Messenger] fix AMQP delay queue to be per exchange 2019-06-17 18:43:56 +02:00
Fabien Potencier
6ee3efac79 minor #32066 Fine tune constructor types (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

Fine tune constructor types

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| 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        | symfony/symfony-docs#... <!-- required for new features -->

Fine tunes some constructor types that have been added in #24722

Form names as integer was only a workaround as forms names are used as array keys which get transformed to int. So it was added as a workaround in https://github.com/symfony/symfony/pull/6355#discussion_r2422205
With typehints added in #24722 those were mostly auto-cast anyway, e.g. in FormBuilder. There are only a few integer form names remaining documented, in the main entry points of the Form component (`\Symfony\Component\Form\FormInterface::add`). Internally it's always a string now. So I could remove some int docs which also fixes #30032 what @xabbuh tried to do.

Some of these changes we're just not done before because of broken tests. It's mainly a missing explicit mock for `TranslationInterface::trans` which returned null. If we had return types hints in interfaces, this wouldn't happen.

Commits
-------

507794a575 Fine tune constructor types
2019-06-17 18:40:55 +02:00
Fabien Potencier
99c44a3836 bug #32065 [HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error

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

As spotted in the linked issue, we are missing this type of exception. It's a bug at the contracts level.

Commits
-------

3f167417fb [HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error
2019-06-17 18:35:34 +02:00
Jérémy Derussé
9f960f34e7
Fix expired lock not cleaned 2019-06-17 16:13:35 +02:00
Nicolas Grekas
a0aa94114a minor #32054 Prepare for PHP 7.4 preload (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Prepare for PHP 7.4 preload

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

PHP 7.4 preloading is not compatible with declaring the same class twice in if/else blocks.
Let's split the ones we have in several files.

Commits
-------

7cf3fb4a21 Prepare for PHP 7.4 preload
2019-06-17 13:50:38 +02:00
Tobias Schultze
507794a575 Fine tune constructor types 2019-06-17 02:42:58 +01:00
Nicolas Grekas
3f167417fb [HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error 2019-06-16 20:17:37 +02:00
Roland Franssen
270f10cc81 [HttpFoundation] Fix SA/phpdoc JsonResponse 2019-06-16 13:18:06 +02:00
Roland Franssen
5491d5347c [PhpUnitBridge] Bump PHPUnit 7+8 2019-06-16 13:16:20 +02:00
Fabien Potencier
db1543514e bug #32040 [DI] Show the right class autowired when providing a non-existing class (Simperfit)
This PR was merged into the 4.3 branch.

Discussion
----------

[DI] Show the right class autowired when providing a non-existing class

| Q             | A
| ------------- | ---
| Branch?        4.3
| Bug fix?      | yes
| 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 | #31997   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |none <!-- required for new features -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

This gets the last current id before the error and pass it to the callback in order to get the right error message.

Commits
-------

fbda90af6e [DI] Show the right class autowired when providing a non-existing class in constructor
2019-06-16 13:15:10 +02:00
Amrouche Hamza
fbda90af6e
[DI] Show the right class autowired when providing a non-existing class in constructor 2019-06-15 06:08:07 +02:00
Nicolas Grekas
7cf3fb4a21 Prepare for PHP 7.4 preload 2019-06-15 00:30:02 +02:00
Tobias Schultze
0034dee641 [Messenger] make retry logic work without SentStamp 2019-06-14 23:41:22 +02:00
Tobias Schultze
a9bcdcc936 bug #32035 [Messenger] fix delay delivery for non-fanout exchanges (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] fix delay delivery for non-fanout exchanges

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| 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        | symfony/symfony-docs#... <!-- required for new features -->

Fixes two bugs and outdated phpdoc:
1. When your exchange is not of type fanout, but direct for example, then delivery of delayed (retrying) messages does not work. This is because the delay logics adds a routing key to message. It was fixed if you have a custom routing key in #31355. But if you have no routing key, it still changed the routing key which means the message will not be delivery from your direct exchange to your queue anymore after being in the delay exchange. For fanout, which is the default, it does not matter because the routing key is ignored.
2. also fix dsn parsing of plain `amqp://` which is a valid URI that parse_url cannot handle when you want to pass all parameters as options

Commits
-------

0f15306d61 [Messenger] fix delay delivery for non-fanout exchanges
2019-06-14 19:11:46 +02:00
Christian Flothmann
ecded5ed03 prevent double deprecation message 2019-06-14 16:37:07 +02:00
Maxime Steinhausser
c7cc780373 [FrameworkBundle] Unconditionally register the DateIntervalNormalizer 2019-06-14 15:17:07 +02:00
Fabien Potencier
cfbb5b50b1 bug #32025 SimpleCacheAdapter fails to cache any item if a namespace is used (moufmouf)
This PR was squashed before being merged into the 3.4 branch (closes #32025).

Discussion
----------

SimpleCacheAdapter fails to cache any item if a namespace is used

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

This is a backport of #32019

The SimpleCacheAdapter extends AdapterTestCase.
When adding a namespace, the AdapterTestCase adds ":" after the namespace:

https://github.com/symfony/symfony/blob/v4.3.1/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php#L37

The namespace is prepended to the cache key.
But in PSR-16, the ":" is a forbidden character.

As a result, the cache key is invalid and cache is not persisted. If you use Psr16Adapter + a namespace, the cache simply does not work.

As per @nicolas-grekas advices, a NS_SEPARATOR const is added to change the namespace separator for the `SimpleCacheAdapter` to "_" (that is compatible with PSR-16).

The first commit of this PR starts with an additional test and no fix (to showcase the problem).

Commits
-------

ffd3469ddf SimpleCacheAdapter fails to cache any item if a namespace is used
2019-06-14 13:16:09 +02:00
David Négrier
ffd3469ddf SimpleCacheAdapter fails to cache any item if a namespace is used 2019-06-14 13:16:02 +02:00
Maxime Steinhausser
0c0978cd47 [Validator] Deprecate unused arg in ExpressionValidator 2019-06-14 10:40:37 +02:00
Fabien Potencier
6b50c89d76 bug #32022 [HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set

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

On Windows, curl has no cabundle configured by default.

Commits
-------

a2960a3318 [HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set
2019-06-14 10:02:21 +02:00
Fabien Potencier
50c62d7704 feature #31287 [Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation (jschaedl)
This PR was squashed before being merged into the 4.4 branch (closes #31287).

Discussion
----------

[Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #27534   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | tbd.

### Description

This PR introduces a new `find(string $nodePath)`method in the `ArrayNodeDefinition` class, which helps you finding the right node to prepend configuration to ease configuration tree manipulation.

### How to use it
```php
class Configuration implements ConfigurationInterface
{
    public function getConfigTreeBuilder()
    {
        ...

        $rootNode
            ->children()
                ->arrayNode('social_media_channels')
                    ->children()
                        ->booleanNode('enable')->end()
                        ->arrayNode('twitter')->end()
                        ->arrayNode('facebook')->end()
                        ->arrayNode('instagram')->end()
                    ->end()
                ->end()
            ->end()
        ;

        $this->changeSocialMediaChannelConfiguration($rootNode->find('social_media_channels.enable'));
        $this->addTwitterConfiguration($rootNode->find('social_media_channels.twitter'));
        $this->addFacebookConfiguration($rootNode->find('social_media_channels.facebook'));
        $this->addInstagramConfiguration($rootNode->find('social_media_channels.instagram'));

        return $treeBuilder;
    }

    private function changeSocialMediaChannelConfiguration(NodeDefinition $node)
    {
        $node
            ->defaultTrue()
        ;
    }

    private function addTwitterConfiguration(NodeDefinition $node)
    {
        $node
            ->children()
                ->integerNode('client_id')->end()
                ->scalarNode('client_secret')->end()
            ->end()
        ;
    }

    private function addFacebookConfiguration(NodeDefinition $node)
    {
        $node
            ->children()
                ->integerNode('client_id')->end()
                ->scalarNode('client_secret')->end()
            ->end()
        ;
    }

    private function addInstagramConfiguration(NodeDefinition $node)
    {
        $node
            ->children()
                ->integerNode('client_id')->end()
                ->scalarNode('client_secret')->end()
            ->end()
        ;
    }
}

```

Commits
-------

e3b248aee0 [Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation
2019-06-14 09:59:19 +02:00
Jan Schädlich
e3b248aee0 [Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation 2019-06-14 09:59:12 +02:00
Christian Flothmann
94ded00216 validate composite constraints in all groups 2019-06-14 09:34:46 +02:00
Fabien Potencier
b8978bd9ff bug #32007 [Serializer] Handle true and false appropriately in CSV encoder (battye)
This PR was squashed before being merged into the 3.4 branch (closes #32007).

Discussion
----------

[Serializer] Handle true and false appropriately in CSV encoder

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

Previously, if `true` was passed in as a value to the CSV encoder then `fputcsv()` would correctly treat it as 1. However, if `false` was passed in, it would be treated as a blank value. `null` would also be treated as a blank value.

This fix makes it consistent so that true and false will map to 1 and 0, while null maps to an empty string.

Commits
-------

89cba00c68 [Serializer] Handle true and false appropriately in CSV encoder
2019-06-14 07:50:06 +02:00
battye
89cba00c68 [Serializer] Handle true and false appropriately in CSV encoder 2019-06-14 07:49:57 +02:00
Fabien Potencier
f06a35b974 feature #31959 [DomCrawler][Feature][DX] Add Form::getName() method (JustBlackBird)
This PR was squashed before being merged into the 4.4 branch (closes #31959).

Discussion
----------

[DomCrawler][Feature][DX] Add Form::getName() method

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | None
| License       | MIT
| Doc PR        | symfony/symfony-docs#11705

The PR adds `Symfony\Component\DomCrawler\Form::getName` method.

The method is actually a syntax sugar but can improve DX when dealing with tests. For example, in the snippet

```php
$client = static::createClient();
$crawler = $client->request('GET', '/post/hello-world');
$form = $crawler->selectButton('submit')->form();

$form['my_form[name]'] = 'Fabien';
$form['my_form[subject]'] = 'Symfony rocks!';
```
the prefix in field name (`my_form`) is form name, which is generated by Symfony automatically. The method, added in the PR helps to get that name in a most obvious way.

Commits
-------

ff53cb462a [DomCrawler][Feature][DX] Add Form::getName() method
2019-06-14 07:15:47 +02:00
Dmitry Simushev
ff53cb462a [DomCrawler][Feature][DX] Add Form::getName() method 2019-06-14 07:15:39 +02:00
Fabien Potencier
e02da2ab35 bug #32036 [Messenger] improve logs (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] improve logs

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

The logs are currently very confusing and duplicated:

- When handled sync the uncaught error it logged and displayed by the console / http error handler anyway. Currently it the warning is duplicated and useless:

```
14:26:11 WARNING   [messenger] An exception occurred while handling message "{class}": OUCH, THAT HURTS! GO TO MOM!
14:26:11 ERROR     [console] Error thrown while running command "{class}". Message: "OUCH, THAT HURTS! GO TO MOM!"

In HandleMessageMiddleware.php line 82:

  [Symfony\Component\Messenger\Exception\HandlerFailedException]
  OUCH, THAT HURTS! GO TO MOM!
```

- When handling async is was even confusing because the actual error was logged as warning and the retry (which is a good thing) was the error.

```
13:48:15 WARNING   [messenger] An exception occurred while handling message "{class}": OUCH, THAT HURTS! GO TO MOM!
13:48:15 ERROR     [messenger] Retrying {class} - retry #1.
```

Now it's must clearer and adds even context like the delay:

```
16:20:11 ERROR     [messenger] Error thrown while handling message {class}. Dispatching for retry #3 using 4000 ms delay. Error: "OUCH, THAT HURTS! GO TO MOM!"
...
16:20:15 CRITICAL  [messenger] Error thrown while handling message {class}. Removing from transport after 3 retries. Error: "OUCH, THAT HURTS! GO TO MOM!"
```

Commits
-------

2ac7027b71 [Messenger] improve logs
2019-06-14 07:10:33 +02:00
Tobias Schultze
2ac7027b71 [Messenger] improve logs 2019-06-14 05:35:37 +02:00
Tobias Schultze
0f15306d61 [Messenger] fix delay delivery for non-fanout exchanges
also fix dsn parsing of plain amqp:// uri
2019-06-14 02:31:20 +02:00
Jérémy Derussé
7439c8de55
Parameterize Mailgun's region 2019-06-13 19:53:12 +02:00
Fabien Potencier
bd9d0a4793 bug #32000 [Routing] fix absolute url generation when scheme is not known (Tobion)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] fix absolute url generation when scheme is not known

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| 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 | #25491
| License       | MIT
| Doc PR        |

This fixes two edge cases in the url generator:
1. when the context scheme is not known (empty) generating an absolute url would return an invalid url starting with `://host/path`. #25491 handled the case when the host is unknown which makes sense. but the way it was done, created this new problem.
2. non-http(s) urls do not require a host. e.g. typical `file:///path` urls. url generator is fixed to be in line with rfc3986

Commits
-------

8e04222976 [Routing] fix absolute url generation when scheme is not known
2019-06-13 18:44:13 +02:00
Fabien Potencier
9865988ac2 bug #32012 Add statement to fileLink to ignore href code when no fileLink. (bmxmale)
This PR was merged into the 4.3 branch.

Discussion
----------

Add statement to fileLink to ignore href code when no fileLink.

| Q             | A
| ------------- | ---
| Branch?       | 4.3 <!-- see below -->
| Bug fix?      | yes
| 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->
This fix add statement to `\Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor::formatControllerLink` to fix display bug.

**Before**

![image](https://user-images.githubusercontent.com/23213308/59355771-ed8a1000-8d27-11e9-998f-fa2fc34edd62.png)

**After**

![image](https://user-images.githubusercontent.com/23213308/59355785-f2e75a80-8d27-11e9-953b-7523e0c9ad35.png)

Commits
-------

b9eab42823 Add statement to fileLink to ignore href code when no fileLink.
2019-06-13 18:41:02 +02:00
Fabien Potencier
bad18dc4ac feature #32026 [VarDumper] caster for HttpClient's response dumps all info (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] caster for HttpClient's response dumps all info

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

No need to dump the internal structure for responses IMHO, here is a caster that dumps the info instead:

![image](https://user-images.githubusercontent.com/243674/59434490-efb5a280-8deb-11e9-8714-5f1ccbc208b1.png)

Commits
-------

2b268379f5 [VarDumper] caster for HttpClient's response dumps all info
2019-06-13 18:38:05 +02:00
Nicolas Grekas
2b268379f5 [VarDumper] caster for HttpClient's response dumps all info 2019-06-13 18:29:46 +02:00
Fabien Potencier
faf7b305f9 bug #32024 [VarDumper] fix dumping objects that implement __debugInfo() (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] fix dumping objects that implement __debugInfo()

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

Right now it fails if the return value is not an array + it doesn't dump the original details from the object's internals.

Commits
-------

a9d0038ec0 [VarDumper] fix dumping objects that implement __debugInfo()
2019-06-13 18:26:35 +02:00
Stefano Degenkamp
d445465ef4 Fix binary operation +, - or * on string
By type casting to integer.
2019-06-13 17:39:17 +02:00
Nicolas Grekas
567cb27a1d [Security] minor improvement 2019-06-13 16:09:13 +02:00
Nicolas Grekas
7a1e6f732e Merge branch '4.3' into 4.4
* 4.3:
  fix merge
2019-06-13 16:07:54 +02:00
Nicolas Grekas
648aa67eca fix merge 2019-06-13 16:07:09 +02:00
Tobias Nyholm
91f1680b3f
[Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue 2019-06-13 15:04:56 +02:00
Nicolas Grekas
a9d0038ec0 [VarDumper] fix dumping objects that implement __debugInfo() 2019-06-13 14:39:23 +02:00
Nicolas Grekas
a2960a3318 [HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set 2019-06-13 14:16:31 +02:00
Fabien Potencier
fa38497957 fixed CS 2019-06-13 13:06:22 +02:00
Fabien Potencier
8787bbc94a Merge branch '4.3' into 4.4
* 4.3:
  fixed CS
  fixed CS
  fixed CS
  Do not log or call the proxy function when the locale is the same
  Added missing required dependencies on psr/cache and psr/container in symfony/cache-contracts and symfony/service-contracts respectively.
  [HttpClient] fix closing debug stream prematurely
  [Mailer] made code more robust
  Restore compatibility with php 5.5
  fixed sender/recipients in SMTP Envelope
  collect called listeners information only once
  [HttpKernel] Remove TestEventDispatcher.
2019-06-13 13:05:05 +02:00
Fabien Potencier
9526988eca fixed CS 2019-06-13 13:03:18 +02:00
Fabien Potencier
84bc7aba91 Merge branch '4.2' into 4.3
* 4.2:
  fixed CS
  fixed CS
  [HttpKernel] Remove TestEventDispatcher.
2019-06-13 13:01:17 +02:00
Fabien Potencier
37fa45bbd1 fixed CS 2019-06-13 12:57:15 +02:00
Fabien Potencier
0f958aabfa Merge branch '3.4' into 4.2
* 3.4:
  fixed CS
  [HttpKernel] Remove TestEventDispatcher.
2019-06-13 12:50:42 +02:00
Fabien Potencier
106b348d3d fixed CS 2019-06-13 12:34:15 +02:00
Fabien Potencier
dab7a554ae bug #32014 Do not log or call the proxy function when the locale is the same (gmponos)
This PR was squashed before being merged into the 4.3 branch (closes #32014).

Discussion
----------

Do not log or call the proxy function when the locale is the same

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

I was the one creating the PR for logging the change of the locale but ATM I am filled with logs of translator about switching the locale from "en" to "en".. Not sure why.

Commits
-------

31bdfb372c Do not log or call the proxy function when the locale is the same
2019-06-13 11:55:06 +02:00
Mponos George
31bdfb372c Do not log or call the proxy function when the locale is the same 2019-06-13 11:54:55 +02:00
Fabien Potencier
e63577500c bug #32011 [HttpClient] fix closing debug stream prematurely (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix closing debug stream prematurely

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

@ElGecko76 can you please confirm this fixes the issue for you?
I'm not able to reproduce so I can't myself. Thanks.

Commits
-------

21857a1edb [HttpClient] fix closing debug stream prematurely
2019-06-13 11:48:41 +02:00
Michael Bessolov
9cbeb63613
Added missing required dependencies on psr/cache and psr/container
in symfony/cache-contracts and symfony/service-contracts respectively.
2019-06-12 23:16:15 -07:00
Fabien Potencier
1c1d6d9edf bug #31992 Fix sender/recipients in SMTP Envelope (fabpot)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix sender/recipients in SMTP Envelope

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| 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 | #31986
| License       | MIT
| Doc PR        | n/a

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

7a2f9bf134 fixed sender/recipients in SMTP Envelope
2019-06-12 18:30:49 +02:00
Fabien Potencier
41ff9d31d4 minor #32002 [Mailer] made code more robust (fabpot)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] made code more robust

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

8bdc6596ef [Mailer] made code more robust
2019-06-12 16:08:31 +02:00
Nicolas Grekas
21857a1edb [HttpClient] fix closing debug stream prematurely 2019-06-12 15:33:27 +02:00
Mateusz Lerczak
b9eab42823
Add statement to fileLink to ignore href code when no fileLink. 2019-06-12 12:36:09 +02:00
Fabien Potencier
8bdc6596ef [Mailer] made code more robust 2019-06-12 06:54:21 +02:00
Tomas
a9705a0143 Fix AuthenticationException::getToken typehint 2019-06-12 07:10:29 +03:00
Tobias Schultze
8e04222976 [Routing] fix absolute url generation when scheme is not known 2019-06-12 03:24:15 +02:00
Grégoire Paris
496c118c3a
Restore compatibility with php 5.5
The ARRAY_FILTER_USE_KEY constant was introduced in php 5.6, let us
avoid it for now.
See https://www.php.net/manual/en/function.array-filter.php#refsect1-function.array-filter-changelog
2019-06-11 23:50:05 +02:00
Fabien Potencier
7a2f9bf134 fixed sender/recipients in SMTP Envelope 2019-06-11 21:40:57 +02:00
Christian Flothmann
284262a219 collect called listeners information only once 2019-06-11 20:36:39 +02:00
Nicolas Grekas
28674b1e30 [HttpClient] add HttplugClient for compat with libs that need httplug v1 or v2 2019-06-11 17:49:07 +02:00
Nicolas Grekas
e54b62c1e2 Merge branch '4.3' into 4.4
* 4.3:
  add back possibility to use form themes without translations
  [HttpClient] fix Psr18Client handling of non-200 response codes
  [WebProfilerBundle] fix FC with HttpFoundation v5
  [OptionsResolver] fix adding $triggerDeprecation to Options::offsetGet()
  [Form] test case is not legacy
  Fix reporting unsilenced deprecations from insulated tests
  fix handling nested embeddables
  Added FormInterface to @return Form::getClickedButton docblock
2019-06-11 17:42:17 +02:00
Nicolas Grekas
bde8204da3 Merge branch '4.2' into 4.3
* 4.2:
  [WebProfilerBundle] fix FC with HttpFoundation v5
  [OptionsResolver] fix adding $triggerDeprecation to Options::offsetGet()
  [Form] test case is not legacy
  Fix reporting unsilenced deprecations from insulated tests
  Added FormInterface to @return Form::getClickedButton docblock
2019-06-11 17:41:59 +02:00
Nicolas Grekas
b856ab5aa2 Merge branch '3.4' into 4.2
* 3.4:
  [WebProfilerBundle] fix FC with HttpFoundation v5
  [Form] test case is not legacy
  Fix reporting unsilenced deprecations from insulated tests
  Added FormInterface to @return Form::getClickedButton docblock
2019-06-11 17:21:32 +02:00
Alexander M. Turek
3eba36c088 [Mailer] Catch missing scheme in DSN. 2019-06-11 14:30:26 +02:00
Fabien Potencier
8bdd25b7fc bug #31988 [TwigBridge] add back possibility to use form themes without translations (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[TwigBridge] add back possibility to use form themes without translations

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

Commits
-------

87c1d19e72 add back possibility to use form themes without translations
2019-06-11 13:40:09 +02:00
Alexander M. Turek
48be09f37e [HttpKernel] Remove TestEventDispatcher. 2019-06-11 12:48:01 +02:00
Fabien Potencier
dc7f6f79e8 feature #31956 [Mailer] Changed EventDispatcherInterface dependency from Component to Contracts (Koc)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Changed EventDispatcherInterface dependency from Component to Contracts

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | almost yes, see https://github.com/symfony/symfony/pull/31956#issuecomment-500194573
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Follow up of https://github.com/symfony/symfony/pull/31946#discussion_r291795454 . I hope this kind of changes are allowed for experimental components.

BTW, @nicolas-grekas , why Psr14 interface is optional for Contract's `EventDispatcherInterface https://github.com/symfony/symfony/blob/4.4/src/Symfony/Contracts/EventDispatcher/EventDispatcherInterface.php#L16 ?

Commits
-------

bdb6217b15 Changed EventDispatcherInterface dependency from Component to Contracts
2019-06-11 12:40:22 +02:00
Fabien Potencier
2f4f8c05d7 bug #31982 [HttpClient] fix Psr18Client handling of non-200 response codes (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix Psr18Client handling of non-200 response codes

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

Commits
-------

4a7989456b [HttpClient] fix Psr18Client handling of non-200 response codes
2019-06-11 12:37:06 +02:00
Fabien Potencier
71731c6342 feature #31980 [HttpClient] make Psr18Client implement relevant PSR-17 factories (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] make Psr18Client implement relevant PSR-17 factories

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

This should help use the component with libs that consume only PSR-18.

Commits
-------

1c0baf689d [HttpClient] make Psr18Client implement relevant PSR-17 factories
2019-06-11 12:35:03 +02:00
Christian Flothmann
87c1d19e72 add back possibility to use form themes without translations 2019-06-11 11:05:48 +02:00
Fabien Potencier
cc1fc5bc81 feature #31919 [WebProfilerBundle] Select default theme based on user preferences (javiereguiluz)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfilerBundle] Select default theme based on user preferences

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| 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        | (not needed)

This is the same we recently added to symfony.com website. It works on latest versions of Firefox and Safari only (Chrome will add support soon).

Commits
-------

0fc0a348b8 [WebProfilerBundle] Select default theme based on user preferences
2019-06-11 10:38:12 +02:00
Christian Flothmann
776ab628f6 minor #31963 [Form] test case is not legacy (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] test case is not legacy

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

At least it's green.
/cc @xabbuh @HeahDude

Commits
-------

9ad324ba29 [Form] test case is not legacy
2019-06-11 09:20:04 +02:00
Fabien Potencier
c33f69c5d9 feature #31451 [FrameworkBundle] Allow dots in translation domains (jschaedl)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Allow dots in translation domains

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

### Description

With this fix it is now possible to have `.` in translation domains like `app.security.en.yaml`.

### Todo

- [x] add a test case

Commits
-------

4b593b08d1 [FrameworkBundle] Allow dots in translation domains
2019-06-11 08:42:31 +02:00
Nicolas Grekas
4a7989456b [HttpClient] fix Psr18Client handling of non-200 response codes 2019-06-10 19:33:33 +02:00
Nicolas Grekas
1c0baf689d [HttpClient] make Psr18Client implement relevant PSR-17 factories 2019-06-10 18:43:03 +02:00
Alexandre Segura
ff5517e554 Add missing rendering of form help block. 2019-06-10 10:21:04 +02:00
Timo Bakx
3aec2acce5 [Messenger] Doctrine Connection find and findAll now correctly decode headers 2019-06-09 22:48:04 +02:00
Nicolas Grekas
1872a5af39 [WebProfilerBundle] fix FC with HttpFoundation v5 2019-06-09 18:36:33 +02:00
Nicolas Grekas
adc7e6ab7c [OptionsResolver] fix adding $triggerDeprecation to Options::offsetGet() 2019-06-09 18:15:03 +02:00
Nicolas Grekas
7f39f36379 feature #31321 [DI] deprecates tag !tagged in favor of !tagged_iterator (jschaedl)
This PR was squashed before being merged into the 4.4 branch (closes #31321).

Discussion
----------

[DI] deprecates tag !tagged in favor of !tagged_iterator

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

### Todo

- [x] fix tests

Commits
-------

ab8fb1868f [DI] deprecates tag !tagged in favor of !tagged_iterator
2019-06-09 18:06:29 +02:00
Jan Schädlich
ab8fb1868f [DI] deprecates tag !tagged in favor of !tagged_iterator 2019-06-09 18:06:22 +02:00
Nicolas Grekas
9ad324ba29 [Form] test case is not legacy 2019-06-09 16:44:28 +02:00
Nicolas Grekas
48093f4a13 Fix reporting unsilenced deprecations from insulated tests 2019-06-09 16:27:26 +02:00
Konstantin Myakshin
bdb6217b15 Changed EventDispatcherInterface dependency from Component to Contracts 2019-06-09 11:03:37 +03:00
Nicolas Grekas
cdaa4d69e9 [FrameworkBundle] remove dead code 2019-06-08 16:18:47 +02:00
Nicolas Grekas
82d5ff075a [TwigBundle] fix FC with DI v5 2019-06-08 12:47:47 +02:00
Nicolas Grekas
ac95704a20 [FrameworkBundle] fix FC with DI v5 2019-06-08 12:35:19 +02:00
Nicolas Grekas
1dce522b9a [Config] decouple tests from DI 2019-06-08 12:17:01 +02:00
Christian Flothmann
db91042f6b minor #31222 [Form] Add Button type back to Form::getClickedButton docblock (Bill Hance)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Add Button type back to Form::getClickedButton docblock

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

In commit 56429a6f08 the `Button` type was removed from the return doc block.

I suspect this was an oversight because, AFAIK, the [recommended way](https://symfony.com/doc/current/form/multiple_buttons.html) to check the name of a clicked button would require a return type of `Button` or `SubmitButton`.

The effect is that our static analysis checks are failing.
```
Call to an undefined method
Symfony\Component\Form\ClickableInterface::getName().
```

Commits
-------

b71d589071 Added FormInterface to @return Form::getClickedButton docblock
2019-06-08 11:35:31 +02:00
Christian Flothmann
37efa4bb8c fix handling nested embeddables 2019-06-08 11:24:26 +02:00
Nicolas Grekas
e8975e2dfe Merge branch '4.3' into 4.4
* 4.3:
  [Serializer] add missing "internal" annotation
  [DI] Fix suspicious test
  [SecurityBundle] add missing contraint for symfony/config dep
2019-06-08 08:36:25 +02:00
Nicolas Grekas
2b8e44164e [Serializer] add missing "internal" annotation 2019-06-08 08:34:08 +02:00
Nicolas Grekas
b5306d2e81 Merge branch '4.2' into 4.3
* 4.2:
  [DI] Fix suspicious test
  [SecurityBundle] add missing contraint for symfony/config dep
2019-06-08 08:33:08 +02:00
Roland Franssen
25b961aadc [DI] Fix suspicious test 2019-06-08 08:01:32 +02:00
Nicolas Grekas
07ca9f4831 [SecurityBundle] add missing contraint for symfony/config dep 2019-06-07 22:39:07 +02:00
Nicolas Grekas
02a792a313 minor #31938 [FrameworkBundle] fix FC with HttpKernel v5 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] fix FC with HttpKernel v5

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

This class is deprecated and is thus not enough a reason to conflict with http-kernel v5

Should unlock #31918

Commits
-------

6c109c71a9 [FrameworkBundle] fix FC with HttpKernel v5
2019-06-07 20:31:13 +02:00
Nicolas Grekas
3bef037b7b Merge branch '4.3' into 4.4
* 4.3:
  Fixing bug where PropertyInfoLoader tried to add validation to non-existent properties
  [TwigBundle] fix tests
  [travis] increase concurrency
2019-06-07 20:28:30 +02:00
Nicolas Grekas
bc7e7bbb3b minor #31941 [TwigBundle] fix tests (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[TwigBundle] fix tests

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

Should make master back to green.

Commits
-------

5b29918043 [TwigBundle] fix tests
2019-06-07 20:28:14 +02:00
Ryan Weaver
b702598b0b Fixing bug where PropertyInfoLoader tried to add validation to non-existent properties 2019-06-07 14:22:04 -04:00
Nicolas Grekas
5b29918043 [TwigBundle] fix tests 2019-06-07 20:15:33 +02:00
Nicolas Grekas
6c109c71a9 [FrameworkBundle] fix FC with HttpKernel v5 2019-06-07 18:47:40 +02:00
Nicolas Grekas
c5a29278e2 [Validator] relax low dep 2019-06-07 16:50:21 +02:00
Nicolas Grekas
0ebc425221 [Validator] fix conflict rule 2019-06-07 16:48:04 +02:00
Nicolas Grekas
3d9e884642 Merge branch '4.3' into 4.4
* 4.3:
  [Serializer] Fix DataUriNormalizer deprecation (MIME type guesser is optional)
  [DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder
  avoid service id conflicts with Swiftmailer
  [Form] fix usage of legacy TranslatorInterface
  [Serializer] Fix DataUriNormalizer docblock & composer suggest section
2019-06-07 16:37:08 +02:00
Nicolas Grekas
4f714a63bb Merge branch '4.2' into 4.3
* 4.2:
  [DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder
2019-06-07 16:28:03 +02:00
Nicolas Grekas
7054a385b9 minor #31933 [DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder (Simperfit)
This PR was merged into the 4.2 branch.

Discussion
----------

[DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder

| 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? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | none <!-- required for new features -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

This should be fixed in 4.2 because the deprecation has been introduced in 4.2 as said by @stof in https://github.com/symfony/symfony/pull/31932/files#r291600094

Commits
-------

caabd92f89 [DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder
2019-06-07 16:24:06 +02:00
Maxime Steinhausser
2740bd1a9d [Serializer] Fix DataUriNormalizer deprecation (MIME type guesser is optional) 2019-06-07 16:06:48 +02:00
Amrouche Hamza
caabd92f89
[DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder 2019-06-07 16:04:41 +02:00
Nicolas Grekas
3b90c98e04 bug #31928 [FrameworkBundle] avoid service id conflicts with Swiftmailer (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] avoid service id conflicts with Swiftmailer

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

Commits
-------

5ce0edeb12 avoid service id conflicts with Swiftmailer
2019-06-07 16:01:38 +02:00
Nicolas Grekas
770162af05 Merge branch '4.2' into 4.3
* 4.2:
  [Form] fix usage of legacy TranslatorInterface
  [Serializer] Fix DataUriNormalizer docblock & composer suggest section
2019-06-07 15:58:47 +02:00
Nicolas Grekas
0364135989 bug #31925 [Form] fix usage of legacy TranslatorInterface (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Form] fix usage of legacy TranslatorInterface

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

Commits
-------

0fbfefe869 [Form] fix usage of legacy TranslatorInterface
2019-06-07 15:57:04 +02:00
Nicolas Grekas
51299b4472 Merge branch '3.4' into 4.2
* 3.4:
  [Serializer] Fix DataUriNormalizer docblock & composer suggest section
2019-06-07 15:56:41 +02:00
Christian Flothmann
5ce0edeb12 avoid service id conflicts with Swiftmailer 2019-06-07 12:57:51 +02:00
Nicolas Grekas
0fbfefe869 [Form] fix usage of legacy TranslatorInterface 2019-06-07 11:33:39 +02:00
Maxime Steinhausser
51b6bd886a [Serializer] Fix DataUriNormalizer docblock & composer suggest section 2019-06-07 10:45:31 +02:00
Javier Eguiluz
0fc0a348b8 [WebProfilerBundle] Select default theme based on user preferences 2019-06-07 09:48:55 +02:00
Nicolas Grekas
482c357104 [Validator] v4 conflicts with translation v5 2019-06-07 09:41:00 +02:00
Nicolas Grekas
c8c159a755 Merge branch '4.3' into 4.4
* 4.3:
  [Validator] fix deprecation layer of ValidatorBuilder
  [HttpKernel] Fix missing use for request and response classes
  bumped Symfony version to 4.3.2
  updated VERSION for 4.3.1
  updated CHANGELOG for 4.3.1
2019-06-06 20:30:43 +02:00
Nicolas Grekas
5c7b4a0fef Merge branch '4.2' into 4.3
* 4.2:
  [Validator] fix deprecation layer of ValidatorBuilder
2019-06-06 20:29:58 +02:00
Amrouche Hamza
a0e4ad3086
Several components are incompatible with HttpKernel 5.0 2019-06-06 20:23:06 +02:00
Nicolas Grekas
154ce81519 [Validator] fix deprecation layer of ValidatorBuilder 2019-06-06 19:07:55 +02:00
Nicolas Grekas
c289687599 fix typo 2019-06-06 18:44:02 +02:00
Nicolas Grekas
92aa6eed97 [FrameworkBundle] fix compat with some SF5 components 2019-06-06 18:11:34 +02:00
Andrii Dembitskyi
0041cd9828
[HttpKernel] Fix missing use for request and response classes 2019-06-06 17:13:36 +03:00
Fabien Potencier
07800fc3e4 bumped Symfony version to 4.3.2 2019-06-06 15:31:25 +02:00
Fabien Potencier
31e678cd31 updated VERSION for 4.3.1 2019-06-06 15:23:34 +02:00
Fabien Potencier
6dd72dedaa Merge branch '4.3' into 4.4
* 4.3:
  Fix wrong requirements for ocramius/proxy-manager in root composer.json
  Change IntlTimeZone to DateTimeZone
2019-06-06 15:01:21 +02:00
Fabien Potencier
495f6a3b0b Merge branch '4.2' into 4.3
* 4.2:
  Fix wrong requirements for ocramius/proxy-manager in root composer.json
  Change IntlTimeZone to DateTimeZone
2019-06-06 15:00:51 +02:00
Fabien Potencier
9c37d18719 Merge branch '3.4' into 4.2
* 3.4:
  Change IntlTimeZone to DateTimeZone
2019-06-06 14:59:36 +02:00
Fabien Potencier
9691519ca4 bug #31865 [Form] Fix wrong DateTime on outdated ICU library (aweelex)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fix wrong DateTime on outdated ICU library

| Q | A |
| --- | --- |
| Branch? | 3.4 |
| Bug fix? | Yes |
| New feature? | No |
| BC breaks? | No |
| Deprecations? | No |
| Tests pass? | Yes |
| Fixed tickets | --- |
| License | MIT |

There is a problem, when server uses outdated version of ICU (php-intl).

It throws no exeption or debug message on unexisting Timezone. So sometimes you can get wrong DateTime in Forms, because Intl uses 'Etc/Unknown' (UTC+0) instead correct Timezone. And it happens very unobvious.

I added `\IntlExeption` for that cases.

Commits
-------

a6025ab5ee Change IntlTimeZone to DateTimeZone
2019-06-06 14:47:09 +02:00
Александр Ли
a6025ab5ee Change IntlTimeZone to DateTimeZone 2019-06-06 15:54:42 +05:00
Nicolas Grekas
3c8d4c2842 Merge branch '4.3' into 4.4
* 4.3:
  [HttpKernel] fix link to source generation
  [Doctrine Bridge] Check field type before adding Length constraint
  [FrameworkBundle] fix BC-breaking property in WebTestAssertionsTrait
  [Cache] Pass  arg to get callback everywhere
  Fix DoctrineBridge upgrade 5.0
  [FramworkBundle][HttpKernel] fix KernelBrowser BC layer
  Add a missing quote in getValue() DocBlock
  [Messenger] Add runtime check for ext redis version
  [HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor.
  minor: ChoiceType callable deprecation after/before seems wrong
2019-06-06 12:05:19 +02:00
Nicolas Grekas
fa07177838 Merge branch '4.2' into 4.3
* 4.2:
  [Cache] Pass  arg to get callback everywhere
  Add a missing quote in getValue() DocBlock
  [HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor.
  minor: ChoiceType callable deprecation after/before seems wrong
2019-06-06 12:05:02 +02:00
Nicolas Grekas
05eb388c26 Merge branch '3.4' into 4.2
* 3.4:
  Add a missing quote in getValue() DocBlock
  [HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor.
  minor: ChoiceType callable deprecation after/before seems wrong
2019-06-06 12:03:46 +02:00
Nicolas Grekas
4a4b62bf4d [HttpKernel] fix link to source generation 2019-06-06 11:21:46 +02:00
Fabien Potencier
965ed1634e bug #31880 [FrameworkBundle] fix BC-breaking property in WebTestAssertionsTrait (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] fix BC-breaking property in WebTestAssertionsTrait

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

No properties should be exposed.

Commits
-------

625392669a [FrameworkBundle] fix BC-breaking property in WebTestAssertionsTrait
2019-06-06 10:35:06 +02:00
Fabien Potencier
92f333b848 bug #31881 [FramworkBundle][HttpKernel] fix KernelBrowser BC layer (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[FramworkBundle][HttpKernel] fix KernelBrowser BC layer

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

Swap the order of inheritance to preserve BC with legacy `Client` type hints.
From #30541

Commits
-------

1a4c2548d5 [FramworkBundle][HttpKernel] fix KernelBrowser BC layer
2019-06-06 10:33:46 +02:00
Nicolas Grekas
687f775223 bug #31879 [Cache] Pass arg to get callback everywhere (fancyweb)
This PR was merged into the 4.2 branch.

Discussion
----------

[Cache] Pass  arg to get callback everywhere

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

Some adapters does not pass an useless "save" bool arg. However, that makes a `CallbackInterface` callable unusable with them since the arg is required in the interface.

Commits
-------

d03eb033bb [Cache] Pass  arg to get callback everywhere
2019-06-06 09:46:35 +02:00
Christian Flothmann
9c8a6f96a1 bug #31874 [Doctrine Bridge] Check field type before adding Length constraint (belinde)
This PR was squashed before being merged into the 4.3 branch (closes #31874).

Discussion
----------

[Doctrine Bridge] Check field type before adding Length constraint

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

Validator\DoctrineLoader now add a Length constraint only on field of type string, text and guid; for any other type the mapping length is just ignored

Commits
-------

35e6df6bac [Doctrine Bridge] Check field type before adding Length constraint
2019-06-06 09:45:49 +02:00
Franco Traversaro
35e6df6bac [Doctrine Bridge] Check field type before adding Length constraint 2019-06-06 09:45:42 +02:00
Nicolas Grekas
625392669a [FrameworkBundle] fix BC-breaking property in WebTestAssertionsTrait 2019-06-06 08:55:06 +02:00
Thomas Calvet
d03eb033bb [Cache] Pass arg to get callback everywhere 2019-06-06 08:05:05 +02:00
Nicolas Grekas
1a4c2548d5 [FramworkBundle][HttpKernel] fix KernelBrowser BC layer 2019-06-05 18:18:19 +02:00
Julien Manganne
fd17ff005d
Add a missing quote in getValue() DocBlock 2019-06-05 17:56:22 +02:00
Fabien Potencier
a6b306d4f8 bug #31872 [Messenger] Add missing runtime check for ext redis version (chalasr)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Add missing runtime check for ext redis version

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

Lower versions lead to segmentation faults.

Commits
-------

07603da06c [Messenger] Add runtime check for ext redis version
2019-06-05 17:22:22 +02:00
Nicolas Grekas
d3055814ad Merge branch '4.3' into 4.4
* 4.3:
  [Cache] Fixed undefined variable in ArrayTrait
  [HttpClient] revert bad logic around JSON_THROW_ON_ERROR
  [HttpKernel] Fix handling non-catchable fatal errors
  Fix json-encoding when JSON_THROW_ON_ERROR is used
  [HttpFoundation] work around PHP 7.3 bug related to json_encode()
  [HttpClient] add $response->cancel()
  [Security] added support for updated \"distinguished name\" format in x509 authentication
2019-06-05 15:27:25 +02:00
Nicolas Grekas
e901494262 bug #31864 [Cache] Fixed undefined variable in ArrayTrait (eXtreme)
This PR was squashed before being merged into the 4.3 branch (closes #31864).

Discussion
----------

[Cache] Fixed undefined variable in ArrayTrait

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

So once again (see https://github.com/symfony/symfony/pull/29591) my test suite managed to find an error in ArrayTrait in cache. This time it was this PR: https://github.com/symfony/symfony/pull/31395 later improved by https://github.com/symfony/symfony/pull/31590 that introduced `$id` to logging, which I guess should be `$key`? So this PR changes it to `$key`, ~but my tests **still fail** as there is no `$this->namespace` in `ArrayAdapter` (is this the only class that uses this ArrayTrait?). But I don't know what to do about it. Maybe @nicolas-grekas has some answers?~

Commits
-------

8568923491 [Cache] Fixed undefined variable in ArrayTrait
2019-06-05 15:26:52 +02:00
Jacek Jędrzejewski
8568923491 [Cache] Fixed undefined variable in ArrayTrait 2019-06-05 15:26:46 +02:00
Nicolas Grekas
fc7ed49c78 Merge branch '4.2' into 4.3
* 4.2:
  [HttpKernel] Fix handling non-catchable fatal errors
  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:25:51 +02:00
Fabien Potencier
11f04abcd4 bug #31863 [HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor (Ivo)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor

…r in RedirectResponse constructor.

| Q             | A
| ------------- | ---
| Branch?       |  3.4
| Bug fix?      | yes
| 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 | #31862  <!-- #-prefixed issue number(s), if any -->
| License       | MIT

Perform a case-insensitive check on `$headers` in \Symfony\Component\HttpFoundation\RedirectResponse::__construct()

Commits
-------

b5e6c99a3b [HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor.
2019-06-05 15:24:38 +02:00
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
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
a24f4db689 Merge branch '4.3' into 4.4 2019-06-05 13:37:18 +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
Amrouche Hamza
8f182d811e
[Console] allow answer to be trimmed by adding a flag 2019-06-05 07:34:14 +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
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
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
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
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
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
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
Fabien Potencier
40076b98bf bug #31836 [DoctrineBridge] do not process private properties from parent class (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[DoctrineBridge] do not process private properties from parent class

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

Commits
-------

adfa1ef3ce do not process private properties from parent class
2019-06-04 12:24:01 +02:00
Fabien Potencier
22e5f32e5f bug #31790 [Messenger] set amqp content_type based on serialization format (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] set amqp content_type based on serialization format

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| 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 | #31736
| License       | MIT
| Doc PR        |

Commits
-------

dee077016d [Messenger] set amqp content_type based on serialization format
2019-06-04 12:22:38 +02:00
Fabien Potencier
d56ae06ca3 changed type hints 2019-06-04 11:22:54 +02:00
Christian Flothmann
be82b987bf conflict with HttpKernel component 5.0 2019-06-04 11:08:45 +02:00
Christian Flothmann
adfa1ef3ce do not process private properties from parent class 2019-06-04 10:43:25 +02:00
Nicolas Grekas
4acca42330 [HttpClient] Don't throw InvalidArgumentException on bad Location header 2019-06-04 10:32:15 +02:00
Fabien Potencier
ec9159e074 feature #31597 [Security] add MigratingPasswordEncoder (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] add MigratingPasswordEncoder

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

Split from #31153: the proposed `MigratingPasswordEncoder` is able to validate password using a chain of encoders, and encodes new them using the best-provided algorithm.

This chained encoder is used when the "auto" algorithm is configured. This is seamless for 4.3 app.

Commits
-------

765f14c80e [Security] add MigratingPasswordEncoder
2019-06-04 09:35:52 +02:00
Fabien Potencier
8d359b2525 feature #31351 [Validator] Improve TypeValidator to handle array of types (jschaedl)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Improve TypeValidator to handle array of types

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

The `@Type` constraint is now able to handle multiple types:

```php
/**
 * @var string|array
 * @Assert\Type(type={"string", "array"})
 */
 private $name;
```

and will pass when `$name` is either of type `string` or `array`.

Commits
-------

c8100f34f8 [Validator] Improve TypeValidator to handle array of types
2019-06-04 09:08:54 +02:00
Fabien Potencier
5d261bceb0 minor #31633 [Messenger][DoctrineBridge] Extract Abstract Doctrine Middleware (Koc)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger][DoctrineBridge] Extract Abstract Doctrine Middleware

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

Just a minior refactoring to prevent code duplicate.

Commits
-------

184ce667d3 Extract Abstract Doctrine Middleware
2019-06-04 09:05:15 +02:00
Robert Kopera
bdbac2c6e6 [Security] added support for updated \"distinguished name\" format in x509 authentication 2019-06-04 09:01:11 +02:00
Fabien Potencier
129bf7376b feature #31526 [Validator] Add compared value path to violation parameters (ogizanagi)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Add compared value path to violation parameters

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- 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 | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

While it's not really useful to use as a placeholder in the violation message template (compared to hard-coding it into the message. Nor it is really user-friendly),
it becomes handy in conjunction with #29130 for any mapping logic on client-side.

Commits
-------

2da226a57f [Validator] Add compared value path to violation parameters
2019-06-04 08:40:18 +02:00
Nicolas Grekas
4fce813ed0 [HttpClient] fix unregistering the debug buffer when using curl 2019-06-04 08:38:41 +02:00
Fabien Potencier
6f9d0f0a09 feature #31514 Add exception as HTML comment to beginning and end of exception_full.html.twig (ruudk)
This PR was merged into the 4.4 branch.

Discussion
----------

Add exception as HTML comment to beginning and end of `exception_full.html.twig`

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

## Description

Every now and then you are confronted with an exception in Symfony's debug mode. Sometimes, you will see this in your browser console or terminal. To make it easier to easily see what's going on, this change adds a HTML comment on 2 locations:
- between the `<html>` and `<head>` tag;
- between the `</body>` and `</html>` tag.

This way, you don't have to scan the very verbose HTML that Symfony generates. You can quickly glance at the end or the beginning.

## How does it look?

```html
<!-- Notice: Undefined index: payouts in /Volumes/CS/www/src/Generated/GraphQL/Query/TransactionList/Data.php line 33 (500 Internal Server Error) -->
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="robots" content="noindex,nofollow">
        <meta name="viewport" content="width=device-width,initial-scale=1">
        <title>    Notice: Undefined index: payouts in /Volumes/CS/www/src/Generated/GraphQL/Query/TransactionList/Data.php line 33 (500 Internal Server Error)
</title>
        <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAgCAYAAAABtRhCAAADVUlEQVRIx82XX0jTURTHLYPyqZdefQx66CEo80+aYpoIkqzUikz6Z5klQoWUWYRIJYEUGpQ+lIr9U5dOTLdCtkmWZis3rbnC5fw/neYW002307mX/cZvP3/7o1PwwOdh95x7vnf39zvnd29AgBer2xO6DclAXiMqZAqxIiNIN/IYSUS2BPhjmGATchUxI+ADWiRhpWK7HKuHFVBFdmU5YvnI4grFGCaReF/EBH4KsZlGgj2JBTuCYBWRIYF8YoEOJ6wBt/gEs7mBbyOjQXruPLSdOgPCiEiPSUUHDoL8Ug5IUo9B/d5wrt+G7OAKNrODPuVdB6vRCIzN6SdBlpW9RIgk/1FeAXabzRlrUPVCS/JhbmwudztnGeeH9AyXBIwtmM3wLinZJZHifjHw2V+NBoRh+9ixQrbgbnaSIcl7cGea6hoXQbNe7za241oeO5Z0p42M4BV2EqP2D50wo+6HzvwC6C4sApNOR8cmOrtcnhtj2kYRyC9eBvXzKrBZrXSs72kFd1t3MoKVbMekQkEnSNKOO8fac3LpmK6l1TlGtsxmsdKFsecPYgwxst0cwROMYDXboSotg0WLBRqjY51jLYcENElXwW2XJKPydvoI2GN9T8rBtrAArYIUruBJXkFheCQYlCpQP6uk5dAQFQNaUROMSGVQFxLmkoQsxDJrhLbTZ+nvVsERME9MgPJRKV/58AsyomTSzE813WLFvWK++qI0xSfQl8k8Pg46sYRuv5t6dS+4RqxDwaa4BGjYH+NTQvKScIp9+YL/hoZh3jDtLRHtt2C3g6bmhX+CpsFBWg7ilDSPgj0lD2ncr5ev/BP8VvyAJhqVyZeUhPOrEhEFxgEtjft846Z/guQTNT89Q5P9flMLoth4F7808wKtWWKzAwNQHxrh/1vaid2F+XpYTSbQf1XA2McOmOpROnvpvMEA4tSjq1cW0sws2gCYxswY6TKkvzYnJq1NHZLnRU4BX+4U0uburvusu8Kv8iHY7qefkM4IFngJHEOUXmLEPgiGsI8YnlZILit3vSSLRTQe/MPIZva5pshNIEmyFQlCvruJKXPkCEfmePzkphXHdzZNQdoRI9KPlBAxlj/I8U97ERPS5bjGbWDFbEdqHVe5caTBeZZx2H/IMvzeN15yoQAAAABJRU5ErkJggg==%0A">

       <!-- ... clip ... -->

    Sfjs.addEventListener(document, 'DOMContentLoaded', function() {
        Sfjs.createTabs();
        Sfjs.createToggles();
        Sfjs.createFilters();
    });

/*]]>*/</script>

    </body>
</html>
<!-- Notice: Undefined index: payouts in /Volumes/CS/www/src/Generated/GraphQL/Query/TransactionList/Data.php line 33 (500 Internal Server Error) -->
```

Commits
-------

11c8b4531f Add exception as HTML comment to beginning and end of `exception_full.html.twig`
2019-06-04 08:32:40 +02:00
Nicolas Grekas
765f14c80e [Security] add MigratingPasswordEncoder 2019-06-04 08:31:08 +02:00
Fabien Potencier
2438b1422a bug #31774 [Mailer] Fix the possibility to set a From header from MessageListener (fabpot)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] Fix the possibility to set a From header from MessageListener

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| 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 | #31733
| License       | MIT
| Doc PR        | n/a

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

f4254e6f5e [Mailer] fixed the possibility to set a From header from MessageListener
2019-06-04 08:18:12 +02:00
Fabien Potencier
66b87abcfc bug #31811 [DoctrineBridge] don't add embedded properties to wrapping class metadata (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[DoctrineBridge] don't add embedded properties to wrapping class metadata

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

Commits
-------

56fe02512c don't add embedded properties to wrapping class metadata
2019-06-04 08:16:02 +02:00
Konstantin Myakshin
184ce667d3 Extract Abstract Doctrine Middleware 2019-06-04 09:11:04 +03:00
Fabien Potencier
05d6d31794 minor #31661 [Translation] refactor ArrayLoader::flatten (azjezz)
This PR was squashed before being merged into the 4.4 branch (closes #31661).

Discussion
----------

[Translation] refactor ArrayLoader::flatten

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

Commits
-------

5b0544691e [Translation] refactor ArrayLoader::flatten
2019-06-04 08:11:00 +02:00
Saif Eddin G
5b0544691e [Translation] refactor ArrayLoader::flatten 2019-06-04 08:10:51 +02:00
Fabien Potencier
a2b79e15e1 feature #31739 [FrameworkBundle] Add missing BC layer for deprecated ControllerNameParser injections (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Add missing BC layer for deprecated ControllerNameParser injections

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

Allows removing the `ControllerNameParser` class and corresponding `controller_name_converter` service in 5.0.
Should have been done in 4.1, better late than never.

Commits
-------

1f37275a72 [FrameworkBundle] Add missing BC layer for deprecated ControllerNameParser injections
2019-06-04 07:54:11 +02:00
Fabien Potencier
852fb36101 feature #31831 [HttpClient] add $response->cancel() (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] add $response->cancel()

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

(BC break allowed by the `@experimental` annotation)

Canceling a response is already possible but requires registering a progress function and throwing an exception from it. This new method aims at making this much simpler.

/cc @jderusse as we discussed this on Slack.

Commits
-------

549930e820 [HttpClient] add $response->cancel()
2019-06-04 07:48:40 +02:00
Fabien Potencier
9ce3ff3c64 minor #31827 [Form][DX] Improved error message on create a form builder with invalid options (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form][DX] Improved error message on create a form builder with invalid options

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

**before**
> The required option "class" is missing.

**after**
> An error has occurred resolving the options of the form "App\Form\MyEntityType": The required option "class" is missing.

Commits
-------

37c7a2bf09 Improved error message on create a form builder with invalid options
2019-06-04 07:44:20 +02:00
Fabien Potencier
be7b7fea60 feature #31334 [Messenger] Add clear Entity Manager middleware (Koc)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Add clear Entity Manager middleware

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

General purpose of this middleware:
* avoid memory leaks during messages handling
* prevent unexpected side effects when entities that already stored in identity map not refreshed between messages

Commits
-------

6e690a6078 Add clear Entity Manager middleware (closes #29662)
2019-06-04 07:41:58 +02:00
Fabien Potencier
957a0b82cb minor #31828 [TwigBundle] mark TemplateIterator as internal (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBundle] mark TemplateIterator as internal

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| 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        | symfony/symfony-docs#... <!-- required for new features -->

This class is an implementation detail and should not be relied on as an extension point. This is also why TemplateCacheWarmer does not typhint this class but iterable. By making it internal we can remove the rootDir argument in #31823

Commits
-------

9b46c17911 [TwigBundle] mark TemplateIterator as internal
2019-06-04 07:02:12 +02:00
Robin Chalas
1768c9365c feature #31594 [Security] add PasswordEncoderInterface::needsRehash() (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] add PasswordEncoderInterface::needsRehash()

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

Split from #31153, with tests.

Commits
-------

50590dce81 [Security] add PasswordEncoderInterface::needsRehash()
2019-06-04 05:02:33 +02:00
Tobias Schultze
9b46c17911 [TwigBundle] mark TemplateIterator as internal
so we can remove the rootDir argument in 5.0
2019-06-04 01:50:10 +02:00
Nicolas Grekas
0119d217ca Merge branch '4.3' into 4.4
* 4.3:
  [Translation] Fixed case sensitivity of lint:xliff command
  fix type hint for salt in PasswordEncoderInterface
  Simplify code - catch \Throwable capture all exceptions
  Collect locale details earlier in the process in TranslationDataCollector
  fix typo in PR #31802
  update italian validator translation
  Add missing translations
  [TwigBridge] suggest Translation Component when TranslationExtension is used
2019-06-03 22:28:03 +02:00
Nicolas Grekas
0a9d724d2a Merge branch '4.2' into 4.3
* 4.2:
  [Translation] Fixed case sensitivity of lint:xliff command
  fix type hint for salt in PasswordEncoderInterface
  Simplify code - catch \Throwable capture all exceptions
  fix typo in PR #31802
  update italian validator translation
  Add missing translations
2019-06-03 22:27:40 +02:00
Nicolas Grekas
9fbfc4cf06 Merge branch '3.4' into 4.2
* 3.4:
  fix type hint for salt in PasswordEncoderInterface
  fix typo in PR #31802
  update italian validator translation
  Add missing translations
2019-06-03 22:27:17 +02:00
Nicolas Grekas
54ba63a57e bug #31786 [Translation] Fixed case sensitivity of lint:xliff command (javiereguiluz)
This PR was squashed before being merged into the 4.2 branch (closes #31786).

Discussion
----------

[Translation] Fixed case sensitivity of lint:xliff command

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| 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        | (not needed)

I was checking some errors of `lint:xliff` (https://travis-ci.org/EasyCorp/EasyAdminBundle/jobs/540053551#L657) and saw this:

```
ERROR  in src/Resources/translations/EasyAdminBundle.sr_RS.xlf
 * There is a mismatch between the language included in the file name ("EasyAdminBundle.sr_RS.xlf") and the "sr-rs" value used in the "target-language" attribute of the file.

ERROR  in src/Resources/translations/EasyAdminBundle.zh_CN.xlf
 * There is a mismatch between the language included in the file name ("EasyAdminBundle.zh_CN.xlf") and the "zh-cn" value used in the "target-language" attribute of the file.
```

This was suspicious, so I checked the XLIFF standard and it says (http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#target-language):

```
target-language:
  Unlike the other XLIFF attributes, the values are not case-sensitive.
```

So, it's valid that `zh-cn` is the target language and `zh-CN` is the file extension. This PR fixes that.

Commits
-------

ec690b2145 [Translation] Fixed case sensitivity of lint:xliff command
2019-06-03 22:10:17 +02:00
Javier Eguiluz
ec690b2145 [Translation] Fixed case sensitivity of lint:xliff command 2019-06-03 22:09:57 +02:00
Nicolas Grekas
0bf50cff96 bug #31815 [Translator] Collect locale details earlier in the process (pierredup)
This PR was merged into the 4.3 branch.

Discussion
----------

[Translator] Collect locale details earlier in the process

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

The [LocaleAwareListener](https://github.com/symfony/symfony/blob/4.3/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php) class reverts the locale back to the default locale when the request has finished. But the `TranslationDataCollector` only collects the locale in `lateCollect`, which only happens when the kernel terminates. This means the locale is reverted back to the default by the time the collector runs.

The PR moves the `locale` and `fallback_locales` from `lateCollect` to `collect`, so that the information can be captured earlier, before the `LocaleAwareListener` is run.

Commits
-------

5c394eeb79 Collect locale details earlier in the process in TranslationDataCollector
2019-06-03 21:51:47 +02:00
Massimiliano Arione
0e741f9600 fix type hint for salt in PasswordEncoderInterface 2019-06-03 21:38:25 +02:00
Yonel Ceruto
37c7a2bf09 Improved error message on create a form builder with invalid options 2019-06-03 15:21:10 -04:00
Nicolas Grekas
50590dce81 [Security] add PasswordEncoderInterface::needsRehash() 2019-06-03 20:14:30 +02:00
Nicolas Grekas
549930e820 [HttpClient] add $response->cancel() 2019-06-03 20:11:29 +02:00
Fabien Potencier
061f622a61 feature #31821 [FrameworkBundle][TwigBundle] Add missing deprecations for PHP templating layer (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][TwigBundle] Add missing deprecations for PHP templating layer

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

As part of https://github.com/symfony/symfony/pull/21035 and 7169f4d3e2

Commits
-------

61613d0bf0 Add missing deprecations for PHP templating layer
2019-06-03 19:16:59 +02:00
Yonel Ceruto
61613d0bf0 Add missing deprecations for PHP templating layer 2019-06-03 12:49:37 -04:00
Konstantin Myakshin
6e690a6078 Add clear Entity Manager middleware (closes #29662) 2019-06-03 18:44:42 +03:00
Grégoire Pineau
693cbff647 feature #31509 [Monolog] Setup the LoggerProcessor after all other processor (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Monolog] Setup the LoggerProcessor after all other processor

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

---

This is a bit strange but [`Monolog\Processor::pushProcessor()`](ebb804e432/src/Monolog/Logger.php (L224-L229))  **prepend** the processor to the stack.

Since the Compiler Pass has a low priority, the `DebugProcessor` is always
the last one to be added to the stack, so the first one in it.

Commits
-------

429307d7cf [Monolog] Setup the LoggerProcessor after all other processor
2019-06-03 17:33:39 +02:00
Grégoire Pineau
648c6949fc Simplify code - catch \Throwable capture all exceptions
This is a legacy when we did support PHP 5.X
2019-06-03 17:30:31 +02:00
Pierre du Plessis
5c394eeb79
Collect locale details earlier in the process in TranslationDataCollector 2019-06-03 16:21:58 +02:00
Robin Chalas
1f37275a72 [FrameworkBundle] Add missing BC layer for deprecated ControllerNameParser injections 2019-06-03 15:37:01 +02:00
Christian Flothmann
56fe02512c don't add embedded properties to wrapping class metadata 2019-06-03 15:22:45 +02:00
Massimiliano Arione
b37c1a818f
fix typo in PR #31802 2019-06-03 11:50:31 +02:00
Massimiliano Arione
2b95fcaa6b update italian validator translation 2019-06-03 11:16:20 +02:00