Skip to content

Commit

Permalink
Dev: Run composer install no-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Oct 27, 2021
1 parent 3330e4f commit 226c560
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 25 deletions.
42 changes: 38 additions & 4 deletions third_party/composer/ClassLoader.php
Expand Up @@ -37,11 +37,13 @@
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
private $vendorDir;

// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
Expand All @@ -57,10 +59,17 @@ class ClassLoader
private $missingClasses = array();
private $apcuPrefix;

private static $registeredLoaders = array();

public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}

public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}

return array();
Expand Down Expand Up @@ -279,7 +288,7 @@ public function isClassMapAuthoritative()
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}

/**
Expand All @@ -300,6 +309,17 @@ public function getApcuPrefix()
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);

if (null === $this->vendorDir) {
return;
}

if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}

/**
Expand All @@ -308,6 +328,10 @@ public function register($prepend = false)
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));

if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}

/**
Expand Down Expand Up @@ -367,6 +391,16 @@ public function findFile($class)
return $file;
}

/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}

private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
Expand Down
56 changes: 45 additions & 11 deletions third_party/composer/InstalledVersions.php
Expand Up @@ -20,8 +20,6 @@





class InstalledVersions
{
private static $installed = array (
Expand All @@ -32,7 +30,7 @@ class InstalledVersions
'aliases' =>
array (
),
'reference' => '61a21a821d0279dabfe7da614072c66e4115e913',
'reference' => '3330e4fe97b0c039bd31fb4c57af412f6dfdfc80',
'name' => 'limesurvey/limesurvey',
),
'versions' =>
Expand All @@ -44,7 +42,16 @@ class InstalledVersions
'aliases' =>
array (
),
'reference' => '61a21a821d0279dabfe7da614072c66e4115e913',
'reference' => '3330e4fe97b0c039bd31fb4c57af412f6dfdfc80',
),
'paragonie/constant_time_encoding' =>
array (
'pretty_version' => 'v2.4.0',
'version' => '2.4.0.0',
'aliases' =>
array (
),
'reference' => 'f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c',
),
'paragonie/random_compat' =>
array (
Expand All @@ -57,21 +64,48 @@ class InstalledVersions
),
'paragonie/sodium_compat' =>
array (
'pretty_version' => 'v1.16.0',
'version' => '1.16.0.0',
'pretty_version' => 'v1.17.0',
'version' => '1.17.0.0',
'aliases' =>
array (
),
'reference' => 'c59cac21abbcc0df06a3dd18076450ea4797b321',
),
'phpseclib/bcmath_compat' =>
array (
'pretty_version' => '1.0.4',
'version' => '1.0.4.0',
'aliases' =>
array (
),
'reference' => '928e0565c9fe4f60b8f09119656c1aa418fc84ab',
'reference' => 'f805922db4b3d8c1e174dafb74ac7374264e8880',
),
'phpseclib/phpseclib' =>
array (
'pretty_version' => '3.0.10',
'version' => '3.0.10.0',
'aliases' =>
array (
),
'reference' => '62fcc5a94ac83b1506f52d7558d828617fac9187',
),
'symfony/polyfill-ctype' =>
array (
'pretty_version' => 'v1.22.1',
'version' => '1.22.1.0',
'pretty_version' => 'v1.23.0',
'version' => '1.23.0.0',
'aliases' =>
array (
),
'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce',
),
'tiamo/spss' =>
array (
'pretty_version' => '2.2.2',
'version' => '2.2.2.0',
'aliases' =>
array (
),
'reference' => 'c6c942b1ac76c82448322025e084cadc56048b4e',
'reference' => '8fe40261cdf4980aab0913f64f8bca7aeb0937b0',
),
'twig/twig' =>
array (
Expand Down Expand Up @@ -110,6 +144,7 @@ public static function getInstalledPackages()
$packages[] = array_keys($installed['versions']);
}


if (1 === \count($packages)) {
return $packages[0];
}
Expand Down Expand Up @@ -305,7 +340,6 @@ public static function reload($data)




private static function getInstalled()
{
if (null === self::$canGetVendors) {
Expand Down
1 change: 1 addition & 0 deletions third_party/composer/autoload_classmap.php
Expand Up @@ -6,4 +6,5 @@
$baseDir = dirname($vendorDir);

return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
);
9 changes: 7 additions & 2 deletions third_party/composer/autoload_real.php
Expand Up @@ -13,19 +13,24 @@ public static function loadClassLoader($class)
}
}

/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}

require __DIR__ . '/platform_check.php';

spl_autoload_register(array('ComposerAutoloaderInitddb1a145e450f862353420acc5153e40', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitddb1a145e450f862353420acc5153e40', 'loadClassLoader'));

$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
require __DIR__ . '/autoload_static.php';

call_user_func(\Composer\Autoload\ComposerStaticInitddb1a145e450f862353420acc5153e40::getInitializer($loader));
} else {
Expand Down
5 changes: 5 additions & 0 deletions third_party/composer/autoload_static.php
Expand Up @@ -108,12 +108,17 @@ class ComposerStaticInitddb1a145e450f862353420acc5153e40
),
);

public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
);

public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitddb1a145e450f862353420acc5153e40::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitddb1a145e450f862353420acc5153e40::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInitddb1a145e450f862353420acc5153e40::$prefixesPsr0;
$loader->classMap = ComposerStaticInitddb1a145e450f862353420acc5153e40::$classMap;

}, null, ClassLoader::class);
}
Expand Down
52 changes: 44 additions & 8 deletions third_party/composer/installed.php
Expand Up @@ -6,7 +6,7 @@
'aliases' =>
array (
),
'reference' => '61a21a821d0279dabfe7da614072c66e4115e913',
'reference' => '3330e4fe97b0c039bd31fb4c57af412f6dfdfc80',
'name' => 'limesurvey/limesurvey',
),
'versions' =>
Expand All @@ -18,7 +18,16 @@
'aliases' =>
array (
),
'reference' => '61a21a821d0279dabfe7da614072c66e4115e913',
'reference' => '3330e4fe97b0c039bd31fb4c57af412f6dfdfc80',
),
'paragonie/constant_time_encoding' =>
array (
'pretty_version' => 'v2.4.0',
'version' => '2.4.0.0',
'aliases' =>
array (
),
'reference' => 'f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c',
),
'paragonie/random_compat' =>
array (
Expand All @@ -31,21 +40,48 @@
),
'paragonie/sodium_compat' =>
array (
'pretty_version' => 'v1.16.0',
'version' => '1.16.0.0',
'pretty_version' => 'v1.17.0',
'version' => '1.17.0.0',
'aliases' =>
array (
),
'reference' => 'c59cac21abbcc0df06a3dd18076450ea4797b321',
),
'phpseclib/bcmath_compat' =>
array (
'pretty_version' => '1.0.4',
'version' => '1.0.4.0',
'aliases' =>
array (
),
'reference' => '928e0565c9fe4f60b8f09119656c1aa418fc84ab',
'reference' => 'f805922db4b3d8c1e174dafb74ac7374264e8880',
),
'phpseclib/phpseclib' =>
array (
'pretty_version' => '3.0.10',
'version' => '3.0.10.0',
'aliases' =>
array (
),
'reference' => '62fcc5a94ac83b1506f52d7558d828617fac9187',
),
'symfony/polyfill-ctype' =>
array (
'pretty_version' => 'v1.22.1',
'version' => '1.22.1.0',
'pretty_version' => 'v1.23.0',
'version' => '1.23.0.0',
'aliases' =>
array (
),
'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce',
),
'tiamo/spss' =>
array (
'pretty_version' => '2.2.2',
'version' => '2.2.2.0',
'aliases' =>
array (
),
'reference' => 'c6c942b1ac76c82448322025e084cadc56048b4e',
'reference' => '8fe40261cdf4980aab0913f64f8bca7aeb0937b0',
),
'twig/twig' =>
array (
Expand Down

0 comments on commit 226c560

Please sign in to comment.