Change root.dev-requirement to root.dev in installed.php as the root is not required per se, and this simply tracks the dev mode at install time
parent
cb2db16637
commit
1179e4b481
|
@ -189,7 +189,7 @@ class InstalledVersions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}
|
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool}
|
||||||
*/
|
*/
|
||||||
public static function getRootPackage()
|
public static function getRootPackage()
|
||||||
{
|
{
|
||||||
|
@ -202,7 +202,7 @@ class InstalledVersions
|
||||||
* Returns the raw installed.php data for custom implementations
|
* Returns the raw installed.php data for custom implementations
|
||||||
*
|
*
|
||||||
* @return array[]
|
* @return array[]
|
||||||
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: array<string, array{pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[]}>}
|
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool}, versions: array<string, array{dev-requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[]}>}
|
||||||
*/
|
*/
|
||||||
public static function getRawData()
|
public static function getRawData()
|
||||||
{
|
{
|
||||||
|
@ -225,7 +225,7 @@ class InstalledVersions
|
||||||
* @param array[] $data A vendor/composer/installed.php data set
|
* @param array[] $data A vendor/composer/installed.php data set
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: array<string, array{pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[]}>} $data
|
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool}, versions: array<string, array{dev-requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[]}>} $data
|
||||||
*/
|
*/
|
||||||
public static function reload($data)
|
public static function reload($data)
|
||||||
{
|
{
|
||||||
|
@ -235,7 +235,7 @@ class InstalledVersions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array[]
|
* @return array[]
|
||||||
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: array<string, array{pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[]}>}>
|
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool}, versions: array<string, array{dev-requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[]}>}>
|
||||||
*/
|
*/
|
||||||
private static function getInstalled()
|
private static function getInstalled()
|
||||||
{
|
{
|
||||||
|
|
|
@ -179,8 +179,9 @@ class FilesystemRepository extends WritableArrayRepository
|
||||||
);
|
);
|
||||||
if ($package instanceof RootPackageInterface) {
|
if ($package instanceof RootPackageInterface) {
|
||||||
$versions['root'] = $versions['versions'][$package->getName()];
|
$versions['root'] = $versions['versions'][$package->getName()];
|
||||||
|
unset($versions['root']['dev-requirement']);
|
||||||
$versions['root']['name'] = $package->getName();
|
$versions['root']['name'] = $package->getName();
|
||||||
$versions['root']['dev-requirement'] = $devMode;
|
$versions['root']['dev'] = $devMode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@ return array(
|
||||||
'1.10.x-dev',
|
'1.10.x-dev',
|
||||||
),
|
),
|
||||||
'reference' => 'sourceref-by-default',
|
'reference' => 'sourceref-by-default',
|
||||||
'dev-requirement' => true,
|
|
||||||
'name' => '__root__',
|
'name' => '__root__',
|
||||||
|
'dev' => true,
|
||||||
),
|
),
|
||||||
'versions' => array(
|
'versions' => array(
|
||||||
'__root__' => array(
|
'__root__' => array(
|
||||||
|
|
Loading…
Reference in New Issue