You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (self::class !== (new \ReflectionMethod($this, 'getDefaultName'))->class) {
119
107
trigger_deprecation('symfony/console', '7.3', 'Overriding "Command::getDefaultName()" in "%s" is deprecated and will be removed in Symfony 8.0, use the #[AsCommand] attribute instead.', static::class);
@@ -159,7 +147,7 @@ public function __construct(?string $name = null, ?callable $code = null)
159
147
$this->addUsage($usage);
160
148
}
161
149
162
-
if (\is_callable($this) && self::class === (new \ReflectionMethod($this, 'execute'))->getDeclaringClass()->name) {
150
+
if (!$code && \is_callable($this) && self::class === (new \ReflectionMethod($this, 'execute'))->getDeclaringClass()->name) {
0 commit comments