aboutsummaryrefslogtreecommitdiff
path: root/app/Models/UserConfiguration.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-04-07 12:40:43 +0200
committerGravatar GitHub <noreply@github.com> 2023-04-07 12:40:43 +0200
commitdbbae15a8458679db0f4540dacdbdcff9c02ec8c (patch)
tree19d84d19660d3aa8e616f75d5c6eafba99679e1c /app/Models/UserConfiguration.php
parentd23d10bcde1a9b86c784d58b891f61e740e0124e (diff)
Remove ConfigurationSetter (#5251)
This class has not been maintained for a while. Only a subset of our configuration properties are there, and some code is not relevant anymore. Furthermore, it is relying exclusively on dynamically invoked functions, making it challenging to maintain, in particular to find out what is used and what is not, what is handled and what is not. It is not well suited for changes in data formats, which have been handled in the Context class instead. It is also not able to handle configuration properties that are missing. It is the class with most errors for PHPStan level 6 (179 errors). It is also making intense use of is_callable and call_user_func_array, which are performance killers. Should the need arrise again to perform validation of our internal configuration files, I suggest an implementation with the opposite approach, namely driven by our code instead of driven by the data. In summary, at the moment, this class is costly, while not offering many guarantees.
Diffstat (limited to 'app/Models/UserConfiguration.php')
-rw-r--r--app/Models/UserConfiguration.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/Models/UserConfiguration.php b/app/Models/UserConfiguration.php
index 9a77c4761..df19d95e7 100644
--- a/app/Models/UserConfiguration.php
+++ b/app/Models/UserConfiguration.php
@@ -71,9 +71,8 @@
*/
final class FreshRSS_UserConfiguration extends Minz_Configuration {
- public static function init(string $config_filename, ?string $default_filename = null,
- ?FreshRSS_ConfigurationSetter $configuration_setter = null): FreshRSS_UserConfiguration {
- parent::register('user', $config_filename, $default_filename, $configuration_setter);
+ public static function init(string $config_filename, ?string $default_filename = null): FreshRSS_UserConfiguration {
+ parent::register('user', $config_filename, $default_filename);
return parent::get('user');
}
}