Commit Graph

48145 Commits

Author SHA1 Message Date
Christian Flothmann eb0e47b40c minor #36244 [Typo] Rename occurence to occurrence (pgrimaud)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Typo] Rename occurence to occurrence

| Q             | A
| ------------- | ---
| Branch?       | master (5.1)
| Bug fix?      | yes (typo)
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36242
| License       | MIT
| Doc PR        | Not needed

This PR will fix correct spelling of methods containing the word occurrence implemented with PR :
- [PHPUnitBridge] Improved deprecations display #35271

This changes are on master branch, because the original PR is a new feature for Symfony 5.1.

Commits
-------

11f746a2c7 [Typo] Rename occurence to occurrence
2020-03-28 08:34:32 +01:00
Pierre Grimaud 11f746a2c7 [Typo] Rename occurence to occurrence 2020-03-27 20:13:16 +01:00
Fabien Potencier e0de6cc292 bug #36214 [HttpClient] Fix TraceableHttpClient::stream that not works (l-vo)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[HttpClient] Fix TraceableHttpClient::stream that not works

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

The stream method when using the TraceableHttpClient seems not work.

I'm not sure to really understand what the previous implementation should do but this is an attempt to fix it.

Commits
-------

575f0408df [HttpClient] Fix TraceableHttpClient::stream that not works
2020-03-27 18:16:27 +01:00
Laurent VOULLEMIER 575f0408df [HttpClient] Fix TraceableHttpClient::stream that not works 2020-03-27 18:16:16 +01:00
Nicolas Grekas 4dabd00ecd minor #36183 [Form] conflict with translation contracts < 1.1.7 (xabbuh)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Form] conflict with translation contracts < 1.1.7

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

Commits
-------

d2197aafb1 conflict with translation contracts < 1.1.7
2020-03-24 22:27:36 +01:00
Christian Flothmann d2197aafb1 conflict with translation contracts < 1.1.7 2020-03-24 10:09:58 +01:00
Fabien Potencier 8e47e9f850 feature #34984 [Form] Allowing plural message on extra data validation failure (popnikos)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Form] Allowing plural message on extra data validation failure

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

When using allow_extra_fields feature (and set to false) with an extra_fields_message, this message may now support pluralization regarding count of extra fields (extra data). e.g. "extra field found|extra fields found"

Commits
-------

0b058fa0a0 Allowing plural message on extra data validation failure
2020-03-24 09:43:26 +01:00
popnikos 0b058fa0a0 Allowing plural message on extra data validation failure
When using allow_extra_fields feature (and set to false) with an extra_fields_message, this message may now support pluralization regarding count of extra fields (extra data). e.g. "extra field found|extra fields found"
2020-03-24 09:31:58 +01:00
Nicolas Grekas f18294ba4b bug #36180 [Uid] work around buggy libuuid (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Uid] work around buggy libuuid

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

As found while working on the polyfill, fixed upstream in
d6ddf07d31

Commits
-------

ebf601b1a6 [Uid] work around buggy libuuid
2020-03-23 16:19:39 +01:00
Nicolas Grekas ebf601b1a6 [Uid] work around buggy libuuid 2020-03-23 15:03:28 +01:00
Nicolas Grekas e1eb80c9f2 [Mailer] fix merge of MailgunApiTransportTest 2020-03-23 14:03:11 +01:00
Nicolas Grekas 8ace1c1f94 Merge branch '5.0'
* 5.0:
  [Http Foundation] Fix clear cookie samesite
  [Security] Check if firewall is stateless before checking for session/previous session
  [Form] Support customized intl php.ini settings
  [Security] Remember me: allow to set the samesite cookie flag
  [Debug] fix for PHP 7.3.16+/7.4.4+
  [Validator] Backport translations
  [Mailer] Use %d instead of %s for error code in error messages
  [HttpKernel] fix locking for PHP 7.4+
  [Security] Fixed hardcoded value of SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE
  Prevent warning in proc_open()
  [FrameworkBundle] Fix Router Cache
  Fix deprecation messages
2020-03-23 13:45:08 +01:00
Nicolas Grekas efb5c4907f Merge branch '4.4' into 5.0
* 4.4:
  [Http Foundation] Fix clear cookie samesite
  [Security] Check if firewall is stateless before checking for session/previous session
  [Form] Support customized intl php.ini settings
  [Security] Remember me: allow to set the samesite cookie flag
  [Debug] fix for PHP 7.3.16+/7.4.4+
  [Validator] Backport translations
  [Mailer] Use %d instead of %s for error code in error messages
  [HttpKernel] fix locking for PHP 7.4+
  [Security] Fixed hardcoded value of SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE
  Prevent warning in proc_open()
  [FrameworkBundle] Fix Router Cache
  Fix deprecation messages
2020-03-23 13:42:46 +01:00
Nicolas Grekas 7f5d017175 bug #36169 [HttpKernel] fix locking for PHP 7.4+ (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] fix locking for PHP 7.4+

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

As explained in https://bugs.php.net/79398

Commits
-------

f618b98b6c [HttpKernel] fix locking for PHP 7.4+
2020-03-23 13:38:14 +01:00
Nicolas Grekas 099481f237 Merge branch '3.4' into 4.4
* 3.4:
  [Http Foundation] Fix clear cookie samesite
  [Security] Check if firewall is stateless before checking for session/previous session
  [Form] Support customized intl php.ini settings
  [Security] Remember me: allow to set the samesite cookie flag
  [Debug] fix for PHP 7.3.16+/7.4.4+
  [Validator] Backport translations
  Prevent warning in proc_open()
2020-03-23 13:37:11 +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 9bcffd5340 minor #36177 Fix typo on deprecated parameter typehint on UPGRADE-5.1.md file (jpjoao)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Fix typo on deprecated parameter typehint on UPGRADE-5.1.md file

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | None
| License       | MIT
| Doc PR        | symfony/symfony-docs#13394

Fix typo.

Commits
-------

4939d4c61f [FrameworkBundle] Fix typo on deprecated parameter typehint
2020-03-23 13:07:05 +01:00
João Paulo V Martins 4939d4c61f [FrameworkBundle] Fix typo on deprecated parameter typehint 2020-03-23 13:06:46 +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 3afe198018 minor #36137 [HttpClient] Issue notice when NativeHttpClient is used (trowski)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpClient] Issue notice when NativeHttpClient is used

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

Simple PR to issue a notice to notify the user that `ext-curl` or `amphp/http-client` should be installed to use an HTTP/2 capable HTTP client. Not sure on the notice wording.

Commits
-------

874c1e6ab0 [HttpClient] Issue notice when NativeHttpClient is used
2020-03-23 12:34:24 +01:00
Aaron Piotrowski 874c1e6ab0 [HttpClient] Issue notice when NativeHttpClient is used 2020-03-23 12:34:08 +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 0076ed5752 feature #36154 [Notifier][Slack] Add fields on Slack Section block (birkof)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Notifier][Slack] Add fields on Slack Section block

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- 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.
-->
Added `fields` field on section block.
> An array of text objects. Any text objects included with fields will be rendered in a compact format that allows for 2 columns of side-by-side text. Maximum number of items is 10. Maximum length for the text in each item is 2000 characters.

Example of use:
```
$slackOptions = (new SlackOptions())
            ->block((new SlackSectionBlock())->text('My message'))
            ->block(new SlackDividerBlock())
            ->block(
                (new SlackSectionBlock())
                    ->field('*Max Rating*')
                    ->field('5.0')
                    ->field('*Min Rating*')
                    ->field('1.0')
            );
```

Expected output:

<img width="677" alt="Screen Shot 2020-03-21 at 09 57 36" src="https://user-images.githubusercontent.com/65848/77222314-b8360c80-6b5a-11ea-874c-2cfb1829f839.png">

Commits
-------

faad197e85 Added fields on Slack Section block
2020-03-23 09:59:47 +01:00
Fabien Potencier cd1761151c minor #36170 [Mailer] Use %d instead of %s for error code in error messages (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Use %d instead of %s for error code in error messages

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

Commits
-------

9c3951ed69 [Mailer] Use %d instead of %s for error code in error messages
2020-03-23 09:41:36 +01:00
Fabien Potencier 0c22ab8526 feature #36148 [Mailer][Mailgun] Support more headers (Nyholm)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Mailer][Mailgun] Support more headers

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

Im not sure if this should be classified as a bug since "setting headers are broken". Ie, you cannot use some Mailgun API features.

Or, this may be a feature because now you may specify any supported custom header you want.

Commits
-------

537c8b8aa6 [Mailer][Mailgun] Support more headers
2020-03-23 09:39:49 +01:00
Nyholm 537c8b8aa6 [Mailer][Mailgun] Support more headers 2020-03-23 09:39:26 +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 1b90621353 minor #36165 [Validator] Add missing translations (przemyslaw-bogusz)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Validator] Add missing translations

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

I forgot about it in the original PR (#35744) - sorry for the extra work.

Commits
-------

0c06856207 [Validator] Add missing translations
2020-03-23 09:23:32 +01:00
Przemysław Bogusz 0c06856207 [Validator] Add missing translations 2020-03-23 09:23:25 +01:00
Fabien Potencier 9c3951ed69 [Mailer] Use %d instead of %s for error code in error messages 2020-03-23 09:19:50 +01:00
Nicolas Grekas f618b98b6c [HttpKernel] fix locking for PHP 7.4+ 2020-03-22 21:08:25 +01:00
Daniel STANCU faad197e85 Added fields on Slack Section block 2020-03-21 09:46:58 +02:00
Nicolas Grekas 80672fb12a minor #36153 [Uid] minor improvements (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Uid] minor improvements

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

Commits
-------

660326bed3 [Uid] minor improvements
2020-03-20 20:45:54 +01:00
Nicolas Grekas 660326bed3 [Uid] minor improvements 2020-03-20 20:42:05 +01:00
Nicolas Grekas 8397eb79e0 bug #36151 [Security] Fixed hardcoded value of SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Fixed hardcoded value of SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE

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

Commits
-------

677429479d [Security] Fixed hardcoded value of SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE
2020-03-20 16:18:11 +01:00
Grégoire Pineau 677429479d [Security] Fixed hardcoded value of SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE 2020-03-20 16:02:37 +01:00
Fabien Potencier 7e181b93ca feature #36144 [FrameworkBundle][Routing] Add link to source to router:match (l-vo)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle][Routing] Add link to source to router:match

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | https://github.com/orgs/symfony/projects/1#card-30505860
| License       | MIT
| Doc PR        |

Add link to source on `debug:router`/`router:match` when `framework.ide` is configured

Commits
-------

a96690cce5 [FrameworkBundle][Routing] Add link to source to router:match
2020-03-20 10:46:44 +01:00
Laurent VOULLEMIER a96690cce5 [FrameworkBundle][Routing] Add link to source to router:match 2020-03-20 10:40:16 +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
Nicolas Grekas 7866144768 bug #36143 [FrameworkBundle] Fix Router Cache (guillbdx)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Fix Router Cache

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

RouteCollection config cache didn't have the container file in the tracked resources. If container was recompiled, routes cache was not regenerated. This PR adds the container file to the route collection resources.

Commits
-------

c6ace13e34 [FrameworkBundle] Fix Router Cache
2020-03-19 21:46:09 +01:00
Guillaume Pédelagrabe c6ace13e34 [FrameworkBundle] Fix Router Cache 2020-03-19 21:46:03 +01:00