Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Package.php

function Package::replaceVersion

Replaces current version and pretty version with passed values. It also sets stability.

Parameters

string $version The package's normalized version:

string $prettyVersion The package's non-normalized version:

File

vendor/composer/composer/src/Composer/Package/Package.php, line 669

Class

Package
Core package definitions that are needed to resolve dependencies and install packages

Namespace

Composer\Package

Code

public function replaceVersion(string $version, string $prettyVersion) : void {
    $this->version = $version;
    $this->prettyVersion = $prettyVersion;
    $this->stability = VersionParser::parseStability($version);
    $this->dev = $this->stability === 'dev';
}
RSS feed
Powered by Drupal