Skip to content

Commit

Permalink
Console 6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Nov 1, 2023
1 parent bf2b514 commit dd4d6da
Show file tree
Hide file tree
Showing 49 changed files with 158 additions and 323 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"react/event-loop": "^1.1",
"symfony/cache": "^6.0",
"symfony/config": "^6.0",
"symfony/console": "^6.0",
"symfony/console": "6.2.13",
"symfony/dependency-injection": "^6.0",
"symfony/dotenv": "^6.0",
"symfony/event-dispatcher": "^6.0",
Expand Down
128 changes: 67 additions & 61 deletions composer.lock

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions config/dev/services.yml

This file was deleted.

7 changes: 2 additions & 5 deletions src/Command/Acsf/AcsfApiBaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@

use Acquia\Cli\Command\Api\ApiBaseCommand;
use Acquia\Cli\Exception\AcquiaCliException;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputInterface;

#[AsCommand(name: 'acsf:base')]
class AcsfApiBaseCommand extends ApiBaseCommand {
/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'acsf:base';

protected function checkAuthentication(): void {
if ($this->commandRequiresAuthentication() && !$this->cloudApiClientService->isMachineAuthenticated()) {
Expand Down
8 changes: 3 additions & 5 deletions src/Command/Acsf/AcsfListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@

namespace Acquia\Cli\Command\Acsf;

use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'acsf:list')]
class AcsfListCommand extends AcsfListCommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'acsf:list';
protected string $namespace = 'acsf';

protected function configure(): void {
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Acsf/AcsfListCommandBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$command->setHidden(FALSE);
}
else {
$command->setHidden(TRUE);
$command->setHidden();
}
}

Expand Down
10 changes: 3 additions & 7 deletions src/Command/Api/ApiBaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use AcquiaCloudApi\Exception\ApiErrorException;
use Closure;
use GuzzleHttp\Psr7\Utils;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -20,14 +21,9 @@
use Symfony\Component\Validator\Exception\ValidatorException;
use Symfony\Component\Validator\Validation;

#[AsCommand(name: 'api:base')]
class ApiBaseCommand extends CommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'api:base';

protected string $method;

/**
Expand Down Expand Up @@ -58,7 +54,7 @@ class ApiBaseCommand extends CommandBase {
private array $pathParams = [];

protected function configure(): void {
$this->setHidden(TRUE);
$this->setHidden();
parent::configure();
}

Expand Down
8 changes: 3 additions & 5 deletions src/Command/Api/ApiListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@

namespace Acquia\Cli\Command\Api;

use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'api:list')]
class ApiListCommand extends ApiListCommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'api:list';
protected string $namespace = 'api';

protected function configure(): void {
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Api/ApiListCommandBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$command->setHidden(FALSE);
}
else {
$command->setHidden(TRUE);
$command->setHidden();
}
}

Expand Down
8 changes: 2 additions & 6 deletions src/Command/App/AppOpenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@

use Acquia\Cli\Command\CommandBase;
use Acquia\Cli\Exception\AcquiaCliException;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand(name: 'app:open')]
class AppOpenCommand extends CommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'app:open';

protected function configure(): void {
$this->setDescription('Opens your browser to view a given Cloud application')
->acceptApplicationUuid()
Expand Down
8 changes: 2 additions & 6 deletions src/Command/App/AppVcsInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@
use Acquia\Cli\Exception\AcquiaCliException;
use AcquiaCloudApi\Endpoints\Code;
use AcquiaCloudApi\Endpoints\Environments;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand(name: 'app:vcs:info')]
class AppVcsInfo extends CommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'app:vcs:info';

protected function configure(): void {
$this->setDescription('Get all branches and tags of the application with the deployment status')
->addOption('deployed', NULL, InputOption::VALUE_OPTIONAL, 'Show only deployed branches and tags')
Expand Down
8 changes: 2 additions & 6 deletions src/Command/App/LinkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@
namespace Acquia\Cli\Command\App;

use Acquia\Cli\Command\CommandBase;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand(name: 'app:link')]
class LinkCommand extends CommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'app:link';

protected function configure(): void {
$this->setDescription('Associate your project with a Cloud Platform application')
->setAliases(['link']);
Expand Down
8 changes: 2 additions & 6 deletions src/Command/App/LogTailCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@

use Acquia\Cli\Command\CommandBase;
use AcquiaCloudApi\Endpoints\Logs;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand(name: 'app:log:tail')]
class LogTailCommand extends CommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'app:log:tail';

protected function configure(): void {
$this->setDescription('Tail the logs from your environments')
->acceptEnvironmentId()
Expand Down
8 changes: 2 additions & 6 deletions src/Command/App/NewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@
use Acquia\Cli\Command\CommandBase;
use Acquia\Cli\Exception\AcquiaCliException;
use Acquia\DrupalEnvironmentDetector\AcquiaDrupalEnvironmentDetector;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Filesystem\Path;

#[AsCommand(name: 'app:new:local')]
class NewCommand extends CommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'app:new:local';

protected function configure(): void {
$this->setDescription('Create a new Drupal or Next.js project')
->addArgument('directory', InputArgument::OPTIONAL, 'The destination directory')
Expand Down
8 changes: 2 additions & 6 deletions src/Command/App/UnlinkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@

use Acquia\Cli\Command\CommandBase;
use Acquia\Cli\Exception\AcquiaCliException;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand(name: 'app:unlink')]
class UnlinkCommand extends CommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'app:unlink';

protected function configure(): void {
$this->setDescription('Remove local association between your project and a Cloud Platform application')
->setAliases(['unlink']);
Expand Down
8 changes: 2 additions & 6 deletions src/Command/Auth/AuthLoginCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,15 @@
namespace Acquia\Cli\Command\Auth;

use Acquia\Cli\Command\CommandBase;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand(name: 'auth:login')]
class AuthLoginCommand extends CommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'auth:login';

protected function configure(): void {
$this->setDescription('Register your Cloud API key and secret to use API functionality')
->setAliases(['login'])
Expand Down
8 changes: 2 additions & 6 deletions src/Command/Auth/AuthLogoutCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@
namespace Acquia\Cli\Command\Auth;

use Acquia\Cli\Command\CommandBase;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand(name: 'auth:logout')]
class AuthLogoutCommand extends CommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'auth:logout';

protected function configure(): void {
$this->setDescription('Remove Cloud API key and secret from local machine.')
->setAliases(['logout']);
Expand Down
8 changes: 2 additions & 6 deletions src/Command/CodeStudio/CodeStudioWizardCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,17 @@
use AcquiaCloudApi\Endpoints\Account;
use DateTime;
use Gitlab\Exception\ValidationFailedException;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand(name: 'codestudio:wizard')]
class CodeStudioWizardCommand extends WizardCommandBase {

use CodeStudioCommandTrait;

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'codestudio:wizard';

private Checklist $checklist;

protected function configure(): void {
Expand Down
8 changes: 2 additions & 6 deletions src/Command/DocsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@

namespace Acquia\Cli\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ChoiceQuestion;

#[AsCommand(name: 'docs')]
class DocsCommand extends CommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'docs';

protected function configure(): void {
$this->setDescription('Open Acquia product documentation in a web browser')
->addArgument('product', InputArgument::OPTIONAL, 'Acquia Product Name')
Expand Down
8 changes: 2 additions & 6 deletions src/Command/Email/ConfigurePlatformEmailCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use AcquiaCloudApi\Response\SubscriptionResponse;
use Closure;
use LTDBeget\dns\configurator\Zone;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -24,14 +25,9 @@
use Symfony\Component\Validator\Validation;
use Symfony\Component\Yaml\Yaml;

#[AsCommand(name: 'email:configure')]
class ConfigurePlatformEmailCommand extends CommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'email:configure';

protected function configure(): void {
$this->setDescription('Configure Platform email for one or more applications')
->addArgument('subscriptionUuid', InputArgument::OPTIONAL, 'The subscription UUID to register the domain with.')
Expand Down
8 changes: 2 additions & 6 deletions src/Command/Email/EmailInfoForSubscriptionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use AcquiaCloudApi\Connector\Client;
use AcquiaCloudApi\Response\SubscriptionResponse;
use League\Csv\Writer;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Helper\TableCell;
Expand All @@ -17,14 +18,9 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand(name: 'email:info')]
class EmailInfoForSubscriptionCommand extends CommandBase {

/**
* @var string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
*/
protected static $defaultName = 'email:info';

protected function configure(): void {
$this->setDescription('Print information related to Platform Email set up in a subscription.')
->addArgument('subscriptionUuid', InputArgument::OPTIONAL, 'The subscription UUID whose Platform Email configuration is to be checked.')
Expand Down
Loading

0 comments on commit dd4d6da

Please sign in to comment.