diff --git a/monorepo/DevTools/src/RefactorConfigCommand.php b/monorepo/DevTools/src/RefactorConfigCommand.php index 927b26d5a26..721bb8cd26e 100644 --- a/monorepo/DevTools/src/RefactorConfigCommand.php +++ b/monorepo/DevTools/src/RefactorConfigCommand.php @@ -34,7 +34,7 @@ class RefactorConfigCommand extends Command protected const SUPPORTED_FORMATS = ['yaml']; /** @var string */ - protected $signature = 'refactor:config {format : The new configuration format}'; + protected $signature = 'refactor:config {format : The new configuration format} {--skip-diff : Skip diffing and dump the entire config}'; /** @var string */ protected $description = 'Migrate the configuration to a different format.'; @@ -59,7 +59,11 @@ protected function migrateToYaml(): int { $this->ensureYamlConfigDoesNotExist(); - $config = $this->getConfigDiff(); + $config = config('hyde'); + + if (! $this->option('skip-diff')) { + $config = $this->getDiffedConfig($config); + } if (empty($config)) { $this->warn("You don't seem to have any configuration to migrate."); @@ -84,9 +88,8 @@ protected function ensureYamlConfigDoesNotExist(): void } } - protected function getConfigDiff(): array + protected function getDiffedConfig($config): array { - $config = config('hyde'); $default = require Hyde::vendorPath('config/hyde.php'); return $this->diffConfig($config, $default); diff --git a/packages/framework/src/Console/Commands/ChangeSourceDirectoryCommand.php b/packages/framework/src/Console/Commands/ChangeSourceDirectoryCommand.php index 6bffde7f1ee..2b9f8cee5fa 100644 --- a/packages/framework/src/Console/Commands/ChangeSourceDirectoryCommand.php +++ b/packages/framework/src/Console/Commands/ChangeSourceDirectoryCommand.php @@ -27,7 +27,7 @@ class ChangeSourceDirectoryCommand extends Command { /** @var string */ - protected $signature = 'change:sourceDirectory {name : The new source directory name }'; + protected $signature = 'change:sourceDirectory {name : The new source directory name}'; /** @var string */ protected $description = 'Change the source directory for your project';