This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[Console] Add bright colors to console.
| Q | A
| ------------- | ---
| Branch? | 5.x <!-- 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 | Fix#39869 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | symfony/symfony-docs#14884 <!-- required for new features -->
Add the "bright" ANSI colours to symfony/console. This adds ANSI escape codes 90-97 and 100-107.
<!--
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 5.x.
-->
Commits
-------
dbb94524ba [Console] Add bright colors to console.
* 5.2:
Use createMock() instead of a getter
[ErrorHandler] Fix strpos error when trying to call a method without a name
use proper keys to not override appended files
take into account all label related options
Fix console logger according to PSR-3
* 4.4:
Use createMock() instead of a getter
[ErrorHandler] Fix strpos error when trying to call a method without a name
use proper keys to not override appended files
Fix console logger according to PSR-3
This PR was merged into the 4.4 branch.
Discussion
----------
[Console] Fix console logger according to PSR-3
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39050, #29138
| License | MIT
`Symfony\Component\HttpKernel\EventListener\ErrorListener` logs non-HTTP exceptions at `LogLevel::CRITICAL`.
`Symfony\Component\Messenger\Worker` logs unrecoverable exceptions at `LogLevel::CRITICAL`.
`Symfony\Component\Console\EventListener\ErrorListener` logs exceptions at `LogLevel::ERROR`.
As per PSR-3, unexpected and unrecoverable exceptions should be logged at `LogLevel::CRITICAL`.
Commits
-------
69fcd075eb Fix console logger according to PSR-3
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
Use createMock() instead of a getter
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | ---
| License | MIT
| Doc PR | ---
Before I go on, are you interested in such change @nicolas-grekas ?
Commits
-------
9629dafa66 Use createMock() instead of a getter
This PR was merged into the 4.4 branch.
Discussion
----------
[Finder] use proper keys to not override appended files
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#40022
| License | MIT
| Doc PR |
Commits
-------
036c8d71fd use proper keys to not override appended files
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] Fix strpos error when trying to call a method without a name
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | None (direct fix)
| License | MIT
| Doc PR | None
<!--
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 5.x.
-->
When running the following code:
```php
class Foo
{
// Some code here
}
$str = ''; // this should not happen, but for some reason, it did.
$foo->{$str}();
```
a fatal error occurs because the method name to execute is empty, but Symfony's error enhancer fails to parse it:
![Error screenshot](https://user-images.githubusercontent.com/7600265/106108704-ec019b80-6148-11eb-82bc-f7801e30fea4.png)
In this PR, I propose a fix with a more clear error to inform the developer about what happened.
Commits
-------
66be87bffc [ErrorHandler] Fix strpos error when trying to call a method without a name
This PR was merged into the 5.2 branch.
Discussion
----------
[Uid] Fix time to float conversion
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
On 32b systems, when the timestamp is before the UNIX epoch, the result is currently shifted by 1. Inverting all the bits is not enough, we need to add 1. I guess https://en.wikipedia.org/wiki/Two%27s_complement is relevant here?
Alternative:
```php
$time = -1 * self::toBase(self::add($time ^ "\xff\xff\xff\xff\xff\xff\xff\xff", "\x00\x00\x00\x00\x00\x00\x00\x01"), self::BASE10);
```
Commits
-------
9680a27246 [Uid] Fix time to float conversion
* 5.2:
Replace "branch-version" by "versions" in composer.json
Bump Symfony version to 5.2.3
Update VERSION for 5.2.2
Update CHANGELOG for 5.2.2
Bump Symfony version to 4.4.20
Update VERSION for 4.4.19
Update CONTRIBUTORS for 4.4.19
Update CHANGELOG for 4.4.19
Use import instead of FQCN