Skip to content

Commit

Permalink
Set --no-suggest option to true only on Composer 1
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric authored Jun 15, 2020
1 parent 967fb2d commit 385c835
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Command/UpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Symfony\Flex\Command;

use Composer\Command\UpdateCommand as BaseUpdateCommand;
use Composer\Plugin\PluginInterface;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Flex\PackageResolver;
Expand All @@ -31,7 +32,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
$input->setArgument('packages', $this->resolver->resolve($input->getArgument('packages')));

if ($input->hasOption('no-suggest')) {
if (version_compare('2.0.0', PluginInterface::PLUGIN_API_VERSION, '>') && $input->hasOption('no-suggest')) {
$input->setOption('no-suggest', true);
}

Expand Down

0 comments on commit 385c835

Please sign in to comment.