Skip to content

Commit

Permalink
Handle "self.version" constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioheleno committed May 9, 2023
1 parent cfcdc80 commit f94e94c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function __invoke(CommandInterface $command, array $attributes = []): Han
);

if ($dependency->getConstraint() === 'self.version') {
// need to find out how to handle this
// should never happen as PackageDiscovery sets it to release version, but just in case
return HandlerResultEnum::REJECT;
}

Expand Down
6 changes: 2 additions & 4 deletions src/Application/Processor/Handler/PackageDiscoveryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ static function (Version $version): string {

foreach ($filteredRequire as $dependencyName => $constraint) {
if ($constraint === 'self.version') {
// need to find out how to handle this
continue;
$constraint = $release['version'];
}

// find by the unique constraint (version_id, name, development)
Expand Down Expand Up @@ -332,8 +331,7 @@ static function (Version $version): string {

foreach ($filteredRequireDev as $dependencyName => $constraint) {
if ($constraint === 'self.version') {
// need to find out how to handle this
continue;
$constraint = $release['version'];
}

// find by the unique constraint (version_id, name, development)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function __invoke(CommandInterface $command, array $attributes = []): Han

foreach ($dependencyCol as $dependency) {
if ($dependency->getConstraint() === 'self.version') {
// need to find out how to handle this
// should never happen as PackageDiscovery sets it to release version, but just in case
continue;
}

Expand All @@ -130,7 +130,7 @@ public function __invoke(CommandInterface $command, array $attributes = []): Han

foreach ($dependencyCol as $dependency) {
if ($dependency->getConstraint() === 'self.version') {
// need to find out how to handle this
// should never happen as PackageDiscovery sets it to release version, but just in case
continue;
}

Expand Down

0 comments on commit f94e94c

Please sign in to comment.