diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2019-10-11 06:35:50 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2019-10-11 06:35:50 +0300 |
commit | 39aeb35ae1d2159a473c88c53a5cb4787a64c444 (patch) | |
tree | 55e559f2d82804e712b66996719c9f35e2e0d5df | |
parent | da92367838fa85b806dfd2486b6e91c308cb5e46 (diff) |
Don't enable example plugins by default so we can remove them from the release (#14991)
* trying to remove example plugins
* remove example plugins on next update
* fix screenshot test
-rwxr-xr-x | config/global.ini.php | 2 | ||||
-rw-r--r-- | core/Application/Kernel/PluginList.php | 2 | ||||
-rw-r--r-- | core/Updates/3.12.0-b7.php | 46 | ||||
-rw-r--r-- | tests/PHPUnit/Framework/TestingEnvironmentManipulator.php | 2 | ||||
-rw-r--r-- | tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png | 4 |
5 files changed, 52 insertions, 4 deletions
diff --git a/config/global.ini.php b/config/global.ini.php index 6dfb458b5e..1d6c02eb8a 100755 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -959,7 +959,6 @@ Plugins[] = Diagnostics Plugins[] = CoreVisualizations Plugins[] = Proxy Plugins[] = API -Plugins[] = ExamplePlugin Plugins[] = Widgetize Plugins[] = Transitions Plugins[] = LanguagesManager @@ -979,7 +978,6 @@ Plugins[] = VisitsSummary Plugins[] = VisitFrequency Plugins[] = VisitTime Plugins[] = VisitorInterest -Plugins[] = ExampleAPI Plugins[] = RssWidget Plugins[] = Feedback Plugins[] = Monolog diff --git a/core/Application/Kernel/PluginList.php b/core/Application/Kernel/PluginList.php index dbab86e3bd..e3275c2c84 100644 --- a/core/Application/Kernel/PluginList.php +++ b/core/Application/Kernel/PluginList.php @@ -33,6 +33,7 @@ class PluginList */ private $corePluginsDisabledByDefault = array( 'DBStats', + 'ExamplePlugin', 'ExampleCommand', 'ExampleSettingsPlugin', 'ExampleUI', @@ -41,6 +42,7 @@ class PluginList 'ExampleTracker', 'ExampleLogTables', 'ExampleReport', + 'ExampleAPI', 'MobileAppMeasurable', 'Provider', 'TagManager' diff --git a/core/Updates/3.12.0-b7.php b/core/Updates/3.12.0-b7.php new file mode 100644 index 0000000000..f5b4bf8fb8 --- /dev/null +++ b/core/Updates/3.12.0-b7.php @@ -0,0 +1,46 @@ +<?php +/** + * Piwik - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ + +namespace Piwik\Updates; + +use Piwik\Updater; +use Piwik\Updates as PiwikUpdates; +use Piwik\Updater\Migration\Factory as MigrationFactory; + +/** + * Update for version 3.12.0-b7. + */ +class Updates_3_12_0_b7 extends PiwikUpdates +{ + /** + * @var MigrationFactory + */ + private $migration; + + public function __construct(MigrationFactory $factory) + { + $this->migration = $factory; + } + + public function getMigrations(Updater $updater) + { + $migration1 = $this->migration->plugin->deactivate('ExamplePlugin'); + $migration2 = $this->migration->plugin->deactivate('ExampleAPI'); + + return array( + $migration1, + $migration2, + ); + } + + public function doUpdate(Updater $updater) + { + $updater->executeMigrations(__FILE__, $this->getMigrations($updater)); + } +} diff --git a/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php b/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php index b1ed5efbfb..12b648fe67 100644 --- a/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php +++ b/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php @@ -212,6 +212,8 @@ class TestingEnvironmentManipulator implements EnvironmentManipulator { $plugins = $this->vars->getCoreAndSupportedPlugins(); $plugins[] = 'TagManager'; + $plugins[] = 'ExamplePlugin'; + $plugins[] = 'ExampleAPI'; $fixturePluginsToLoad = []; diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png index eabfffc87d..090c037439 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a9ea7f84c27cfdeaa536973e65725853df62cc0fffe31e907d05d13c21b2490 -size 4403487 +oid sha256:e75dfc851ff839e46c952ed08d2986a98ba565b82182fdc21e0a567fbebe6c80 +size 4403426 |