Skip to content

Commit

Permalink
Merge pull request #114 from ibexa/ibx-8224-drop-backward-command
Browse files Browse the repository at this point in the history
IBX-8224: Dropped BackwardCompatibilityCommand interface
  • Loading branch information
ViniTou authored Jun 27, 2024
2 parents 53fad83 + 9408be0 commit 87601ef
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 48 deletions.
12 changes: 1 addition & 11 deletions src/bundle/Command/CreateExampleDataCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

use Ibexa\Behat\Event\Events;
use Ibexa\Behat\Event\InitialEvent;
use Ibexa\Bundle\Core\Command\BackwardCompatibleCommand;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
use Symfony\Component\Console\Command\Command;
Expand All @@ -23,7 +22,7 @@
use Symfony\Component\Stopwatch\Stopwatch;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;

class CreateExampleDataCommand extends Command implements BackwardCompatibleCommand
class CreateExampleDataCommand extends Command
{
public const NAME = 'ibexa:behat:create-data';

Expand Down Expand Up @@ -53,7 +52,6 @@ public function __construct(EventDispatcherInterface $eventDispatcher, LoggerInt
protected function configure()
{
$this
->setAliases(['ezplatform:tools:create-data'])
->addArgument('iterations', InputArgument::REQUIRED)
->addArgument('serializedTransitionData', InputArgument::REQUIRED);
}
Expand Down Expand Up @@ -86,12 +84,4 @@ private function parseInputData(string $serializedTransitionEvent): InitialEvent
{
return $this->serializer->deserialize(base64_decode($serializedTransitionEvent), InitialEvent::class, 'json');
}

/**
* @return string[]
*/
public function getDeprecatedAliases(): array
{
return ['ezplatform:tools:create-data'];
}
}
16 changes: 1 addition & 15 deletions src/bundle/Command/CreateExampleDataManagerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
namespace Ibexa\Bundle\Behat\Command;

use Ibexa\Behat\Event\InitialEvent;
use Ibexa\Bundle\Core\Command\BackwardCompatibleCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
Expand All @@ -22,7 +21,7 @@
use Symfony\Component\Stopwatch\Stopwatch;
use Symfony\Component\Yaml\Yaml;

class CreateExampleDataManagerCommand extends Command implements BackwardCompatibleCommand
class CreateExampleDataManagerCommand extends Command
{
private const BATCH_SIZE = 100;

Expand Down Expand Up @@ -53,11 +52,6 @@ public function __construct(string $env, string $projectDir)
$this->stopwatch = new Stopwatch();
}

protected function configure(): void
{
$this->setAliases(['ezplatform:tools:generate-items']);
}

public function execute(InputInterface $input, OutputInterface $output)
{
$data = $this->getData();
Expand Down Expand Up @@ -158,12 +152,4 @@ private function serialize(InitialEvent $eventData): string
{
return base64_encode($this->serializer->serialize($eventData, 'json'));
}

/**
* @return string[]
*/
public function getDeprecatedAliases(): array
{
return ['ezplatform:tools:generate-items'];
}
}
12 changes: 1 addition & 11 deletions src/bundle/Command/CreateLanguageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace Ibexa\Bundle\Behat\Command;

use Ibexa\Bundle\Core\Command\BackwardCompatibleCommand;
use Ibexa\Contracts\Core\Repository\LanguageService;
use Ibexa\Contracts\Core\Repository\PermissionResolver;
use Ibexa\Contracts\Core\Repository\UserService;
Expand All @@ -17,7 +16,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class CreateLanguageCommand extends Command implements BackwardCompatibleCommand
class CreateLanguageCommand extends Command
{
/** @var \Ibexa\Contracts\Core\Repository\LanguageService */
private $languageService;
Expand All @@ -40,19 +39,10 @@ public function __construct(
parent::__construct();
}

/**
* @return string[]
*/
public function getDeprecatedAliases(): array
{
return ['ez:behat:create-language'];
}

protected function configure()
{
$this
->setName('ibexa:behat:create-language')
->setAliases(['ez:behat:create-language'])
->setDescription('Create a Language')
->addArgument('language-code', InputArgument::REQUIRED)
->addArgument('language-name', InputArgument::OPTIONAL, 'Language name', '')
Expand Down
12 changes: 1 addition & 11 deletions src/bundle/Command/TestSiteaccessCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@

namespace Ibexa\Bundle\Behat\Command;

use Ibexa\Bundle\Core\Command\BackwardCompatibleCommand;
use Ibexa\Core\MVC\Symfony\SiteAccess;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class TestSiteaccessCommand extends Command implements BackwardCompatibleCommand
class TestSiteaccessCommand extends Command
{
/** @var \Ibexa\Core\MVC\Symfony\SiteAccess */
private $siteaccess;
Expand All @@ -26,19 +25,10 @@ public function __construct(SiteAccess $siteaccess)
parent::__construct();
}

/**
* @return string[]
*/
public function getDeprecatedAliases(): array
{
return ['ez:behat:siteaccess'];
}

protected function configure()
{
$this
->setName('ibexa:behat:test-siteaccess')
->setAliases($this->getDeprecatedAliases())
->setDescription('Outputs the name of the active siteaccess')
;
}
Expand Down

0 comments on commit 87601ef

Please sign in to comment.