Skip to content

Commit e42d6b1

Browse files
committed
[TASK] prepare v2
1 parent 883d1b3 commit e42d6b1

File tree

11 files changed

+77
-184
lines changed

11 files changed

+77
-184
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,12 @@ jobs:
4141
if: matrix.TYPO3 == '13'
4242
run: |
4343
composer require typo3/cms-core:^13.4 --no-progress --no-interaction --dev -W
44-
- name: Install composer dependencies TYPO3 12
45-
if: matrix.TYPO3 == '12'
46-
run: |
47-
composer require typo3/cms-core:^12.4 --no-progress --no-interaction --dev -W
4844
- name: Phpstan 13
4945
if: matrix.TYPO3 == '13'
5046
run: .Build/bin/phpstan analyze -c Build/phpstan13.neon
5147
- name: Phpstan 14
5248
if: matrix.TYPO3 == '14'
5349
run: .Build/bin/phpstan analyze -c Build/phpstan.neon
54-
- name: Phpstan 12
55-
if: matrix.TYPO3 == '12'
56-
run: .Build/bin/phpstan analyze -c Build/phpstan12.neon
5750
- name: Phpcsfix
5851
run: .Build/bin/php-cs-fixer fix --config=Build/php-cs-fixer.php --dry-run --stop-on-violation --using-cache=no
5952
- name: Functional Tests

Build/phpstan11.neon

Lines changed: 0 additions & 9 deletions
This file was deleted.

Build/phpstan12.neon

Lines changed: 0 additions & 9 deletions
This file was deleted.

Classes/Hooks/DrawItem.php

Lines changed: 0 additions & 50 deletions
This file was deleted.

Configuration/TCA/Overrides/sys_template.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

Configuration/TCA/Overrides/tx_listelements_item.php

Lines changed: 8 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -3,87 +3,14 @@
33
defined('TYPO3') or die();
44

55
(function () {
6-
$childTcaTypes = [
7-
0 => [
8-
'showitem' => '
9-
--palette--;;basicoverlayPalette,
10-
--palette--;;filePalette',
11-
],
12-
(enum_exists(\TYPO3\CMS\Core\Resource\FileType::class) ? \TYPO3\CMS\Core\Resource\FileType::TEXT->value : \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT) => [
13-
'showitem' => '
14-
--palette--;;imageoverlayPalette,
15-
--palette--;;filePalette',
16-
],
17-
(enum_exists(\TYPO3\CMS\Core\Resource\FileType::class) ? \TYPO3\CMS\Core\Resource\FileType::IMAGE->value : \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE) => [
18-
'showitem' => '
19-
--palette--;;imageoverlayPalette,
20-
--palette--;;filePalette',
21-
],
22-
(enum_exists(\TYPO3\CMS\Core\Resource\FileType::class) ? \TYPO3\CMS\Core\Resource\FileType::AUDIO->value : \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO) => [
23-
'showitem' => '
24-
--palette--;;audioOverlayPalette,
25-
--palette--;;filePalette',
26-
],
27-
(enum_exists(\TYPO3\CMS\Core\Resource\FileType::class) ? \TYPO3\CMS\Core\Resource\FileType::VIDEO->value : \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO) => [
28-
'showitem' => '
29-
--palette--;;videoOverlayPalette,
30-
--palette--;;filePalette',
31-
],
32-
(enum_exists(\TYPO3\CMS\Core\Resource\FileType::class) ? \TYPO3\CMS\Core\Resource\FileType::APPLICATION->value : \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION) => [
33-
'showitem' => '
34-
--palette--;;basicoverlayPalette,
35-
--palette--;;filePalette',
36-
],
37-
];
38-
if ((\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class))->getMajorVersion() < 12) {
39-
$GLOBALS['TCA']['tx_listelements_item']['ctrl']['cruser_id'] = 'cruser_id';
40-
$GLOBALS['TCA']['tx_listelements_item']['columns']['l10n_parent']['config']['internal_type'] = 'db';
41-
$GLOBALS['TCA']['tx_listelements_item']['columns']['sorting_foreign']['config']['type'] = 'input';
42-
$GLOBALS['TCA']['tx_listelements_item']['columns']['sorting_foreign']['config']['eval'] = 'int';
43-
$GLOBALS['TCA']['tx_listelements_item']['columns']['sorting_foreign']['config']['internal_type'] = 'db';
44-
$GLOBALS['TCA']['tx_listelements_item']['columns']['images']['config'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
45-
'images',
46-
[
47-
'appearance' => [
48-
'createNewRelationLinkTitle' => 'LLL:EXT:listelements/Resources/Private/Language/locallang_db.xlf:tx_listelements_item.images.addFileReference',
49-
],
50-
// custom configuration for displaying fields in the overlay/reference table
51-
// to use the imageoverlayPalette instead of the basicoverlayPalette
52-
'overrideChildTca' => [
53-
'types' => $childTcaTypes,
54-
],
55-
]
56-
);
57-
$GLOBALS['TCA']['tx_listelements_item']['columns']['assets']['config'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
58-
'assets',
59-
[
60-
'appearance' => [
61-
'createNewRelationLinkTitle' => 'LLL:EXT:listelements/Resources/Private/Language/locallang_db.xlf:tx_listelements_item.assets.addFileReference',
62-
],
63-
// custom configuration for displaying fields in the overlay/reference table
64-
// to use the imageoverlayPalette instead of the basicoverlayPalette
65-
'overrideChildTca' => [
66-
'types' => $childTcaTypes,
67-
],
68-
]
69-
);
70-
$GLOBALS['TCA']['tx_listelements_item']['columns']['link']['config'] = [
71-
'type' => 'input',
72-
'renderType' => 'inputLink',
73-
'size' => 50,
74-
'max' => 1024,
75-
'eval' => 'trim',
76-
'fieldControl' => [
77-
'linkPopup' => [
78-
'options' => [
79-
'title' => 'LLL:EXT:listelements/Resources/Private/Language/locallang_db.xlf:tx_listelements_item.link',
80-
],
81-
],
82-
],
83-
'softref' => 'typolink',
84-
];
6+
$majorVersion = (new \TYPO3\CMS\Core\Information\Typo3Version())->getMajorVersion();
7+
if ($majorVersion < 14) {
8+
$GLOBALS['TCA']['tx_listelements_item']['ctrl']['searchFields'] = 'header,subheader,bodytext,link';
859
} else {
86-
$GLOBALS['TCA']['tx_listelements_item']['columns']['assets']['config']['overrideChildTca']['types'] = $childTcaTypes;
87-
$GLOBALS['TCA']['tx_listelements_item']['columns']['images']['config']['overrideChildTca']['types'] = $childTcaTypes;
10+
// https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/14.0/Breaking-106972-TCAControlOptionSearchFieldsRemoved.html
11+
// the Schema API detects searchable fields (e.g. all type text or input
12+
// we exclude:
13+
$GLOBALS['TCA']['tx_listelements_item']['columns']['tablename']['config']['searchable'] = false;
14+
$GLOBALS['TCA']['tx_listelements_item']['columns']['fieldname']['config']['searchable'] = false;
8815
}
8916
})();

Configuration/TCA/tx_listelements_item.php

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
'ignoreRootLevelRestriction' => true,
2828
'ignorePageTypeRestriction' => true,
2929
],
30-
'searchFields' => 'header,subheader,bodytext,link',
3130
],
3231

3332
'columns' => [
@@ -164,6 +163,40 @@
164163
'createNewRelationLinkTitle' => 'LLL:EXT:listelements/Resources/Private/Language/locallang_db.xlf:tx_listelements_item.images.addFileReference',
165164
],
166165
'allowed' => 'common-image-types',
166+
'overrideChildTca' => [
167+
'types' => [
168+
0 => [
169+
'showitem' => '
170+
--palette--;;basicoverlayPalette,
171+
--palette--;;filePalette',
172+
],
173+
\TYPO3\CMS\Core\Resource\FileType::TEXT->value => [
174+
'showitem' => '
175+
--palette--;;imageoverlayPalette,
176+
--palette--;;filePalette',
177+
],
178+
\TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [
179+
'showitem' => '
180+
--palette--;;imageoverlayPalette,
181+
--palette--;;filePalette',
182+
],
183+
\TYPO3\CMS\Core\Resource\FileType::AUDIO->value => [
184+
'showitem' => '
185+
--palette--;;audioOverlayPalette,
186+
--palette--;;filePalette',
187+
],
188+
\TYPO3\CMS\Core\Resource\FileType::VIDEO->value => [
189+
'showitem' => '
190+
--palette--;;videoOverlayPalette,
191+
--palette--;;filePalette',
192+
],
193+
\TYPO3\CMS\Core\Resource\FileType::APPLICATION->value => [
194+
'showitem' => '
195+
--palette--;;basicoverlayPalette,
196+
--palette--;;filePalette',
197+
],
198+
],
199+
],
167200
],
168201
],
169202
'assets' => [
@@ -173,6 +206,40 @@
173206
'appearance' => [
174207
'createNewRelationLinkTitle' => 'LLL:EXT:listelements/Resources/Private/Language/locallang_db.xlf:tx_listelements_item.assets.addFileReference',
175208
],
209+
'overrideChildTca' => [
210+
'types' => [
211+
0 => [
212+
'showitem' => '
213+
--palette--;;basicoverlayPalette,
214+
--palette--;;filePalette',
215+
],
216+
\TYPO3\CMS\Core\Resource\FileType::TEXT->value => [
217+
'showitem' => '
218+
--palette--;;imageoverlayPalette,
219+
--palette--;;filePalette',
220+
],
221+
\TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [
222+
'showitem' => '
223+
--palette--;;imageoverlayPalette,
224+
--palette--;;filePalette',
225+
],
226+
\TYPO3\CMS\Core\Resource\FileType::AUDIO->value => [
227+
'showitem' => '
228+
--palette--;;audioOverlayPalette,
229+
--palette--;;filePalette',
230+
],
231+
\TYPO3\CMS\Core\Resource\FileType::VIDEO->value => [
232+
'showitem' => '
233+
--palette--;;videoOverlayPalette,
234+
--palette--;;filePalette',
235+
],
236+
\TYPO3\CMS\Core\Resource\FileType::APPLICATION->value => [
237+
'showitem' => '
238+
--palette--;;basicoverlayPalette,
239+
--palette--;;filePalette',
240+
],
241+
],
242+
],
176243
],
177244
],
178245
'link' => [

Configuration/TypoScript/setup.typoscript

Lines changed: 0 additions & 1 deletion
This file was deleted.

ext_emconf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'author_company' => 'b13 GmbH, Stuttgart',
1212
'constraints' => [
1313
'depends' => [
14-
'typo3' => '11.5.0-14.99.99',
14+
'typo3' => '13.4.0-14.99.99',
1515
],
1616
],
1717
];

ext_localconf.php

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)