66899[FEATURE] Introduce API for the configuration module
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Oli Bartsch +1
-
Verified V +2 Done
- Christian Kuhn +2
- Oli Bartsch +1
- TYPO3com +1 CI
Issues 1
Files 22
- typo3/sysext/core/Documentation/Changelog/master/Feature-92929-ExtendableConfigurationModule.rst2new+148 −0
- typo3/sysext/core/Tests/Acceptance/Backend/ConfigurationModule/ConfigurationModuleProviderCest.phpnew+69 −0
- typo3/sysext/core/Tests/Acceptance/Support/Extension/BackendCoreEnvironment.php+1 −0
- typo3/sysext/form/Classes/ConfigurationModuleProvider/FormYamlProvider.phpnew+68 −0
- typo3/sysext/form/Configuration/Services.yaml+7 −0
- typo3/sysext/form/Resources/Private/Language/locallang.xlf+4 −0
- typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/AbstractProvider.phpnew+56 −0
- typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/BackendRoutesProvider.phpnew+44 −0
- typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/BackendUserSettingsProvider.phpnew+33 −0
- typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/BackendUserTsConfigProvider.phpnew+36 −0
- typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/EventListenersProvider.phpnew+35 −0
- typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/GlobalVariableProvider.php3new+103 −0
- typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/HttpMiddlewareStackProvider.phpnew+41 −0
- typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/ProviderInterface.phpnew+57 −0
- typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/ProviderRegistry.phpnew+58 −0
- typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/SiteConfigurationProvider.phpnew+38 −0
- typo3/sysext/lowlevel/Classes/Controller/ConfigurationController.php2+39 −235
- typo3/sysext/lowlevel/Classes/DependencyInjection/ConfigurationModuleProviderPass.phpnew+75 −0
- typo3/sysext/lowlevel/Classes/ServiceProvider.php+6 −1
- typo3/sysext/lowlevel/Configuration/Services.phpnew+14 −0
Review log 2943
Show 1218 earlier messages
-
Sebastian Michaelsen uploaded patch set 1 11/25/20, 14:40
-
TYPO3com voted on patch set 1 V -1 11/25/20, 14:53 Completed build in 12m 32s on Wed, 25 Nov, 02:53 PM Test Summary: 32394 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7571
-
Sebastian Michaelsen uploaded patch set 2 11/25/20, 15:11
-
Mathias Brodala commented on patch set 2 11/25/20, 15:21
I like the idea in general.ConfigurationTreeProviderInterface.php:20This can be skipped, providers do not need to worry about the specific rendering. Also this could be used in other locations without tree rendering.ConfigurationTreeProviderInterface.php:26No need to repeat the return type here. ;-)ConfigurationTreeProviderInterface.php:28Given this is a boolean it should say "sortKeys". But then again: why not leave this up to the provider? -
TYPO3com voted on patch set 2 V +1 11/25/20, 15:26 Completed build in 14m 36s on Wed, 25 Nov, 03:26 PM Test Summary: 32394 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7573
-
Sebastian Michaelsen uploaded patch set 3 11/25/20, 15:44
-
TYPO3com voted on patch set 3 V -1 11/25/20, 15:44 Completed build in 24s on Wed, 25 Nov, 03:44 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7574
-
Sebastian Michaelsen commented on patch set 3 11/25/20, 15:45
ConfigurationTreeProviderInterface.php:20ReplyYou're right that the providers are independent from the rendering. I just felt that ConfigurationProviderInterface is a very generic name.ConfigurationTreeProviderInterface.php:26ReplyAckConfigurationTreeProviderInterface.php:28ReplyYou're right. I removed the sorting feature from the interface. The providers now sort the data them themselves if applicable. -
Mathias Brodala commented on patch set 3 CR -1 11/25/20, 15:54
Please drop the "Tree" from the class names as discussed. :-)ConfigurationTreeProviderInterface.php:20Reply UnresolvedI think that's fine, that's what the namespace is there for. -
Oli Bartsch commented on patch set 3 11/25/20, 15:56
ConfigurationController.php:57This could heavily simplified using ServiceContainer and DI. So we don't have to use makeInstance by providing the Containe, get rid of the superglobals. This would also align the registration process according to latest introductions like the dashboard and allows better handling of the registered "providers". Thinking about it, there IMO two ways this could be achieved: 1. Leaving the configuration in the implementation classes - the providers, we could simply tag all classes which implement ConfigurationTreeProviderInterface and then register them in a registry through a CompilerPass. 2. Moving the configuration in a Services.(yaml|php) and manually tag all services there. The registration process then would be the same as in (1.) You can have a look at ext:extensionmanager which does exactly this kind of registration: - All "remotes" are defined in Services.yaml and tagged with "extension.remote". - In Services.php a compiler pass is registered for this tag - The compiler pass fetches the service definition for the tag and calls the "registerRemote" method of the "RemoteRegistry" which "registers" the given services. - The "RemoteRegistry" is just a simple storage object for all corresponding services and their configuration and provides multiple function (has, get, getAll, ..) to retrieve the registered services Please ping me on slack if you have any questions regarding this. -
Oli Bartsch commented on patch set 3 11/25/20, 15:59
ConfigurationController.php:57Reply UnresolvedYou can also have a look at the RST, explaining the registration for 3rd party: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/master/Feature-92457-ImprovedExtensionRepositoryAPI.html -
Oli Bartsch uploaded patch set 4 11/25/20, 23:22
-
TYPO3com voted on patch set 4 V -1 11/25/20, 23:23 Completed build in 21s on Wed, 25 Nov, 11:23 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7583
-
Oli Bartsch uploaded patch set 5 11/25/20, 23:29
-
Oli Bartsch uploaded patch set 6 11/25/20, 23:37
-
TYPO3com voted on patch set 5 V -1 11/25/20, 23:41 Completed build in 11m 04s on Wed, 25 Nov, 11:41 PM Test Summary: 32394 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7584
-
TYPO3com voted on patch set 6 V -1 11/25/20, 23:49 Completed build in 12m 27s on Wed, 25 Nov, 11:49 PM Test Summary: 32394 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7585
-
Oli Bartsch commented on patch set 6 V -1 11/25/20, 23:56
I just changed the registration method without touching the class structure in the first place. This however still needs some more adjustments which include the way the providers are implemented. There are now a lot of classes with empty body. Since they all do the same with just another identifier and another global variable key, this could be one class with multiple tags assigned (same tag name but other attributes). Similar to how multiple event listeners are registered for the same class. This class could then a $identifer and $configuration property. First is simply filled with the "identifier" attribute and the second with the array of the defined global variable. The providers which generate the configuration array themselves (e.g. SiteConfigurationProvider), using other services, could be register the same way but with an additional attribute (name tbd) which calls the assigned "implementation" class which just fills the $configuration property with a custom $configurationArray. So there will be less classes and the registration will even be more simplified. Second topic to think about are the "labels". We should try to remove them since they just duplicate the identifier. This would mean we either use the identifier and change the locallang keys, or we use the current label as new identifier. Therefore, a UpgradeWizard needs to fix the UC since the identifier is stored there.
-
Oli Bartsch uploaded patch set 7 11/27/20, 15:04
-
TYPO3com voted on patch set 7 V -1 11/27/20, 15:16 Completed build in 11m 26s on Fri, 27 Nov, 03:16 PM Test Summary: 32394 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7648
-
Oli Bartsch uploaded patch set 8 11/27/20, 15:26
-
TYPO3com voted on patch set 8 V +1 11/27/20, 15:37 Completed build in 11m 09s on Fri, 27 Nov, 03:37 PM Test Summary: 32394 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7650
-
Oli Bartsch uploaded patch set 9 11/27/20, 17:53
-
TYPO3com voted on patch set 9 V +1 11/27/20, 18:05 Completed build in 11m 23s on Fri, 27 Nov, 06:05 PM Test Summary: 32394 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7653
-
Oli Bartsch uploaded patch set 10 11/27/20, 18:17
-
TYPO3com voted on patch set 10 V +1 11/27/20, 18:28 Completed build in 10m 43s on Fri, 27 Nov, 06:28 PM Test Summary: 32394 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7655
-
Daniel Haupt uploaded patch set 11 11/27/20, 21:55
-
TYPO3com voted on patch set 11 V +1 11/27/20, 22:06 Completed build in 10m 59s on Fri, 27 Nov, 10:06 PM Test Summary: 32394 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7658
-
Oli Bartsch uploaded patch set 12 11/30/20, 09:21
-
TYPO3com voted on patch set 12 V +1 11/30/20, 09:33 Completed build in 11m 48s on Mon, 30 Nov, 09:33 AM Test Summary: 32404 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7691
-
Christian Kuhn commented on patch set 12 11/30/20, 10:03
Feature-92929-ExtendableConfigurationModule.rst:12it should be mentioned the backend 'Configuration' module is provided by the lowlevel extension.GlobalVariableProvider.php:70since the missing key would indicate a programmer error and not a user error, a generic top level exception that should never be caught should be thrown.Services.yaml:53since 'configuration' is such a generic term, it might be better to use 'configurationModule' ?Services.yaml:54similar here - maybe a better naming could be 'configurationModuleProvider' ?Services.yaml:56and here ;) -
Oli Bartsch commented on patch set 12 V -1 11/30/20, 12:00
On it -
Oli Bartsch uploaded patch set 13 11/30/20, 13:49
-
Oli Bartsch uploaded patch set 14 11/30/20, 13:56
-
Oli Bartsch commented on patch set 14 11/30/20, 13:57
Feature-92929-ExtendableConfigurationModule.rst:12ReplyDoneGlobalVariableProvider.php:70ReplyDoneServices.yaml:53ReplyDoneServices.yaml:54ReplyDoneServices.yaml:56ReplyDone -
TYPO3com voted on patch set 13 V +1 11/30/20, 14:00 Completed build in 11m 37s on Mon, 30 Nov, 02:00 PM Test Summary: 32405 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7699
-
TYPO3com voted on patch set 14 V +1 11/30/20, 14:07 Completed build in 11m 03s on Mon, 30 Nov, 02:07 PM Test Summary: 32405 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7700
-
Mathias Brodala commented on patch set 14 11/30/20, 14:43
GlobalVariableProvider.php:69I think referring to DI "tags" as attributes here will increase confusion so there should either be a well-documented encapsulation or a straightforward mention of DI "tags". -
Oli Bartsch commented on patch set 14 11/30/20, 15:05
GlobalVariableProvider.php:69ReplyThat's actually the correct term. It's an attribute of a service tag (See: https://symfony.com/doc/current/service_container/tags.html). This does not relate to DI in the first place. The need for those tag attributes is therefore mentioned in the rst. -
Mathias Brodala commented on patch set 14 11/30/20, 15:18
GlobalVariableProvider.php:69ReplyAh indeed. I missed that these attributes are set on the lone tag required for this change. That clears it up. :-) -
Oli Bartsch voted on patch set 14 V +1 CR +1 12/01/20, 14:26
-
Christian Kuhn voted on patch set 14 V +2 CR +2 12/01/20, 14:27
-
Christian Kuhn merged patch set 15 12/01/20, 14:27