Update composer autoloader and fix packaging
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Родитель
19a93ffe57
Коммит
702e421893
2
Makefile
2
Makefile
|
@ -24,6 +24,7 @@ update-composer: composer.phar
|
|||
appstore:
|
||||
mkdir -p $(sign_dir)
|
||||
rsync -a \
|
||||
--delete \
|
||||
--exclude=.git \
|
||||
--exclude=build \
|
||||
--exclude=.gitignore \
|
||||
|
@ -37,6 +38,7 @@ appstore:
|
|||
--exclude=l10n/no-php \
|
||||
--exclude=Makefile \
|
||||
--exclude=nbproject \
|
||||
--exclude=node_modules \
|
||||
--exclude=screenshots \
|
||||
--exclude=phpunit*xml \
|
||||
--exclude=tests \
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -53,8 +53,9 @@ class ClassLoader
|
|||
|
||||
private $useIncludePath = false;
|
||||
private $classMap = array();
|
||||
|
||||
private $classMapAuthoritative = false;
|
||||
private $missingClasses = array();
|
||||
private $apcuPrefix;
|
||||
|
||||
public function getPrefixes()
|
||||
{
|
||||
|
@ -271,6 +272,26 @@ class ClassLoader
|
|||
return $this->classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче