From cf6d8adec7f4aa252a89249e3f8e899f2330afba Mon Sep 17 00:00:00 2001 From: Matthias Adrowski <matthias.adrowski@sgalinski.de> Date: Wed, 3 Aug 2022 11:50:30 +0200 Subject: [PATCH] [TASK] Cleanup, port back to php 7.3 --- Classes/Controller/BackendController.php | 2 -- Classes/Controller/JoblistController.php | 6 ------ Classes/Domain/Repository/CompanyRepository.php | 8 ++++---- Classes/Domain/Repository/JobRepository.php | 3 --- Classes/Hooks/PageLayoutView/PluginRenderer.php | 7 +++++-- Classes/Paginator/QueryResultRawPaginator.php | 4 ++-- Classes/Preview/PreviewRenderer.php | 10 +++++----- Classes/ViewHelpers/Backend/CompanyLabelViewHelper.php | 4 ---- ext_emconf.php | 2 +- 9 files changed, 17 insertions(+), 29 deletions(-) diff --git a/Classes/Controller/BackendController.php b/Classes/Controller/BackendController.php index 44ca2b7f..dc11a05f 100644 --- a/Classes/Controller/BackendController.php +++ b/Classes/Controller/BackendController.php @@ -37,8 +37,6 @@ use TYPO3\CMS\Core\Messaging\FlashMessage; use TYPO3\CMS\Core\Pagination\SimplePagination; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; -use TYPO3\CMS\Extbase\Pagination\QueryResultPaginator; -use TYPO3\CMS\Extbase\Persistence\ObjectStorage; use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; use TYPO3\CMS\Extbase\Utility\LocalizationUtility; diff --git a/Classes/Controller/JoblistController.php b/Classes/Controller/JoblistController.php index ccb2e55c..d174a1b6 100644 --- a/Classes/Controller/JoblistController.php +++ b/Classes/Controller/JoblistController.php @@ -26,9 +26,7 @@ namespace SGalinski\SgJobs\Controller; * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ -use Psr\Http\Message\ResponseInterface; use SGalinski\ProjectBase\Domain\Repository\CountryRepository; -use SGalinski\SgComments\Domain\Model\Comment; use SGalinski\SgJobs\Domain\Model\Company; use SGalinski\SgJobs\Domain\Model\Job; use SGalinski\SgJobs\Domain\Model\JobApplication; @@ -37,7 +35,6 @@ use SGalinski\SgJobs\Domain\Repository\DepartmentRepository; use SGalinski\SgJobs\Domain\Repository\ExperienceLevelRepository; use SGalinski\SgJobs\Domain\Repository\JobApplicationRepository; use SGalinski\SgJobs\Domain\Repository\JobRepository; -use SGalinski\SgJobs\Property\TypeConverter\UploadedFileReferenceConverter; use SGalinski\SgJobs\Service\FileAndFolderService; use SGalinski\SgMail\Service\MailTemplateService; use SGalinski\SgSeo\Service\HeadTagService; @@ -49,13 +46,10 @@ use TYPO3\CMS\Core\Site\SiteFinder; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\PathUtility; -use TYPO3\CMS\Core\Utility\VersionNumberUtility; use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; -use TYPO3\CMS\Extbase\Domain\Model\FileReference; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; use TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException; use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException; -use TYPO3\CMS\Extbase\Object\ObjectManager; use TYPO3\CMS\Extbase\Property\Exception\TypeConverterException; use TYPO3\CMS\Extbase\Utility\LocalizationUtility; use TYPO3\CMS\Extbase\Validation\Validator\ConjunctionValidator; diff --git a/Classes/Domain/Repository/CompanyRepository.php b/Classes/Domain/Repository/CompanyRepository.php index 556457d0..4a002435 100644 --- a/Classes/Domain/Repository/CompanyRepository.php +++ b/Classes/Domain/Repository/CompanyRepository.php @@ -51,7 +51,7 @@ class CompanyRepository extends Repository { * Returns all countries filtered by page id * * @param int $pageUid - * @return mixed + * @return array * @throws \TYPO3\CMS\Core\Context\Exception\AspectNotFoundException */ public function getAllCountries($pageUid) { @@ -74,7 +74,7 @@ class CompanyRepository extends Repository { * Returns all filtered cities * * @param int $pageUid - * @return mixed + * @return array * @throws \TYPO3\CMS\Core\Context\Exception\AspectNotFoundException */ public function getAllCities($pageUid) { @@ -97,7 +97,7 @@ class CompanyRepository extends Repository { * Returns all company names filtered by page id * * @param int $pageUid - * @return mixed + * @return array * @throws \TYPO3\CMS\Core\Context\Exception\AspectNotFoundException */ public function getAllCompanyNames($pageUid) { @@ -120,7 +120,7 @@ class CompanyRepository extends Repository { * Returns all companies filtered by page id * * @param int $pageUid - * @return mixed + * @return object[]|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface * @throws \TYPO3\CMS\Core\Context\Exception\AspectNotFoundException */ public function getAllCompanies($pageUid) { diff --git a/Classes/Domain/Repository/JobRepository.php b/Classes/Domain/Repository/JobRepository.php index 838821c3..d64ae6d1 100644 --- a/Classes/Domain/Repository/JobRepository.php +++ b/Classes/Domain/Repository/JobRepository.php @@ -28,14 +28,11 @@ namespace SGalinski\SgJobs\Domain\Repository; use SGalinski\SgJobs\Domain\Model\Job; use TYPO3\CMS\Extbase\Object\ObjectManagerInterface; -use TYPO3\CMS\Extbase\Persistence\Generic\Query; -use TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser; use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings; use TYPO3\CMS\Extbase\Persistence\QueryInterface; use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; use TYPO3\CMS\Extbase\Persistence\QueryResultInterface as ExtbaseQueryResultInterface; use TYPO3\CMS\Extbase\Persistence\Repository; -use TYPO3\CMS\Extbase\Utility\DebuggerUtility; /** * Job Repository diff --git a/Classes/Hooks/PageLayoutView/PluginRenderer.php b/Classes/Hooks/PageLayoutView/PluginRenderer.php index f6a056f7..da0c0063 100644 --- a/Classes/Hooks/PageLayoutView/PluginRenderer.php +++ b/Classes/Hooks/PageLayoutView/PluginRenderer.php @@ -25,7 +25,6 @@ use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\View\PageLayoutView; use TYPO3\CMS\Core\Localization\LanguageService; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Fluid\View\StandaloneView; /** * Class PluginRenderer - Renders backend previews for plugins. @@ -33,7 +32,11 @@ use TYPO3\CMS\Fluid\View\StandaloneView; * @package SGalinski\SgJobs\Hooks\PageLayoutView */ class PluginRenderer implements \TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface { - protected PreviewService $previewService; + + /** + * @var PreviewService $previewService + */ + protected $previewService; public function init() { $this->previewService = GeneralUtility::makeInstance(PreviewService::class); diff --git a/Classes/Paginator/QueryResultRawPaginator.php b/Classes/Paginator/QueryResultRawPaginator.php index b255a54a..82a220c4 100644 --- a/Classes/Paginator/QueryResultRawPaginator.php +++ b/Classes/Paginator/QueryResultRawPaginator.php @@ -36,9 +36,9 @@ final class QueryResultRawPaginator extends AbstractPaginator { private $paginatedQueryResult; /** - * @var int + * @var int $totalItems */ - protected int $totalItems = 0; + protected $totalItems = 0; public function __construct( QueryResultInterface $queryResult, diff --git a/Classes/Preview/PreviewRenderer.php b/Classes/Preview/PreviewRenderer.php index d2fb9653..73c643c4 100644 --- a/Classes/Preview/PreviewRenderer.php +++ b/Classes/Preview/PreviewRenderer.php @@ -21,11 +21,8 @@ namespace SGalinski\SgJobs\Preview; use TYPO3\CMS\Backend\Preview\PreviewRendererInterface; -use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem; use TYPO3\CMS\Core\Localization\LanguageService; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Fluid\View\StandaloneView; /** * @@ -34,9 +31,12 @@ class PreviewRenderer implements PreviewRendererInterface { /** * @var LanguageService $languageService */ - protected LanguageService $languageService; + protected $languageService; - protected PreviewService $previewService; + /** + * @var PreviewService $previewService + */ + protected $previewService; public function __construct(LanguageService $languageService, PreviewService $previewService) { $this->languageService = $languageService; diff --git a/Classes/ViewHelpers/Backend/CompanyLabelViewHelper.php b/Classes/ViewHelpers/Backend/CompanyLabelViewHelper.php index 110c0142..7f90cf7c 100644 --- a/Classes/ViewHelpers/Backend/CompanyLabelViewHelper.php +++ b/Classes/ViewHelpers/Backend/CompanyLabelViewHelper.php @@ -26,12 +26,8 @@ namespace SGalinski\SgJobs\ViewHelpers\Backend; * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ -use SGalinski\SgJobs\Domain\Model\Job; -use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\Database\ConnectionPool; -use TYPO3\CMS\Core\Page\PageRenderer; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; /** diff --git a/ext_emconf.php b/ext_emconf.php index 275e4cac..2049f36f 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -17,7 +17,7 @@ $EM_CONF['sg_jobs'] = [ 'depends' => [ 'typo3' => '10.4.0-11.5.99', - 'php' => '7.4.0-8.1.99', + 'php' => '7.3.0-8.1.99', 'sg_mail' => '>=8.0.0' ], 'conflicts' => -- GitLab