getComposer()->getPackage()->getExtra()[Builder::NAME] ?? []; return $conf; } protected function getSettingsPath(): string { $settingsPath = getcwd() . "/settings"; return $settingsPath; } /** * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output * * @return array * - string Template name * - int Error */ public function validateTemplateName(InputInterface $input, OutputInterface $output): array { $file = $input->getArgument(static::ARG_FILE); $conf = $this->getBuilderConfig(); $templateName = $conf['templates'][$file] ?? ''; if (empty($templateName)) { $output->writeln(sprintf( 'Could not build file %s: no such template in composer.json extra section', $file )); return ["", 1]; } return [$templateName, 0]; } }