Skip to content

Commit

Permalink
Don't enable example plugins by default so we can remove them from th…
Browse files Browse the repository at this point in the history
…e release (#14991)

* trying to remove example plugins

* remove example plugins on next update

* fix screenshot test
  • Loading branch information
tsteur authored and mattab committed Oct 11, 2019
1 parent da92367 commit 39aeb35
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 4 deletions.
2 changes: 0 additions & 2 deletions config/global.ini.php
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,6 @@
Plugins[] = CoreVisualizations
Plugins[] = Proxy
Plugins[] = API
Plugins[] = ExamplePlugin
Plugins[] = Widgetize
Plugins[] = Transitions
Plugins[] = LanguagesManager
Expand All @@ -979,7 +978,6 @@
Plugins[] = VisitFrequency
Plugins[] = VisitTime
Plugins[] = VisitorInterest
Plugins[] = ExampleAPI
Plugins[] = RssWidget
Plugins[] = Feedback
Plugins[] = Monolog
Expand Down
2 changes: 2 additions & 0 deletions core/Application/Kernel/PluginList.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class PluginList
*/
private $corePluginsDisabledByDefault = array(
'DBStats',
'ExamplePlugin',
'ExampleCommand',
'ExampleSettingsPlugin',
'ExampleUI',
Expand All @@ -41,6 +42,7 @@ class PluginList
'ExampleTracker',
'ExampleLogTables',
'ExampleReport',
'ExampleAPI',
'MobileAppMeasurable',
'Provider',
'TagManager'
Expand Down
46 changes: 46 additions & 0 deletions core/Updates/3.12.0-b7.php
Original file line number Diff line number Diff line change
@@ -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));
}
}
2 changes: 2 additions & 0 deletions tests/PHPUnit/Framework/TestingEnvironmentManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ private function getPluginsToLoadDuringTest()
{
$plugins = $this->vars->getCoreAndSupportedPlugins();
$plugins[] = 'TagManager';
$plugins[] = 'ExamplePlugin';
$plugins[] = 'ExampleAPI';

$fixturePluginsToLoad = [];

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 39aeb35

Please sign in to comment.