diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e3633de7..e9c6f1958 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,12 +17,8 @@ jobs: fail-fast: false max-parallel: 5 matrix: - typo3: ['^12', '^13', '13.4.x-dev'] + typo3: ['^13', '13.4.x-dev', '14.0.x-dev'] php: ['8.2', '8.3'] - include: - - typo3: '^12' - php: '8.1' - steps: - id: checkout name: Checkout Code diff --git a/Classes/ViewHelpers/Data/PaginateViewHelper.php b/Classes/ViewHelpers/Data/PaginateViewHelper.php index 4ede4d734..243717189 100644 --- a/Classes/ViewHelpers/Data/PaginateViewHelper.php +++ b/Classes/ViewHelpers/Data/PaginateViewHelper.php @@ -14,13 +14,15 @@ use TYPO3\CMS\Core\Pagination\SimplePagination; use TYPO3\CMS\Core\Utility\ArrayUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Core\View\ViewFactoryData; +use TYPO3\CMS\Core\View\ViewFactoryInterface; +use TYPO3\CMS\Core\View\ViewInterface; use TYPO3\CMS\Extbase\Configuration\ConfigurationManager; use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; use TYPO3\CMS\Extbase\Pagination\QueryResultPaginator; use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; use TYPO3\CMS\Fluid\Core\Rendering\RenderingContext; use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextFactory; -use TYPO3\CMS\Fluid\View\StandaloneView; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; @@ -78,7 +80,7 @@ public function render(): string 'pagination' => $pagination, 'configuration' => $configuration, ]); - $paginationRendered = $paginationView->render(); + $paginationRendered = $paginationView->render('Paginate/Index'); $variableProvider = $renderingContext->getVariableProvider(); $variableProvider->add('paginator', $paginator); @@ -99,7 +101,7 @@ public function render(): string ); } - protected function getTemplateObject(RenderingContextInterface $renderingContext, ServerRequestInterface $request): StandaloneView + protected function getTemplateObject(RenderingContextInterface $renderingContext, ServerRequestInterface $request): ViewInterface { $setup = $this->getConfigurationManager()->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT); @@ -110,9 +112,6 @@ protected function getTemplateObject(RenderingContextInterface $renderingContext $context->setRequest($request); } - /** @var StandaloneView $view */ - $view = GeneralUtility::makeInstance(StandaloneView::class, $context); - $layoutRootPaths = []; $layoutRootPaths[] = GeneralUtility::getFileAbsFileName('EXT:bootstrap_package/Resources/Private/Layouts/ViewHelpers/'); if (isset($setup['plugin.']['tx_bootstrappackage.']['view.']['layoutRootPaths.'])) { @@ -135,12 +134,12 @@ protected function getTemplateObject(RenderingContextInterface $renderingContext } } - $view->setLayoutRootPaths($layoutRootPaths); - $view->setPartialRootPaths($partialRootPaths); - $view->setTemplateRootPaths($templateRootPaths); - $view->setTemplate('Paginate/Index'); - - return $view; + return GeneralUtility::makeInstance(ViewFactoryInterface::class) + ->create(new ViewFactoryData( + templateRootPaths: $templateRootPaths, + partialRootPaths: $partialRootPaths, + layoutRootPaths: $layoutRootPaths, + )); } protected function getConfigurationManager(): ConfigurationManagerInterface diff --git a/Classes/ViewHelpers/File/IsAudioViewHelper.php b/Classes/ViewHelpers/File/IsAudioViewHelper.php index 66a346cb7..a9ee27e08 100644 --- a/Classes/ViewHelpers/File/IsAudioViewHelper.php +++ b/Classes/ViewHelpers/File/IsAudioViewHelper.php @@ -11,6 +11,7 @@ use TYPO3\CMS\Core\Resource\File; use TYPO3\CMS\Core\Resource\FileReference; +use TYPO3\CMS\Core\Resource\FileType; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; @@ -25,16 +26,11 @@ public function render() $allowedFileExtensions = $GLOBALS['TYPO3_CONF_VARS']['SYS']['audiofile_ext'] ?? ''; $allowedFileExtensions = GeneralUtility::trimExplode(',', $allowedFileExtensions); - if (is_object($file) + return is_object($file) && ($file instanceof FileReference || $file instanceof File) && ( in_array($file->getExtension(), $allowedFileExtensions, true) - || $file->getType() === File::FILETYPE_AUDIO - ) - ) { - return true; - } - - return false; + || $file->isType(FileType::AUDIO) + ); } } diff --git a/Classes/ViewHelpers/File/IsImageViewHelper.php b/Classes/ViewHelpers/File/IsImageViewHelper.php index 969dd3c1f..0be4aa088 100644 --- a/Classes/ViewHelpers/File/IsImageViewHelper.php +++ b/Classes/ViewHelpers/File/IsImageViewHelper.php @@ -11,6 +11,7 @@ use TYPO3\CMS\Core\Resource\File; use TYPO3\CMS\Core\Resource\FileReference; +use TYPO3\CMS\Core\Resource\FileType; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; @@ -25,16 +26,11 @@ public function render() $allowedFileExtensions = $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] ?? ''; $allowedFileExtensions = GeneralUtility::trimExplode(',', $allowedFileExtensions); - if (is_object($file) + return is_object($file) && ($file instanceof FileReference || $file instanceof File) && ( in_array($file->getExtension(), $allowedFileExtensions, true) - || $file->getType() === File::FILETYPE_IMAGE - ) - ) { - return true; - } - - return false; + || $file->isType(FileType::IMAGE) + ); } } diff --git a/Classes/ViewHelpers/File/IsMediaViewHelper.php b/Classes/ViewHelpers/File/IsMediaViewHelper.php index ff400a750..717cba094 100644 --- a/Classes/ViewHelpers/File/IsMediaViewHelper.php +++ b/Classes/ViewHelpers/File/IsMediaViewHelper.php @@ -11,6 +11,7 @@ use TYPO3\CMS\Core\Resource\File; use TYPO3\CMS\Core\Resource\FileReference; +use TYPO3\CMS\Core\Resource\FileType; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; @@ -25,16 +26,11 @@ public function render() $allowedFileExtensions = $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] ?? ''; $allowedFileExtensions = GeneralUtility::trimExplode(',', $allowedFileExtensions); - if (is_object($file) + return is_object($file) && ($file instanceof FileReference || $file instanceof File) && ( in_array($file->getExtension(), $allowedFileExtensions, true) - || $file->getType() === File::FILETYPE_VIDEO - ) - ) { - return true; - } - - return false; + || $file->isType(FileType::VIDEO) + ); } } diff --git a/Classes/ViewHelpers/FrameViewHelper.php b/Classes/ViewHelpers/FrameViewHelper.php index 7cbfabce8..edffb90af 100644 --- a/Classes/ViewHelpers/FrameViewHelper.php +++ b/Classes/ViewHelpers/FrameViewHelper.php @@ -14,9 +14,11 @@ use TYPO3\CMS\Core\Resource\FileReference; use TYPO3\CMS\Core\Resource\ResourceFactory; use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Core\View\ViewFactoryData; +use TYPO3\CMS\Core\View\ViewFactoryInterface; +use TYPO3\CMS\Core\View\ViewInterface; use TYPO3\CMS\Extbase\Configuration\ConfigurationManager; use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; -use TYPO3\CMS\Fluid\View\StandaloneView; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; /** @@ -162,10 +164,10 @@ public function render() ] ); - return $view->render(); + return $view->render('Frame/Index'); } - protected static function getTemplateObject(): StandaloneView + protected static function getTemplateObject(): ViewInterface { $setup = static::getConfigurationManager()->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT); @@ -191,14 +193,12 @@ protected static function getTemplateObject(): StandaloneView } } - /** @var StandaloneView $view */ - $view = GeneralUtility::makeInstance(StandaloneView::class); - $view->setLayoutRootPaths($layoutRootPaths); - $view->setPartialRootPaths($partialRootPaths); - $view->setTemplateRootPaths($templateRootPaths); - $view->setTemplate('Frame/Index'); - - return $view; + return GeneralUtility::makeInstance(ViewFactoryInterface::class) + ->create(new ViewFactoryData( + templateRootPaths: $templateRootPaths, + partialRootPaths: $partialRootPaths, + layoutRootPaths: $layoutRootPaths, + )); } protected static function getConfigurationManager(): ConfigurationManagerInterface diff --git a/Configuration/TCA/Overrides/100_pages.php b/Configuration/TCA/Overrides/100_pages.php index 0e74d3e6b..090879446 100644 --- a/Configuration/TCA/Overrides/100_pages.php +++ b/Configuration/TCA/Overrides/100_pages.php @@ -88,7 +88,7 @@ ], 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => '--palette--;;filePalette', ], ], @@ -108,7 +108,7 @@ 'maxitems' => 1, 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => ' --palette--;;imageoverlayPalette, --palette--;;filePalette diff --git a/Configuration/TCA/Overrides/225_content_element_texticon.php b/Configuration/TCA/Overrides/225_content_element_texticon.php index 510f19550..acf0339fe 100644 --- a/Configuration/TCA/Overrides/225_content_element_texticon.php +++ b/Configuration/TCA/Overrides/225_content_element_texticon.php @@ -126,7 +126,7 @@ ], 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => '--palette--;;filePalette', ], ], diff --git a/Configuration/TCA/Overrides/300_content_general_columns.php b/Configuration/TCA/Overrides/300_content_general_columns.php index 0d425cef3..6462ebc95 100644 --- a/Configuration/TCA/Overrides/300_content_general_columns.php +++ b/Configuration/TCA/Overrides/300_content_general_columns.php @@ -182,7 +182,7 @@ ], 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => 'crop,--palette--;;filePalette', ], ], diff --git a/Configuration/TCA/tx_bootstrappackage_accordion_item.php b/Configuration/TCA/tx_bootstrappackage_accordion_item.php index 45ed47983..4efff5a7a 100644 --- a/Configuration/TCA/tx_bootstrappackage_accordion_item.php +++ b/Configuration/TCA/tx_bootstrappackage_accordion_item.php @@ -189,12 +189,12 @@ ], 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => ' --palette--;;imageoverlayPalette, --palette--;;filePalette', ], - \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [ + \TYPO3\CMS\Core\Resource\FileType::VIDEO->value => [ 'showitem' => ' --palette--;;videoOverlayPalette, --palette--;;filePalette', diff --git a/Configuration/TCA/tx_bootstrappackage_card_group_item.php b/Configuration/TCA/tx_bootstrappackage_card_group_item.php index a4f04e02b..f861bee53 100644 --- a/Configuration/TCA/tx_bootstrappackage_card_group_item.php +++ b/Configuration/TCA/tx_bootstrappackage_card_group_item.php @@ -197,7 +197,7 @@ 'maxitems' => 1, 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => ' --palette--;;imageoverlayPalette, --palette--;;filePalette', @@ -275,7 +275,7 @@ ], 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => '--palette--;;filePalette', ], ], diff --git a/Configuration/TCA/tx_bootstrappackage_carousel_item.php b/Configuration/TCA/tx_bootstrappackage_carousel_item.php index 775de99d7..6e39603af 100644 --- a/Configuration/TCA/tx_bootstrappackage_carousel_item.php +++ b/Configuration/TCA/tx_bootstrappackage_carousel_item.php @@ -599,7 +599,7 @@ 'maxitems' => 1, 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => ' --palette--;;imageoverlayPalette, --palette--;;filePalette', @@ -641,7 +641,7 @@ ], 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => 'crop,--palette--;;filePalette', ], ], diff --git a/Configuration/TCA/tx_bootstrappackage_icon_group_item.php b/Configuration/TCA/tx_bootstrappackage_icon_group_item.php index befa4b07b..de5e074d1 100644 --- a/Configuration/TCA/tx_bootstrappackage_icon_group_item.php +++ b/Configuration/TCA/tx_bootstrappackage_icon_group_item.php @@ -228,7 +228,7 @@ ], 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => '--palette--;;filePalette', ], ], diff --git a/Configuration/TCA/tx_bootstrappackage_tab_item.php b/Configuration/TCA/tx_bootstrappackage_tab_item.php index 8d206a5f5..87c27980b 100644 --- a/Configuration/TCA/tx_bootstrappackage_tab_item.php +++ b/Configuration/TCA/tx_bootstrappackage_tab_item.php @@ -189,12 +189,12 @@ ], 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => ' --palette--;;imageoverlayPalette, --palette--;;filePalette', ], - \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [ + \TYPO3\CMS\Core\Resource\FileType::VIDEO->value => [ 'showitem' => ' --palette--;;videoOverlayPalette, --palette--;;filePalette', diff --git a/Configuration/TCA/tx_bootstrappackage_timeline_item.php b/Configuration/TCA/tx_bootstrappackage_timeline_item.php index 827789297..05631567b 100644 --- a/Configuration/TCA/tx_bootstrappackage_timeline_item.php +++ b/Configuration/TCA/tx_bootstrappackage_timeline_item.php @@ -223,7 +223,7 @@ ], 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => '--palette--;;filePalette', ], ], @@ -243,7 +243,7 @@ 'maxitems' => 1, 'overrideChildTca' => [ 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + \TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [ 'showitem' => ' --palette--;;imageoverlayPalette, --palette--;;filePalette', diff --git a/composer.json b/composer.json index dec5c108f..99969b969 100644 --- a/composer.json +++ b/composer.json @@ -32,15 +32,15 @@ "ext-libxml": "*", "ext-simplexml": "*", "scssphp/scssphp": "^1.13", - "typo3/cms-backend": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-core": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-extbase": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-extensionmanager": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-fluid": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-frontend": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-install": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-rte-ckeditor": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-seo": "^12.4 || ^13.4 || 13.*.*@dev" + "typo3/cms-backend": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-core": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-extbase": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-extensionmanager": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-fluid": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-frontend": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-install": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-rte-ckeditor": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-seo": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev" }, "require-dev": { "b13/container": "^2.3 || dev-task/dev-main", @@ -53,16 +53,16 @@ "phpstan/phpstan-deprecation-rules": "^1.1", "phpstan/phpstan-phpunit": "^1.3", "phpstan/phpstan-strict-rules": "^1.5", - "typo3/cms-belog": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-felogin": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-filelist": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-form": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-indexed-search": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-info": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-lowlevel": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-tstemplate": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/cms-workspaces": "^12.4 || ^13.4 || 13.*.*@dev", - "typo3/testing-framework": "^8.2.3" + "typo3/cms-belog": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-felogin": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-filelist": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-form": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-indexed-search": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-info": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-lowlevel": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-tstemplate": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/cms-workspaces": "^12.4 || ^13.4 || 13.*.*@dev || 14.*.*@dev", + "typo3/testing-framework": "^8.2.3 || @dev" }, "config": { "bin-dir": ".build/bin",