Skip to content

Commit 69921b1

Browse files
add ^6.0 for framework-extra-bundle
1 parent b0d0859 commit 69921b1

File tree

5 files changed

+13
-25
lines changed

5 files changed

+13
-25
lines changed

Controller/ForgotResetController.php

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Dayspring\LoginBundle\Entity\ChangePasswordEntity;
66
use Dayspring\LoginBundle\Form\Type\ChangePasswordType;
77
use Dayspring\LoginBundle\Form\Type\ResetPasswordType;
8+
use Symfony\Component\HttpFoundation\RequestStack;
89
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
910
use Symfony\Component\Routing\Annotation\Route;
1011
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
@@ -24,27 +25,14 @@
2425

2526
class ForgotResetController extends AbstractController
2627
{
27-
protected $userProvider;
28-
protected $authenticationManager;
29-
protected $session;
30-
protected $tokenStorage;
31-
protected $userPasswordHasher;
32-
protected $mailer;
3328

3429
public function __construct(
35-
// AuthenticationManagerInterface $authenticationManager,
36-
UserProviderInterface $userProvider,
37-
SessionInterface $session,
38-
MailerInterface $mailer,
39-
TokenStorageInterface $tokenStorage,
40-
UserPasswordHasherInterface $userPasswordHasher
30+
protected UserProviderInterface $userProvider,
31+
protected RequestStack $requestStack,
32+
protected MailerInterface $mailer,
33+
protected TokenStorageInterface $tokenStorage,
34+
protected UserPasswordHasherInterface $userPasswordHasher
4135
) {
42-
// $this->authenticationManager = $authenticationManager;
43-
$this->mailer = $mailer;
44-
$this->session = $session;
45-
$this->tokenStorage = $tokenStorage;
46-
$this->userPasswordHasher = $userPasswordHasher;
47-
$this->userProvider = $userProvider;
4836
}
4937

5038
/**
@@ -165,7 +153,7 @@ public function changePasswordAction(Request $request)
165153
// $token = $this->authenticationManager->authenticate($token);
166154
// $this->tokenStorage->setToken($token);
167155

168-
$this->session->getFlashBag()->add('success', 'New password has been saved.');
156+
$this->requestStack->getSession()->getFlashBag()->add('success', 'New password has been saved.');
169157

170158
return $this->redirect($this->generateUrl("account_dashboard"));
171159
}

Tests/Resources/config/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ framework:
1111
#serializer: { enable_annotations: true }
1212
#templating: { engines: ['twig', 'php'] }
1313
session:
14-
storage_id: session.storage.mock_file
14+
storage_factory_id: session.storage.factory.mock_file
1515
profiler:
1616
collect: false
1717
mailer:

Tests/TestKernel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88

99
class TestKernel extends Kernel
1010
{
11-
public function getProjectDir()
11+
public function getProjectDir(): string
1212
{
1313
return __DIR__;
1414
}
1515

16-
public function getCacheDir()
16+
public function getCacheDir(): string
1717
{
1818
return __DIR__.'/../var/cache';
1919
}
2020

21-
public function getLogDir()
21+
public function getLogDir(): string
2222
{
2323
return __DIR__.'/../var/log';
2424
}

Tests/WebTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class WebTestCase extends BaseWebTestCase
1919

2020
protected static $application;
2121

22-
protected static function getKernelClass()
22+
protected static function getKernelClass(): string
2323
{
2424
return TestKernel::class;
2525
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"symfony/asset": "^5.3|^6.0",
4242
"symfony/expression-language": "^5.1|^6.0",
4343
"symfony/monolog-bundle": "^3.6.0",
44-
"sensio/framework-extra-bundle": "^5.5.6",
44+
"sensio/framework-extra-bundle": "^5.5.6|^6.0",
4545
"dayspring-tech/propel-bundle": "dev-jrw-symfony_6 as 6.0.0",
4646

4747
"egulias/email-validator": "^2.1.25|^3.0|^4.0",

0 commit comments

Comments
 (0)