Skip to content
Snippets Groups Projects
Commit 46508e9c authored by Torben Hansen's avatar Torben Hansen Committed by Benjamin Franzke
Browse files

[TASK] Use ConfigurationManagerInterface in ext:felogin


Currently, extbase `ConfigurationManager` is directly used in
ext:felogin for the password recovery functionality.

With this change, `ConfigurationManagerInterface` is used instead
of `ConfigurationManager`, so DI can decide which implementation of
`ConfigurationManager` should be used.

Resolves: #101894
Releases: main, 12.4
Signed-off-by: default avatarTorben Hansen <derhansen@gmail.com>
Change-Id: I0a09e88b3d778f3da850fbd753d5ef43cdbb9f25
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80953


Reviewed-by: default avatarBenjamin Franzke <ben@bnf.dev>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenjamin Franzke <ben@bnf.dev>
parent d11b4dad
Branches
Tags
No related merge requests found
......@@ -22,7 +22,7 @@ use Psr\Log\LoggerAwareTrait;
use Symfony\Component\Mime\Address;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Crypto\Random;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Security\Cryptography\HashService;
use TYPO3\CMS\Fluid\View\TemplatePaths;
......@@ -42,11 +42,11 @@ class RecoveryConfiguration implements LoggerAwareInterface
public function __construct(
protected Context $context,
ConfigurationManager $configurationManager,
ConfigurationManagerInterface $configurationManager,
Random $random,
HashService $hashService
) {
$this->settings = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS);
$this->settings = $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS);
$this->forgotHash = $this->getLifeTimeTimestamp() . '|' . $this->generateHash($random, $hashService);
$this->resolveFromTypoScript();
}
......
......@@ -23,7 +23,7 @@ use Symfony\Component\Mime\Address;
use TYPO3\CMS\Core\Mail\FluidEmail;
use TYPO3\CMS\Core\Mail\MailerInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Mvc\RequestInterface;
use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
......@@ -40,11 +40,11 @@ class RecoveryService
public function __construct(
protected readonly MailerInterface $mailer,
protected EventDispatcherInterface $eventDispatcher,
ConfigurationManager $configurationManager,
ConfigurationManagerInterface $configurationManager,
protected RecoveryConfiguration $recoveryConfiguration,
protected UriBuilder $uriBuilder
) {
$this->settings = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS);
$this->settings = $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS);
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment