Commit Graph

51072 Commits

Author SHA1 Message Date
Nicolas Grekas
66758ad5dc Merge branch '4.4' into 5.1
* 4.4:
  [HttpFoundation] skip tests when the IANA server is throttling the list of status codes
  [DoctrineBridge] fix DBAL v3 compat
2020-09-27 16:14:57 +02:00
Nicolas Grekas
cbb0b1d54b Merge branch '3.4' into 4.4
* 3.4:
  [HttpFoundation] skip tests when the IANA server is throttling the list of status codes
  [DoctrineBridge] fix DBAL v3 compat
2020-09-27 16:14:06 +02:00
Nicolas Grekas
feaa9a6b2a [HttpFoundation] skip tests when the IANA server is throttling the list of status codes 2020-09-27 16:13:16 +02:00
Nicolas Grekas
4b1612b8dd [DoctrineBridge] fix DBAL v3 compat 2020-09-27 16:06:58 +02:00
Nicolas Grekas
cde8ffecce Merge branch '5.1'
* 5.1:
  [Filesystem] fix for PHP 8
  [Cache] fix DBAL v3 compat
  Bump Symfony version to 5.1.7
  Update VERSION for 5.1.6
  Update CHANGELOG for 5.1.6
  Bump Symfony version to 4.4.15
  Update VERSION for 4.4.14
  Update CHANGELOG for 4.4.14
  Bump Symfony version to 3.4.46
  Update VERSION for 3.4.45
  Update CONTRIBUTORS for 3.4.45
  Update CHANGELOG for 3.4.45
2020-09-27 16:05:32 +02:00
Nicolas Grekas
b93dea7244 Merge branch '4.4' into 5.1
* 4.4:
  [Filesystem] fix for PHP 8
  [Cache] fix DBAL v3 compat
  Bump Symfony version to 4.4.15
  Update VERSION for 4.4.14
  Update CHANGELOG for 4.4.14
  Bump Symfony version to 3.4.46
  Update VERSION for 3.4.45
  Update CONTRIBUTORS for 3.4.45
  Update CHANGELOG for 3.4.45
2020-09-27 16:02:37 +02:00
Nicolas Grekas
7529d131cc Merge branch '3.4' into 4.4
* 3.4:
  [Filesystem] fix for PHP 8
2020-09-27 15:54:16 +02:00
Nicolas Grekas
a4324447f1 [Filesystem] fix for PHP 8 2020-09-27 15:07:29 +02:00
Jan Schädlich
6a0510d859 Add Dsn test case 2020-09-27 14:45:53 +02:00
Nicolas Grekas
911e120fa4 Merge branch '3.4' into 4.4
* 3.4:
  [Cache] fix DBAL v3 compat
  Bump Symfony version to 3.4.46
  Update VERSION for 3.4.45
  Update CONTRIBUTORS for 3.4.45
  Update CHANGELOG for 3.4.45
2020-09-27 14:40:39 +02:00
Nicolas Grekas
3d1ed2e90d [Cache] fix DBAL v3 compat 2020-09-27 14:33:10 +02:00
Nicolas Grekas
d8d90b009a minor #37993 [HttpFoundation][Cache][Messenger] Replace redis "DEL" commands with "UNLINK" (jonashrem)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[HttpFoundation][Cache][Messenger] Replace redis "DEL" commands with "UNLINK"

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

This PR replaces DEL Command with UNLINK command.

Details about UNLINK can be found here https://redis.io/commands/unlink .

As noticed here redis/redis#1748 (comment) this will not change the behavior.

As there is no check of Redis version included, it will break Redis Versions < 4.0 through.

As Redis 4.0 was released on 2017-07-14 and Redis 3 went EOL with the Redis 5 on 2018-10-17, I don't expect this being an issue.

With redis 4.0 there is a new unlink command intruded ( https://redis.io/commands/unlink ) with is a smarter version of del() as it deletes keys in O(1) and frees the memory in background.

See also http://antirez.com/news/93 and redis/redis#1748

This won't change the behavior but only the memory usage as clarified here: redis/redis#1748 (comment) which shouldn't be an issue with most Magento instances

With this, I recommend replacing DEL operations with UNLINK operations.

Commits
-------

91a44524ff [HttpFoundation][Cache][Messenger] Replace redis "DEL" commands with "UNLINK"
2020-09-27 13:34:36 +02:00
Jonas Hünig
91a44524ff [HttpFoundation][Cache][Messenger] Replace redis "DEL" commands with "UNLINK" 2020-09-27 12:41:29 +02:00
Fabien Potencier
176262b3b9 Bump Symfony version to 5.1.7 2020-09-27 06:36:47 +02:00
Fabien Potencier
c54f3c0501
Merge pull request #38313 from fabpot/release-5.1.6
released v5.1.6
2020-09-27 06:33:37 +02:00
Fabien Potencier
81bcd90f08 Update VERSION for 5.1.6 2020-09-27 06:33:19 +02:00
Fabien Potencier
25f57cfcf1 Update CHANGELOG for 5.1.6 2020-09-27 06:33:04 +02:00
Fabien Potencier
08e27e9f03 Bump Symfony version to 4.4.15 2020-09-27 06:29:46 +02:00
Fabien Potencier
c589c9a604
Merge pull request #38312 from fabpot/release-4.4.14
released v4.4.14
2020-09-27 06:26:00 +02:00
Fabien Potencier
9e8f2e7db6 Update VERSION for 4.4.14 2020-09-27 06:25:44 +02:00
Fabien Potencier
5e81cb7c7b Update CHANGELOG for 4.4.14 2020-09-27 06:25:32 +02:00
Fabien Potencier
2abc465335 Merge branch '5.1'
* 5.1:
  Fix wrong merge
2020-09-27 06:23:47 +02:00
Fabien Potencier
46e609b262 Fix wrong merge 2020-09-27 06:23:37 +02:00
Fabien Potencier
9a774ede48 Bump Symfony version to 3.4.46 2020-09-27 06:03:03 +02:00
Fabien Potencier
acaf962168
Merge pull request #38311 from fabpot/release-3.4.45
released v3.4.45
2020-09-27 05:47:15 +02:00
Fabien Potencier
bc38373380 Update VERSION for 3.4.45 2020-09-27 05:46:58 +02:00
Fabien Potencier
0022465b97 Update CONTRIBUTORS for 3.4.45 2020-09-27 05:46:54 +02:00
Fabien Potencier
17ceb6e73e Update CHANGELOG for 3.4.45 2020-09-27 05:46:13 +02:00
Fabien Potencier
6ca92258d7 Merge branch '5.1'
* 5.1:
  [ErrorHandler] Return false directly and remove unused variable
  [OptionsResolver] Assert that the error type is valid in deprecations test
  [OptionsResolver] Fix deprecation message access
  [HttpClient] Allow bearer token with colon
  [Form] Fix custom formats deprecation with HTML5 widgets
  [Translator] Optional Intl dependency
  [Contracts][Translation] Optional Intl dependency
  [ErrorHandler] Escape JSON encoded log context
  update missing translations arabic
  [Yaml] simplify the test
  fix test by letting mock throw the actual expected exception
2020-09-27 05:44:38 +02:00
Fabien Potencier
5685496974 Merge branch '4.4' into 5.1
* 4.4:
  [ErrorHandler] Return false directly and remove unused variable
  [OptionsResolver] Assert that the error type is valid in deprecations test
  [HttpClient] Allow bearer token with colon
  [Form] Fix custom formats deprecation with HTML5 widgets
  [Translator] Optional Intl dependency
  [Contracts][Translation] Optional Intl dependency
  [ErrorHandler] Escape JSON encoded log context
  update missing translations arabic
  [Yaml] simplify the test
  fix test by letting mock throw the actual expected exception
2020-09-27 05:44:28 +02:00
Fabien Potencier
55a450d827 Merge branch '3.4' into 4.4
* 3.4:
  update missing translations arabic
  [Yaml] simplify the test
  fix test by letting mock throw the actual expected exception
2020-09-27 05:36:23 +02:00
Fabien Potencier
a6aa08e166 feature #38296 [lock] Provides default implementation when store does not supports the behavior (jderusse)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[lock] Provides default implementation when store does not supports the behavior

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

All stores does not provide the same behaviors. Some are blocking, some allows shared Locks, ...
Issue is: When people use `lock` to use a behavior that is not supported by the store, they get an `UnsuportedException`, but they don't have any way to know if the store supports or not the behavior they want to use.

ie: when using the FrameworkBundle
```yaml
framework:
    lock: '%env(LOCK_DSN)%'
```
User (or bundle) can't use safely `$lock->acquire(true)` or `$lock->acquireRead()`.

Given it's very easy to provide an fallback implementation to those behavior, this PR
- use fallback implementation when store does not support the behavior
- deprecate the RetryTillSaveStore (not needed anymore)

Commits
-------

575b391b9b [lock] Provides default implementation when store does not supports the behavior
2020-09-27 05:25:42 +02:00
Jérémy Derussé
575b391b9b [lock] Provides default implementation when store does not supports the behavior 2020-09-27 05:25:36 +02:00
Fabien Potencier
934b125dff feature #38298 [Notifier] Add Sendinblue notifier. (ptondereau)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Notifier] Add Sendinblue notifier.

| 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       | no <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | todo <!-- required for new features -->

Add Sendinblue SMS notifier bridge.

Commits
-------

e7300a8580 Add Sendinblue notifier.
2020-09-27 05:14:32 +02:00
Pierre Tondereau
e7300a8580 Add Sendinblue notifier. 2020-09-26 11:58:00 +02:00
Fabien Potencier
9e4f511cbf Fix CS 2020-09-26 07:31:43 +02:00
Fabien Potencier
013bbcc23e minor #38303 [Messenger] Fix misleading comment about time-limit (sylfabre)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Messenger] Fix misleading comment about time-limit

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

The current explanation of the time-limit option of the `messenger:consume` command is misleading as it lets you think that this is an enforced hard limit.

For instance, you may think that a command started with `--time-limit=10` will stop once 10 seconds are elapsed, no matter what.

Actually, two things happen:
- Once 10 seconds have elapsed, then the worker won't receive and handle any other message
- The worker will keep running until the currently handled message is fully handled so it can last way longer than 10 seconds, then it will stop.

I'm not sure this is behavior is actually a bug or not, but the current documentation does not describe the current behavior

Commits
-------

21176646e9 [Messenger] Fix misleading comment about time-limit
2020-09-26 07:30:40 +02:00
Fabien Potencier
ffb7f0e36f minor #38304 [Translation] Allow Translatable objects to be used as strings (tgalopin)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Translation] Allow Translatable objects to be used as strings

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

Allow Translatable objects to be used as strings.

Commits
-------

0ba206420e [Translation] Allow Translatable objects to be used as strings
2020-09-26 07:28:36 +02:00
Fabien Potencier
6a5571552f Fix CS 2020-09-26 07:26:20 +02:00
Fabien Potencier
02d879f693 feature #38305 [PhpUnitBridge] Enable a maximum PHPUnit version to be set via SYMFONY_MAX_PHPUNIT_VERSION (stevegrunwell)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[PhpUnitBridge] Enable a maximum PHPUnit version to be set via SYMFONY_MAX_PHPUNIT_VERSION

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

This PR adds support for the `SYMFONY_MAX_PHPUNIT_VERSION` environment variable, letting users set the **maximum** version of PHPUnit to be considered when running the PHPUnit Bridge.

The use case here comes from testing WordPress using the library; as of the time of this ticket, [WordPress' core test suite does not yet support PHPUnit 8.x](https://core.trac.wordpress.org/ticket/46149). As a result, trying to run the WordPress core test suite with PHPUnit Bridge results in the following error under PHP 7.2 or newer:

> **Error:** Looks like you're using PHPUnit 8.3.5. WordPress requires at least PHPUnit 5.4 and is currently only compatible with PHPUnit up to 7.x.
Please use the latest PHPUnit version from the 7.x branch.

In this use case, the developer testing against WordPress would set `SYMFONY_MAX_PHPUNIT_VERSION=7.5` in their environment (or `phpunit.xml` file) and the PHPUnit Bridge would never go *above* that version (but would still be free to, for instance, load PHPUnit 6 when running under PHP 7.0).

Commits
-------

7877a5b488 [PhpUnitBridge] Enable a maximum PHPUnit version to be set via SYMFONY_MAX_PHPUNIT_VERSION
2020-09-26 07:25:33 +02:00
Steve Grunwell
7877a5b488 [PhpUnitBridge] Enable a maximum PHPUnit version to be set via SYMFONY_MAX_PHPUNIT_VERSION 2020-09-25 14:59:28 -04:00
Titouan Galopin
0ba206420e [Translation] Allow Translatable objects to be used as strings 2020-09-25 18:10:29 +02:00
Sylvain Fabre
21176646e9 [Messenger] Fix misleading comment about time-limit 2020-09-25 15:58:44 +02:00
Nicolas Grekas
6bb0ef4f52 minor #38299 [ErrorHandler] Return false directly and remove unused variable (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Return false directly and remove unused variable

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/37848
| License       | MIT
| Doc PR        | -

To return true, $type and $log both need to be true. But to enter the condition, one of them has to be false.

I also spotted an unused variable below so I removed it.

Commits
-------

3933957d1a [ErrorHandler] Return false directly and remove unused variable
2020-09-25 11:42:25 +02:00
Thomas Calvet
3933957d1a [ErrorHandler] Return false directly and remove unused variable 2020-09-25 10:51:35 +02:00
Fabien Potencier
f71d8cfabb minor #38294 [OptionsResolver] Assert that the error type is valid in deprecations test (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[OptionsResolver] Assert that the error type is valid in deprecations test

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

A change in the code could cause a warning for example and still produce the expected number of errors and the expected last error. Checking the type of the error is a little bit better. The best would be to check all the expected deprecations one by one, maybe later? 😄

Commits
-------

926d18f2f9 [OptionsResolver] Assert that the error type is valid in deprecations test
2020-09-25 08:00:01 +02:00
Fabien Potencier
44bd82cb2d bug #38291 [OptionsResolver] Fix deprecation message access (fancyweb)
This PR was merged into the 5.1 branch.

Discussion
----------

[OptionsResolver] Fix deprecation message access

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

`$this->deprecated[$option]` cannot be a string, it's always an array.

Commits
-------

232af423aa [OptionsResolver] Fix deprecation message access
2020-09-25 07:58:26 +02:00
Fabien Potencier
e6dcf9bc03 bug #38292 Register the binary types as well (jdelaune)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

Register the binary types as well

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix -
| License       | MIT
| Doc PR        | symfony/symfony-docs-

Binary versions were not working since they weren't registered

Commits
-------

96a0e5fca1 Register the binary types as well
2020-09-25 07:57:25 +02:00
Jordan de Laune
96a0e5fca1 Register the binary types as well 2020-09-25 07:57:18 +02:00
Thomas Calvet
926d18f2f9 [OptionsResolver] Assert that the error type is valid in deprecations test 2020-09-24 18:40:22 +02:00