Skip to content

Commit

Permalink
[TASK] v13/v14 compatibility: Use \TYPO3\CMS\Core\Resource\FileType ENUM
Browse files Browse the repository at this point in the history
  • Loading branch information
garvinhicking committed Oct 24, 2024
1 parent 93fa020 commit 61542e1
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 130 deletions.
112 changes: 0 additions & 112 deletions Build/phpstan-baseline-v13.neon
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,6 @@ parameters:
count: 1
path: ../Classes/ViewHelpers/Data/PaginateViewHelper.php

-
message: """
#^Fetching deprecated class constant FILETYPE_AUDIO of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:AUDIO instead$#
"""
count: 1
path: ../Classes/ViewHelpers/File/IsAudioViewHelper.php

-
message: """
#^Fetching deprecated class constant FILETYPE_IMAGE of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:IMAGE instead$#
"""
count: 1
path: ../Classes/ViewHelpers/File/IsImageViewHelper.php

-
message: """
#^Fetching deprecated class constant FILETYPE_VIDEO of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:VIDEO instead$#
"""
count: 1
path: ../Classes/ViewHelpers/File/IsMediaViewHelper.php

-
message: """
#^Fetching class constant class of deprecated class TYPO3\\\\CMS\\\\Fluid\\\\View\\\\StandaloneView\\:
Expand All @@ -55,91 +31,3 @@ parameters:
"""
count: 1
path: ../Classes/ViewHelpers/FrameViewHelper.php

-
message: """
#^Fetching deprecated class constant FILETYPE_IMAGE of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:IMAGE instead$#
"""
count: 2
path: ../Configuration/TCA/Overrides/100_pages.php

-
message: """
#^Fetching deprecated class constant FILETYPE_IMAGE of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:IMAGE instead$#
"""
count: 1
path: ../Configuration/TCA/Overrides/225_content_element_texticon.php

-
message: """
#^Fetching deprecated class constant FILETYPE_IMAGE of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:IMAGE instead$#
"""
count: 1
path: ../Configuration/TCA/Overrides/300_content_general_columns.php

-
message: """
#^Fetching deprecated class constant FILETYPE_IMAGE of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:IMAGE instead$#
"""
count: 1
path: ../Configuration/TCA/tx_bootstrappackage_accordion_item.php

-
message: """
#^Fetching deprecated class constant FILETYPE_VIDEO of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:VIDEO instead$#
"""
count: 1
path: ../Configuration/TCA/tx_bootstrappackage_accordion_item.php

-
message: """
#^Fetching deprecated class constant FILETYPE_IMAGE of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:IMAGE instead$#
"""
count: 2
path: ../Configuration/TCA/tx_bootstrappackage_card_group_item.php

-
message: """
#^Fetching deprecated class constant FILETYPE_IMAGE of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:IMAGE instead$#
"""
count: 2
path: ../Configuration/TCA/tx_bootstrappackage_carousel_item.php

-
message: """
#^Fetching deprecated class constant FILETYPE_IMAGE of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:IMAGE instead$#
"""
count: 1
path: ../Configuration/TCA/tx_bootstrappackage_icon_group_item.php

-
message: """
#^Fetching deprecated class constant FILETYPE_IMAGE of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:IMAGE instead$#
"""
count: 1
path: ../Configuration/TCA/tx_bootstrappackage_tab_item.php

-
message: """
#^Fetching deprecated class constant FILETYPE_VIDEO of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:VIDEO instead$#
"""
count: 1
path: ../Configuration/TCA/tx_bootstrappackage_tab_item.php

-
message: """
#^Fetching deprecated class constant FILETYPE_IMAGE of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\:
will be removed in TYPO3 v14, use TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileType\\:\\:IMAGE instead$#
"""
count: 2
path: ../Configuration/TCA/tx_bootstrappackage_timeline_item.php
3 changes: 2 additions & 1 deletion 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 @@ -29,7 +30,7 @@ public function render()
&& ($file instanceof FileReference || $file instanceof File)
&& (
in_array($file->getExtension(), $allowedFileExtensions, true)
|| $file->getType() === File::FILETYPE_AUDIO
|| $file->getType() === FileType::AUDIO->value
)
) {
return true;
Expand Down
3 changes: 2 additions & 1 deletion 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 @@ -29,7 +30,7 @@ public function render()
&& ($file instanceof FileReference || $file instanceof File)
&& (
in_array($file->getExtension(), $allowedFileExtensions, true)
|| $file->getType() === File::FILETYPE_IMAGE
|| $file->getType() === FileType::IMAGE->value
)
) {
return true;
Expand Down
3 changes: 2 additions & 1 deletion 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 @@ -29,7 +30,7 @@ public function render()
&& ($file instanceof FileReference || $file instanceof File)
&& (
in_array($file->getExtension(), $allowedFileExtensions, true)
|| $file->getType() === File::FILETYPE_VIDEO
|| $file->getType() === FileType::VIDEO->value
)
) {
return true;
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

0 comments on commit 61542e1

Please sign in to comment.