[MAINTENANCE] Introduce AbstractRepository for unified storage PID management#1941
Open
beatrycze-volk wants to merge 6 commits intokitodo:mainfrom
Open
[MAINTENANCE] Introduce AbstractRepository for unified storage PID management#1941beatrycze-volk wants to merge 6 commits intokitodo:mainfrom
AbstractRepository for unified storage PID management#1941beatrycze-volk wants to merge 6 commits intokitodo:mainfrom
Conversation
Centralizes the logic for setting storage page IDs for Extbase repositories. All repositories now extend this new abstract class, gaining access to a unified `setStoragePid` method to configure query settings, reducing code duplication and improving maintainability.
2382d2e to
edab140
Compare
Explicitly sets the 'storagePid' from plugin settings on various repositories within controller actions. This ensures consistent data retrieval and manipulation by correctly scoping repository queries to the configured storage page, leveraging the `setStoragePid` method introduced with `AbstractRepository`.
This change ensures that functional tests correctly pass the `storagePid` setting to controller actions. This aligns the tests with the updated repository logic, which now expects the `storagePid` for scoping queries, as introduced by the `AbstractRepository` and applied in recent controller changes.
Relocates the `setStoragePid` call from `initializeAction` to `initializeDocumentRepository`. This ensures that the `storagePid` setting is processed by `sanitizeSettings()` before being passed to the document repository, improving initialization order and robustness.
edab140 to
bb8b675
Compare
Aligns the `initializeRepository` helper with the `AbstractRepository` by using its `setStoragePid` method. This removes the need for explicit `Typo3QuerySettings` setup in functional tests, streamlining repository instantiation.
All repositories now extend `AbstractRepository`, which in turn extends `TYPO3\CMS\Extbase\Persistence\Repository`. This makes the direct `use` statement in individual repository classes redundant and can be removed for cleaner code.
This was referenced Apr 28, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently functions like
findAll()and custom functions which usecreateQuery()do not work, becuase pid in the generated SQL is always 0. It is necessary to set upstoragePid.See:
https://docs.typo3.org/permalink/t3coreapi:extbase-repository-query-setting
https://docs.typo3.org/permalink/t3coreapi:typo3-cms-extbase-persistence-repository-setdefaultquerysettings