This PR was merged into the 5.3-dev branch.
Discussion
----------
[PhpUnitBridge] fix test on appveyor
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Hopefully :)
Commits
-------
89033a5781 [PhpUnitBridge] fix test on appveyor
This PR was merged into the 4.4 branch.
Discussion
----------
[DependencyInjection] fix dumping service-closure-arguments
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39259
| License | MIT
| Doc PR | -
5.3 uses service closures a bit more, so that this is required to make the `lint:container` command work.
Commits
-------
1aa9a249fc [DependencyInjection] fix dumping service-closure-arguments
This PR was submitted for the 5.x branch but it was merged into the 5.2 branch instead.
Discussion
----------
[Console] Fix Windows code page support
My previous PR #41113 was corrected by `@nicolas`-grekas on 3bac7fe. He introduced logical changes in the code which resulted in incorrect behaviour.
The basic idea was to restore the I/O codepage as soon as you get console input. And you have to do this even if `fgets()` returns **false**, because otherwise you'll leave the changed codepage for the rest of the script execution - and that's bad!
Commits
-------
044b585f69 [Console] Fix Windows code page support
This PR was merged into the 5.2 branch.
Discussion
----------
[Security] Make Login Rate Limiter also case insensitive for non-ascii user identifiers
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
As per discussion in https://github.com/symfony/symfony/pull/41156
Commits
-------
3b7e7fbc7f [Security] Make Login Rate Limiter also case insensitive for non-ascii user identifiers
This PR was merged into the 5.3-dev branch.
Discussion
----------
[DependencyInjection] Don't try to load YamlFileLoader if it's not actually needed
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#41169
| License | MIT
| Doc PR | -
This PR enables using DI without Config when autoconfiguration is not used.
(When autoconfiguration is used, the dependency on Config is still there.)
Commits
-------
7eb46bd779 [DI] Don't try to load YamlFileLoader if it's not actually needed
This PR was merged into the 4.4 branch.
Discussion
----------
WDT: Only load "Sfjs" if it is not present already
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | none
| License | MIT
| Doc PR | not needed
Hi!
Playing with Turbo, I noticed two small issues with the WDT:
1) When you click a link (which Turbo loads via AJAX), the new toolbar would correctly load, but its "AJAX tab" would be missing/empty. At first, that seems.. at least... "correct enough". After all, we *did* just load a new web debug toolbar. However, this can be avoided by simply *not* redefining the `Sfjs` variable: if it already exists, just use it. And this is the intention of that object, I believe: for it to be loaded *once*, and then reused over and over again via its `loadToolbar()` method.
2) Additionally, I was experimenting with some crazy prefetch + Turbo functionality. It works, but caused one minor issue with the web debug toolbar. The flow is this:
A) A prefetch request is made to pre-cache a URL in Turbo.
B) When that links is actually clicked, the cached version from (A) is used as the "Preview". It's HTML calls `Sfjs.loadToolbar()`.
C) At the same moment as (B), another AJAX request is made to the same URL from (A) to get the full, fresh page (in case it's out of date).
D) When (C) finishes, it will have its own `Sfjs.loadToolbar()` call.
The problem is that the AJAX request for the first web debug toolbar (from B) sometimes finishes *after* the AJAX call made by Turbo for (C). The result is that the first web debug toolbar tries to activate itself... but it's already gone from the page.
I realize this is a... kind of crazy scenario, but I think the fix is legit: if, for any reason, the web debug toolbar element is not on the page, we should not try to initialize it. It results in:
<img width="431" alt="Screen Shot 2021-05-10 at 3 49 06 PM" src="https://user-images.githubusercontent.com/121003/117716165-429a5f00-b1a7-11eb-9b99-bf08591d2ff4.png">
## To Test
JUST to be on the safe side, I prepared a symfony-demo app with Turbo installed, and using these changes. You can try it here - https://github.com/weaverryan/symfony-demo/tree/turbo - the README is updated to quickly get it running (no need to even run yarn, the JavaScript files are committed).
Thanks!
Commits
-------
47ef65f336 only load Sfjs if it is not present
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[Messenger] Ability to distinguish retry and delay actions
Added ability to distinguish retry and delay actions so that different "x-dead-letter-exchange" exchange name will be used in different scenarios.
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR |
This is a bug which existed since v4.4. The following scenario is possible:
- There are two queues: `A` and `B`, both are bound to the same routing key via "topic" exchange (two different applications for example).
- A message is published to this routing key to "topic" exchange.
- Consumer of queue `A` handles it correctly and acknowledges the message.
- Consumer of queue `B` throws and exception and message goes to retry (for example to queue `delay_delays_key_5`).
- Once message expired in `delay_delays_key_5`, it is delivered again to both `A` and `B` (**again** consumed by consumer `A`).
Expected: behavior of consumer `B` should not cause message duplication to queue `A`.
It is required to make a change of name of temporary delay queue (otherwise "delay" and "retry" queues have incompatible declaration arguments). I left `queue_name_pattern` as is to keep settings of connection backward compatible, but changed internals of queue name construction.
Commits
-------
417aaab6ee [Messenger] Ability to distinguish retry and delay actions
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Mailer][Notifier][Translation] Add tests for UnsupportedSchemeException
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix #... <!-- 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#... <!-- required for new features -->
This way we make sure a third party which is not known by `symfony/translation` can reuse this exception without being part of the `SCHEME_TO_PACKAGE_MAP`.
`@Nyholm` I agree that the exception should not know about the bridges, any ideas? The DX ist great to tell the user a package is missing and can be installed via composer 🤔
### Todos
* [x] add this test for `symfony/notifier`
* [x] add this test for `symfony/mailer`
cc `@welcoMattic`
Commits
-------
48553dac5d Add tests for UnsupportedSchemeException
* 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