From 974e26084b57cfa27ff5aef87e099edc960bd52e Mon Sep 17 00:00:00 2001 From: Beatrycze Volk Date: Fri, 10 Nov 2023 16:16:57 +0100 Subject: [PATCH 1/3] The function `errorAction()` needs to exists in NewTenantController Without this function the backend module doesn't work --- Classes/Controller/Backend/NewTenantController.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Classes/Controller/Backend/NewTenantController.php b/Classes/Controller/Backend/NewTenantController.php index 3d461878f..c85b941c5 100644 --- a/Classes/Controller/Backend/NewTenantController.php +++ b/Classes/Controller/Backend/NewTenantController.php @@ -436,6 +436,17 @@ public function indexAction(): void $this->view->assign('recordInfos', $recordInfos); } + /** + * Error function - there is nothing to do at the moment. + * + * @access public + * + * @return void + */ + public function errorAction() + { + } + /** * Get language label for given key and language. * From 6fcd94f0ac73c952ed4d35e9b85e478e7aa3f254 Mon Sep 17 00:00:00 2001 From: Beatrycze Volk Date: Fri, 10 Nov 2023 17:23:36 +0100 Subject: [PATCH 2/3] Add PHPStan exception as it is necessary to keep this function in this form --- .github/phpstan.neon | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/phpstan.neon b/.github/phpstan.neon index fa63a3481..92c7c5477 100644 --- a/.github/phpstan.neon +++ b/.github/phpstan.neon @@ -1,5 +1,6 @@ parameters: ignoreErrors: + - '#Return type \(void\) of method Kitodo\\Dlf\\Controller\\Backend\\NewTenantController::errorAction\(\) should be compatible with return type \(Psr\\Http\\Message\\ResponseInterface\) of method TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController::errorAction\(\)#' - '#Call to an undefined method Kitodo\\Dlf\\Domain\\Repository\\[a-zA-Z]+Repository::countByPid\(\)\.#' - '#Call to an undefined method Kitodo\\Dlf\\Domain\\Repository\\[a-zA-Z]+Repository::findByIsListed\(\)\.#' - '#Call to an undefined method Kitodo\\Dlf\\Domain\\Repository\\[a-zA-Z]+Repository::findByIsSortable\(\)\.#' From abf978b15e641118212805d465f49353df40a05e Mon Sep 17 00:00:00 2001 From: Beatrycze Volk Date: Tue, 21 Nov 2023 12:13:15 +0100 Subject: [PATCH 3/3] Change return for `errorAction` function --- .github/phpstan.neon | 1 - Classes/Controller/Backend/NewTenantController.php | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/phpstan.neon b/.github/phpstan.neon index 92c7c5477..fa63a3481 100644 --- a/.github/phpstan.neon +++ b/.github/phpstan.neon @@ -1,6 +1,5 @@ parameters: ignoreErrors: - - '#Return type \(void\) of method Kitodo\\Dlf\\Controller\\Backend\\NewTenantController::errorAction\(\) should be compatible with return type \(Psr\\Http\\Message\\ResponseInterface\) of method TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController::errorAction\(\)#' - '#Call to an undefined method Kitodo\\Dlf\\Domain\\Repository\\[a-zA-Z]+Repository::countByPid\(\)\.#' - '#Call to an undefined method Kitodo\\Dlf\\Domain\\Repository\\[a-zA-Z]+Repository::findByIsListed\(\)\.#' - '#Call to an undefined method Kitodo\\Dlf\\Domain\\Repository\\[a-zA-Z]+Repository::findByIsSortable\(\)\.#' diff --git a/Classes/Controller/Backend/NewTenantController.php b/Classes/Controller/Backend/NewTenantController.php index c85b941c5..7223ca0ca 100644 --- a/Classes/Controller/Backend/NewTenantController.php +++ b/Classes/Controller/Backend/NewTenantController.php @@ -22,6 +22,7 @@ use Kitodo\Dlf\Domain\Repository\MetadataRepository; use Kitodo\Dlf\Domain\Repository\StructureRepository; use Kitodo\Dlf\Domain\Repository\SolrCoreRepository; +use Psr\Http\Message\ResponseInterface; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\View\BackendTemplateView; use TYPO3\CMS\Core\Localization\LocalizationFactory; @@ -441,10 +442,11 @@ public function indexAction(): void * * @access public * - * @return void + * @return ResponseInterface */ - public function errorAction() + public function errorAction(): ResponseInterface { + return parent::errorAction(); } /**