* 5.2:
[Inflector][String] wrong plural form of words ending by "pectus"
[HttpClient] Don't prepare the request in ScopingHttpClient
[Console] Fixes for PHP 8.1 deprecations
Make LoginRateLimiter case insentive
Fix/Rewrite .gitignore regex builder
Reset limiters on successful login
Provide count argument for TooManyLoginAttemptsAuthenticationException to be able to translate in plural way
[security] NullToken signature
* 4.4:
[Inflector][String] wrong plural form of words ending by "pectus"
[HttpClient] Don't prepare the request in ScopingHttpClient
[Console] Fixes for PHP 8.1 deprecations
Fix/Rewrite .gitignore regex builder
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Inflector][String] wrong plural form of words ending by "pectus"
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#41124
| License | MIT
| Doc PR | N/A
Commits
-------
0dc8893caa [Inflector][String] wrong plural form of words ending by "pectus"
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] Don't prepare the request in ScopingHttpClient
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Spotted while working on #41159 (needed by it.)
Commits
-------
a53db83823 [HttpClient] Don't prepare the request in ScopingHttpClient
This PR was merged into the 5.2 branch.
Discussion
----------
[Security] Make Login Rate Limiter case insensitive
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Login RateLimiter is case sensitive, while most login forms aren't case sensitive.
This PR makes `DefaultLoginRateLimiter` case insensitive.
Commits
-------
c333f3d547 Make LoginRateLimiter case insentive
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Translation] Improved Translation Providers
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Some small improvements on Translation Providers:
- move symfony/config from dev dependency to hard dependency for all Bridges as all providers use XliffFileLoader to load pulled translations (cf. https://github.com/symfony/symfony/pull/40927#issuecomment-836569888)
- replace all instances of
```
'headers' => [
'Authorization' => 'Bearer API_TOKEN',
]
```
with `'auth_bearer' => 'API_TOKEN',` even in tests files.
- Fix Lokalise base_uri concatenation
Commits
-------
84fd13ce95 Improved Translation Providers
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Translation] Added Lokalise Provider
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/15310
To follow up on https://github.com/symfony/symfony/pull/38475, this PR adds [Lokalise](https://lokalise.com/) Provider.
The todo list to make it ready is:
- [x] Apply recent changes that have been made on `ProviderInterface` and `TranslatorBagInterface` (we removed the `all()` and `getDomains()` method from TranslatorBagInterface)
- [x] Add LokaliseProvider to `src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_providers.php` file
- [x] Add Lokalise case to `Symfony\Component\Translation\Exception\UnsupportedSchemeException`
- [x] Move `LokaliseProvider` and `LokaliseProviderFactory` from `Symfony\Component\Translation\Bridge\Lokalise\Provider` to `Symfony\Component\Translation\Bridge\Lokalise` namespace
- [x] Write integration tests by mocking HTTP Responses
The major part of the remaining work concerns tests, I will make it done before the beginning of May.
Commits
-------
022d8285f3 Added Lokalise Provider
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Translation] Added PoEditor Provider
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/15310
To follow up on https://github.com/symfony/symfony/pull/38475, this PR adds [PoEditor](https://poeditor.com/) Provider.
The todo list to make it ready is:
- [x] Apply recent changes that have been made on `ProviderInterface` and `TranslatorBagInterface` (we removed the `all()` and `getDomains()` method from TranslatorBagInterface)
- [x] Add PoEditorProvider to `src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_providers.php` file
- [x] Add PoEditor case to `Symfony\Component\Translation\Exception\UnsupportedSchemeException`
- [x] Write integration tests by mocking HTTP Responses
The major part of the remaining work concerns tests, I will make it done before the beginning of May.
Commits
-------
240ac22f70 Added PoEditor Provider
This PR was merged into the 5.3-dev branch.
Discussion
----------
Fix style of changelogs/readmes
| Q | A
| ------------- | ---
| Branch? | 5.3
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
a964554538 Fix style of changelogs/readmes
This PR was merged into the 5.2 branch.
Discussion
----------
[Security] Translation count argument for TooManyLoginAttemptsAuthenticationException
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| License | MIT
Added `%count%` argument to leverage translator's pluralization functionality as discussed in https://github.com/symfony/symfony/pull/41097
Commits
-------
2bf0b485f9 Provide count argument for TooManyLoginAttemptsAuthenticationException to be able to translate in plural way
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[Translation] Added Crowdin Translation Provider
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | <!-- required for new features -->
To follow up on #38475, this PR adds [Crowdin](https://crowdin.com/) Provider.
This provider was removed a few weeks ago from the Translation Providers feature by `@welcoMattic`.
We discussed all the recent changes made on `ProviderInterface`, `TranslatorBagInterface`, and others and I already applied these changes to Crowdin Provider.
Also, this Provider is adapted to work with both [Crowdin](https://crowdin.com/) and [Crowdin Enterprise](https://crowdin.com/enterprise).
The todo list to make it ready is:
- [x] Write integration tests by mocking HTTP Responses
I will make it done before the beginning of May.
Commits
-------
d7fda16262 [Translation] Added Crowdin Translation Provider
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Translation] Refactored LocoProvider
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
I've refactored the LocoProviderTest class to use properly `MockResponse` instead and creating mock of `ResponseInterface` and make useless assertions.
I've also refactored the Provider itself to get benefit of HttpClient concurrency.
It allows me to find 2 bugs, which are fixed. They concerns the usage of internal unique ids provided by Loco to update/delete translations, instead of translation files keys (which are not unique across a Symfony application).
Finally I've added a test for the `delete` method.
Ready for first review
Commits
-------
40041db7cb Refactored LocoProviderTest
This PR was merged into the 5.3-dev branch.
Discussion
----------
[DependencyInjection] Better exception when a configurator is not type hinted
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
This would help with such BC break:
https://github.com/markitosgv/JWTRefreshTokenBundle/pull/241
Commits
-------
25813e3804 [DependencyInjection] Better exception when a configurator is not type hinted
This PR was merged into the 5.2 branch.
Discussion
----------
[Security] NullToken signature
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
The signature of `TokenInterface::getUser` does not allow returning null. But `NullToken` returns `null`.
0f96ac7484/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php (L49-L56)
This PR update `NullToken::getUser` to return an empty string instead of null.
I wonder if the fix shouldn't be to change the return type in the interface, but that would be a BC break, right?
Commits
-------
9ad3720efc [security] NullToken signature
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
Fix/Rewrite .gitignore regex builder
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | fix#39257
| License | MIT
| Doc PR | no
This PR fixes `.gitignore` with exclude wildcard ignore rules like `!a/*/b` were failing with `preg_match(): Compilation failed: lookbehind assertion is not fixed length at offset` PHP error.
Functionality/performance was verified against large `.gitignore` files:
- https://github.com/PrestaShop/PrestaShop/blob/1.7.7.3/.gitignore
- https://github.com/dotnet/installer/blob/v5.0.202/.gitignore
- https://github.com/dotnet/runtime/blob/v5.0.5/.gitignore
This PR also improves the testing cases.
Commits
-------
83f9fd3adf Fix/Rewrite .gitignore regex builder
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Runtime] don't display the shebang on the CLI
| Q | A
| ------------- | ---
| Branch? | 5.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#40949
| License | MIT
| Doc PR | -
Commits
-------
463b2db51b [Runtime] dont display the shebang on the CLI