72469[!!!][TASK] Remove extbase ObjectManager
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Stefan Bürk +1
-
Verified V +2 Done
- Benni Mack +2
- Stefan Bürk +1
- core-ci +1 CI
Issues 7
- Task #96208Remove extbase ObjectManager
- Task #94377Deprecate extbase ObjectManager->getEmptyObject()
- Task #94370Avoid ObjectManager in ext:form FormRuntime
- Task #94317Avoid ObjectManager around ext:form FormDefinition
- Task #94619Deprecate extbase ObjectManager
- Task #94451Avoid ObjectManager in ext:extbase
- Task #90803Mark ObjectManager::get deprecated
Files 115
- typo3/sysext/belog/Tests/Unit/Domain/Repository/LogEntryRepositoryTest.php+0 −5
- typo3/sysext/belog/Tests/Unit/Domain/Repository/WorkspaceRepositoryTest.php+0 −5
- typo3/sysext/beuser/Tests/Unit/Domain/Repository/BackendUserRepositoryTest.php+1 −6
- typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96107-DeprecatedFunctionalityRemoved.rst+15 −0
- typo3/sysext/core/composer.json+0 −1
- typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php+0 −21
- typo3/sysext/extbase/Classes/Mvc/View/GenericViewResolver.php+1 −9
- typo3/sysext/extbase/Classes/Mvc/Dispatcher.php3+1 −17
- typo3/sysext/extbase/Classes/Object/Container/Exception/UnknownObjectException.phpdeleted+0 −29
- typo3/sysext/extbase/Classes/Object/Container/Container.php5deleted+0 −353
- typo3/sysext/extbase/Classes/Object/Exception/CannotBuildObjectException.phpdeleted+0 −29
- typo3/sysext/extbase/Classes/Object/Exception/CannotReconstituteObjectException.phpdeleted+0 −29
- typo3/sysext/extbase/Classes/Object/Exception.phpdeleted+0 −29
- typo3/sysext/extbase/Classes/Object/ObjectManager.phpdeleted+0 −139
- typo3/sysext/extbase/Classes/Object/ObjectManagerInterface.phpdeleted+0 −54
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php+4 −12
- typo3/sysext/extbase/Classes/Persistence/Generic/Query.php+3 −15
- typo3/sysext/extbase/Classes/Persistence/Generic/QueryFactory.php+1 −9
- typo3/sysext/extbase/Classes/Persistence/Generic/QueryResult.php+1 −3
- typo3/sysext/extbase/Classes/Persistence/Generic/Session.php+2 −9
Show 95 more files
- typo3/sysext/extbase/Classes/Persistence/ForwardCompatibleQueryInterface.phpdeleted+0 −27
- typo3/sysext/extbase/Classes/Persistence/ForwardCompatibleQueryResultInterface.phpdeleted+0 −27
- typo3/sysext/extbase/Classes/Persistence/QueryInterface.php+1 −3
- typo3/sysext/extbase/Classes/Persistence/QueryResultInterface.php+1 −4
- typo3/sysext/extbase/Classes/Persistence/Repository.php+1 −12
- typo3/sysext/extbase/Classes/Property/TypeConverter/AbstractTypeConverter.php+0 −17
- typo3/sysext/extbase/Classes/Property/TypeConverter/ObjectConverter.php+10 −43
- typo3/sysext/extbase/Classes/Property/TypeConverter/PersistentObjectConverter.php+2 −3
- typo3/sysext/extbase/Classes/Property/PropertyMapper.php+1 −9
- typo3/sysext/extbase/Classes/Utility/DebuggerUtility.php+0 −3
- typo3/sysext/extbase/Classes/ServiceProvider.php+0 −20
- typo3/sysext/extbase/Configuration/Services.php+0 −25
- typo3/sysext/extbase/Configuration/Services.yaml+0 −4
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Person.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Tag.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/a/Classes/Domain/Model/A.phpdeleted+0 −47
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/a/Classes/Domain/Repository/ARepository.phpdeleted+0 −24
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/a/Configuration/TCA/tx_a_domain_model_a.phpdeleted+0 −25
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/a/Configuration/Services.yamldeleted+0 −11
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/a/ext_emconf.phpdeleted+0 −23
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/a/ext_tables.sqldeleted+0 −14
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/b/Classes/Domain/Model/B.phpdeleted+0 −47
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/b/Classes/Domain/Repository/BRepository.phpdeleted+0 −24
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/b/Configuration/Extbase/Persistence/Classes.phpdeleted+0 −9
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/b/Configuration/TCA/Overrides/tx_a_domain_model_a.phpdeleted+0 −21
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/b/ext_emconf.phpdeleted+0 −23
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/b/ext_localconf.phpdeleted+0 −16
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/b/ext_tables.sqldeleted+0 −6
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/b/tx_a_domain_model_a.csvdeleted+0 −3
- typo3/sysext/extbase/Tests/Functional/Persistence/ImplementationClassNameTest.phpdeleted+0 −66
- typo3/sysext/extbase/Tests/FunctionalDeprecated/Object/Fixtures/Test.phpdeleted+0 −29
- typo3/sysext/extbase/Tests/FunctionalDeprecated/Object/ObjectManagerTest.phpdeleted+0 −38
- typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php+0 −2
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_prototype.phpdeleted+0 −20
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_prototypeNeedsPrototype.phpdeleted+0 −29
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_prototypeNeedsPrototypeInConstructor.phpdeleted+0 −27
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_prototypeNeedsSingleton.phpdeleted+0 −29
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_prototypeNeedsSingletonInConstructor.phpdeleted+0 −27
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_singleton.phpdeleted+0 −22
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_singletonNeedsPrototype.phpdeleted+0 −31
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_singletonNeedsPrototypeInConstructor.phpdeleted+0 −29
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_singletonNeedsSingleton.phpdeleted+0 −31
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_singletonNeedsSingletonInConstructor.phpdeleted+0 −29
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_a.phpdeleted+0 −35
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_amixed_array.phpdeleted+0 −38
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_amixed_array_singleton.phpdeleted+0 −40
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_amixed_null.phpdeleted+0 −42
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_b.phpdeleted+0 −34
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_b_child.phpdeleted+0 −23
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_b_child_someimplementation.phpdeleted+0 −23
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_c.phpdeleted+0 −25
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_class_with_injectsettings.phpdeleted+0 −40
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_cyclic1.phpdeleted+0 −29
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_cyclic1WithSetterDependency.phpdeleted+0 −26
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_cyclic2.phpdeleted+0 −26
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_cyclic2WithSetterDependency.phpdeleted+0 −26
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_initializable.phpdeleted+0 −42
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_injectmethods.phpdeleted+0 −42
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_injectsettings.phpdeleted+0 −32
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_needsinterface.phpdeleted+0 −30
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_resolveablecyclic1.phpdeleted+0 −31
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_resolveablecyclic2.phpdeleted+0 −40
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_resolveablecyclic3.phpdeleted+0 −31
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_serializable.phpdeleted+0 −39
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_singleton.phpdeleted+0 −25
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_someimplementation.phpdeleted+0 −23
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/testclasses/t3lib_object_tests_someinterface.phpdeleted+0 −22
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/ContainerConstructorInjectionTestFixtures.phpdeleted+0 −135
- typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/NamespacedClass.phpdeleted+0 −25
- typo3/sysext/extbase/Tests/Unit/Object/Container/ContainerTest.phpdeleted+0 −972
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapperTest.php+1 −9
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/PersistenceManagerTest.php+2 −15
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryFactoryTest.php+1 −2
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryTest.php+0 −1
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/SessionTest.php+10 −19
- typo3/sysext/extbase/Tests/Unit/Persistence/RepositoryTest.php+3 −17
- typo3/sysext/extbase/Tests/UnitDeprecated/Object/Container/Fixtures/ContainerPropertyInjectionTestClasses.phpdeleted+0 −48
- typo3/sysext/extbase/Tests/UnitDeprecated/Object/Container/ContainerTest.phpdeleted+0 −86
- typo3/sysext/extensionmanager/Tests/Unit/Utility/DependencyUtilityTest.php+2 −20
- typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php+0 −1
- typo3/sysext/fluid/Classes/Core/Rendering/RenderingContextFactory.php+2 −13
- typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperResolver.php+2 −17
- typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperResolverFactory.php+2 −7
- typo3/sysext/fluid/Classes/ServiceProvider.php+0 −3
- typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ViewHelperResolverTest.php+0 −2
- typo3/sysext/form/Classes/Domain/Finishers/AbstractFinisher.php+2 −34
- typo3/sysext/form/Classes/Domain/Finishers/FinisherInterface.php+1 −2
- typo3/sysext/form/Classes/Domain/Model/FormDefinition.php+5 −43
- typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php+1 −12
- typo3/sysext/form/Classes/ViewHelpers/RenderViewHelper.php+2 −10
- typo3/sysext/form/Tests/Unit/Domain/Runtime/FormRuntimeTest.php+0 −1
- typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php+7 −0
- typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php+1 −0
- composer.json+0 −6
- composer.lock+70 −70
Review log 1825
-
Christian Kuhn uploaded patch set 1 12/02/21, 18:19
-
Christian Kuhn uploaded patch set 2 12/02/21, 18:24
-
core-ci voted on patch set 1 V -1 12/02/21, 18:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20431
-
core-ci voted on patch set 2 V -1 12/02/21, 18:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20432
-
Christian Kuhn uploaded patch set 3 12/02/21, 18:54
-
core-ci voted on patch set 3 V -1 12/02/21, 19:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20433
-
Christian Kuhn uploaded patch set 4 12/02/21, 19:11
-
Christian Kuhn uploaded patch set 5 12/02/21, 19:13
-
core-ci voted on patch set 4 V -1 12/02/21, 19:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20434
-
core-ci voted on patch set 5 V +1 12/02/21, 19:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20435
-
Christian Kuhn uploaded patch set 6 12/02/21, 19:33
-
Christian Kuhn uploaded patch set 7 12/02/21, 19:37
-
core-ci voted on patch set 6 V +1 12/02/21, 19:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20437
-
core-ci voted on patch set 7 V +1 12/02/21, 19:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20438
-
Stefan Bürk voted on patch set 7 V +1 CR +1 12/02/21, 21:22
-
Oli Bartsch commented on patch set 7 12/02/21, 21:30
-
Christian Kuhn commented on patch set 7 12/02/21, 23:19
Dispatcher.php:132ReplyYes. By design: If your Services.yaml file does not provide it, you get a deprecation not in v11 due to the OM fallback. In v12 it fails hard. There are similar things in other places, and it's exactly how it should be. Did I miss something? -
Christian Kuhn commented on patch set 7 12/02/21, 23:21
Dispatcher.php:132ReplyWe *could* throw some dedicated exception "please configure appropriate Services.yaml", but there is little point in doing so since the exception is relatively clear alreaody, and we're not doing similar things at many other places, either. -
Alexander Schnitzler commented on patch set 7 12/03/21, 08:12
Container.php:272What is the alternative to this method and getImplementationClassName()? -
Christian Kuhn commented on patch set 7 12/03/21, 10:41
Container.php:272Replysymfony DI / xclass -
Benni Mack commented on patch set 7 V +1 CR +1 12/03/21, 12:15
Container.php:272ReplyI also agree "getImplementationClassName()" is actually a ugly and hackish "DI" concept, where e.g. "Interface" is removed automatically etc. This is already solved with `"alias" in Services.yaml. -
Benni Mack voted on patch set 7 V +2 CR +2 12/03/21, 14:02
-
Benni Mack merged patch set 8 12/03/21, 14:02
-
Alexander Schnitzler commented on patch set 8 12/06/21, 07:52
Container.php:272ReplyI agree it was hackish before. The question is: Do we want to tell users to use a DI alias. As models aren't services but prototypes we wouldn't want extbase to ask the container here but just rely on the XClass mechanics of makeInstance() I suppose. What I am simply missing is what we are going to tell users that extend other extensions. Do we have a solution? Do we recommend extensions like extender? Do we want to come up with something new? I see the whole test suite that checks override logic has been deleted as well. I see it makes sense in the regard that we drop the whole functionality but I am not sure yet if that is a good idea. -
Christian Kuhn commented on patch set 8 12/06/21, 14:53
Container.php:272Replyxclass'ing is basically a drop-in replacement here: It carries the same drawbacks as registerImplementation() and in the end does the same - a different class in used. Regarding extender: We had the discussion a couple of years ago and were about to add something like that. In retrospective, I'm honestly very thankful we didn't add 'mixin' functionality to the core. The couple of extensions like maybe ext:news can decide to use that on their own and then have to manage all the problematic side effects.
Dispatcher.php:132