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
Remove UserSettings Plugin #7846
Conversation
c8cbb17
to
688bfb7
Compare
{ | ||
public function doUpdate(Updater $updater) | ||
{ | ||
$this->uninstallPlugin('UserSettings'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: I added a test in DeprecatedMethodsTest
and a comment:
// please be aware if re-adding a plugin called UserSettings, and someone updates eg from Piwik 2.13 to that version,
// the plugin will be possibly removed in an Update during 2.14.0
Looks good to me |
Will remove it and see what happens. I saw this one as well and was confused |
@@ -1191,6 +1191,8 @@ private function executePluginDeactivate($pluginName) | |||
*/ | |||
private function unloadPluginFromMemory($pluginName) | |||
{ | |||
$this->unloadPlugin($pluginName); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why there is unloadPluginFromMemory()
and unloadPlugin()
and why one calls the other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I don't understand the question. UnloadPluginFromMemory did before only remove the activated plugin, now it does actually remove the loaded and the activated plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> why are there 2 methods that look like they do the same thing? Is there a difference between them? From the name it's hard to tell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plugin::uninstall
is more or less meant as a hook where plugins can remove eg created files, DB tables/data etc in case the plugin gets uninstalled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering about Plugin\Manager::unloadPluginFromMemory()
and Plugin\Manager::unloadPlugin()
(both in the plugin manager)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realize it was re unloadPluginFromMemory
... well, I can have a look if there's maybe a better name that makes it clearer. The name was already there...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep no worries this small change just made me see there were those 2 methods so I was curious
👍 for merge (need a rebase) |
As the plugin does now nothing anymore, I removed it.
10f4e08
to
6bc52ad
Compare
The UserSettings API was deprecated in 2.9.0, 2.10.0 and 2.11.0
After removing all the deprecated methods, the plugin did nothing anymore so I removed it.