[TASK] Move PageRepository to EXT:core 66/61166/7
authorBenni Mack <benni@typo3.org>
Sat, 13 Jul 2019 14:12:47 +0000 (16:12 +0200)
committerBenjamin Franzke <bfr@qbus.de>
Wed, 17 Jul 2019 05:12:52 +0000 (07:12 +0200)
commit0cdab109a59b62c832ed61fe08c2a629865b52f7
treeb21f69212b00b0a9e79f149a46976756c956eab7
parent1d4613c1e838d730e2b4eabd3f72969e3d72351c
[TASK] Move PageRepository to EXT:core

Since Context API was introduced in TYPO3 v9, PageRepository is highly
decoupled from $TSFE->sys_page, and fully works standalone.

It is also used in various places where TSFE is not needed,
or required, but also in places of EXT:core.

Especially parts like RootlineUtility, which depends on PageRepository
very much, cannot live without it.

I propose to move this highly important PHP class into EXT:core,
in order to allow to decouple EXT:frontend even further from
EXT:core.

The FQCN is moved from
- \TYPO3\CMS\Frontend\Page\PageRepository
to
- TYPO3\CMS\Core\Domain\Repository\PageRepository

It can be assumed to use PageRepository for any use-case
and actually reduce usages towards BackendUtility::get...
by using this API more and more.

Further adaptions could be to reduce the logic
within PageRepository and move this into QueryBuilder
and assimilate especially the "versionOL" behavior.

Resolves: #88746
Releases: master
Change-Id: Id8225100ac60bd77fc7e1303efb4c46b741d3415
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61166
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Benjamin Franzke <bfr@qbus.de>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
72 files changed:
composer.json
composer.lock
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/NewRecordController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php
typo3/sysext/backend/Classes/Tree/View/ElementBrowserPageTreeView.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/core/Classes/Domain/Repository/PageRepository.php [new file with mode: 0644]
typo3/sysext/core/Classes/Domain/Repository/PageRepositoryGetPageHookInterface.php [new file with mode: 0644]
typo3/sysext/core/Classes/Domain/Repository/PageRepositoryGetPageOverlayHookInterface.php [new file with mode: 0644]
typo3/sysext/core/Classes/Domain/Repository/PageRepositoryGetRecordOverlayHookInterface.php [new file with mode: 0644]
typo3/sysext/core/Classes/Domain/Repository/PageRepositoryInitHookInterface.php [new file with mode: 0644]
typo3/sysext/core/Classes/Routing/Aspect/PersistedAliasMapper.php
typo3/sysext/core/Classes/Routing/Aspect/PersistedPatternMapper.php
typo3/sysext/core/Classes/Routing/PageRouter.php
typo3/sysext/core/Classes/TypoScript/TemplateService.php
typo3/sysext/core/Classes/Utility/RootlineUtility.php
typo3/sysext/core/Configuration/TCA/pages.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-88746-PageRepositoryPHPClassMovedFromFrontendToCoreExtension.rst [new file with mode: 0644]
typo3/sysext/core/Migrations/Code/ClassAliasMap.php [new file with mode: 0644]
typo3/sysext/core/Migrations/Code/LegacyClassesForIde.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Domain/Repository/PageRepositoryTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Fixtures/pages.xml [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Tca/PagesVisibleFieldsTest.php
typo3/sysext/core/Tests/Unit/Domain/Repository/PageRepositoryTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/RootlineUtilityTest.php
typo3/sysext/core/composer.json
typo3/sysext/core/ext_tables.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php
typo3/sysext/extbase/Tests/Functional/Persistence/QueryLocalizedDataTest.php
typo3/sysext/extbase/Tests/Functional/Persistence/TranslationTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbBackendTest.php
typo3/sysext/frontend/Classes/Aspect/FileMetadataOverlayAspect.php
typo3/sysext/frontend/Classes/Category/Collection/CategoryCollection.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/FilesContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
typo3/sysext/frontend/Classes/ContentObject/RecordsContentObject.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Middleware/ShortcutAndMountPointRedirect.php
typo3/sysext/frontend/Classes/Page/PageRepository.php [deleted file]
typo3/sysext/frontend/Classes/Page/PageRepositoryGetPageHookInterface.php [deleted file]
typo3/sysext/frontend/Classes/Page/PageRepositoryGetPageOverlayHookInterface.php [deleted file]
typo3/sysext/frontend/Classes/Page/PageRepositoryGetRecordOverlayHookInterface.php [deleted file]
typo3/sysext/frontend/Classes/Page/PageRepositoryInitHookInterface.php [deleted file]
typo3/sysext/frontend/Classes/Typolink/AbstractTypolinkBuilder.php
typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
typo3/sysext/frontend/Configuration/TCA/pages_language_overlay.php
typo3/sysext/frontend/Tests/Functional/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php
typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php
typo3/sysext/frontend/Tests/Functional/Controller/TypoScriptFrontendControllerTest.php
typo3/sysext/frontend/Tests/Functional/Fixtures/pages.xml [deleted file]
typo3/sysext/frontend/Tests/Functional/Page/PageRepositoryTest.php [deleted file]
typo3/sysext/frontend/Tests/Functional/Rendering/UriPrefixRenderingTest.php
typo3/sysext/frontend/Tests/Functional/Tca/PagesLanguageOverlayVisibleFieldsTest.php
typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php
typo3/sysext/frontend/Tests/Unit/ContentObject/Menu/AbstractMenuContentObjectTest.php
typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php
typo3/sysext/frontend/Tests/Unit/Page/PageRepositoryTest.php [deleted file]
typo3/sysext/frontend/Tests/Unit/Typolink/DatabaseRecordLinkBuilderTest.php
typo3/sysext/indexed_search/Classes/Controller/SearchController.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/seo/Classes/Canonical/CanonicalGenerator.php
typo3/sysext/seo/Classes/XmlSitemap/PagesXmlSitemapDataProvider.php
typo3/sysext/seo/Configuration/TCA/Overrides/pages.php
typo3/sysext/seo/Tests/Functional/Canonical/CanonicalGeneratorTest.php
typo3/sysext/viewpage/Classes/Controller/ViewModuleController.php