Skip to content

Commit

Permalink
Merge pull request #2044 from nextcloud/dependabot/composer/symfony/s…
Browse files Browse the repository at this point in the history
…table29

[stable29] build(deps): Bump symfony/* to latest 5.4
  • Loading branch information
nickvergessen authored Jan 29, 2025
2 parents 059e167 + 50ff872 commit 871ffec
Show file tree
Hide file tree
Showing 136 changed files with 685 additions and 516 deletions.
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
"sabre/dav": "^4.4.0",
"scssphp/scssphp": "^1.12",
"stecman/symfony-console-completion": "^0.11.0",
"symfony/console": "^5.4.24",
"symfony/event-dispatcher": "^5.4.26",
"symfony/http-foundation": "^5.4.24",
"symfony/mailer": "^5.4.22",
"symfony/console": "^5.4.47",
"symfony/event-dispatcher": "^5.4.45",
"symfony/http-foundation": "^5.4.48",
"symfony/mailer": "^5.4.45",
"symfony/polyfill-intl-grapheme": "^1.28",
"symfony/polyfill-intl-normalizer": "^1.28",
"symfony/process": "^5.4.34",
"symfony/routing": "^5.4.24",
"symfony/translation": "^5.4.24",
"symfony/process": "^5.4.47",
"symfony/routing": "^5.4.48",
"symfony/translation": "^5.4.45",
"wapmorgan/mp3info": "^0.1.0",
"web-auth/webauthn-lib": "^3.1"
},
Expand Down
92 changes: 46 additions & 46 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 23 additions & 4 deletions composer/InstalledVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ class InstalledVersions
*/
private static $installed;

/**
* @var bool
*/
private static $installedIsLocalDir;

/**
* @var bool|null
*/
Expand Down Expand Up @@ -309,6 +314,12 @@ public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();

// when using reload, we disable the duplicate protection to ensure that self::$installed data is
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
// so we have to assume it does not, and that may result in duplicate data being returned when listing
// all installed packages for example
self::$installedIsLocalDir = false;
}

/**
Expand All @@ -322,19 +333,27 @@ private static function getInstalled()
}

$installed = array();
$copiedLocalDir = false;

if (self::$canGetVendors) {
$selfDir = strtr(__DIR__, '\\', '/');
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
$vendorDir = strtr($vendorDir, '\\', '/');
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @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 */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
self::$installedByVendor[$vendorDir] = $required;
$installed[] = $required;
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
self::$installed = $required;
self::$installedIsLocalDir = true;
}
}
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
$copiedLocalDir = true;
}
}
}

Expand All @@ -350,7 +369,7 @@ private static function getInstalled()
}
}

if (self::$installed !== array()) {
if (self::$installed !== array() && !$copiedLocalDir) {
$installed[] = self::$installed;
}

Expand Down
Loading

0 comments on commit 871ffec

Please sign in to comment.