--- /dev/null
+.. include:: ../../Includes.txt
+
+===============================================================
+Deprecation: #86338 - Change visibility of PageRepository->init
+===============================================================
+
+See :issue:`86338`
+
+Description
+===========
+
+The :php:`PageRepository::init()` method is now called implicitly within the constructor.
+
+
+Impact
+======
+
+Calling the method will trigger a deprecation warning.
+
+
+Affected Installations
+======================
+
+Any TYPO3 installation with extensions directly calling the :php:`PageRepository::init()` method.
+
+
+Migration
+=========
+
+Remove the call to the :php:`PageRepository::init()` function. The constructor is taking care of calling the method.
+
+.. index:: NotScanned, ext:frontend
* @var array
*/
protected $deprecatedPublicMethods = [
+ 'init' => 'init() is now called implicitly on object creation, and is not necessary anymore to be called explicitly. Calling init() will throw an error in TYPO3 v10.',
'movePlhOL' => 'Using movePlhOL is deprecated and will not be possible anymore in TYPO3 v10.',
'getMovePlaceholder' => 'Using getMovePlaceholder is deprecated and will not be possible anymore in TYPO3 v10.'
];
* into account
*
* @param bool $show_hidden If $show_hidden is TRUE, the hidden-field is ignored!! Normally this should be FALSE. Is used for previewing.
- * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::fetch_the_id(), \TYPO3\CMS\Tstemplate\Controller\TemplateAnalyzerModuleFunctionController::initialize_editor()
+ * @internal
*/
- public function init($show_hidden)
+ protected function init($show_hidden)
{
$this->where_groupAccess = '';
*/
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
+use TYPO3\CMS\Frontend\Page\PageRepository;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
/**
false
);
- $pageContextMock = $this->getMockBuilder(\TYPO3\CMS\Frontend\Page\PageRepository::class)->getMock();
- $this->tsFrontendController->_set('sys_page', $pageContextMock);
+ $this->tsFrontendController->_set('sys_page', new PageRepository());
}
/**
$this->typoScriptFrontendController = $typoScriptFrontendController;
$this->signalSlotDispatcher = $signalSlotDispatcher;
$this->pageRepository = GeneralUtility::makeInstance(PageRepository::class);
- $this->pageRepository->init(false);
}
/**