Skip to content

Commit

Permalink
Skip releases without a semver compliant version string in ComposerRe…
Browse files Browse the repository at this point in the history
…positoryTransformer
  • Loading branch information
DavidSingh3 authored and bradyvercher committed Jul 27, 2021
1 parent a5e7afb commit 694ec6e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Transformer/ComposerRepositoryTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use SatisPress\ReleaseManager;
use SatisPress\Repository\PackageRepository;
use SatisPress\VersionParser;
use UnexpectedValueException;

/**
* Composer repository transformer class.
Expand Down Expand Up @@ -165,6 +166,15 @@ protected function transform_item( Package $package ): array {
'version' => $version,
]
);
} catch ( UnexpectedValueException $e ) {
$this->logger->error(
'Invalid version string for {package}:{version}.',
[
'exception' => $e,
'package' => $package->get_name(),
'version' => $version,
]
);
}
}

Expand Down

0 comments on commit 694ec6e

Please sign in to comment.