mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Update PearPackageExtractor for package.xml 2.1 support
This commit is contained in:
parent
71ac073ebe
commit
a88265a497
3 changed files with 48 additions and 2 deletions
|
@ -115,13 +115,13 @@ class PearPackageExtractor
|
|||
throw new \RuntimeException('Package definition file is not valid.');
|
||||
|
||||
$packageSchemaVersion = $package['version'];
|
||||
if ($packageSchemaVersion == '1.0') {
|
||||
if ('1.0' == $packageSchemaVersion) {
|
||||
$children = $package->release->filelist->children();
|
||||
$packageName = (string) $package->name;
|
||||
$packageVersion = (string) $package->release->version;
|
||||
$sourceDir = $packageName . '-' . $packageVersion;
|
||||
$result = $this->buildSourceList10($children, $role, $sourceDir);
|
||||
} elseif ($packageSchemaVersion == '2.0') {
|
||||
} elseif ('2.0' == $packageSchemaVersion || '2.1' == $packageSchemaVersion) {
|
||||
$children = $package->contents->children();
|
||||
$packageName = (string) $package->name;
|
||||
$packageVersion = (string) $package->version->release;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue