In previous TYPO3 versions, accessing records was mixed between Frontend (handled by PageRepository) and Backend (handled by static methods in BackendUtility). In TYPO3 v9, the Context API was introduced and PageRepository now acts as a strong database accessor which is not bound to Frontend anymore, at all.
In addition, various places of the backend also used PageRepository already, which violated the separation of packages, as TYPO3 Core aims to strictly separate Frontend and Backend application code.
In the case of PageRepository, the code is used by both applications, and is therefore moved to Core system extension (EXT:core), and renamed to TYPO3\CMS\Core\Domain\Repository\PageRepository.
Until TYPO3 v9, it was placed in TYPO3\CMS\Frontend\Page\PageRepository.
Change the path of
PageRepository
fromTYPO3\CMS\Frontend\Page\PageRepository
toTYPO3\CMS\Core\Domain\Repository\PageRepository
.See here: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/10.0/Deprecation-88746-PageRepositoryPHPClassMovedFromFrontendToCoreExtension.html