- Output for 8.1.0 - 8.1.29, 8.2.0 - 8.2.23, 8.3.0 - 8.3.11
- string(26) "description of the command" string(19) "app:command:process"
<?php
#[AsCommand(description: 'description of the command', name: 'app:'.self::COMMAND.':process')]
final class MyCommand
{
private const COMMAND = 'command';
}
$r = new ReflectionClass('MyCommand');
foreach($r->getAttributes() as $attribute) {
foreach($attribute->getArguments() as $arg) {
var_dump($arg);
}
}