Bug #62301

ConfigurationManager setters make system unstable

Added by Lukas Rüegg over 5 years ago. Updated almost 5 years ago.

Status:
Rejected
Priority:
Won't have this time
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-10-17
Due date:
% Done:

0%

TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

We are slowly moving our projects from LTS 4.5 to LTS 6.2 and one of the issues we recently encountered is the usage of the configuration manager's (\TYPO3\CMS\Core\Configuration\ConfigurationManager) setters (setLocalConfigurationValueByPath & setLocalConfigurationValuesByPathValuePairs). Based on the "What's new" documentation for TYPO3 6.0 (http://typo3.org/download/release-notes/whats-new/) I was under the impression that using the configuration manager's getter/setters was the "new" way to do things. However, any attempt to use these methods quickly runs into

( ! ) Catchable fatal error: Argument 1 passed to TYPO3\CMS\Core\Utility\ArrayUtility::setValueByPath() must be an array

It turns out that the setter's failure to implement any kind of locking introduces a race condition which apparently cannot be fixed (@see Markus Klein's comment https://forge.typo3.org/issues/60294#note-13).

This all begs the question, why this method is available at all. What is the purpose of providing (and documenting) an API method which introduces a known issue and makes the system unstable?


Related issues

Related to TYPO3 Core - Bug #60294: If a local file storage is outside the document root, images are sometimes not shown if multiple images are on a page. Closed 2014-07-13
Related to TYPO3 Core - Bug #60650: ConfigurationManager::getConfigurationValueByPath ignores AdditionalConfiguration.php Closed 2014-07-29

History

#1 Updated by Christian Kuhn about 5 years ago

  • Status changed from New to Needs Feedback

Hey Simon. I have the strong feeling you're misusing this API. The ConfigurationManager class is used to take care of LocalConfiguration file and friends. It is not meant to be called in a plugin on a regular basis (eg. in ext_tables or ext_localconf), since this would always trigger a rewrite of those files - and you definitely don't want this.

The ConfigurationManager class is for configuration management & changing only, so there shouldn't be any regular call by extensions or your setup during production use.

I wonder what you wanted to achieve in the first place?

#2 Updated by Anja Leichsenring almost 5 years ago

  • Status changed from Needs Feedback to Rejected
  • Priority changed from Must have to Won't have this time

Most probably no bug, but user based API misuse. I close this ticket after three month without feedback.

Also available in: Atom PDF