|
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
|
|
|
|
|
namespace Fgm\Drupal\Composer;
|
|
|
|
|
|
+require_once __DIR__ . '/../../../../vendor/autoload.php';
|
|
|
+
|
|
|
use Composer\Command\BaseCommand;
|
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
@@ -45,7 +47,7 @@ abstract class BaseBuilderCommand extends BaseCommand {
|
|
|
* @param \Symfony\Component\Console\Output\OutputInterface $output
|
|
|
* Command output.
|
|
|
* @param string $buildName
|
|
|
- * The nature of the build: services, settings, etc.
|
|
|
+ * The template name as a composer.json extra section.
|
|
|
*
|
|
|
* @return array
|
|
|
* - string Template name
|
|
@@ -59,10 +61,12 @@ abstract class BaseBuilderCommand extends BaseCommand {
|
|
|
$conf = $this->getComposer()->getPackage()->getExtra()[Builder::NAME] ?? [];
|
|
|
$templateName = $conf['templates'][$buildName] ?? '';
|
|
|
if (empty($templateName)) {
|
|
|
- $output->writeln(sprintf(
|
|
|
- 'Could not build file %s: no such template in composer.json extra section',
|
|
|
- $buildName
|
|
|
- ));
|
|
|
+ $output->writeln(
|
|
|
+ sprintf(
|
|
|
+ 'Could not build file %s: no such template in composer.json extra section',
|
|
|
+ $buildName
|
|
|
+ )
|
|
|
+ );
|
|
|
return ["", 1];
|
|
|
}
|
|
|
return [$templateName, 0];
|