@@ -32,19 +32,19 @@ public function __construct(PackageResolver $resolver)
32
32
protected function configure ()
33
33
{
34
34
parent ::configure ();
35
- $ this ->addOption ('unpack ' , null , InputOption::VALUE_NONE , 'Unpack Symfony packs in composer.json. ' );
35
+ $ this ->addOption ('no-unpack ' , null , InputOption::VALUE_NONE , 'Disable unpacking Symfony packs in composer.json. ' );
36
+ $ this ->addOption ('unpack ' , null , InputOption::VALUE_NONE , '[DEPRECATED] Unpacking is now enabled by default. ' );
36
37
}
37
38
38
39
protected function execute (InputInterface $ input , OutputInterface $ output )
39
40
{
40
- $ unpack = $ input ->getOption ('unpack ' );
41
+ if ($ input ->getOption ('unpack ' )) {
42
+ $ this ->getIO ()->writeError ('<warning>The "--unpack" command line option is deprecated; unpacking is now enabled by default.</warning> ' );
43
+ }
44
+
41
45
$ packages = $ this ->resolver ->resolve ($ input ->getArgument ('packages ' ), true );
42
46
if ($ packages ) {
43
47
$ input ->setArgument ('packages ' , $ this ->resolver ->resolve ($ input ->getArgument ('packages ' ), true ));
44
- } elseif ($ unpack ) {
45
- $ this ->getIO ()->writeError ('<error>--unpack is incompatible with the interactive mode.</> ' );
46
-
47
- return 1 ;
48
48
}
49
49
50
50
if (version_compare ('2.0.0 ' , PluginInterface::PLUGIN_API_VERSION , '> ' ) && $ input ->hasOption ('no-suggest ' )) {
@@ -53,7 +53,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
53
53
54
54
$ ret = parent ::execute ($ input , $ output ) ?? 0 ;
55
55
56
- if (0 !== $ ret || $ input ->getOption ('no-update ' )) {
56
+ if (0 !== $ ret || $ input ->getOption ('no-unpack ' ) || $ input -> getOption ( ' no- update ' )) {
57
57
return $ ret ;
58
58
}
59
59
0 commit comments