Skip to content

Commit d5d3984

Browse files
committed
convert scaffold files to .tpl
1 parent b014858 commit d5d3984

38 files changed

+6
-12
lines changed

src/Maker/MakeScaffold.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
use Symfony\Component\Console\Command\Command;
2222
use Symfony\Component\Console\Input\InputArgument;
2323
use Symfony\Component\Console\Input\InputInterface;
24-
use Symfony\Component\Filesystem\Filesystem;
2524
use Symfony\Component\Finder\Finder;
2625
use Symfony\Component\HttpKernel\Kernel;
2726
use Symfony\Component\Process\ExecutableFinder;
@@ -159,7 +158,12 @@ private function generateScaffold(string $name, ConsoleStyle $io): void
159158
if (is_dir($scaffold['dir'])) {
160159
$io->text('Copying scaffold files...');
161160

162-
(new Filesystem())->mirror($scaffold['dir'], $this->files->getRootDirectory());
161+
foreach (Finder::create()->files()->in($scaffold['dir']) as $file) {
162+
$this->files->dumpFile(
163+
"{$file->getRelativePath()}/{$file->getFilenameWithoutExtension()}",
164+
$file->getContents()
165+
);
166+
}
163167
}
164168

165169
if (isset($scaffold['configure'])) {

0 commit comments

Comments
 (0)