Skip to content

Commit

Permalink
[TASK] Use ConfigurationManagerInterface in ext:felogin
Browse files Browse the repository at this point in the history
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: Torben Hansen <[email protected]>
Change-Id: I0a09e88b3d778f3da850fbd753d5ef43cdbb9f25
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80941
Tested-by: Benjamin Franzke <[email protected]>
Reviewed-by: Benjamin Franzke <[email protected]>
Reviewed-by: Oliver Klee <[email protected]>
Reviewed-by: Georg Ringer <[email protected]>
Tested-by: core-ci <[email protected]>
Tested-by: Georg Ringer <[email protected]>
  • Loading branch information
derhansen authored and bnf committed Sep 11, 2023
1 parent f1fd5f5 commit 9097282
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
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;

Expand All @@ -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();
}
Expand Down
6 changes: 3 additions & 3 deletions typo3/sysext/felogin/Classes/Service/RecoveryService.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
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;
Expand All @@ -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);
}

/**
Expand Down

0 comments on commit 9097282

Please sign in to comment.