|
3 | 3 | namespace Drush\Commands\drupal_integrations; |
4 | 4 |
|
5 | 5 | use Consolidation\SiteAlias\SiteAliasManagerAwareTrait; |
| 6 | +use Drush\Attributes as CLI; |
6 | 7 | use Drush\Commands\DrushCommands; |
7 | 8 | use Drush\Drush; |
8 | 9 | use Drush\Exceptions\CommandFailedException; |
@@ -86,11 +87,8 @@ public function __construct() { |
86 | 87 |
|
87 | 88 | /** |
88 | 89 | * Get all remote aliases from lagoon API. |
89 | | - * |
90 | | - * @command lagoon:aliases |
91 | | - * |
92 | | - * @aliases la |
93 | 90 | */ |
| 91 | + #[CLI\Command(name: 'lagoon:aliases', aliases: ['la'])] |
94 | 92 | public function aliases() { |
95 | 93 | $this->preCommandChecks(); |
96 | 94 | // Project still not defined, throw a warning. |
@@ -124,31 +122,26 @@ public function aliases() { |
124 | 122 |
|
125 | 123 | /** |
126 | 124 | * Generate a JWT token for the lagoon API. |
127 | | - * |
128 | | - * @command lagoon:jwt |
129 | | - * |
130 | | - * @aliases jwt |
131 | 125 | */ |
| 126 | + #[CLI\Command(name: 'lagoon:jwt', aliases: ['jwt'])] |
132 | 127 | public function generateJwt() { |
133 | 128 | $this->preCommandChecks(); |
134 | 129 | $this->io()->writeln($this->getJwtToken()); |
135 | 130 | } |
136 | 131 |
|
137 | 132 | /** |
138 | 133 | * Run pre-rollout tasks. |
139 | | - * |
140 | | - * @command lagoon:pre-rollout-tasks |
141 | 134 | */ |
| 135 | + #[CLI\Command(name: 'lagoon:pre-rollout-tasks')] |
142 | 136 | public function preRolloutTasks() { |
143 | 137 | $this->preCommandChecks(); |
144 | 138 | $this->runRolloutTasks('pre'); |
145 | 139 | } |
146 | 140 |
|
147 | 141 | /** |
148 | 142 | * Run post-rollout tasks. |
149 | | - * |
150 | | - * @command lagoon:post-rollout-tasks |
151 | 143 | */ |
| 144 | + #[CLI\Command(name: 'lagoon:post-rollout-tasks')] |
152 | 145 | public function postRolloutTasks() { |
153 | 146 | $this->preCommandChecks(); |
154 | 147 | $this->runRolloutTasks('post'); |
|
0 commit comments