This PR was merged into the 4.4 branch.
Discussion
----------
fix validator when we have false returned by the current element of the iterator
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#40057
| License | MIT
Commits
-------
a9e9359581 fix validator when we have a false current element
This PR was merged into the 4.4 branch.
Discussion
----------
Streamline dataproviders
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | ---
| License | MIT
| Doc PR | ---
No need to create extra PR's on other branches, no more occurrences 👍
Commits
-------
025079b051 Streamline dataproviders
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[Messenger] Allow to limit consumer to specific queues
| Q | A
| ------------- | ---
| Branch? | 5.x for features
| Bug fix? | no
| New feature? | yes (TODO: changelog)
| Deprecations? | no
| Tickets | Fix#38630 (i think)
| License | MIT
| Doc PR | symfony/symfony-docs#... TODO
(Note: I am aware that there are other solutions for #38630 that might be more elegant. Our usecase does not use fanout, the reason why we need the functionality is different)
**Description**
We have a large application where one part is creating messages for products that need reindexing. A transport decorator decides before queueing whether this is a large effort or a small effort, based on some metric. Based on that, it adds a routing key which is then used in rabbitmq to put the message into the "small" or "large" queue.
We need two separate consumer processes that consume the small and the large queue, for separate scaling and such.
I looked into how we could achieve that. One option is to offer another option in the consume command. That would need to be forwarded to the receiver somehow, i added an interface for it now. The current PR is an illustration of the idea. If you specify a queue that the receiver does not have, things will fail in an inlegeant. If you specify multiple receivers, you can't specify the queue per receiver (though that starts being an odd usecase imho, you could then run two consumers instead)
Another option could be to allow configuring multiple receivers for the same transport that get the queue name(s) injected into their constructor. Then you can consume them separately. This currently needs a ton of configuration and some custom code to work. I can look at doing a PR to make this approach simpler, if you prefer it over the option to the consume command...
Commits
-------
9af1e20dae Adding changelog
81d6a49750 [Messenger] Allow to limit consumer to specific queues
This PR was squashed before being merged into the 5.2 branch.
Discussion
----------
[Mailer][Mime] Fix case-sensitive handling of header names
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39953
| License | MIT
| Doc PR | -
Fixes case-sensitive handling of header names in "Mime" and "Mailer" component, more in the [ticket](https://github.com/symfony/symfony/issues/39953).
Commits
-------
d563c846f6 [Mailer][Mime] Fix case-sensitive handling of header names
This PR was merged into the 4.4 branch.
Discussion
----------
[Mime] Fix case-sensitive handling of header names
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39953
| License | MIT
| Doc PR | -
Fixes case-sensitive handling of header names in "Mailer" component, more in the [ticket](https://github.com/symfony/symfony/issues/39953) and the [root PR](https://github.com/symfony/symfony/pull/39954).
Commits
-------
b2d7454042 [Mime] Fix case-sensitive handling in Headers::isUniqueHeader()
This PR was merged into the 5.2 branch.
Discussion
----------
[Messenger] Fix Doctrine setup when using a migration
| Q | A
| ------------- | ---
| Branch? | 5.2 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#39928 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | n/a
#38136 fixed running `messenger:setup-transports` (issue reported in #37179), but it breaks usage with `make:migration` (reported in #39928) as code is already executed in a transaction.
This PR fixes both use cases.
Commits
-------
42eeb44f83 [Messenger] Fix Doctrine setup when using a migration
This PR was merged into the 5.3-dev branch.
Discussion
----------
[DoctineBridge] Remove UuidV*Generator classes
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
There is no benefit in using these classes over creating the UUIDs inline.
Let's keep things simple.
For `UlidGenerator`, I'm keeping it as it will provide something useful once #39507 and https://github.com/doctrine/DoctrineBundle/pull/1284 are finished.
Commits
-------
3c296bd2f5 [DoctineBridge] Remove UuidV*Generator
When accessing a route that does not exist, Symfony throws a `NotFoundHttpException` that says `No route found for "POST /path"`.
On some projects this might be good enough to find the root cause, but on projects that have lots of routes on different hosts, it becomes hard to understand how the request was initiated. Was it done over HTTP or HTTPS? What was the hostname? Did the user specify a port?
To make this easier, we now show the full URI of the path, like this: `No route found for "POST https://www.symfony.com/path"`.
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 5.2 branch.
Discussion
----------
[TwigBridge] take into account all label related options
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#40007
| License | MIT
| Doc PR |
Commits
-------
adb0fd1c7d take into account all label related options
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.3-dev branch.
Discussion
----------
[FrameworkBundle][HttpFoundation][Security] Deprecate service "session"
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | Fix#10557 and Fix#12839
| License | MIT
| Doc PR | TODO
This is a attempt to deprecate service `session` and `SessionInterface`.
This PR replaces the `session` service by a `.session.do-not-use` service (used internally by Symfony) and make `session` a deprecated alias.
In Symfony 6.0 we can remove the `session` service and replace the `SessionListener` by a Factory that build the session (instead of fetching it from container)
This PR also add a short cut `RequestStack::getSession(): ?SessionInterface`
For backward compatibility the `SessionListener` is replaced by `FactorySessionListener` **only when** the user don't override the service `session` (ping @wouterj )
TODO:
- [x] Test many configuration and dependencies (ie. session disabled + csrf)
- [x] ChangeLog and Upgrade
- [x] fix tests
Commits
-------
54acc00769 Deprecat service "session"
This PR was merged into the 5.2 branch.
Discussion
----------
[DoctrineBridge] add missing `@experimental` annotation on Uid generators
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Forgotten when we created the classes.
Needed since I plan to remove all the `UuidV*` generators. They're useless and a more flexible approach based on https://github.com/doctrine/DoctrineBundle/pull/1284 is coming.
Commits
-------
e380102590 [DoctrineBridge] add missing `@experimental` annotation on Uid generators
This PR was merged into the 5.3-dev branch.
Discussion
----------
Remove some leftover @experimental annotations
| 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 | n/a <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | n/a
Commits
-------
315d62e661 Remove some leftover @experimental annotations
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Uid] Add RFC4122 UUID namespaces as constants
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Discussed with @tgalopin
Will play well with #39507
Commits
-------
4e73aeb169 [Uid] Add RFC4122 UUID namespaces as constants