Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
php /
Composer /
Util /
Delete
Unzip
Name
Size
Permission
Date
Action
Http
[ DIR ]
drwxr-xr-x
2026-07-12 06:24
AuthHelper.php
13.64
KB
-rw-r--r--
2023-03-21 10:50
Bitbucket.php
9.7
KB
-rw-r--r--
2023-03-21 10:50
ComposerMirror.php
2.34
KB
-rw-r--r--
2023-03-21 10:50
ConfigValidator.php
9.05
KB
-rw-r--r--
2023-03-21 10:50
ErrorHandler.php
2.44
KB
-rw-r--r--
2023-03-21 10:50
Filesystem.php
27.82
KB
-rw-r--r--
2023-03-21 10:50
Git.php
22.09
KB
-rw-r--r--
2023-03-21 10:50
GitHub.php
8.46
KB
-rw-r--r--
2026-05-14 09:28
GitLab.php
12
KB
-rw-r--r--
2023-03-21 10:50
Hg.php
3.19
KB
-rw-r--r--
2023-03-21 10:50
HttpDownloader.php
17.63
KB
-rw-r--r--
2023-03-21 10:50
IniHelper.php
1.61
KB
-rw-r--r--
2023-03-21 10:50
Loop.php
3.47
KB
-rw-r--r--
2023-03-21 10:50
MetadataMinifier.php
650
B
-rw-r--r--
2023-03-21 10:50
NoProxyPattern.php
10.62
KB
-rw-r--r--
2023-03-21 10:50
PackageInfo.php
964
B
-rw-r--r--
2023-03-21 10:50
PackageSorter.php
4.08
KB
-rw-r--r--
2023-03-21 10:50
Perforce.php
18.47
KB
-rw-r--r--
2026-05-14 09:28
Platform.php
8.57
KB
-rw-r--r--
2023-03-21 10:50
ProcessExecutor.php
13.82
KB
-rw-r--r--
2026-05-14 09:28
RemoteFilesystem.php
26.83
KB
-rw-r--r--
2023-03-21 10:50
Silencer.php
2.05
KB
-rw-r--r--
2023-03-21 10:50
StreamContextFactory.php
9.32
KB
-rw-r--r--
2023-03-21 10:50
Svn.php
9.66
KB
-rw-r--r--
2023-03-21 10:50
SyncHelper.php
2.39
KB
-rw-r--r--
2023-03-21 10:50
Tar.php
1.73
KB
-rw-r--r--
2023-03-21 10:50
TlsHelper.php
6.88
KB
-rw-r--r--
2023-03-21 10:50
Url.php
5.23
KB
-rw-r--r--
2026-05-14 09:28
Zip.php
3.31
KB
-rw-r--r--
2023-03-21 10:50
Save
Rename
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Util; use Composer\Package\PackageInterface; use Composer\Package\RootPackageInterface; class PackageSorter { /** * Returns the most recent version of a set of packages * * This is ideally the default branch version, or failing that it will return the package with the highest version * * @template T of PackageInterface * @param array<T> $packages * @return ($packages is non-empty-array<T> ? T : T|null) */ public static function getMostCurrentVersion(array $packages): ?PackageInterface { if (count($packages) === 0) { return null; } $highest = reset($packages); foreach ($packages as $candidate) { if ($candidate->isDefaultBranch()) { return $candidate; } if (version_compare($highest->getVersion(), $candidate->getVersion(), '<')) { $highest = $candidate; } } return $highest; } /** * Sorts packages by name * * @template T of PackageInterface * @param array<T> $packages * @return array<T> */ public static function sortPackagesAlphabetically(array $packages): array { usort($packages, static function (PackageInterface $a, PackageInterface $b) { return $a->getName() <=> $b->getName(); }); return $packages; } /** * Sorts packages by dependency weight * * Packages of equal weight are sorted alphabetically * * @param PackageInterface[] $packages * @param array<string, int> $weights Pre-set weights for some packages to give them more (negative number) or less (positive) weight offsets * @return PackageInterface[] sorted array */ public static function sortPackages(array $packages, array $weights = []): array { $usageList = []; foreach ($packages as $package) { $links = $package->getRequires(); if ($package instanceof RootPackageInterface) { $links = array_merge($links, $package->getDevRequires()); } foreach ($links as $link) { $target = $link->getTarget(); $usageList[$target][] = $package->getName(); } } $computing = []; $computed = []; $computeImportance = static function ($name) use (&$computeImportance, &$computing, &$computed, $usageList, $weights) { // reusing computed importance if (isset($computed[$name])) { return $computed[$name]; } // canceling circular dependency if (isset($computing[$name])) { return 0; } $computing[$name] = true; $weight = $weights[$name] ?? 0; if (isset($usageList[$name])) { foreach ($usageList[$name] as $user) { $weight -= 1 - $computeImportance($user); } } unset($computing[$name]); $computed[$name] = $weight; return $weight; }; $weightedPackages = []; foreach ($packages as $index => $package) { $name = $package->getName(); $weight = $computeImportance($name); $weightedPackages[] = ['name' => $name, 'weight' => $weight, 'index' => $index]; } usort($weightedPackages, static function (array $a, array $b): int { if ($a['weight'] !== $b['weight']) { return $a['weight'] - $b['weight']; } return strnatcasecmp($a['name'], $b['name']); }); $sortedPackages = []; foreach ($weightedPackages as $pkg) { $sortedPackages[] = $packages[$pkg['index']]; } return $sortedPackages; } }