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.
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
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
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
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
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
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`.
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
* 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
* 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
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"