48047[TASK] Make driver registry TCA change cacheable
Commit message
Review
-
Code review CR +2
- Markus Klein +2
- Wouter Wolters +1
- Nicole Hummel +1
-
Verified V +2
- Markus Klein +2
- Nicole Hummel +1
Issues 1
Files 3
Review log 25
-
Helmut Hummel uploaded patch set 1 05/09/16, 17:54
-
Markus Klein commented on patch set 1 05/09/16, 18:24
-
Markus Klein commented on patch set 2 05/09/16, 18:24
Published edit on patch set 1. -
Helmut Hummel commented on patch set 1 05/09/16, 18:25
sys_file_storage.php:5Reply1. why? 2. what do you mean by "also not in an override" -
Helmut Hummel commented on patch set 2 05/09/16, 18:26
don't mind to remove the import, just be interested what the exact problem is with that -
Markus Klein commented on patch set 2 05/09/16, 18:29
If multiple overrides do that, we run into a PHP error that we can't "use" the same class twice. With "also not in an override" I mean that we officially forbid use statements in ext_tables/ext_localconf. -
Markus Klein commented on patch set 2 05/09/16, 18:32
Can we really do that change actually? If I consider an ext that adds a driver to $GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['registeredDrivers'], it will not be taken into account anymore, right? (core is loaded as the very first extension) -
Frans Saris commented on patch set 2 05/09/16, 18:41
Won't this break for every extension that calls registerDriverClass in ext_localconf? Or are the overrides loaded before ext_localconf? -
Helmut Hummel commented on patch set 2 05/09/16, 19:09
We have the following order in the bootstrap 1. bootstrap->configure() loads ext_localconf.php files of **ALL** extensions. ::registerDriverClass calls of *all* extensions will successfully register the drivers in TYPO3_CONF_VARS 2. bootstrap->loadExtensionTables() is called, which calls ExtensionManagementUtility::loadBaseTca(), which iterates over every extensions Configuration/TCA files **individually** and caches the resulting **TCA** array, **not** the code in Overrides. 1. https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/backend/Classes/Http/Application.php#L74 2. https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/Core/Bootstrap.php#L968-L970 -
Helmut Hummel commented on patch set 2 05/09/16, 19:10
> Won't this break for every extension that calls registerDriverClass in ext_localconf? By reading the explanation above: how would this break? > Or are the overrides loaded before ext_localconf? overrides are loaded **AFTER** ext_localconf,php files of extensions, and this is why it does not break anything. Or do I miss something here? -
Helmut Hummel commented on patch set 2 05/09/16, 19:13
> If multiple overrides do that, we run into a PHP error that we can't "use" the same class twice. That is wrong. The override files are included individually (if cache is empty) and never concatenated. > we officially forbid use statements in ext_tables/ext_localconf. yes, because these files are concatenated in the end, overrides are not To be honest, I don't care. I'm fine with having the rule to not import namespaces in TCA overrides files just to be consistent -
Frans Saris voted on patch set 2 CR +1 05/09/16, 19:31
-
Markus Klein commented on patch set 2 05/09/16, 19:51
"use" stmt: Okay right, I missed that those are not concat. So we can shorten that again of course. My mistake. If I think about that in general, I would even go one step further and put that very call into the bootstrap code where TCA is being built. FAL is a vital part anyway and the sysext:core is always loaded. There is no point of using an override just for that. What do you think? -
Wouter Wolters updated the commit message in patch set 3 05/10/16, 08:04
-
Nicole Hummel commented on patch set 3 CR +1 05/10/16, 09:42
DriverRegistry.php:90This can be removed because (new) drivers are needed in FE as well, am I right? -
Helmut Hummel commented on patch set 3 05/11/16, 15:05
DriverRegistry.php:90ReplyThis must be removed, to avoid inconsistent cache state, when fronted request is done first with empty caches -
Nicole Hummel voted on patch set 3 V +1 05/11/16, 17:35
-
Wouter Wolters voted on patch set 3 CR +1 05/11/16, 18:21
-
Markus Klein commented on patch set 3 05/11/16, 18:54
sys_file_storage.php:4Shouldn't we rather put this line directly into \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::buildBaseTcaFromSingleFiles()? -
Nicole Hummel commented on patch set 3 05/11/16, 19:16
sys_file_storage.php:4ReplyThis would prevent any other adaptation afterwards -
Markus Klein commented on patch set 3 CR +1 05/11/16, 22:45
sys_file_storage.php:4ReplyTrue, but do we want an adaption to happen at all? I mean you register a driver, but why on earth would you modify the generated TCA for the storage record? -
Helmut Hummel commented on patch set 3 05/18/16, 07:14
sys_file_storage.php:4ReplyNo matter wether you want to change that afterwards or not. when deciding for coupled vs decoupled, I'd always opt for decoupled -
Markus Klein voted on patch set 3 CR +2 V +2 05/18/16, 07:28
-
Gerrit merged patch set 3 05/18/16, 07:28
-
Markus Klein commented on patch set 4 05/18/16, 07:29
Cherry Picked This patchset was cherry picked to branch TYPO3_7-6 as commit fba1a39a1ad3206509ce83ff8c742b6851a82a3f
sys_file_storage.php:5