From ebbeecedc9d051ba2e06ec3a1a896188934c68f0 Mon Sep 17 00:00:00 2001 From: Kevin Porras Date: Wed, 9 Feb 2022 16:18:53 -0600 Subject: [PATCH] Use greaterThanOrEqualTo instead of satisfies to compare latest and current versions. --- src/SelfUpdateCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SelfUpdateCommand.php b/src/SelfUpdateCommand.php index c10ed29..e7e14e5 100644 --- a/src/SelfUpdateCommand.php +++ b/src/SelfUpdateCommand.php @@ -4,6 +4,7 @@ use Composer\Semver\VersionParser; use Composer\Semver\Semver; +use Composer\Semver\Comparator; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -210,7 +211,7 @@ protected function execute(InputInterface $input, OutputInterface $output) 'compatible' => $isCompatibleOptionSet, 'version_constraint' => $versionConstraintArg, ]); - if (null === $latestRelease || Semver::satisfies($latestRelease['version'], $this->currentVersion)) { + if (null === $latestRelease || Comparator::greaterThanOrEqualTo($this->currentVersion, $latestRelease['version'])) { $output->writeln('No update available'); return 0; }