Skip to content

Commit c9d17da

Browse files
committed
convert scaffold files to .tpl
1 parent 9bc88b2 commit c9d17da

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'])) {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)