Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSR-2 refactoring for config plugin #2382

Merged
merged 46 commits into from Jun 15, 2018
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c6639e6
start of refactoring the config plugin
splitbrain May 11, 2018
e063bab
moved php parser to it's own file
splitbrain May 11, 2018
6850fd4
created a configuration Loader class
splitbrain May 11, 2018
8ea5685
moved the whole settings class mechanism to it's own class
splitbrain May 11, 2018
5a38a12
added Writer class for saving the config back to file
splitbrain May 11, 2018
077c27b
adjusted basic loading saving in admin
splitbrain May 11, 2018
5675a07
moved language loading to the loader
splitbrain May 12, 2018
a017dff
introduce getType for Settings
splitbrain May 12, 2018
5c17d2d
first go over the settings classes for PSR-2
splitbrain May 12, 2018
a1ef8b4
PSR2 adjustments for admin class
splitbrain May 12, 2018
edba97f
fixed the minimal tests we have
splitbrain May 12, 2018
de33cda
Merge branch 'psr2' into psr2-config
splitbrain May 18, 2018
be1cc9a
replaced ptln() with echo
splitbrain May 18, 2018
0a5b05e
Moved settings to their own namespace
splitbrain May 18, 2018
70b28bc
check for opcache function before using it
splitbrain May 18, 2018
1c0be3e
reset config directory for every test
splitbrain May 18, 2018
d7e6f39
Merge branch 'testinit' into psr2-config
splitbrain May 18, 2018
eb1b595
basic test for the Writer class
splitbrain May 18, 2018
e98b5e4
sucess is green
splitbrain May 18, 2018
5d703e3
Also allow test files ending in Test.php
splitbrain May 20, 2018
f00299d
extract save checking into own method
splitbrain May 20, 2018
af40dea
proper defaults for initialize
splitbrain May 20, 2018
98a151b
Some first Setting class tests
splitbrain May 20, 2018
c73b800
some more tests on the output mechanism
splitbrain May 20, 2018
91109d5
Fixed some bugs in the Loader and added tests
splitbrain May 25, 2018
303ffdf
Merge branch 'psr2' into psr2-config
splitbrain May 25, 2018
d6fc72e
fix language and TOC handling
splitbrain May 25, 2018
6dd8fd8
some more testing
splitbrain May 25, 2018
28cc4f4
make the onoff setting more boolean
splitbrain May 25, 2018
d6987bd
fixed updateSettings iteration
splitbrain May 25, 2018
e901cf7
make abstract test abstract again
splitbrain May 25, 2018
8356fe6
improve update() comments
Chris--S May 25, 2018
5f43ccc
Merge pull request #2404 from splitbrain/psr2-config-update-comments
splitbrain May 25, 2018
f37fd93
fix numericopt setting
splitbrain May 25, 2018
53f3816
do not drop undefined settings when saving the configuration
splitbrain May 25, 2018
80302b1
readd PLUGIN_CONFIG_PLUGINLIST event
splitbrain May 25, 2018
3b223df
pass correct array in event
splitbrain May 26, 2018
13b5250
removed constructor parameters we never use
splitbrain May 26, 2018
4667676
clean settings data
splitbrain Jun 1, 2018
fbe5f61
removed fixme that had been fixed
splitbrain Jun 1, 2018
e729604
make undefined settings output work again
splitbrain Jun 1, 2018
7a0ee53
show other errors in undefined settings again
splitbrain Jun 1, 2018
b71f246
an empty class is valid, only truly no class is bad
splitbrain Jun 1, 2018
f74addc
remove support for _cautionList
splitbrain Jun 1, 2018
a6e1db4
fallback classes for plugins inheriting from old settings classes
splitbrain Jun 1, 2018
f8dcd5b
do not initialize the configuration in constructor
splitbrain Jun 1, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/plugins/config/core/Loader.php
Expand Up @@ -20,12 +20,15 @@ class Loader {
/**
* Loader constructor.
* @param ConfigParser $parser
* @triggers PLUGIN_CONFIG_PLUGINLIST
*/
public function __construct(ConfigParser $parser) {
global $conf;
$this->parser = $parser;
$this->plugins = plugin_list();
$this->template = $conf['template'];
// allow plugins to remove configurable plugins
trigger_event('PLUGIN_CONFIG_PLUGINLIST', $list);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like that $list is not defined already or used further in this function

}

/**
Expand Down