78235[TASK] Introduce DatabaseType enum
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 23
- typo3/sysext/backend/Classes/Form/Element/DatetimeElement.php+3 −2
- typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseRowDateTimeFields.php+6 −3
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaRecordTitle.php+8 −4
- typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php+3 −1
- typo3/sysext/backend/Classes/Search/LiveSearch/DatabaseRecordProvider.php+3 −1
- typo3/sysext/backend/Classes/Search/LiveSearch/PageRecordProvider.php+3 −1
- typo3/sysext/backend/Classes/Utility/BackendUtility.php+6 −4
- typo3/sysext/backend/Tests/Unit/Form/Element/DatetimeElementTest.php+2 −1
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseRowDateTimeFieldsTest.php+8 −7
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaRecordTitleTest.php+6 −5
- typo3/sysext/core/Classes/Database/Query/QueryHelper.php3+6 −8
- typo3/sysext/core/Classes/Database/Schema/DefaultTcaSchema.php+4 −3
- typo3/sysext/core/Classes/DataHandling/TCA/DatabaseType.php7new+44 −0
- typo3/sysext/core/Classes/DataHandling/DataHandler.php+5 −4
- typo3/sysext/core/Classes/Migrations/TcaMigration.php4+4 −2
- typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php+7 −6
- typo3/sysext/core/Tests/Unit/Migrations/TcaMigrationTest.php+9 −8
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/ColumnMap.php+4 −9
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/ColumnMapFactory.php+4 −5
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php2+11 −20
Review log 3442
Show 1017 earlier messages
-
Alexander Schnitzler uploaded patch set 1 03/23/23, 17:58
-
Alexander Schnitzler commented on patch set 1 03/23/23, 18:05
DatabaseIntegrityController.php:897This is unintentionally added by php-cs-fixer.DatabaseIntegrityController.php:2231This is unintentionally added by php-cs-fixer. -
core-ci voted on patch set 1 V -1 03/23/23, 18:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39487
-
Alexander Schnitzler uploaded patch set 2
V -103/23/23, 18:20 -
Alexander Schnitzler uploaded patch set 3 03/23/23, 18:41
-
core-ci voted on patch set 2 V -1 03/23/23, 18:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39490
-
Alexander Schnitzler updated the commit message in patch set 4 03/23/23, 19:00
-
Alexander Schnitzler commented on patch set 4 03/23/23, 19:00
This change is ready for review.DataMapper.php:318ReplyDone -
core-ci voted on patch set 3 V -1 03/23/23, 19:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39491
-
Alexander Schnitzler uploaded patch set 5 03/23/23, 19:15
-
core-ci voted on patch set 4 V -1 03/23/23, 19:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39492
-
core-ci voted on patch set 5 V +1 03/23/23, 19:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39493
-
Alexander Schnitzler uploaded patch set 6
V +103/24/23, 07:07 -
Alexander Schnitzler commented on patch set 6 03/24/23, 07:10
DatabaseIntegrityController.php:897ReplyDoneDatabaseIntegrityController.php:2231ReplyDone -
Alexander Schnitzler uploaded patch set 7 03/24/23, 07:17
-
core-ci voted on patch set 6 V +1 03/24/23, 07:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39518
-
core-ci voted on patch set 7 V +1 03/24/23, 07:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39520
-
Stefan Froemken commented on patch set 7 03/27/23, 16:24
DatabaseType.php:36What about just: return array_column(self::cases(), 'value'); instead of array_map and array function? -
Stefan Froemken commented on patch set 7 03/27/23, 16:25
DatabaseType.php:36Replyups arrow function -
Oliver Klee commented on patch set 7 CR +1 03/27/23, 16:36
Beautiful! -
Stefan Froemken commented on patch set 7 CR -1 03/27/23, 16:45
TcaMigration.php:890Can we use DatabaseType::getDateTimeTypes(); here? -
Alexander Schnitzler commented on patch set 7 03/27/23, 16:54
DatabaseType.php:36ReplyI'm not sure array_column works here because we don't have an array of arrays where we can use one column from. We have an array of objects. Maybe I'm mistaken though. Can you please check again?TcaMigration.php:890ReplyUnfortunately not, date time types is different from date time formats. -
Stefan Froemken commented on patch set 7 03/27/23, 17:01
DatabaseType.php:36ReplyResult is exactly the same. I have copied that snippet from a community entry of the php docs ;-)TcaMigration.php:890ReplyUps. yes of cause. Sorry. -
Oliver Klee commented on patch set 7 03/27/23, 17:08
TcaMigration.php:890ReplyAck -
Stefan Froemken uploaded patch set 8
CR +1V +103/27/23, 18:21 -
Stefan Froemken voted on patch set 8 V +1 CR +1 03/27/23, 18:23
-
core-ci voted on patch set 8 V +1 03/27/23, 18:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39716
-
Wouter Wolters voted on patch set 8 V +1 CR +1 03/27/23, 18:32
-
Wouter Wolters voted on patch set 8 V 0 03/27/23, 18:32
-
Oliver Klee voted on patch set 8 CR +1 03/27/23, 19:49
-
Alexander Schnitzler commented on patch set 8 03/28/23, 16:49
DatabaseType.php:36ReplyResolved, right? -
Oliver Klee voted on patch set 8 V +1 03/29/23, 08:35
-
Christian Kuhn commented on patch set 8 03/29/23, 09:21
QueryHelper.php:211why not deprecate now? -
Benni Mack commented on patch set 8 CR -1 03/29/23, 09:31
I think we're lacking the other DB Types which TYPO3 supports (JSON and UUID), right? -
Alexander Schnitzler commented on patch set 8 03/29/23, 09:44
Reply
No, those are actual types. See \TYPO3\CMS\Core\DataHandling\TableColumnType::JSON and \TYPO3\CMS\Core\DataHandling\TableColumnType::UUID. json used to be a dbType, but was converted to an actual type here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77798QueryHelper.php:211ReplyMy last information was not to deprecate that short before the LTS releases. Maybe things changed but I was once told only to deprecate things in the n.0 release. -
Benni Mack commented on patch set 8 03/29/23, 11:28
QueryHelper.php:211Reply UnresolvedThis was related to all findBy() methods in all extbase extensions, which I found highly critical to have all currently compatible v12 extensions having trigger_errors() for a long time. This is like deprecating GeneralUtility::makeInstance() NOW. So, there is no rule to not deprecate something before LTS, however, I try to estimate the amount of usages based on various extension scanners and conversations with developers from agencies when to avoid an immediate deprecation. -
Benni Mack commented on patch set 8 03/29/23, 11:28
Reply
yes. thanks. -
Alexander Schnitzler commented on patch set 8 03/29/23, 18:32
Reply
Can you remove your -1 on this and let Christian decide to add one again in case we want to handle the deprecation? -
Benni Mack voted on patch set 8 CR 0 03/29/23, 21:27
-
Oliver Hader commented on patch set 8 04/01/23, 16:35
DatabaseType.php:36UnresolvedUsing string values here instead of a list of all cases, is reducing the benefits of using enums...DatabaseType.php:39UnresolvedHm, all `DatabaseType` values seem to be date-time types... I guess there might be additional types in the future. However, this could be simplified like e.g. ``` $type = DatabaseType::tryFrom($whatever); if ($type instanceof DatabaseType) {} // or if ($type?->isDateTimeType()) {} ``` -
Oliver Hader voted on patch set 8 CR -1 04/01/23, 16:36
-
Alexander Schnitzler abandoned the change 04/01/23, 17:12
DataMapper.php:318