Commit Graph

46992 Commits

Author SHA1 Message Date
Fabien Potencier
86613797d1 [Mime] Remove unused var 2020-06-05 23:43:09 +02:00
Fabien Potencier
fe61dd5c19 bug #37065 [HttpClient] Throw JsonException instead of TransportException on empty response in Response::toArray() (jeroennoten)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Throw JsonException instead of TransportException on empty response in Response::toArray()

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37064
| License       | MIT

Commits
-------

69547d9cfc [HttpClient] Throw JsonException instead of TransportException on empty response in Response::toArray()
2020-06-03 10:00:49 +02:00
Fabien Potencier
950ff7e40c bug #37077 [WebProfilerBundle] Move ajax clear event listener initialization on loadToolbar (Bruno BOUTAREL)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfilerBundle] Move ajax clear event listener initialization on loadToolbar

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37073
| License       | MIT

Fix ajax clear event listener stacking on each ajax request made.
Comment says if should be synced with `TwigBundle/Resources/views/base_js.html.twig`

If not applicable feel free to deny.

Commits
-------

cf4587b498 Move ajax clear event listener initialization on loadToolbar
2020-06-02 21:29:14 +02:00
Bruno BOUTAREL
cf4587b498 Move ajax clear event listener initialization on loadToolbar 2020-06-02 18:20:08 +02:00
Jeroen Noten
69547d9cfc [HttpClient] Throw JsonException instead of TransportException on empty response in Response::toArray() 2020-06-02 15:48:45 +02:00
Fabien Potencier
a2f4342d08 bug #37049 [Serializer] take into account the context when preserving empty array objects (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] take into account the context when preserving empty array objects

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37041
| License       | MIT
| Doc PR        |

Commits
-------

98fff21140 take into account the context when preserving empty array objects
2020-06-02 10:39:56 +02:00
Christian Flothmann
98fff21140 take into account the context when preserving empty array objects 2020-06-01 19:29:37 +02:00
Fabien Potencier
d87b6665dd minor #37032 [VarExporter] tfix: s/markAsSkipped/markTestSkipped/ (DavidPrevot)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarExporter] tfix: s/markAsSkipped/markTestSkipped/

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Just fixes a typo causing the testsuite to fail at least on PHP 7.4.5

Commits
-------

393c9d920a [VarExporter] tfix: s/markAsSkipped/markTestSkipped/
2020-06-01 07:20:03 +02:00
David Prévot
393c9d920a [VarExporter] tfix: s/markAsSkipped/markTestSkipped/ 2020-05-31 15:10:09 -10:00
Fabien Potencier
d45883fb7b bumped Symfony version to 4.4.10 2020-05-31 07:29:28 +02:00
Fabien Potencier
92c4593e3c
Merge pull request #37017 from fabpot/release-4.4.9
released v4.4.9
2020-05-31 07:26:09 +02:00
Fabien Potencier
8e93e5bec1 updated VERSION for 4.4.9 2020-05-31 07:25:51 +02:00
Fabien Potencier
b533b07e71 updated CHANGELOG for 4.4.9 2020-05-31 07:25:41 +02:00
Nicolas Grekas
bdb01db3dc bug #37008 [Security] Fixed AbstractToken::hasUserChanged() (wouterj)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Security] Fixed AbstractToken::hasUserChanged()

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36989
| License       | MIT
| Doc PR        | -

This PR completely reverts #35944.

That PR tried to fix a BC break (ref #35941, #35509) introduced by #31177. However, this broke many authentications (ref #36989), as the User is serialized in the session (as hinted by @stof). Many applications don't include the `roles` property in the serialization (at least, the MakerBundle doesn't include it).

In 5.2, we should probably deprecate having different roles in token and user, which fixes the BC breaks all together.

Commits
-------

f297beb42c [Security] Fixed AbstractToken::hasUserChanged()
2020-05-30 23:50:18 +02:00
Wouter de Jong
f297beb42c [Security] Fixed AbstractToken::hasUserChanged() 2020-05-30 23:50:11 +02:00
Nicolas Grekas
d9506ab843 Merge branch '3.4' into 4.4
* 3.4:
  [DI] fix typo
2020-05-30 23:49:23 +02:00
Nicolas Grekas
fa31260e5e [DI] fix typo 2020-05-30 23:06:01 +02:00
Nicolas Grekas
143718c750 Merge branch '3.4' into 4.4
* 3.4:
  Fix abstract method name in PHP doc block
2020-05-30 22:07:26 +02:00
Nicolas Grekas
79f80d361c minor #37015 Fix abstract method name in PHP doc block (l-vo)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix abstract method name in PHP doc block

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

d6966c3147 Fix abstract method name in PHP doc block
2020-05-30 22:07:07 +02:00
Nicolas Grekas
282cafb093 Merge branch '3.4' into 4.4
* 3.4:
  Various cleanups
2020-05-30 22:06:45 +02:00
Laurent VOULLEMIER
d6966c3147
Fix abstract method name in PHP doc block 2020-05-30 21:50:06 +02:00
Nicolas Grekas
d8f282edca Various cleanups 2020-05-30 20:58:05 +02:00
Nicolas Grekas
255e9117a0 Merge branch '3.4' into 4.4
* 3.4:
  Fixes sprintf(): Too few arguments in form transformer
  [Console] Fix QuestionHelper::disableStty()
  validate subforms in all validation groups
  Update Hungarian translations
  Add meaningful message when Process is not installed (ProcessHelper)
  [PropertyAccess] Fix TypeError parsing again.
  [Form] add missing Czech validators translation
  [Validator] add missing Czech translations
  never directly validate Existence (Required/Optional) constraints
2020-05-30 20:50:54 +02:00
Nicolas Grekas
84081adbf7 bug #36894 [Validator] never directly validate Existence (Required/Optional) constraints (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] never directly validate Existence (Required/Optional) constraints

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36637 #36723
| License       | MIT
| Doc PR        |

Using `Optional` or `Required` like "regular" constraints does not make any sense, but doing so didn't break before #36365. I suggest to ignore them for now and deprecate using them outside the `Collection` constraint in 5.2.

Commits
-------

d333aae187 never directly validate Existence (Required/Optional) constraints
2020-05-30 20:43:38 +02:00
Nicolas Grekas
8e40814164 bug #37007 [Console] Fix QuestionHelper::disableStty() (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix QuestionHelper::disableStty()

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no>
| Tickets       | -
| License       | MIT
| Doc PR        | -

We broke it when adding `Terminal::hasSttyAvailable()`.
Let's fix it on 3.4 and move it to terminal on master, as suggested in #36977

Commits
-------

5d93b61278 [Console] Fix QuestionHelper::disableStty()
2020-05-30 20:43:03 +02:00
Nicolas Grekas
ca66e6cede minor #37003 [PropertyAccess] Fix TypeError parsing again (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccess] Fix TypeError parsing again

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #36872
| License       | MIT
| Doc PR        | N/A

Apparently, the format of `TypeError`s has changed again in php8. While investigating, I noticed our error message parsing is not handling anonymous classes well, so I've added some test cases for them.

I chose a fuzzier regular expression to parse the expected return type from the error message. Additionally, I'm checking the stack trace if the caught `TypeError` is really caused by the accessor call.

Commits
-------

03b4e98630 [PropertyAccess] Fix TypeError parsing again.
2020-05-30 20:42:19 +02:00
Nicolas Grekas
2e8ae40183 bug #36865 [Form] validate subforms in all validation groups (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] validate subforms in all validation groups

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36852
| License       | MIT
| Doc PR        |

Commits
-------

b819d94d14 validate subforms in all validation groups
2020-05-30 20:41:29 +02:00
Nicolas Grekas
e8beef468b bug #36907 Fixes sprintf(): Too few arguments in form transformer (pedrocasado)
This PR was merged into the 3.4 branch.

Discussion
----------

Fixes sprintf(): Too few arguments in form transformer

Similar to: #29482

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | none
| License       | MIT
| Doc PR        | none

Fixes the form reverse transformation when the method viewToNorm is called within a value with the character %:

Before : "sprintf(): Too few arguments"

After : Form reverse transformation works.

Reference : http://php.net/manual/function.sprintf.php

Commits
-------

ff7d3f4f01 Fixes sprintf(): Too few arguments in form transformer
2020-05-30 20:40:39 +02:00
Nicolas Grekas
68d14c8511 minor #37013 [HttpClient] fix issues in tests (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix issues in tests

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

a337ba5547 [HttpClient] fix issues in tests
2020-05-30 20:39:29 +02:00
Nicolas Grekas
a337ba5547 [HttpClient] fix issues in tests 2020-05-30 20:33:03 +02:00
Pedro Casado
ff7d3f4f01 Fixes sprintf(): Too few arguments in form transformer 2020-05-30 19:48:24 +02:00
Fabien Potencier
5e0e9a8019 bug #36868 [Validator] Use Mime component to determine mime type for file validator (pierredup)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Use Mime component to determine mime type for file validator

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

When validating the mime type for a file, the Validator component relies on the `Symfony\Component\HttpFoundation\File\File` class, but if the HttpFoundation component is not installed, then you just get the error

```
PHP Fatal error:  Uncaught Error: Class 'Symfony\Component\HttpFoundation\File\File' not found
```

This PR uses the Mime component to get the mime type for a file and throws an exception if the Mime component is not installed.

Commits
-------

472883313f [Validator] Use Mime component to determine mime type for file validator
2020-05-30 09:26:56 +02:00
Fabien Potencier
a3c460fdcb minor #37004 [Form] Update Hungarian translations (1ed)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Update Hungarian translations

| Q             | A
| ------------- | ---
| Branch?       |  3.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | -
| License       | MIT
| Doc PR        | -
<!--
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/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - 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 master.
-->

Commits
-------

1614595424 Update Hungarian translations
2020-05-30 09:18:49 +02:00
Robin Chalas
5d93b61278 [Console] Fix QuestionHelper::disableStty() 2020-05-29 16:49:42 +02:00
Pierre du Plessis
472883313f
[Validator] Use Mime component to determine mime type for file validator 2020-05-29 14:10:59 +02:00
Christian Flothmann
b819d94d14 validate subforms in all validation groups 2020-05-29 11:57:12 +02:00
Gábor Egyed
1614595424
Update Hungarian translations 2020-05-29 09:47:21 +02:00
Fabien Potencier
b7cd22cbc0 bug #37000 Add meaningful message when using ProcessHelper and Process is not installed (l-vo)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

Add meaningful message when using ProcessHelper and Process is not installed

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

When using the process helper without the `Process` component, a php fatal error is triggered (`PHP Fatal error:  Uncaught Error: Class 'Symfony\Component\Process\Process' not found`). This PR adds a meaningful exception; allowing to display a console error message instead of a raw php fatal error.

Commits
-------

3ab76e40ff Add meaningful message when Process is not installed (ProcessHelper)
2020-05-29 05:22:53 +02:00
Laurent VOULLEMIER
3ab76e40ff Add meaningful message when Process is not installed (ProcessHelper) 2020-05-29 05:22:46 +02:00
Alexander M. Turek
03b4e98630 [PropertyAccess] Fix TypeError parsing again. 2020-05-29 02:04:36 +02:00
Fabien Potencier
03cad5a750 minor #36980 [Form] add missing Czech validators translation (mhujer)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] add missing Czech validators translation

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT

Commits
-------

afdda5d764 [Form] add missing Czech validators translation
2020-05-28 21:20:09 +02:00
Fabien Potencier
96d2d19de2 bug #36995 [TwigBridge] fix fallback html-to-txt body converter (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBridge] fix fallback html-to-txt body converter

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Right now, the content of the `<head>` and `<style>` are dumped as text. This fixes it.

Of course, use `league/html-to-markdown` if you need a better parser.

Commits
-------

6f59d60508 [TwigBridge] fix fallback html-to-txt body converter
2020-05-28 15:43:01 +02:00
Nicolas Grekas
6f59d60508 [TwigBridge] fix fallback html-to-txt body converter 2020-05-28 15:20:36 +02:00
Nicolas Grekas
15d4f7ac04 [Security/Http] fix merge 2020-05-28 14:17:38 +02:00
Nicolas Grekas
0d2bc7bd6a bug #36993 [ErrorHandler] fix setting $trace to null in FatalError (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] fix setting $trace to null in FatalError

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Spotted by @nikic in https://github.com/php/php-src/pull/5620#issuecomment-635258024

Commits
-------

aa50c9287c [ErrorHandler] fix setting $trace to null in FatalError
2020-05-28 14:15:08 +02:00
Nicolas Grekas
aa50c9287c [ErrorHandler] fix setting $trace to null in FatalError 2020-05-28 12:39:14 +02:00
Nicolas Grekas
5fe0f9490e minor #36992 Handle fetch mode deprecation of DBAL 2.11 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Handle fetch mode deprecation of DBAL 2.11

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

Continuation of #36987 on the 4.4 branch.

Commits
-------

1385213a9a Handle fetch mode deprecation of DBAL 2.11.
2020-05-28 10:58:00 +02:00
Martin Hujer
afdda5d764 [Form] add missing Czech validators translation 2020-05-28 10:39:10 +02:00
Alexander M. Turek
1385213a9a Handle fetch mode deprecation of DBAL 2.11. 2020-05-28 10:27:51 +02:00
Nicolas Grekas
dfe8c816a6 Merge branch '3.4' into 4.4
* 3.4:
  Handle fetch mode deprecation of DBAL 2.11.
  Fixed handling of CSRF logout error
2020-05-28 10:15:49 +02:00