minor #33678 Various tweaks 4.3 (fabpot)
This PR was squashed before being merged into the 4.3 branch (closes #33678).
Discussion
----------
Various tweaks 4.3
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | n/a
| License | MIT
| Doc PR | n/a
<!--
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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
7596f99a12
Various tweaks 4.3
This commit is contained in:
commit
926f286000
@ -140,7 +140,7 @@ class QuestionTest extends TestCase
|
||||
{
|
||||
return [
|
||||
['Potato'],
|
||||
[new \stdclass()],
|
||||
[new \stdClass()],
|
||||
[false],
|
||||
];
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ EOF
|
||||
|
||||
$count = 0;
|
||||
try {
|
||||
$worker->run([], function (?Envelope $envelope) use ($worker, $io, &$count) {
|
||||
$worker->run([], function (?Envelope $envelope) use ($worker, &$count) {
|
||||
++$count;
|
||||
if (null === $envelope) {
|
||||
$worker->stop();
|
||||
|
@ -378,7 +378,7 @@ class WorkerTest extends TestCase
|
||||
$worker = new Worker([$receiver], $bus);
|
||||
$workerWithDecorator = new StopWhenMessageCountIsExceededWorker($worker, 2);
|
||||
$processedEnvelopes = [];
|
||||
$workerWithDecorator->run([], function (?Envelope $envelope) use ($worker, &$processedEnvelopes) {
|
||||
$workerWithDecorator->run([], function (?Envelope $envelope) use (&$processedEnvelopes) {
|
||||
if (null !== $envelope) {
|
||||
$processedEnvelopes[] = $envelope;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Security\Http\Firewall;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
||||
use Symfony\Component\HttpKernel\Event\RequestEvent;
|
||||
|
||||
|
@ -109,7 +109,7 @@ class SwitchUserListenerTest extends TestCase
|
||||
public function testExitUserBasedOnSwitchUserRoleUpdatesToken()
|
||||
{
|
||||
$originalToken = new UsernamePasswordToken('username', '', 'key', []);
|
||||
$this->tokenStorage->setToken(new UsernamePasswordToken('username', '', 'key', [new SwitchUserRole('ROLE_PREVIOUS', $originalToken, false)], $originalToken));
|
||||
$this->tokenStorage->setToken(new UsernamePasswordToken('username', '', 'key', [new SwitchUserRole('ROLE_PREVIOUS', $originalToken, false)]));
|
||||
|
||||
$this->request->query->set('_switch_user', SwitchUserListener::EXIT_VALUE);
|
||||
|
||||
|
Reference in New Issue
Block a user