forked from matomo-org/matomo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renames CustomPiwikJs plugin to CustomJsTracker (matomo-org#15505)
* Renames CustomPiwikJs plugin to CustomTrackerJs * adds bc for old api class name * adds update to rename plugin in exisiting config * update ui tests * rename again * remove old events * improve changelog * remove bc fallback * Improve migration * use tagmanager submodule * updates UI files
- Loading branch information
Showing
74 changed files
with
289 additions
and
611 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?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\Updater\Migration\Plugin; | ||
|
||
use Piwik\Config; | ||
use Piwik\Plugin; | ||
use Piwik\Updater\Migration; | ||
|
||
/** | ||
* Uninstalls the given plugin during the update | ||
*/ | ||
class Uninstall extends Migration | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
private $pluginName; | ||
|
||
/** | ||
* @var Plugin\Manager | ||
*/ | ||
private $pluginManager; | ||
|
||
public function __construct(Plugin\Manager $pluginManager, $pluginName) | ||
{ | ||
$this->pluginManager = $pluginManager; | ||
$this->pluginName = $pluginName; | ||
} | ||
|
||
public function __toString() | ||
{ | ||
$domain = Config::getLocalConfigPath() == Config::getDefaultLocalConfigPath() ? '' : Config::getHostname(); | ||
$domainArg = !empty($domain) ? "--matomo-domain=\"$domain\" " : ''; | ||
|
||
return sprintf('./console %splugin:uninstall "%s"', $domainArg, $this->pluginName); | ||
} | ||
|
||
public function shouldIgnoreError($exception) | ||
{ | ||
return true; | ||
} | ||
|
||
public function exec() | ||
{ | ||
$this->pluginManager->uninstallPlugin($this->pluginName); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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\Plugins\CorePluginsAdmin\Commands; | ||
|
||
use Piwik\Plugin\ConsoleCommand; | ||
use Piwik\Plugin\Manager; | ||
use Symfony\Component\Console\Input\InputArgument; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* plugin:deactivate console command. | ||
*/ | ||
class UninstallPlugin extends ConsoleCommand | ||
{ | ||
protected function configure() | ||
{ | ||
$this->setName('plugin:uninstall'); | ||
$this->setDescription('Uninstall a plugin.'); | ||
$this->addArgument('plugin', InputArgument::IS_ARRAY, 'The plugin name you want to uninstall. Multiple plugin names can be specified separated by a space.'); | ||
} | ||
|
||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$pluginManager = Manager::getInstance(); | ||
|
||
$plugins = $input->getArgument('plugin'); | ||
|
||
foreach ($plugins as $plugin) { | ||
if ($pluginManager->isPluginLoaded($plugin)) { | ||
$output->writeln(sprintf('<comment>The plugin %s is still active.</comment>', $plugin)); | ||
continue; | ||
} | ||
|
||
$pluginManager->uninstallPlugin($plugin); | ||
|
||
$output->writeln("Uninstalled plugin <info>$plugin</info>"); | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.