class SecurityAdvisory
Same name in this branch
- 11.1.x core/modules/system/src/SecurityAdvisories/SecurityAdvisory.php \Drupal\system\SecurityAdvisories\SecurityAdvisory
Hierarchy
- class \Composer\Advisory\PartialSecurityAdvisory implements \JsonSerializable
- class \Composer\Advisory\SecurityAdvisory extends \Composer\Advisory\PartialSecurityAdvisory
Expanded class hierarchy of SecurityAdvisory
3 files declare their use of SecurityAdvisory
- AdvisoryProviderInterface.php in vendor/
composer/ composer/ src/ Composer/ Repository/ AdvisoryProviderInterface.php - ComposerRepository.php in vendor/
composer/ composer/ src/ Composer/ Repository/ ComposerRepository.php - RepositorySet.php in vendor/
composer/ composer/ src/ Composer/ Repository/ RepositorySet.php
File
-
vendor/
composer/ composer/ src/ Composer/ Advisory/ SecurityAdvisory.php, line 18
Namespace
Composer\AdvisoryView source
class SecurityAdvisory extends PartialSecurityAdvisory {
/**
* @var string
* @readonly
*/
public $title;
/**
* @var string|null
* @readonly
*/
public $cve;
/**
* @var string|null
* @readonly
*/
public $link;
/**
* @var DateTimeImmutable
* @readonly
*/
public $reportedAt;
/**
* @var non-empty-array<array{name: string, remoteId: string}>
* @readonly
*/
public $sources;
/**
* @var string|null
* @readonly
*/
public $severity;
/**
* @param non-empty-array<array{name: string, remoteId: string}> $sources
*/
public function __construct(string $packageName, string $advisoryId, ConstraintInterface $affectedVersions, string $title, array $sources, DateTimeImmutable $reportedAt, ?string $cve = null, ?string $link = null, ?string $severity = null) {
parent::__construct($packageName, $advisoryId, $affectedVersions);
$this->title = $title;
$this->sources = $sources;
$this->reportedAt = $reportedAt;
$this->cve = $cve;
$this->link = $link;
$this->severity = $severity;
}
/**
* @internal
*/
public function toIgnoredAdvisory(?string $ignoreReason) : IgnoredSecurityAdvisory {
return new IgnoredSecurityAdvisory($this->packageName, $this->advisoryId, $this->affectedVersions, $this->title, $this->sources, $this->reportedAt, $this->cve, $this->link, $ignoreReason, $this->severity);
}
/**
* @return mixed
*/
public function jsonSerialize() {
$data = parent::jsonSerialize();
$data['reportedAt'] = $data['reportedAt']->format(DATE_RFC3339);
return $data;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
PartialSecurityAdvisory::$advisoryId | public | property | @readonly | ||
PartialSecurityAdvisory::$affectedVersions | public | property | @readonly | ||
PartialSecurityAdvisory::$packageName | public | property | @readonly | ||
PartialSecurityAdvisory::create | public static | function | |||
SecurityAdvisory::$cve | public | property | @readonly | ||
SecurityAdvisory::$link | public | property | @readonly | ||
SecurityAdvisory::$reportedAt | public | property | @readonly | ||
SecurityAdvisory::$severity | public | property | @readonly | ||
SecurityAdvisory::$sources | public | property | @readonly | ||
SecurityAdvisory::$title | public | property | @readonly | ||
SecurityAdvisory::jsonSerialize | public | function | Overrides PartialSecurityAdvisory::jsonSerialize | 1 | |
SecurityAdvisory::toIgnoredAdvisory | public | function | @internal | ||
SecurityAdvisory::__construct | public | function | Overrides PartialSecurityAdvisory::__construct | 1 |