Skip to content

Cleanup I*Config classes #12260

Closed
Closed

Description

@PVince81

So far we seem to have lots of classes and interfaces just to read the config, some legacy and some new.

We need to clean up this mess.

Here are a few:

  • IConfig
  • OC\Preferences
  • IAppConfig
  • OC_Config
  • OC_AppConfig

@icewind1991 which ones do we want to keep and which ones should go ?

Activity

  1. BernhardPosselt commented on Nov 18, 2014

    @BernhardPosselt
    Contributor

    You need to split the configs based on their dependencies:

    • You can always read the config/config.php
    • In order to read app and user values you need to first read the config/config.php

    ->

    • Keep IConfig as is and let it read all values but inject the class that is required to read and write the config/config.php into it so you can also set system values. getSystemValue and setSystemValue on the IConfig class just call through to the one that reads the config/config.php
    • Get rid of all the other stuff that makes sense

    @MorrisJobke

  2. self-assigned this
    on Nov 28, 2014
  3. MorrisJobke commented on Jan 28, 2015

    @MorrisJobke
    Contributor

    see also stuff like #13736 and #13104

  4. MorrisJobke commented on Feb 3, 2015

    @MorrisJobke
    Contributor

    Drop of OC_Preferences: #13869

  5. MorrisJobke commented on Feb 3, 2015

    @MorrisJobke
    Contributor

    Drop of \OC\Preferences #13870

  6. DeepDiver1975 commented on Feb 16, 2015

    @DeepDiver1975
    Contributor

    While reviewing #13938 I really wonder if IAppConfig shall die ❓

    It's an isolated and easy to use object.

  7. BernhardPosselt commented on Feb 16, 2015

    @BernhardPosselt
    Contributor

    Stuff that is only available in IAppConfig:

    • Delete all entries for an app
    • Delete a key

    The rest is code duplication. We might want to add those methods to the IConfig interface and then kill it, that is if those methods are actually used in our code

  8. MorrisJobke commented on Feb 16, 2015

    @MorrisJobke
    Contributor
  9. MorrisJobke commented on Feb 16, 2015

    @MorrisJobke
    Contributor

    @DeepDiver1975 We can also handle it all in IAppConfig, but we shouldn't provide two ways of doing this. Either in IConfig OR in IAppConfig.

  10. MorrisJobke commented on Feb 16, 2015

    @MorrisJobke
    Contributor

    The "or" is an exclusive one ;) Read it as an XOR ;)

  11. BernhardPosselt commented on Feb 16, 2015

    @BernhardPosselt
    Contributor

    IMHO makes no sense to put the setting of app config values in one class and the deletion of values in another class :)

  12. MorrisJobke commented on Feb 16, 2015

    @MorrisJobke
    Contributor

    IMHO makes no sense to put the setting of app config values in one class and the deletion of values in another class :)

    I moved all missing methods over to IConfig and deprecated IAppConfig with #13938 ;) The question here is if we want to do it in this way, or if we want the AppConfig be a separate interface, but then I would remove the methods from IConfig.

  13. BernhardPosselt commented on Feb 16, 2015

    @BernhardPosselt
    Contributor

    Separate interface makes only sense if we have the exact same signatures. That way we could keep backwards compatibility and let iconfig inherit from iappconfig.

  14. added this to the milestone on Apr 7, 2015
  15. ghost added this to the milestone on Sep 10, 2015
  16. ghost removed this from the milestone on Sep 10, 2015
  17. MorrisJobke commented on Jan 8, 2016

    @MorrisJobke
    Contributor

    Latest cleanups went into 9.0 -> closing

  18. removed their assignment
    on Jan 8, 2016
  19. removed their assignment
    on Jan 8, 2016
  20. lock commented on Aug 7, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  21. locked as resolved and limited conversation to collaborators on Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions