73622[!!!][FEATURE] Separate internal_type=folder into an own type
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Oli Bartsch +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Oli Bartsch +1
- core-ci +1 CI
Issues 1
Files 40
- Build/phpstan/phpstan-baseline.neon+5 −0
- Build/Sources/TypeScript/backend/form-engine/element/folder-element.ts4new+54 −0
- typo3/sysext/backend/Classes/Form/Element/FolderElement.php2new+267 −0
- typo3/sysext/backend/Classes/Form/Element/GroupElement.php2+15 −32
- typo3/sysext/backend/Classes/Form/FieldControl/ElementBrowser.php3+8 −7
- typo3/sysext/backend/Classes/Form/FieldControl/InsertClipboard.php+6 −10
- typo3/sysext/backend/Classes/Form/FieldWizard/RecordsOverview.php+1 −7
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFolder.php2new+84 −0
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaGroup.php+55 −89
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInlineConfiguration.php+0 −13
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaRecordTitle.php+19 −5
- typo3/sysext/backend/Classes/Form/Utility/FormEngineUtility.php+2 −1
- typo3/sysext/backend/Classes/Form/NodeFactory.php+1 −0
- typo3/sysext/backend/Classes/Utility/BackendUtility.php+8 −9
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine/element/folder-element.jsnew+13 −0
- typo3/sysext/backend/Tests/Functional/Form/FormDataProvider/TcaGroupTest.php+0 −2
- typo3/sysext/backend/Tests/Unit/Form/FieldControl/ElementBrowserTest.php+14 −3
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaFolderTest.phpnew+96 −0
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaGroupTest.php2+0 −68
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaInlineConfigurationTest.php+0 −28
Show 20 more files
- typo3/sysext/core/Classes/Database/ReferenceIndex.php+1 −1
- typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php4+1 −1
- typo3/sysext/core/Classes/DataHandling/DataHandler.php3+6 −8
- typo3/sysext/core/Classes/DataHandling/TableColumnSubType.phpdeleted+0 −46
- typo3/sysext/core/Classes/DataHandling/TableColumnType.php+1 −0
- typo3/sysext/core/Classes/Migrations/TcaMigration.php6+32 −0
- typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php6+2 −3
- typo3/sysext/core/Configuration/DefaultConfiguration.php6+23 −3
- typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96983-TableColumnSubType.rst2new+37 −0
- typo3/sysext/core/Documentation/Changelog/12.0/Deprecation-96983-TCAInternal_type.rst4new+75 −0
- typo3/sysext/core/Documentation/Changelog/12.0/Feature-96983-TCATypeFolder.rstnew+36 −0
- typo3/sysext/core/Resources/Private/Language/locallang_core.xlf+2 −2
- typo3/sysext/core/Tests/Unit/Migrations/TcaMigrationTest.php4+54 −0
- typo3/sysext/core/Tests/Unit/Tree/TableConfiguration/TreeDataProviderFactoryTest.php+7 −3
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/ColumnMap.php+0 −23
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php2+1 −7
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapFactoryTest.php2+27 −27
- typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php+5 −0
- typo3/sysext/lowlevel/Classes/Database/QueryGenerator.php+2 −6
- typo3/sysext/lowlevel/Classes/Integrity/DatabaseIntegrityCheck.php+1 −1
Review log 5471
Show 3646 earlier messages
-
Nikita Hovratov uploaded patch set 1 02/20/22, 17:09
-
Nikita Hovratov uploaded patch set 2 02/20/22, 17:16
-
core-ci voted on patch set 1 V -1 02/20/22, 17:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23954
-
core-ci voted on patch set 2 V -1 02/20/22, 18:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23956
-
Nikita Hovratov uploaded patch set 3 02/21/22, 13:30
-
core-ci voted on patch set 3 V -1 02/21/22, 13:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23988
-
Nikita Hovratov uploaded patch set 4 02/21/22, 14:08
-
core-ci voted on patch set 4 V +1 02/21/22, 14:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23990
-
Nikita Hovratov commented on patch set 4 02/21/22, 14:17
ready for review -
Benni Mack commented on patch set 4 V +1 CR +1 02/21/22, 18:06
Should this -
Benni Mack commented on patch set 4 V 0 CR -1 02/21/22, 18:07
Should be marked as feature, and we should have TcaMigration to move old code to the new structure. Should be fairly doable. -
Benni Mack commented on patch set 4 02/21/22, 18:07
A... TCA migration is in place. Still, this needs to be a Feature so this can be added to the documentation properly. -
Benni Mack commented on patch set 4 02/21/22, 18:08
TcaMigration.php:562I think we can now unset all other "internal_type" (and internal_type=db) -
Nikita Hovratov uploaded patch set 5 02/21/22, 20:55
-
Nikita Hovratov commented on patch set 5 02/21/22, 20:55
Reply
Added (short) Feature rst.TcaMigration.php:562ReplyDone -
core-ci voted on patch set 5 V +1 02/21/22, 21:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24012
-
Nikita Hovratov uploaded patch set 6 02/21/22, 21:03
-
core-ci voted on patch set 6 V +1 02/21/22, 21:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24013
-
Benjamin Franzke uploaded patch set 7 02/22/22, 07:53
-
Benjamin Franzke commented on patch set 7 02/22/22, 07:53
FolderElement.php:177This should be t3js-folder-hidden-field, to decouple from type=group but it seems t3js-group-hidden-field is actually unused? So I've just removed it here (and in GroupElement).DataMapProcessor.php:1462Hm.. despite the previous description, this also returned true for type=group and internal_type=folder. It will now no longer return true for type=folder. Have you double checked whether this was used for internal_type=folder Was the previous behaviour incorrect or never triggered? (I didn't check yet, just juding from the code in here)DataMapFactoryTest.php:443Drop "AndInternalType" (also below). -
Benjamin Franzke commented on patch set 7 02/22/22, 07:59
DataMapProcessor.php:1462ReplySo what I mean: The change itself is fine, the question is: Do we have a bug here (e.g. in v10 and v11) because internal_type=folder was not checked. -
core-ci voted on patch set 7 V +1 02/22/22, 08:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24029
-
Nikita Hovratov commented on patch set 7 02/22/22, 08:10
DataMapProcessor.php:1462ReplyThe check !empty($configuration['allowed']) would prevent that for type folder. -
Nikita Hovratov commented on patch set 7 02/22/22, 08:20
FolderElement.php:177ReplySeems it was never used since introduction.DataMapFactoryTest.php:443ReplyThanks! -
Benjamin Franzke commented on patch set 7 V -1 02/22/22, 08:25
If I use EXT:styleguide (which should work through TcaMigration) and try to add a new folder and press "Save", the change is not persisted. Can you reproduce? -
Nikita Hovratov uploaded patch set 8 02/22/22, 09:19
-
Nikita Hovratov commented on patch set 8 02/22/22, 09:20
Reply
DataHandler checkValue was missing for the new type. -
core-ci voted on patch set 8 V +1 02/22/22, 09:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24037
-
Benjamin Franzke commented on patch set 8 V +1 CR +1 02/22/22, 09:34
DataMapProcessor.php:1462ReplyAck -
Christian Kuhn commented on patch set 8 02/22/22, 10:42
DefaultConfiguration.php:645remove TcaGroup here and add TcaFolder. -
Nikita Hovratov commented on patch set 8 02/22/22, 10:53
DefaultConfiguration.php:645Replyis it not relevant for TcaGroup? -
Nikita Hovratov uploaded patch set 9 02/22/22, 10:57
-
Nikita Hovratov commented on patch set 9 02/22/22, 11:03
DefaultConfiguration.php:645ReplyHm, there was a fix for that here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/53526/ Also, TcaSelectItems with the dependency to TcaGroup is listed twice there. Is this wrong? -
core-ci voted on patch set 9 V +1 02/22/22, 11:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24042
-
Benjamin Franzke voted on patch set 9 V +1 CR +1 02/22/22, 20:11
-
Benni Mack commented on patch set 9 02/22/22, 20:40
ElementBrowser.php:70this is really nasty and we should build this in a better fashion soon (but not in this patch) -
Nikita Hovratov commented on patch set 9 02/22/22, 21:06
ElementBrowser.php:70ReplyYep, before the ElementBrowser implementations were synced with the internal_type, but as it is gone now I had to built this for now. -
Oli Bartsch commented on patch set 9 CR -1 02/22/22, 21:10
This is a great patch! I did a quick code review, not yet testes the code.folder-element.ts:17Latest TCA types usually got a custom element (web component), see e.g. type "category". Could we do this for the folder element, too?TcaFolder.php:74Could we use a specific exception here?DataHandler.php:2019Actually this would now be `checkValueForGroupFolderSelect`, right?TcaMigration.php:554Usually, each migration describes the migration process in PHPDoc. Could we please add one for this method, too?TcaMigration.php:566The below code is actually really hard to read. For example the "!=== folder" check is duplicated, the isset($fieldConfig['config']['internal_type']) check could be done in the "early return" above. My suggestion would be: if (($fieldConfig['config']['type'] ?? '') !== 'group' || !isset($fieldConfig['config']['internal_type'])) { continue; } unset($tca[$table]['columns'][$fieldName]['config']['internal_type']); if ($fieldConfig['config']['internal_type'] === 'folder') { $tca[$table]['columns'][$fieldName]['config']['type'] = 'folder'; $this->messages[] = 'The TCA field \'' . $fieldName . '\' of table ...'; } else { $this->messages[] = 'The property \'internal_type\' of the TCA ...'; }TreeDataProviderFactory.php:68I don't get this line. Why do we not just use `$tcaConfiguration['type']` directly?Breaking-96983-TableColumnSubType.rst:13... since TCA option `internal_type` ...Deprecation-96983-TCAInternal_type.rst:20\`internal_type\` (Without escaping obviously. That's just required for gerrit)Deprecation-96983-TCAInternal_type.rst:29optionTcaMigrationTest.php:1499What's the difference to "aTable"? -
Oli Bartsch commented on patch set 9 02/22/22, 21:18
DataMapFactory.php:317Do we need this for "folder" again? -
Oli Bartsch commented on patch set 9 02/22/22, 21:21
TcaGroupTest.php:69This does no longer belong here. We should add a dedicated TcaFolderTest. -
Nikita Hovratov commented on patch set 9 02/22/22, 21:30
folder-element.ts:17ReplyI have no experience in creating web components. Could we add this later on?DataHandler.php:2019ReplyI was hesitent to rename functions in DataHandler, eventhough it is a protected method. I can do it, if you say it is ok.TreeDataProviderFactory.php:68ReplyBefore the ElementBrowser implementations were mapped with internal_type. See: typo3/sysext/recordlist/ext_localconf.php Benni commented on the same. We should streamline this later on.TcaMigrationTest.php:1499Replynothing, just to make sure it is fixed in different tables. -
Nikita Hovratov uploaded patch set 10 02/23/22, 07:41
-
Nikita Hovratov commented on patch set 10 02/23/22, 07:45
TcaFolder.php:74ReplyDoneDataHandler.php:2019ReplyDoneTcaMigration.php:554ReplyDoneTcaMigration.php:566ReplyDoneTreeDataProviderFactory.php:68ReplySorry, I confused this with ElementBrowser. This is obviously funny.Breaking-96983-TableColumnSubType.rst:13ReplyDoneDeprecation-96983-TCAInternal_type.rst:20ReplyDoneDeprecation-96983-TCAInternal_type.rst:29ReplyDone -
core-ci voted on patch set 10 V -1 02/23/22, 07:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24075
-
Nikita Hovratov uploaded patch set 11 02/23/22, 08:19
-
Nikita Hovratov commented on patch set 11 02/23/22, 08:20
TcaGroupTest.php:69ReplyDoneDataMapFactory.php:317ReplyDone
-
Nikita Hovratov uploaded patch set 12 02/23/22, 08:23
-
Nikita Hovratov commented on patch set 11 02/23/22, 08:27
TreeDataProviderFactory.php:68ReplyOk, it has to stay like that, because it is basically the same as it was before but with type instead of internal_type. -
core-ci voted on patch set 11 V -1 02/23/22, 08:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24080
-
core-ci voted on patch set 12 V +1 02/23/22, 08:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24081
-
Christian Kuhn commented on patch set 12 02/23/22, 10:05
DefaultConfiguration.php:645Replyi basically want to have an entry for the direct predecessor in this list. this way, the dependencyOrderingService can not resort entries, which basically makes reading & debugging this much easier, especially as soon as other extensions hook into this list with 'before' / 'after'. -
Oli Bartsch commented on patch set 12 02/23/22, 11:02
folder-element.ts:17ReplyOk, I tried this but it seems to be a bit complicated because of the AbstractSortableSelectItems. We could postpone this if no easy solution can be found.TreeDataProviderFactory.php:68ReplySo but the condition will always be TRUE, as long as type is not "folder", right? Therefore we could simply check this: if (($tcaConfiguration['type'] ?? '') !== 'folder') { And the exception would then just be: > 'TCA Tree configuration is invalid: tree for "type=folder" not implemented yetTcaMigrationTest.php:1499ReplyWhy should the table name matter? This test case seems superfluous to me. Better extend the test case to ensure further config is kept in the migration. -
Oli Bartsch uploaded patch set 13 02/23/22, 11:24
-
Oli Bartsch commented on patch set 13 02/23/22, 11:26
folder-element.ts:17ReplyDone -
Nikita Hovratov uploaded patch set 14 02/23/22, 11:28
-
Nikita Hovratov commented on patch set 13 02/23/22, 11:28
ElementBrowser.php:70ReplyDoneTreeDataProviderFactory.php:68ReplyDoneTcaMigrationTest.php:1499ReplyDone -
core-ci voted on patch set 13 V +1 02/23/22, 11:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24095
-
core-ci voted on patch set 14 V +1 02/23/22, 11:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24097
-
Oli Bartsch commented on patch set 14 CR -1 02/23/22, 11:41
aDefaultConfiguration.php:621TcaFolder missing in "flexFormSegment" and "tcaInputPlaceholderRecord" -
Nikita Hovratov uploaded patch set 15 02/24/22, 08:59
-
Nikita Hovratov commented on patch set 15 02/24/22, 09:00
DefaultConfiguration.php:621ReplyAlso added it to siteConfiguration for safety. -
core-ci voted on patch set 15 V +1 02/24/22, 09:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24164
-
Oli Bartsch uploaded patch set 16 02/24/22, 10:36
-
Oli Bartsch uploaded patch set 17 02/24/22, 10:41
-
core-ci voted on patch set 16 V +1 02/24/22, 10:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24175
-
core-ci voted on patch set 17 V +1 02/24/22, 10:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24176
-
Oli Bartsch voted on patch set 17 V +1 CR +1 02/25/22, 13:55
-
Benjamin Franzke voted on patch set 17 V +2 CR +2 02/25/22, 15:35
-
Benjamin Franzke merged patch set 18 02/25/22, 15:35
-
Simon Schaufelberger commented on patch set 18 02/27/22, 04:16
GroupElement.php:250the outer bracket could have been removed as well -
Nikita Hovratov commented on patch set 18 11/22/23, 21:44
GroupElement.php:250Reply