Skip to content

Commit

Permalink
Ignore dependencies where constraint is 'self.version' (replaces #13)
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioheleno committed Mar 15, 2022
1 parent cad0c9c commit 3271833
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(
*/
public function __invoke(CommandInterface $command): HandlerResultEnum {
$package = $command->getPackage();
if ($package->getLatestVersion() === '' || $package->getLatestVersion() === 'self.version') {
if ($package->getLatestVersion() === '') {
return HandlerResultEnum::Reject;
}

Expand All @@ -40,6 +40,11 @@ public function __invoke(CommandInterface $command): HandlerResultEnum {
);

foreach ($dependencyCol as $dependency) {
if ($dependency->getConstraint() === 'self.version') {
// need to find out how to handle this
continue;
}

$dependency = $dependency->withStatus(
Semver::satisfies($package->getLatestVersion(), $dependency->getConstraint()) ?
DependencyStatusEnum::UpToDate :
Expand Down

0 comments on commit 3271833

Please sign in to comment.