Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility changes for TYPO3 v14.0 #1530

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 11 additions & 12 deletions Classes/ViewHelpers/Data/PaginateViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand All @@ -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);

Expand All @@ -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.'])) {
Expand All @@ -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
Expand Down
12 changes: 4 additions & 8 deletions Classes/ViewHelpers/File/IsAudioViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -25,16 +26,11 @@
$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)

Check failure on line 33 in Classes/ViewHelpers/File/IsAudioViewHelper.php

View workflow job for this annotation

GitHub Actions / Build PHP (^13, 8.2)

Call to an undefined method TYPO3\CMS\Core\Resource\File|TYPO3\CMS\Core\Resource\FileReference::isType().

Check failure on line 33 in Classes/ViewHelpers/File/IsAudioViewHelper.php

View workflow job for this annotation

GitHub Actions / Build PHP (^13, 8.3)

Call to an undefined method TYPO3\CMS\Core\Resource\File|TYPO3\CMS\Core\Resource\FileReference::isType().
);
}
}
12 changes: 4 additions & 8 deletions Classes/ViewHelpers/File/IsImageViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -25,16 +26,11 @@
$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)

Check failure on line 33 in Classes/ViewHelpers/File/IsImageViewHelper.php

View workflow job for this annotation

GitHub Actions / Build PHP (^13, 8.2)

Call to an undefined method TYPO3\CMS\Core\Resource\File|TYPO3\CMS\Core\Resource\FileReference::isType().

Check failure on line 33 in Classes/ViewHelpers/File/IsImageViewHelper.php

View workflow job for this annotation

GitHub Actions / Build PHP (^13, 8.3)

Call to an undefined method TYPO3\CMS\Core\Resource\File|TYPO3\CMS\Core\Resource\FileReference::isType().
);
}
}
12 changes: 4 additions & 8 deletions Classes/ViewHelpers/File/IsMediaViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -25,16 +26,11 @@
$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)

Check failure on line 33 in Classes/ViewHelpers/File/IsMediaViewHelper.php

View workflow job for this annotation

GitHub Actions / Build PHP (^13, 8.2)

Call to an undefined method TYPO3\CMS\Core\Resource\File|TYPO3\CMS\Core\Resource\FileReference::isType().

Check failure on line 33 in Classes/ViewHelpers/File/IsMediaViewHelper.php

View workflow job for this annotation

GitHub Actions / Build PHP (^13, 8.3)

Call to an undefined method TYPO3\CMS\Core\Resource\File|TYPO3\CMS\Core\Resource\FileReference::isType().
);
}
}
22 changes: 11 additions & 11 deletions Classes/ViewHelpers/FrameViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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);

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Configuration/TCA/Overrides/100_pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
],
'overrideChildTca' => [
'types' => [
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
\TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [
'showitem' => '--palette--;;filePalette',
],
],
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
],
'overrideChildTca' => [
'types' => [
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
\TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [
'showitem' => '--palette--;;filePalette',
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
],
'overrideChildTca' => [
'types' => [
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
\TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [
'showitem' => 'crop,--palette--;;filePalette',
],
],
Expand Down
4 changes: 2 additions & 2 deletions Configuration/TCA/tx_bootstrappackage_accordion_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions Configuration/TCA/tx_bootstrappackage_card_group_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -275,7 +275,7 @@
],
'overrideChildTca' => [
'types' => [
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
\TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [
'showitem' => '--palette--;;filePalette',
],
],
Expand Down
4 changes: 2 additions & 2 deletions Configuration/TCA/tx_bootstrappackage_carousel_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -641,7 +641,7 @@
],
'overrideChildTca' => [
'types' => [
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
\TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [
'showitem' => 'crop,--palette--;;filePalette',
],
],
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TCA/tx_bootstrappackage_icon_group_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
],
'overrideChildTca' => [
'types' => [
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
\TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [
'showitem' => '--palette--;;filePalette',
],
],
Expand Down
4 changes: 2 additions & 2 deletions Configuration/TCA/tx_bootstrappackage_tab_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions Configuration/TCA/tx_bootstrappackage_timeline_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
],
'overrideChildTca' => [
'types' => [
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
\TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [
'showitem' => '--palette--;;filePalette',
],
],
Expand All @@ -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',
Expand Down
38 changes: 19 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
Loading