Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
a bit stuck
Browse files Browse the repository at this point in the history
slash3b committed Nov 22, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent fdb22c9 commit 698b3b9
Showing 3 changed files with 12 additions and 6 deletions.
12 changes: 8 additions & 4 deletions build-conflicts.php
Original file line number Diff line number Diff line change
@@ -163,6 +163,9 @@ static function (array $components): array {
Shell\execute('cp', [$sourceComposerJsonPath, $targetComposerJsonPath]);
};

/**
* @psalm-suppress MixedAssignment
*/
$commitComposerJson = static function (string $composerJsonPath, array $addedAdvisories): void {
$originalHash = Shell\execute(
'git',
@@ -224,13 +227,14 @@ static function (array $components): array {
));

$prevComposerJSONFileData = file_get_contents(__DIR__ . '/build/roave-security-advisories/composer.json');

/** @var array $prevComposerDecodedData
*/
$prevComposerDecodedData = json_decode($prevComposerJSONFileData, true);

/** @var array<array-key, string> $oldConflictPackages */
$oldConflictPackages = array_keys($prevComposerDecodedData['conflict']);

// /** @var list<Advisory> $addedAdvisories */
/**
* @psalm-param $addedAdvisories Advisory
*/
$addedAdvisories = [];
foreach ($getAdvisories() as $advisory) {
if (in_array($advisory->package->packageName, $oldConflictPackages, true)) {
2 changes: 2 additions & 0 deletions src/Roave/SecurityAdvisories/Advisory.php
Original file line number Diff line number Diff line change
@@ -28,11 +28,13 @@
/** @psalm-immutable */
final class Advisory
{
/** @var PackageName */
public PackageName $package;

/** @var list<VersionConstraint> */
private array $branchConstraints;

/** @var Source */
public Source $source;

/**
4 changes: 2 additions & 2 deletions src/Roave/SecurityAdvisories/Source.php
Original file line number Diff line number Diff line change
@@ -9,10 +9,10 @@

final class Source
{
/** @var non-empty-string */
/** @var non-empty-string $summary */
public string $summary;

/** @var non-empty-string */
/** @var non-empty-string $uri */
public string $uri;

/**

0 comments on commit 698b3b9

Please sign in to comment.