Commit Graph

51144 Commits

Author SHA1 Message Date
Fabien Potencier
72b94b8fb7 minor #38347 [Console] Improve description for the help flag. (rodrigoaguilera)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[Console] Improve description for the help flag.

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

I am currently trying to improve a CLI tool called `robo` (https://robo.li) that relies heavily on the console component.
First thing I did was running it without any argument like `./robo` to find the description for the help flag `-h` or `--help`
"Display this help message"
This is typical for any CLI tool out there except that when I run `./robo --help` I get the help for the `list` command (same output as `robo help list`).

One of the options I considered was to fix this behavior by showing the same output when no command is given disregarding the help flag (just for the case of no command given) but I actually like how symfony console handles the help flag.
I think it needs a clarification for the description given so I changed it to:

> Display help for the given command. When no command is given display help for the list command

Which is more descriptive about what actually happens in the code when that flag is given. Specially the "this" word can be a little confusing.

Commits
-------

c451c48258 [Console] Improve description for the help flag.
2020-09-30 07:13:01 +02:00
Rodrigo Aguilera
c451c48258 [Console] Improve description for the help flag. 2020-09-30 07:13:00 +02:00
Fabien Potencier
8065ab498d bug #38348 [FrameworkBundle] Add Mailjet definition (michaelKaefer)
This PR was merged into the 5.1 branch.

Discussion
----------

[FrameworkBundle] Add Mailjet definition

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

Fixes https://github.com/symfony/symfony/issues/38316

Commits
-------

132bd2ad24 [FrameworkBundle] Add Mailjet definition
2020-09-30 07:10:46 +02:00
Alexander M. Turek
d1cb2d6354 [Validator] Constraints as php 8 Attributes. 2020-09-30 00:43:35 +02:00
Michael Käfer
132bd2ad24 [FrameworkBundle] Add Mailjet definition 2020-09-29 22:17:22 +02:00
Nicolas Grekas
662fcff40f Revert "bug #38063 [FrameworkBundle] generate preload.php in src/ to make opcache.preload predictable (nicolas-grekas)"
This reverts commit d441d867cd, reversing
changes made to 043e7c34de.
2020-09-29 11:51:46 +02:00
Fabien Potencier
af8ad344d3 feature #38332 [Validator] Add support for UUIDv6 in Uuid constraint (nicolas-grekas)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Validator] Add support for UUIDv6 in Uuid constraint

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

Commits
-------

55c17e1af7 [Validator] Add support for UUIDv6 in Uuid constraint
2020-09-29 08:58:21 +02:00
Nicolas Grekas
55c17e1af7 [Validator] Add support for UUIDv6 in Uuid constraint 2020-09-29 08:56:19 +02:00
Fabien Potencier
72ff4012a5 bug #38336 [PhpUnitBridge] Fixed class_alias() for PHPUnit\Framework\Error\Error (stevegrunwell)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Fixed class_alias() for PHPUnit\Framework\Error\Error

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

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`, so we cannot map it using simple string replacement like its descendants.

Commits
-------

8e607b58df [PhpUnitBridge] Fix class_alias() for PHPUnit\Framework\Error\Error
2020-09-29 08:53:53 +02:00
Fabien Potencier
d5ce0e3bc9 feature #38330 [Contracts] add TranslatableInterface (nicolas-grekas)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Contracts] add TranslatableInterface

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

An alternative to #38328:

- `TranslatableInterface` is added to symfony/contracts;
- `Translatable`, still in the component, implements it (and is not final as it makes no sense for a value-object)
- the `t()` function is kept in the component - it doesn't fit in the contracts IMHO;
- `Translatable::trans()` is not static anymore;
- the domain is nullable instead of defaulting to "messages";
- the `t()` function moved in the `Symfony\Component\Translation` namespace (for reference, the `s()` function from String is also namespaced.);
- the Twig extension is made strictly polymorphic: if you pass a Translatable, you cannot pass arguments/domain/count.

Commits
-------

9224f7ac5b [Contracts] add TranslatableInterface
2020-09-29 08:51:20 +02:00
Fabien Potencier
e159dff938 feature #38322 [Validator] Add Ulid constraint and validator (Laurent Clouet)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[Validator] Add Ulid constraint and validator

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

ULID constraint and validator as mentioned in ticket #38103
I checked for it ulid specifications https://github.com/ulid/spec

Commits
-------

e36fd559da [Validator] Add Ulid constraint and validator
2020-09-29 08:36:34 +02:00
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