72478[BUGFIX] Fix deprecated functionality in Doctrine DBAL 3.x API
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Stefan Bürk +1
- Christian Kuhn +1
-
Verified V +2 Done
- Benni Mack +2
- Stefan Bürk +1
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 42
- typo3/sysext/backend/Classes/Domain/Repository/Localization/LocalizationRepository.php+2 −3
- typo3/sysext/backend/Classes/History/RecordHistory.php2+2 −6
- typo3/sysext/backend/Classes/View/PageLayoutView.php2+3 −4
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php+13 −13
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectTreeItemsTest.php+3 −3
- typo3/sysext/core/Classes/Collection/AbstractRecordCollection.php+1 −1
- typo3/sysext/core/Classes/Database/Query/QueryBuilder.php13+80 −7
- typo3/sysext/core/Classes/Database/Schema/EventListener/SchemaIndexDefinitionListener.php2+4 −2
- typo3/sysext/core/Classes/Database/Schema/Parser/TableBuilder.php+1 −2
- typo3/sysext/core/Classes/Database/Schema/Comparator.php+1 −1
- typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php2+4 −8
- typo3/sysext/core/Classes/Database/Schema/DefaultTcaSchema.php4+2 −2
- typo3/sysext/core/Classes/Database/Connection.php+2 −3
- typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php3+2 −2
- typo3/sysext/core/Classes/DataHandling/DataHandler.php+1 −1
- typo3/sysext/core/Classes/Resource/Search/FileSearchQuery.php+2 −4
- typo3/sysext/core/Tests/Unit/Configuration/FlexForm/FlexFormToolsTest.php+9 −9
- typo3/sysext/core/Tests/Unit/Database/Mocks/MockPlatform.php+6 −0
- typo3/sysext/core/Tests/Unit/Database/Schema/ConnectionMigratorTest.php+2 −10
- typo3/sysext/core/Tests/Unit/Database/Schema/DefaultTcaSchemaTest.php+2 −0
Show 22 more files
- typo3/sysext/core/Tests/Unit/Database/ConnectionTest.php+4 −6
- typo3/sysext/core/Tests/Unit/Resource/Repository/AbstractRepositoryTest.php+2 −2
- typo3/sysext/core/Tests/Unit/Tree/TableConfiguration/DatabaseTreeDataProviderTest.php+2 −2
- typo3/sysext/core/Tests/Unit/Utility/File/ExtendedFileUtilityTest.php+2 −2
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php2+3 −2
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbBackendTest.php+2 −2
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php+2 −2
- typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php+3 −3
- typo3/sysext/frontend/Tests/Unit/Authentication/FrontendUserAuthenticationTest.php+2 −2
- typo3/sysext/frontend/Tests/Unit/ContentObject/Menu/AbstractMenuContentObjectTest.php+4 −4
- typo3/sysext/impexp/Classes/Export.php+2 −2
- typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php+9 −10
- typo3/sysext/install/Classes/Controller/InstallerController.php2+23 −12
- typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck/Platform/AbstractPlatform.php3+1 −1
- typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck/Platform/MySql.php+1 −1
- typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck/Platform/PostgreSql.php+1 −1
- typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck/Platform/Sqlite.php+1 −1
- typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck/Platform/SqlSrv.php+1 −1
- typo3/sysext/install/Classes/Updates/DatabaseRowsUpdateWizard.php3+2 −1
- typo3/sysext/lowlevel/Classes/Command/OrphanRecordsCommand.php+1 −1
- typo3/sysext/lowlevel/Classes/Database/QueryGenerator.php2+2 −2
- typo3/sysext/workspaces/Classes/Command/AutoPublishCommand.php+1 −1
Review log 2741
Show 816 earlier messages
-
Benni Mack uploaded patch set 1 12/03/21, 11:04
-
core-ci voted on patch set 1 V -1 12/03/21, 11:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20467
-
Benni Mack uploaded patch set 2 12/03/21, 11:14
-
core-ci voted on patch set 2 V -1 12/03/21, 11:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20468
-
Oliver Klee updated the commit message in patch set 3 12/03/21, 11:55
-
core-ci voted on patch set 3 V -1 12/03/21, 12:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20472
-
Stefan Bürk commented on patch set 3 CR -1 12/04/21, 15:50
on it. Note: getSchemaMigrator() => createSchemaMigrator() replacement cannot be done before doctrine/dbal:^3.2 raise, replacement method do not exists in 2.13.x thus this fails and is not backportable. -
Benni Mack uploaded patch set 4 12/04/21, 20:49
-
core-ci voted on patch set 4 V -1 12/04/21, 21:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20579
-
Benni Mack uploaded patch set 5 12/04/21, 21:10
-
Benni Mack uploaded patch set 6 12/04/21, 21:12
-
core-ci voted on patch set 5 V -1 12/04/21, 21:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20582
-
core-ci voted on patch set 6 V +1 12/04/21, 21:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20583
-
Stefan Bürk uploaded patch set 7 12/04/21, 21:32
-
core-ci voted on patch set 7 V +1 12/04/21, 21:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20584
-
core-ci voted on patch set 7 V -1 12/04/21, 22:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20585
-
core-ci voted on patch set 7 V +1 12/04/21, 22:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20585
-
Stefan Bürk uploaded patch set 8 12/04/21, 23:00
-
core-ci voted on patch set 8 V +1 12/04/21, 23:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20588
-
Christian Kuhn commented on patch set 8 12/04/21, 23:31
RecordHistory.php:236firing a second query here is useless and the code should be refactored towards while ($row = fetchAssociative()) instead. -
Christian Kuhn commented on patch set 8 CR -1 12/05/21, 00:09
important patch, but we should imho clean up various details.PageLayoutView.php:863smells fishy, or i didn't understand this.DataMapProcessor.php:889i think we should avoid this iterator and use while loops instead - first to avoid that method call here and second to streamline core code to only use one alternative instead of different ones.QueryBuilder.php:233*if* we want to add this method, we MUST have a well written comment that this *ignores* QueryRestrictionBuilder and must be used with care. maybe even @internal?!QueryBuilder.php:247same as above.QueryBuilder.php:719why?QueryBuilder.php:740why?QueryBuilder.php:761why?ConnectionMigrator.php:303good!DefaultTcaSchema.php:601was this a bug in my mm sql table creation patch or did they just rename this?SchemaIndexDefinitionListener.php:41please put $event->getConnection() into a variable and add a type hint which object it is, otherwise phpstorm says 'getServerVersion()' is private ... alternative: Refactor code to test platform and not server version.Typo3DbBackend.php:279see my other comments ... *if* we introduce that, we should comment usages - "it is ok to use executeQuery() here because ..."InstallerController.php:653must be within if() above.AbstractPlatform.php:72why? also in next files.DatabaseRowsUpdateWizard.php:211fallback to 'not an array' shouldn't happen here in this while body.QueryGenerator.php:1357imho type hint in method signature and fix callers. -
Stefan Bürk wrote 12/05/21, 01:19
Removed reviewer Stefan Bürk. -
Benni Mack commented on patch set 8 12/05/21, 12:53
PageLayoutView.php:863ReplyexecuteQuery is for SELECT/COUNT statements and returns a Result object as of Doctrine 2.13+. execute would return a Result|int which is not what we want in "getResult". This makes it more explicit.DataMapProcessor.php:889Replywill doQueryBuilder.php:233ReplyBug! will fix.QueryBuilder.php:247Replysee above, this is used for INSERT/UPDATE and DELETE. No restrictions are in place (check ->execute()).QueryBuilder.php:719ReplyAs of Doctrine 3.x, the predicates must not be empty. Imagine PageRepository with "$where_hid_del" which could be empty, and would then fail. I will document this at this place.QueryBuilder.php:740Replysee above.QueryBuilder.php:761Replysee above.DefaultTcaSchema.php:601Replywill checkAbstractPlatform.php:72ReplyPHPStan checks mentioned that this could be null or string. So we explicitly cast to string as isValidDatabaseName() expects a string.DatabaseRowsUpdateWizard.php:211ReplyThat was also PHPstan, will double check -
Benni Mack uploaded patch set 9 12/06/21, 08:56
-
Benni Mack commented on patch set 9 12/06/21, 08:57
Typo3DbBackend.php:279Replythis must be changed as the old code won't work in Doctrine 2x. it's the same logic, as this is native Doctrine DBAL code then. -
Benni Mack commented on patch set 9 12/06/21, 08:58
RecordHistory.php:236ReplyDoneDataMapProcessor.php:889ReplyDoneQueryBuilder.php:233ReplyDoneQueryBuilder.php:719ReplyDoneQueryBuilder.php:761ReplyDoneConnectionMigrator.php:303ReplyDoneSchemaIndexDefinitionListener.php:41ReplyDoneInstallerController.php:653ReplyDoneAbstractPlatform.php:72ReplyDoneDatabaseRowsUpdateWizard.php:211ReplyDoneQueryGenerator.php:1357ReplyDone -
core-ci voted on patch set 9 V -1 12/06/21, 08:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20622
-
Benni Mack uploaded patch set 10 12/06/21, 09:02
-
core-ci voted on patch set 10 V +1 12/06/21, 09:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20623
-
Stefan Bürk uploaded patch set 11 12/06/21, 10:39
-
core-ci voted on patch set 11 V +1 12/06/21, 10:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20627
-
Stefan Bürk commented on patch set 11 12/06/21, 12:02
DefaultTcaSchema.php:601ReplyIt seems that this was a bug from the mm sql table creation patch. doctrine/dbal Column() do not have a 'size' option, only a 'length' option. At least since doctrine/dbal:2.0.0. Not researched later in dbal versions. Even some other places has already used the length option. -
Benni Mack commented on patch set 11 12/06/21, 12:11
DefaultTcaSchema.php:601ReplyDone -
Christian Kuhn commented on patch set 11 CR -1 12/06/21, 15:11
on it. -
Stefan Bürk uploaded patch set 12 12/06/21, 21:04
-
core-ci voted on patch set 12 V +1 12/06/21, 21:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20664
-
Christian Kuhn commented on patch set 12 CR -1 12/07/21, 10:53
on it. -
Christian Kuhn voted on patch set 12 V +1 CR +1 12/07/21, 11:37
-
Stefan Bürk voted on patch set 12 V +1 CR +1 12/07/21, 11:38
-
Benni Mack voted on patch set 12 V +2 CR +2 12/07/21, 11:39
-
Benni Mack merged patch set 13 12/07/21, 11:40