Commit Graph

38430 Commits

Author SHA1 Message Date
Christian Flothmann
a61101c04d minor #36233 [Validator] Add missing vietnamese translations (jschaedl)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add missing vietnamese 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       | - <!-- prefix each issue number with "Fix #", 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/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
-------

25fdc8e580 [Validator] Add missing vietnamese translations
2020-03-28 09:11:11 +01:00
Christian Flothmann
d1eb801e1a minor #36231 [Validator] Add Hungarian translations (1ed)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add Hungarian translations

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| 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
-------

9c1c9347c0 [Validator] Add missing Hungarian translations
2020-03-28 09:09:23 +01:00
Gábor Egyed
9c1c9347c0 [Validator] Add missing Hungarian translations 2020-03-28 09:09:23 +01:00
Christian Flothmann
c22d07c272 minor #36221 [Validator] Add the missing translations for the Arabic (ar) locale (Ahmed Raafat)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #36221).

Discussion
----------

[Validator] Add the missing translations for the Arabic (ar) locale

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

This is a basic PR to add the missing Validator translations for AR Locale.

Commits
-------

d3fa02a918 [Validator] Add the missing translations for the Arabic (ar) locale
2020-03-28 09:07:34 +01:00
Ahmed Raafat
d3fa02a918 [Validator] Add the missing translations for the Arabic (ar) locale 2020-03-28 09:07:27 +01:00
Jan Schädlich
25fdc8e580 [Validator] Add missing vietnamese translations 2020-03-27 19:09:52 +01:00
Fabien Potencier
b92808959b bug #36222 [Console] Fix OutputStream for PHP 7.4 (guillbdx)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Console] Fix OutputStream for PHP 7.4

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

From PHP 7.4, `fwrite` function now returns false for any failure: https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.core.fread-fwrite

Actually, the note in the PHP documentation is not exact: for PHP 7.3 and lower, `fwrite` function did return false when arguments passed in to the function were invalid, and 0 for other failures. From PHP 7.4, it returns false for any failure.
We can see it in the source code: for PHP 7.3: a1a8d14485/ext/standard/file.c (L1140)
Compare to PHP 7.4: https://github.com/php/php-src/blob/master/ext/standard/file.c#L1136

I update `OutputStream::doWrite()` to keep the same behavior as before.

Commits
-------

b375f93ed7 [Console] Fix OutputStream for PHP 7.4
2020-03-27 18:07:38 +01:00
Guillaume Pédelagrabe
b375f93ed7 [Console] Fix OutputStream for PHP 7.4 2020-03-27 18:07:22 +01:00
Fabien Potencier
c0c6c36534 minor #36206 Fixed some typos (javiereguiluz)
This PR was merged into the 3.4 branch.

Discussion
----------

Fixed some typos

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

Commits
-------

4befb23c76 Fixed some typos
2020-03-27 17:59:46 +01:00
Fabien Potencier
8abc8dd8e4 minor #36218 [Validator] Add missing Lithuanian translations (Tadas1987)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add missing Lithuanian translations

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

Commits
-------

861022002e [Validator] Add missing Lithuanian translations
2020-03-27 17:49:02 +01:00
Fabien Potencier
8f2d2c3643 minor #36200 [Validator] add German translations (xabbuh)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

[Validator] add German translations

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

Commits
-------

32d9a5298e add German translations
2020-03-27 17:47:19 +01:00
Christian Flothmann
32d9a5298e add German translations 2020-03-27 17:47:10 +01:00
Thomas Calvet
79fe888072 [HttpKernel][LoggerDataCollector] Prevent keys collisions in the sanitized logs processing 2020-03-27 17:16:43 +01:00
phucvo
c9aa3a849a bug #36157 [Validator] Assert Valid with many groups 2020-03-27 09:42:24 +07:00
tadas
861022002e [Validator] Add missing Lithuanian translations 2020-03-26 11:14:15 +02:00
Javier Eguiluz
4befb23c76 Fixed some typos 2020-03-25 13:02:26 +01:00
Christian Flothmann
a29ee7c220 minor #36192 [Validator] Add french "at least" constraint translations (mtarld)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #36192).

Discussion
----------

[Validator] Add french "at least" constraint translations

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT

Completion of PR https://github.com/symfony/symfony/pull/36165 by adding french translation for "at least" constraint.

Commits
-------

f885822350 Add french "at least" constraint translations
2020-03-25 10:58:14 +01:00
Mathias Arlaud
f885822350 Add french "at least" constraint translations 2020-03-25 10:58:06 +01:00
Nicolas Grekas
438d9e5f28 bug #36175 [Security/Http] Remember me: allow to set the samesite cookie flag (dunglas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security/Http] Remember me: allow to set the samesite cookie flag

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

Similar to #35605, since Chrome 80 is going to require the `samesite` attribute.

This is a cherry-pick of #27976

Commits
-------

f0ceb73397 [Security] Remember me: allow to set the samesite cookie flag
2020-03-23 13:17:13 +01:00
Nicolas Grekas
b4ec8b9a82 bug #36173 [Http Foundation] Fix clear cookie samesite (guillbdx)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Http Foundation] Fix clear cookie samesite

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

With Chrome Update 80, Cookies are required to be `secure` and `samesite=none` for cross site requests. However they are defaulted to `samesite=lax` if the samesite attribute is not set. In other words: developer has to explicitely opt-in for `samesite=none` in the case of a cross site request.

More details: https://chromestatus.com/feature/5088147346030592

We add the `samesite` argument to `clearCookie` method to allow developer to explicitely set this value.

Commits
-------

4bdea1f2e7 [Http Foundation] Fix clear cookie samesite
2020-03-23 13:15:03 +01:00
Guillaume Pédelagrabe
4bdea1f2e7 [Http Foundation] Fix clear cookie samesite 2020-03-23 13:14:52 +01:00
Nicolas Grekas
881fa02c8f bug #36176 [Security] Check if firewall is stateless before checking for session/previous session (koenreiniers)
This PR was submitted for the 4.4 branch but it was squashed and merged into the 3.4 branch instead.

Discussion
----------

[Security] Check if firewall is stateless before checking for session/previous session

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | - <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | -

For one of our applications we had the issue that the session was always initialized, even for routes behind stateless firewalls. Using the redis session adapter this sometimes lead to exceptions if the connection failed. This change prevents the session from being initialized in the guard authentication handler for stateless firewalls

Commits
-------

9bb1230525 [Security] Check if firewall is stateless before checking for session/previous session
2020-03-23 13:10:36 +01:00
Koen Reiniers
9bb1230525 [Security] Check if firewall is stateless before checking for session/previous session 2020-03-23 13:10:23 +01:00
Nicolas Grekas
5b5b61f425 bug #36149 [Form] Support customized intl php.ini settings (jorrit)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Support customized intl php.ini settings

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

`IntlDateParser->parse()` behaves differently when `intl.error_level` and/or `intl.use_exceptions` are not 0.

This change makes sure `\IntlException` is caught when `intl.use_exceptions` is 1 and warnings thrown when `intl.error_level` is not 0 are ignored.

Commits
-------

61025d1d1b [Form] Support customized intl php.ini settings
2020-03-23 13:05:41 +01:00
Jorrit Schippers
61025d1d1b [Form] Support customized intl php.ini settings
`IntlDateParser->parse()` behaves differently when `intl.error_level` and/or `intl.use_exceptions` are not 0.

This change makes sure `\IntlException` is caught when `intl.use_exceptions` is 1 and warnings thrown when `intl.error_level` is not 0 are ignored.
2020-03-23 13:05:01 +01:00
Kévin Dunglas
f0ceb73397 [Security] Remember me: allow to set the samesite cookie flag 2020-03-23 12:51:42 +01:00
Nicolas Grekas
0e2d5e960a bug #36172 [Debug] fix for PHP 7.3.16+/7.4.4+ (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] fix for PHP 7.3.16+/7.4.4+

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

Should make tests green.
Follows https://github.com/php/php-src/pull/5206, which is part of PHP 7.4.4 and 7.3.16.
The same patch is needed on the ErrorHandler component in 4.4 of course.

Commits
-------

b3d9a8ac30 [Debug] fix for PHP 7.3.16+/7.4.4+
2020-03-23 11:37:53 +01:00
Nicolas Grekas
b3d9a8ac30 [Debug] fix for PHP 7.3.16+/7.4.4+ 2020-03-23 11:22:40 +01:00
Fabien Potencier
e3cc3bdb04 minor #36171 [Validator] Backport translations (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Backport 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       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

69d0340066 [Validator] Backport translations
2020-03-23 09:31:27 +01:00
Fabien Potencier
69d0340066 [Validator] Backport translations 2020-03-23 09:29:43 +01:00
Fabien Potencier
98da88f479 bug #36141 Prevent warning in proc_open() (BenMorel)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

Prevent warning in proc_open()

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

In addition to returning `false`, `proc_open()` triggers a warning when it fails. For example:

>  Warning: proc_open(): fork failed - Cannot allocate memory

When using the `ErrorHandler`, the warning gets promoted to an exception, and the next line, `if (! is_resource(...`, is not executed. This mutes the warning and ensures that the next line is always executed and the proper exception is thrown.

Commits
-------

d43833a821 Prevent warning in proc_open()
2020-03-20 07:07:57 +01:00
Benjamin Morel
d43833a821 Prevent warning in proc_open() 2020-03-20 07:07:50 +01:00
Fabien Potencier
5f364af6a0 bug #36121 [VarDumper] fix side-effect by not using mt_rand() (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] fix side-effect by not using mt_rand()

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

Reported by @bobthecow on Twitter: using `mt_rand()` breaks inspecting seeded calls to `mt_rand()`.

Should be replaced by a call to `md5(random_bytes(6))` on 4.4.

Commits
-------

8c85f91b9c [VarDumper] fix side-effect by not using mt_rand()
2020-03-18 08:13:59 +01:00
Nicolas Grekas
8c85f91b9c [VarDumper] fix side-effect by not using mt_rand() 2020-03-17 23:27:36 +01:00
Fabien Potencier
2baa8128ad minor #36099 Fix more quotes in exception messages (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix more quotes in exception messages

| 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       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

4ab6156c5a Fix more quotes in exception messages
2020-03-16 16:59:59 +01:00
Fabien Potencier
4ab6156c5a Fix more quotes in exception messages 2020-03-16 16:51:59 +01:00
Fabien Potencier
2c4c19ce8b bug #36073 [PropertyAccess][DX] Improved errors when reading uninitialized properties (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccess][DX] Improved errors when reading uninitialized properties

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

An attempt to fix #36051 by providing better error messages when trying to read uninitialized properties either via calling a return-type-hinted method from PHP 7.0 or by accessing public-typed properties from PHP 7.4.

It would be nice to have a proper exception class in master.

Commits
-------

a71023ba65 [PropertyAccess] Improved errors when reading uninitialized properties
2020-03-16 16:16:37 +01:00
Fabien Potencier
4b15b1009e minor #36092 [3.4] Minor fixes (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[3.4] Minor fixes

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

Commits
-------

019350022c [3.4] Minor fixes
2020-03-16 12:06:03 +01:00
Thomas Calvet
019350022c [3.4] Minor fixes 2020-03-16 11:48:37 +01:00
Fabien Potencier
e29cdb7076 minor #36090 Fix quotes in exception messages (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix quotes in exception messages

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #36067 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

48102d96f3 Fix quotes in exception messages
2020-03-16 09:43:14 +01:00
Fabien Potencier
48102d96f3 Fix quotes in exception messages 2020-03-16 09:31:04 +01:00
Fabien Potencier
78b11a591d bug #36063 [FrameworkBundle] start session on flashbag injection (William Arslett)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] start session on flashbag injection

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix [#33084](https://github.com/symfony/symfony/issues/33084)
| License       | MIT

This PR addresses an issue whereby if the FlashBag is injected into the application using the default service configuration, we cannot rely that the session has been started. This behaviour is in contradiction to [the docs](https://symfony.com/doc/current/session.html#avoid-starting-sessions-for-anonymous-users):

> Sessions are automatically started whenever you read, write or even check for the existence of data in the session.

This is because symfony ensures the session has been started on calls to getFlashBag() which is normally how the flashbag will be accessed but this is not called if you inject the FlashBag directly into the container.

I have addressed this issue by changing the way the Flashbag service is built so that it uses Session as a factory service and getFlashBag as a factory method. This means that anywhere in symfony where FlashBag is injected can now rely on the fact the session is started.

I have also added a new functional test to verify this behaviour.

Commits
-------

e8b4d35616 [FrameworkBundle] start session on flashbag injection
2020-03-16 07:35:10 +01:00
William Arslett
e8b4d35616 [FrameworkBundle] start session on flashbag injection 2020-03-16 07:35:04 +01:00
Fabien Potencier
7a4be744fd minor #36021 [Validator] Remove commas in translations (przemyslaw-bogusz)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Validator] Remove commas in translations

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

These translations were originally modified in #21335.

Commits
-------

5688f97bad [Validator] Remove commas in translations
2020-03-16 06:59:27 +01:00
Przemysław Bogusz
5688f97bad [Validator] Remove commas in translations 2020-03-16 06:59:20 +01:00
Jules Pietri
a71023ba65
[PropertyAccess] Improved errors when reading uninitialized properties 2020-03-15 14:27:18 +01:00
Fabien Potencier
13ea421e1c minor #36080 Add missing dots at the end of exception messages (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Add missing dots at the end of exception messages

| 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       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

bb8a66e3fc Add missing dots at the end of exception messages
2020-03-15 10:57:52 +01:00
Fabien Potencier
bb8a66e3fc Add missing dots at the end of exception messages 2020-03-15 10:38:08 +01:00
Nicolas Grekas
a562ba23df bug #36020 [Form] ignore microseconds submitted by Edge (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] ignore microseconds submitted by Edge

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

Commits
-------

20971dff82 ignore microseconds submitted by Edge
2020-03-13 15:28:57 +01:00
Christian Flothmann
20971dff82 ignore microseconds submitted by Edge 2020-03-13 14:04:07 +01:00