diff --git a/CHANGELOG.md b/CHANGELOG.md index 22a21ba..c87f1d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). - Drop support for PHP 7.2 and 7.3 (#581) ### Fixed +- Stop injecting QuerySettings (#650) - Do not check `composer.lock` during `composer normalize` (#641) - Require TYPO3 >= 11.5.4 (#643) - Stop relying on transitive dependencies for `psr/http-message` (#613) diff --git a/Classes/Domain/Repository/Traits/StoragePageAgnosticTrait.php b/Classes/Domain/Repository/Traits/StoragePageAgnosticTrait.php index f66b11e..70a049a 100644 --- a/Classes/Domain/Repository/Traits/StoragePageAgnosticTrait.php +++ b/Classes/Domain/Repository/Traits/StoragePageAgnosticTrait.php @@ -4,24 +4,17 @@ declare(strict_types=1); namespace TTN\Tea\Domain\Repository\Traits; -use TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface; +use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings; /** * This trait for repositories makes the repository ignore the storage page setting when fetching models. */ trait StoragePageAgnosticTrait { - private QuerySettingsInterface $querySettings; - - public function injectQuerySettings(QuerySettingsInterface $querySettings): void - { - $this->querySettings = $querySettings; - } - public function initializeObject(): void { - $querySettings = clone $this->querySettings; - + $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class); $querySettings->setRespectStoragePage(false); $this->setDefaultQuerySettings($querySettings); }