Class: Dependabot::Composer::PackageManager

Inherits:
Ecosystem::VersionManager
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/composer/package_manager.rb

Constant Summary collapse

NAME =
"composer"
MANIFEST_FILENAME =
"composer.json"
LOCKFILE_FILENAME =
"composer.lock"
AUTH_FILENAME =
"auth.json"
DEPENDENCY_NAME =
"composer/composer"
REQUIRE_KEY =
"require"
CONFIG_KEY =
"config"
PLATFORM_KEY =
"platform"
PLUGIN_API_VERSION_KEY =
"plugin-api-version"
REPOSITORY_KEY =
"composer_repository"
SUPPORTED_COMPOSER_VERSIONS =

Keep versions in ascending order

T.let([Version.new("2")].freeze, T::Array[Dependabot::Version])
DEPRECATED_COMPOSER_VERSIONS =

Currently, we don’t support any deprecated versions of Composer When a version is going to be unsupported, it will be added here for a while to give users time to upgrade Example for deprecation: DEPRECATED_COMPOSER_VERSIONS = T.let(.freeze, T::Array)

T.let([].freeze, T::Array[Dependabot::Version])

Instance Method Summary collapse

Constructor Details

#initialize(detected_version:, raw_version: nil) ⇒ PackageManager

Returns a new instance of PackageManager.



42
43
44
45
46
47
48
49
50
# File 'lib/dependabot/composer/package_manager.rb', line 42

def initialize(detected_version:, raw_version: nil)
  super(
    name: NAME,
    detected_version: Version.new(detected_version),
    version: raw_version ? Version.new(raw_version) : nil,
    deprecated_versions: DEPRECATED_COMPOSER_VERSIONS,
    supported_versions: SUPPORTED_COMPOSER_VERSIONS
 )
end