1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-22 06:57:53 +00:00
Files
matomo/plugins/FeatureFlags/Commands/DeleteFeatureFlag.php
caddoo a37fad545f Remove ImprovedAllWebsitesDashboard feature flag, and make easier to support ff removal in custom migrations (#23042)
* Remove ImprovedAllWebsitesDashboard feature flag, and make easier to support in custom migrations

* Update UI screenshots

* Delete tests so they pass

* Fix possibly flaky tooltip test

* Update core/Updater/Migration/Custom.php

Co-authored-by: Stefan Giehl <stefan@matomo.org>

* Update core/Updater/Migration/Custom.php

Co-authored-by: Stefan Giehl <stefan@matomo.org>

* Remove old test screenshots

* Pass in array

---------

Co-authored-by: Stefan Giehl <stefan@matomo.org>
2025-02-20 10:02:12 +01:00

37 خطوط
906 B
PHP

<?php
/**
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\FeatureFlags\Commands;
use Piwik\Plugin\ConsoleCommand;
use Piwik\Plugins\FeatureFlags\FeatureFlagManager;
class DeleteFeatureFlag extends ConsoleCommand
{
protected function configure()
{
$this->setName('featureflags:delete');
$this->setDescription('Delete a given feature flag');
$this->addRequiredArgument('featureFlagName');
}
protected function doExecute(): int
{
$featureFlagName = $this->getInput()->getArgument('featureFlagName');
if ($featureFlagName === null) {
throw new \Exception("Feature flag could not be found");
}
FeatureFlagManager::deleteFeatureFlag($featureFlagName);
return self::SUCCESS;
}
}