Skip to content
Snippets Groups Projects

Issue #3500122 by danchadwick: Drush commands should use php attributes rather than annotations

Merged Issue #3500122 by danchadwick: Drush commands should use php attributes rather than annotations
Merged Dan Chadwick requested to merge issue/radix-3500122:3500122-drush-commands-should into 6.0.x
@@ -6,11 +6,16 @@ namespace Drush\Commands\radix;
use Consolidation\AnnotatedCommand\CommandData;
use Consolidation\AnnotatedCommand\CommandError;
use Drush\Attributes as CLI;
use Drush\Boot\DrupalBootLevels;
use Drush\Commands\DrushCommands;
use Drush\Drush;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Process\Process;
// Drush PHP attributes uses a semi-qualified namespace. Suppress phpcs.
// phpcs:disable Drupal.Classes.FullyQualifiedNamespace.UseStatementMissing
/**
* Class SubThemeCommands handles Radix subtheme creation.
*/
@@ -18,19 +23,11 @@ class SubThemeCommands extends DrushCommands {
/**
* Creates a Radix sub-theme.
*
* @param string $name
* The machine-readable name of your sub-theme.
*
* @command radix:create
*
* @aliases radix
*
* @bootstrap full
*
* @usage drush radix:create my_theme
* Creates a Radix sub-theme called my_theme, using the radix_starterkit.
*/
#[CLI\Command(name: 'radix:create', aliases: ['radix'])]
#[CLI\Argument(name: 'name', description: 'The machine-readable name of your sub-theme.')]
#[CLI\Bootstrap(level: DrupalBootLevels::FULL)]
#[CLI\Usage(name: 'drush radix:create my-theme', description: 'Creates a Radix sub-theme called my_theme, using the radix_starterkit.')]
public function createSubTheme(string $name) {
try {
$this->copyStarterKit();
Loading