diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-04-03 11:05:48 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-04-03 11:05:48 +0300 |
commit | 702e4218938c262d13932b149150bc4d3928c37b (patch) | |
tree | 93f37cc12dc479dfbd3027df132a301d3ff9300d /vendor | |
parent | 19a93ffe5722500624adda9af9499d42c9e4e9fc (diff) |
Update composer autoloader and fix packagingnightly-20170403
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/autoload.php | 4 | ||||
-rw-r--r-- | vendor/composer/ClassLoader.php | 48 | ||||
-rw-r--r-- | vendor/composer/autoload_real.php | 10 | ||||
-rw-r--r-- | vendor/composer/autoload_static.php | 4 | ||||
-rw-r--r-- | vendor/composer/installed.json | 2 |
5 files changed, 48 insertions, 20 deletions
diff --git a/vendor/autoload.php b/vendor/autoload.php index 267979b..bd5d073 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -2,6 +2,6 @@ // autoload.php @generated by Composer -require_once __DIR__ . '/composer' . '/autoload_real.php'; +require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit135f220d4958b656c3111e7413e2c032::getLoader(); +return ComposerAutoloaderInitd5289176fb4b3e86997c3313bff1b499::getLoader(); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index ff6ecfb..4626994 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -53,8 +53,9 @@ class ClassLoader private $useIncludePath = false; private $classMap = array(); - private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; public function getPrefixes() { @@ -272,6 +273,26 @@ class ClassLoader } /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** * Registers this instance as an autoloader. * * @param bool $prepend Whether to prepend the autoloader or not @@ -313,29 +334,34 @@ class ClassLoader */ public function findFile($class) { - // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 - if ('\\' == $class[0]) { - $class = substr($class, 1); - } - // class map lookup if (isset($this->classMap[$class])) { return $this->classMap[$class]; } - if ($this->classMapAuthoritative) { + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { return false; } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } $file = $this->findFileWithExtension($class, '.php'); // Search for Hack files if we are running on HHVM - if ($file === null && defined('HHVM_VERSION')) { + if (false === $file && defined('HHVM_VERSION')) { $file = $this->findFileWithExtension($class, '.hh'); } - if ($file === null) { + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { // Remember that this class does not exist. - return $this->classMap[$class] = false; + $this->missingClasses[$class] = true; } return $file; @@ -399,6 +425,8 @@ class ClassLoader if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { return $file; } + + return false; } } diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index d924140..2635b56 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit135f220d4958b656c3111e7413e2c032 +class ComposerAutoloaderInitd5289176fb4b3e86997c3313bff1b499 { private static $loader; @@ -19,15 +19,15 @@ class ComposerAutoloaderInit135f220d4958b656c3111e7413e2c032 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit135f220d4958b656c3111e7413e2c032', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitd5289176fb4b3e86997c3313bff1b499', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit135f220d4958b656c3111e7413e2c032', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitd5289176fb4b3e86997c3313bff1b499', 'loadClassLoader')); - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION'); + $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'; - call_user_func(\Composer\Autoload\ComposerStaticInit135f220d4958b656c3111e7413e2c032::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitd5289176fb4b3e86997c3313bff1b499::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index fb5d375..1949b90 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit135f220d4958b656c3111e7413e2c032 +class ComposerStaticInitd5289176fb4b3e86997c3313bff1b499 { public static $classMap = array ( 'u2flib_server\\Error' => __DIR__ . '/..' . '/yubico/u2flib-server/src/u2flib_server/U2F.php', @@ -17,7 +17,7 @@ class ComposerStaticInit135f220d4958b656c3111e7413e2c032 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->classMap = ComposerStaticInit135f220d4958b656c3111e7413e2c032::$classMap; + $loader->classMap = ComposerStaticInitd5289176fb4b3e86997c3313bff1b499::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 1dea6bd..1e04261 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -17,7 +17,7 @@ "require": { "ext-openssl": "*" }, - "time": "2016-02-19 09:47:51", + "time": "2016-02-19T09:47:51+00:00", "type": "library", "installation-source": "dist", "autoload": { |