Commit Graph

51183 Commits

Author SHA1 Message Date
Laurent Clouet
e36fd559da [Validator] Add Ulid constraint and validator 2020-09-29 08:36:29 +02:00
Fabien Potencier
3113fce1df feature #38333 [Uid] make UUIDv6 always return truly random nodes to prevent leaking the MAC of the host (nicolas-grekas)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Uid] make UUIDv6 always return truly random nodes to prevent leaking the MAC of the host

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

As explained in http://gh.peabody.io/uuidv6/, the wording of the UUIDv1 spec suggests that using the MAC of the host is preferred to compute the "node" field of UUIDs. This is what the uuid extension does, and the reason why the 12 last chars of the UUIDv1 it generates are stable. But this is a privacy leak. There are stories in the wild about how knowing the MAC has been abused in the past.

UUIDv6 prefers putting a secure random number there.

So here is the PR to do so.

Commits
-------

b9c61ca86c [Uid] make UUIDv6 always return truly random nodes to prevent leaking the MAC of the host
2020-09-29 08:35:35 +02:00
Nicolas Grekas
b9c61ca86c [Uid] make UUIDv6 always return truly random nodes to prevent leaking the MAC of the host 2020-09-29 08:01:16 +02:00
Steve Grunwell
8e607b58df [PhpUnitBridge] Fix class_alias() for PHPUnit\Framework\Error\Error
PHPUnit 6.x removed the PHPUnit_Framework_* classes in favor of PHP namespaces, but one error class did not map the same as the others: `PHPUnit_Framework_Error`.

Instead of mapping to `PHPUnit\Framework\Error` in the same way that `PHPUnit_Framework_Error_Warning` mapped to `PHPUnit\Framework\Error\Warning`, this base class was replaced with `PHPUnit\Framework\Error\Error`.
2020-09-28 16:03:26 -04:00
Nicolas Grekas
9224f7ac5b [Contracts] add TranslatableInterface 2020-09-28 15:05:58 +02:00
Fabien Potencier
a429deee62 bug #38329 [lock] Fix non-blocking store fallback (jderusse)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[lock] Fix non-blocking store fallback

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

Fix issue introduced in #38328

Tests added to avoid regressions.

Commits
-------

7a80e41cd8 Fix non-blocking store fallback
2020-09-28 13:34:12 +02:00
Jérémy Derussé
7a80e41cd8
Fix non-blocking store fallback 2020-09-28 12:11:42 +02:00
Nicolas Grekas
88412a1e2b Merge branch '5.1'
* 5.1:
  Fix flaky test possiblity on PHP >=7.1
2020-09-27 21:46:52 +02:00
Nicolas Grekas
2a5710f641 minor #38321 Fix flaky test possiblity on PHP >=7.1 (Valentin)
This PR was merged into the 5.1 branch.

Discussion
----------

Fix flaky test possiblity on PHP >=7.1

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38320
| License       | MIT
| Doc PR        | not needed

Commits
-------

f99256fec8 Fix flaky test possiblity on PHP >=7.1
2020-09-27 21:46:34 +02:00
Valentin
f99256fec8 Fix flaky test possiblity on PHP >=7.1 2020-09-27 19:38:25 +02:00
Nicolas Grekas
6349a1b2fc Merge branch '5.1'
* 5.1:
  [HttpFoundation] skip tests when the IANA server is throttling the list of status codes
  [DoctrineBridge] fix DBAL v3 compat
2020-09-27 16:15:50 +02:00
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