Skip to content

Commit 543305b

Browse files
committed
fix: composer install to latest version
Signed-off-by: codewithvk <[email protected]>
1 parent 546b888 commit 543305b

File tree

4 files changed

+6
-22
lines changed

4 files changed

+6
-22
lines changed

composer/composer/InstalledVersions.php

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ class InstalledVersions
3232
*/
3333
private static $installed;
3434

35-
/**
36-
* @var bool
37-
*/
38-
private static $installedIsLocalDir;
39-
4035
/**
4136
* @var bool|null
4237
*/
@@ -314,12 +309,6 @@ public static function reload($data)
314309
{
315310
self::$installed = $data;
316311
self::$installedByVendor = array();
317-
318-
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
319-
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
320-
// so we have to assume it does not, and that may result in duplicate data being returned when listing
321-
// all installed packages for example
322-
self::$installedIsLocalDir = false;
323312
}
324313

325314
/**
@@ -336,24 +325,19 @@ private static function getInstalled()
336325
$copiedLocalDir = false;
337326

338327
if (self::$canGetVendors) {
339-
$selfDir = strtr(__DIR__, '\\', '/');
340328
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
341-
$vendorDir = strtr($vendorDir, '\\', '/');
342329
if (isset(self::$installedByVendor[$vendorDir])) {
343330
$installed[] = self::$installedByVendor[$vendorDir];
344331
} elseif (is_file($vendorDir.'/composer/installed.php')) {
345332
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
346333
$required = require $vendorDir.'/composer/installed.php';
347334
self::$installedByVendor[$vendorDir] = $required;
348335
$installed[] = $required;
349-
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
336+
if (strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
350337
self::$installed = $required;
351-
self::$installedIsLocalDir = true;
338+
$copiedLocalDir = true;
352339
}
353340
}
354-
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
355-
$copiedLocalDir = true;
356-
}
357341
}
358342
}
359343

composer/composer/autoload_classmap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@
7979
'OCA\\Richdocuments\\Service\\FederationService' => $baseDir . '/../lib/Service/FederationService.php',
8080
'OCA\\Richdocuments\\Service\\FileTargetService' => $baseDir . '/../lib/Service/FileTargetService.php',
8181
'OCA\\Richdocuments\\Service\\FontService' => $baseDir . '/../lib/Service/FontService.php',
82-
'OCA\\Richdocuments\\Service\\SettingsService' => $baseDir . '/../lib/Service/SettingsService.php',
8382
'OCA\\Richdocuments\\Service\\InitialStateService' => $baseDir . '/../lib/Service/InitialStateService.php',
8483
'OCA\\Richdocuments\\Service\\PdfService' => $baseDir . '/../lib/Service/PdfService.php',
8584
'OCA\\Richdocuments\\Service\\RemoteOptionsService' => $baseDir . '/../lib/Service/RemoteOptionsService.php',
8685
'OCA\\Richdocuments\\Service\\RemoteService' => $baseDir . '/../lib/Service/RemoteService.php',
86+
'OCA\\Richdocuments\\Service\\SettingsService' => $baseDir . '/../lib/Service/SettingsService.php',
8787
'OCA\\Richdocuments\\Service\\TemplateFieldService' => $baseDir . '/../lib/Service/TemplateFieldService.php',
8888
'OCA\\Richdocuments\\Service\\UserScopeService' => $baseDir . '/../lib/Service/UserScopeService.php',
8989
'OCA\\Richdocuments\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php',

composer/composer/autoload_static.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ class ComposerStaticInitRichdocuments
112112
'OCA\\Richdocuments\\Service\\FederationService' => __DIR__ . '/..' . '/../lib/Service/FederationService.php',
113113
'OCA\\Richdocuments\\Service\\FileTargetService' => __DIR__ . '/..' . '/../lib/Service/FileTargetService.php',
114114
'OCA\\Richdocuments\\Service\\FontService' => __DIR__ . '/..' . '/../lib/Service/FontService.php',
115-
'OCA\\Richdocuments\\Service\\SettingsService' => __DIR__ . '/..' . '/../lib/Service/SettingsService.php',
116115
'OCA\\Richdocuments\\Service\\InitialStateService' => __DIR__ . '/..' . '/../lib/Service/InitialStateService.php',
117116
'OCA\\Richdocuments\\Service\\PdfService' => __DIR__ . '/..' . '/../lib/Service/PdfService.php',
118117
'OCA\\Richdocuments\\Service\\RemoteOptionsService' => __DIR__ . '/..' . '/../lib/Service/RemoteOptionsService.php',
119118
'OCA\\Richdocuments\\Service\\RemoteService' => __DIR__ . '/..' . '/../lib/Service/RemoteService.php',
119+
'OCA\\Richdocuments\\Service\\SettingsService' => __DIR__ . '/..' . '/../lib/Service/SettingsService.php',
120120
'OCA\\Richdocuments\\Service\\TemplateFieldService' => __DIR__ . '/..' . '/../lib/Service/TemplateFieldService.php',
121121
'OCA\\Richdocuments\\Service\\UserScopeService' => __DIR__ . '/..' . '/../lib/Service/UserScopeService.php',
122122
'OCA\\Richdocuments\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php',

composer/composer/installed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name' => '__root__',
44
'pretty_version' => 'dev-main',
55
'version' => 'dev-main',
6-
'reference' => '8c21f5edd732074493f83a7e9c84b825ab8aab25',
6+
'reference' => '546b888f4192022a11769f4d68bc82ef4c9bc765',
77
'type' => 'library',
88
'install_path' => __DIR__ . '/../',
99
'aliases' => array(),
@@ -13,7 +13,7 @@
1313
'__root__' => array(
1414
'pretty_version' => 'dev-main',
1515
'version' => 'dev-main',
16-
'reference' => '8c21f5edd732074493f83a7e9c84b825ab8aab25',
16+
'reference' => '546b888f4192022a11769f4d68bc82ef4c9bc765',
1717
'type' => 'library',
1818
'install_path' => __DIR__ . '/../',
1919
'aliases' => array(),

0 commit comments

Comments
 (0)