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

Don't enable example plugins by default so we can remove them from the release #14991

Merged
merged 3 commits into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.