Skip to content

Commit e37fb95

Browse files
Copilotnlemoine
andcommitted
Fix backward compatibility for data types selection
Co-authored-by: nlemoine <2526939+nlemoine@users.noreply.github.com>
1 parent 59100db commit e37fb95

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/MoveCommand.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,19 @@ private function sync_directory( Alias $from, Alias $to, string $from_path, stri
481481
private function get_data_types( array $args ): array {
482482
$data_types = array_combine( self::DATA_TYPES, array_map( fn( string $type ): bool => (bool) Utils\get_flag_value( $args, $type, false ), self::DATA_TYPES ) );
483483

484-
return count( array_filter( $data_types ) ) === 0 ? array_fill_keys( self::DATA_TYPES, true ) : $data_types;
484+
// For backward compatibility, if no flags are provided, only sync db and uploads
485+
if ( count( array_filter( $data_types ) ) === 0 ) {
486+
return [
487+
self::DATA_TYPE_DB => true,
488+
self::DATA_TYPE_UPLOADS => true,
489+
self::DATA_TYPE_THEMES => false,
490+
self::DATA_TYPE_PLUGINS => false,
491+
self::DATA_TYPE_MU_PLUGINS => false,
492+
self::DATA_TYPE_LANGUAGES => false,
493+
];
494+
}
495+
496+
return $data_types;
485497
}
486498

487499
/**

0 commit comments

Comments
 (0)