Skip to content

Commit

Permalink
Merge branch 'master' into 2.x-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 12, 2024
2 parents d89f9ff + a12f18b commit af99110
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions monorepo/DevTools/src/RefactorConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.';
Expand All @@ -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.");
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit af99110

Please sign in to comment.