diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Generate/ExtendClassCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Generate/ExtendClassCommand.php index 9bcff9d0f55..a0249555300 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Generate/ExtendClassCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Generate/ExtendClassCommand.php @@ -85,7 +85,8 @@ protected function configure() */ protected function execute(InputInterface $input, OutputInterface $output) { - $class = $input->getArgument('class_name'); + // Normalize class name to exclude leading slashes; a FQCN doesn't need it: + $class = ltrim($input->getArgument('class_name'), '\\'); $target = $input->getArgument('target_module'); $extendFactory = $input->getOption('extendfactory');