这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/PackageVersions/ComposerV2Plugin.php

This file was deleted.

234 changes: 0 additions & 234 deletions src/PackageVersions/Installer.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/PackageVersions/Versions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,8 @@
use Composer\InstalledVersions;
use OutOfBoundsException;

/**
* This is a stub class: it is in place only for scenarios where PackageVersions
* is installed with a `--no-scripts` flag, in which scenarios the Versions class
* is not being replaced.
*
* If you are reading this docBlock inside your `vendor/` dir, then this means
* that PackageVersions didn't correctly install, and is in "fallback" mode.
*/
final class Versions
{
/**
* @deprecated please use {@see self::rootPackageName()} instead.
* This constant will be removed in version 2.0.0.
*/
public const ROOT_PACKAGE_NAME = 'unknown/root-package@UNKNOWN';

private function __construct()
{
}
Expand All @@ -48,13 +34,6 @@ public static function rootPackageName() : string
*/
public static function getVersion(string $packageName) : string
{
/** @psalm-suppress DeprecatedConstant */
if ($packageName === self::ROOT_PACKAGE_NAME) {
$rootPackage = InstalledVersions::getRootPackage();

return $rootPackage['pretty_version'] . '@' . $rootPackage['reference'];
}

return InstalledVersions::getPrettyVersion($packageName)
. '@' . InstalledVersions::getReference($packageName);
}
Expand Down
Loading