Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.
96533[WIP][!!!][TASK] Build Extbase persistence on doctrine/orm
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 2
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/33/96533/2 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/33/96533/2 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V -1 Blocked
- core-ci -1 CI
Issues 1
Files 131
- typo3/sysext/beuser/Classes/Domain/Model/BackendUser.php+8 −7
- typo3/sysext/beuser/Classes/Domain/Model/BackendUserGroup.php+7 −6
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-BeuserModelsUseDoctrineCollection.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-DeleteAndMmWritesTargetTranslationRow.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-DirtyApiNotAuthoritative.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-ExtbaseBackendInterfaceWriteMethodsRemoved.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-ExtbaseBackendWriteApiRemoved.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-ExtbaseCollectionHandlingForDoctrineCollections.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-ExtbaseDataMapperObjectCreationRemoved.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-ExtbaseHistoryTrackerNeedsEntityManager.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-ExtbaseIdentityIsPhysicalRow.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-ExtbasePersistenceManagerUsesEntityManager.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-ExtbaseRequiresDoctrineOrm.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-ExtbaseSessionIsUnitOfWorkFacade.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-ExtbaseWriteTargetRemovedAndEntityIdentityOrphaned.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-LazyObjectStorageAndLazyLoadingProxyNotProduced.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-LazyToOneOfDeletedTargetThrowsException.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-LazyToOneRelationsLoadedEagerly.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-PersistenceEventsDispatchedPerWrittenEntity.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-PersistenceManagerIdentifierFormatChanged.rstnew+21 −0
Show 111 more files
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-SerializingExtbaseEntityInitializesLazyCollections.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-SysHistoryEntriesOfExtbaseChanged.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-ToManyPropertiesUseDoctrineCollection.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-110965-ToOneRelationsCostOneQueryEach.rstnew+21 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Important-110965-ExtbaseQuerySettingsDecideApplicationTypeAtCreation.rstnew+43 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Classes/Controller/ContentController.php+3 −3
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Classes/Domain/Model/Content.php+13 −6
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Classes/Domain/Model/Hotel.php+13 −6
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Classes/Domain/Model/Offer.php+13 −6
- typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php+15 −3
- typo3/sysext/extbase/Classes/EventListener/ExtbaseHistoryTracker.php+10 −5
- typo3/sysext/extbase/Classes/Persistence/Doctrine/Mapping/ExtbaseClassMetadata.phpnew+42 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/Mapping/ExtbaseClassMetadataFactory.phpnew+46 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/Mapping/ExtbaseMappingDriver.phpnew+341 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/Persister/ExtbaseCollectionPersister.phpnew+379 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/Persister/ExtbaseEntityPersister.phpnew+301 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/Persister/RecordWriter.phpnew+455 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/Persister/ValueObjectDeduplicator.phpnew+103 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/Persister/WriteContext.phpnew+107 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/Types/DateTimeImmutableType.phpnew+43 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/Types/TimestampImmutableType.phpnew+55 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/Types/TimestampType.phpnew+59 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/EntityManagerFactory.phpnew+92 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/PersisterCacheFactory.phpnew+95 −0
- typo3/sysext/extbase/Classes/Persistence/Doctrine/RowHydrator.phpnew+420 −0
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php+75 −157
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Overlay/OverlayContext.phpnew+49 −0
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Overlay/RowOverlayService.phpnew+293 −0
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Predicate/LanguagePredicate.phpnew+141 −0
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Predicate/StoragePagePredicate.phpnew+80 −0
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Predicate/VisibilityPredicate.phpnew+153 −0
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Predicate/WorkspacePredicate.phpnew+47 −0
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php+25 −259
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php+19 −268
- typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php+6 −773
- typo3/sysext/extbase/Classes/Persistence/Generic/BackendInterface.php+0 −21
- typo3/sysext/extbase/Classes/Persistence/Generic/EntityIdentity.phpnew+90 −0
- typo3/sysext/extbase/Classes/Persistence/Generic/PersistenceManager.php+21 −41
- typo3/sysext/extbase/Classes/Persistence/Generic/Session.php+85 −135
- typo3/sysext/extbase/Classes/Persistence/Generic/Typo3QuerySettings.php+47 −4
- typo3/sysext/extbase/Classes/Property/TypeConverter/CollectionConverter.phpnew+61 −0
- typo3/sysext/extbase/Classes/Utility/TypeHandlingUtility.php+2 −1
- typo3/sysext/extbase/Classes/Validation/Validator/CollectionValidator.php+2 −1
- typo3/sysext/extbase/Configuration/Services.yaml+16 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Controller/ContentController.php+4 −4
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Administrator.php+17 −16
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Attachment.phpnew+43 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Blog.php+26 −25
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/BlogUser.phpnew+38 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/FrontendUserGroup.php+11 −10
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Info.php+25 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Moderator.phpnew+23 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Note.phpnew+155 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Person.php+20 −19
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Post.php+63 −52
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/TtContent.php+18 −17
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/Extbase/Persistence/Classes.php+11 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/Overrides/fe_users_moderator.phpnew+10 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_attachment.phpnew+43 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_note.phpnew+86 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_post.php+8 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.sql+10 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/extbase_upload/Classes/Domain/Model/Singlefile.php+32 −31
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/parent_child_translation/Classes/Domain/Model/Main.php+12 −11
- typo3/sysext/extbase/Tests/Functional/Mvc/Controller/BlogPostEditingControllerTest.php+13 −17
- typo3/sysext/extbase/Tests/Functional/Persistence/Doctrine/Fixtures/StiContent.phpnew+25 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Doctrine/Fixtures/StiTextContent.phpnew+23 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Doctrine/MetadataTest.phpnew+306 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Doctrine/ReadPathTest.phpnew+108 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Doctrine/WritePathTest.phpnew+112 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/BehaviourConformanceRelationsImport.csvnew+28 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/BehaviourConformanceTestImport.csvnew+48 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/BehaviourConformanceVisibilityImport.csvnew+13 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/ObservablePersistenceBehaviour.csvnew+42 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/RelationPersistenceConformanceAttachCategory.csvnew+6 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/RelationPersistenceConformanceDetachCategory.csvnew+4 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/RelationPersistenceConformanceDetachSpecialTag.csvnew+6 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/RelationPersistenceConformanceImport.csvnew+73 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/TestResultAddObjectStoresDomainObjectRelationAsUidNotToStringInHistory.csv+1 −2
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/TestResultAddObjectWritesHistoryEntry.csv+1 −2
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/TestResultAddObjectWritesHistoryEntryFrontendUser.csv+1 −2
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/TestResultRemoveObjectWritesHistoryEntry.csv+1 −2
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/TestResultUpdateObjectWritesHistoryEntry.csv+2 −3
- typo3/sysext/extbase/Tests/Functional/Persistence/Generic/Mapper/DataMapperTest.php+4 −2
- typo3/sysext/extbase/Tests/Functional/Persistence/Generic/BackendTest.php+8 −13
- typo3/sysext/extbase/Tests/Functional/Persistence/AddTest.php+6 −2
- typo3/sysext/extbase/Tests/Functional/Persistence/BehaviourConformanceTest.phpnew+1281 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/InTest.php+4 −2
- typo3/sysext/extbase/Tests/Functional/Persistence/IsDirtyTest.php+4 −2
- typo3/sysext/extbase/Tests/Functional/Persistence/LazyObjectStorageTest.php+4 −3
- typo3/sysext/extbase/Tests/Functional/Persistence/ObservablePersistenceBehaviourTest.phpnew+883 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/QueryLocalizedDataTest.php+5 −2
- typo3/sysext/extbase/Tests/Functional/Persistence/QuerySettingsApplicationTypeTest.phpnew+125 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/RelationPersistenceConformanceTest.phpnew+952 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/RelationTest.php+8 −7
- typo3/sysext/extbase/Tests/Functional/Persistence/RepositoryTest.php+1 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/UpdateTest.php+1 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/Fixtures/ColumnMapFactoryEntityFixture.phpnew+35 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/ColumnMapFactoryTest.phpnew+167 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapperTest.php+2 −6
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Predicate/AbstractPredicateTestCase.phpnew+114 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Predicate/LanguagePredicateTest.phpnew+183 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Predicate/StoragePagePredicateTest.phpnew+57 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Predicate/VisibilityPredicateTest.phpnew+195 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Predicate/WorkspacePredicateTest.phpnew+43 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/EntityIdentityTest.phpnew+111 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/PersistenceManagerTest.php+24 −12
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/SessionTest.php+40 −20
- typo3/sysext/extbase/composer.json+1 −0
- composer.json+1 −0
- composer.lock+544 −13
Review log 35
-
Alexander Schnitzler uploaded patch set 1 10/08/26, 12:18
-
core-ci voted on patch set 1 V -1 10/08/26, 12:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110488
-
Alexander Schnitzler uploaded patch set 2
V -110/08/26, 12:39 -
Alexander Schnitzler commented on patch set 2 10/08/26, 12:41
The two failing tests are expected. ObservablePersistenceBehaviourTest::lazyUidToOneToTranslatableTargetInLanguageOneIsQueriedOnFirstAccessOnly (data sets on and mixed) pins today's Extbase behaviour. In language 1, a #[Lazy] to-one relation to a translatable record is not queried until its state is first accessed. In this PoC the relation is loaded eagerly in that case, so the test sees one query too many at load time. This is a known, accepted limitation, not a bug: - Why it happens: The Doctrine identity of an entity is the uid of the physically loaded row, which for a translation is the translation's uid. A Doctrine lazy object must be registered under its identity before it is loaded. For a translated target that uid is only known after the language overlay has run, so no lazy object can be created up front. - Where lazy loading still works: In the default language, in workspaces and for non-translatable targets, lazy to-one relations are real Doctrine lazy objects. - Why today's Extbase does not have this problem: It uses a native lazy proxy (newLazyProxy()) that creates the real object only after the overlay. Details: Breaking-110965-LazyToOneRelationsLoadedEagerly.rst -
core-ci voted on patch set 2 V -1 10/08/26, 12:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110491