Commit a6fc12ab authored by Michael Biebl's avatar Michael Biebl

ZP-1332 Update vendor/ for new IpcWincacheProvider class.

Generated with composer 1.5.5.

Released under the Affero GNU General Public License (AGPL) version 3.
parent d09c1248
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// autoload.php @generated by Composer // autoload.php @generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitd6749fc2fb9944bbe86b2b7d79a7852f::getLoader(); return ComposerAutoloaderInit153a56a781a72686b71399955d98204f::getLoader();
...@@ -53,8 +53,9 @@ class ClassLoader ...@@ -53,8 +53,9 @@ class ClassLoader
private $useIncludePath = false; private $useIncludePath = false;
private $classMap = array(); private $classMap = array();
private $classMapAuthoritative = false; private $classMapAuthoritative = false;
private $missingClasses = array();
private $apcuPrefix;
public function getPrefixes() public function getPrefixes()
{ {
...@@ -271,6 +272,26 @@ class ClassLoader ...@@ -271,6 +272,26 @@ class ClassLoader
return $this->classMapAuthoritative; 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. * Registers this instance as an autoloader.
* *
...@@ -313,29 +334,34 @@ class ClassLoader ...@@ -313,29 +334,34 @@ class ClassLoader
*/ */
public function findFile($class) 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 // class map lookup
if (isset($this->classMap[$class])) { if (isset($this->classMap[$class])) {
return $this->classMap[$class]; return $this->classMap[$class];
} }
if ($this->classMapAuthoritative) { if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false; return false;
} }
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php'); $file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM // 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'); $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. // Remember that this class does not exist.
return $this->classMap[$class] = false; $this->missingClasses[$class] = true;
} }
return $file; return $file;
...@@ -348,9 +374,13 @@ class ClassLoader ...@@ -348,9 +374,13 @@ class ClassLoader
$first = $class[0]; $first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) { if (isset($this->prefixLengthsPsr4[$first])) {
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { $subPath = $class;
if (0 === strpos($class, $prefix)) { while (false !== $lastPos = strrpos($subPath, '\\')) {
foreach ($this->prefixDirsPsr4[$prefix] as $dir) { $subPath = substr($subPath, 0, $lastPos);
$search = $subPath.'\\';
if (isset($this->prefixDirsPsr4[$search])) {
foreach ($this->prefixDirsPsr4[$search] as $dir) {
$length = $this->prefixLengthsPsr4[$first][$search];
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
return $file; return $file;
} }
...@@ -399,6 +429,8 @@ class ClassLoader ...@@ -399,6 +429,8 @@ class ClassLoader
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file; return $file;
} }
return false;
} }
} }
......
Copyright (c) 2016 Nils Adermann, Jordi Boggiano Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
......
...@@ -73,6 +73,7 @@ return array( ...@@ -73,6 +73,7 @@ return array(
'InterProcessData' => $baseDir . '/lib/core/interprocessdata.php', 'InterProcessData' => $baseDir . '/lib/core/interprocessdata.php',
'IpcMemcachedProvider' => $baseDir . '/backend/ipcmemcached/ipcmemcachedprovider.php', 'IpcMemcachedProvider' => $baseDir . '/backend/ipcmemcached/ipcmemcachedprovider.php',
'IpcSharedMemoryProvider' => $baseDir . '/backend/ipcsharedmemory/ipcsharedmemoryprovider.php', 'IpcSharedMemoryProvider' => $baseDir . '/backend/ipcsharedmemory/ipcsharedmemoryprovider.php',
'IpcWincacheProvider' => $baseDir . '/backend/ipcwincache/ipcwincache.php',
'ItemOperations' => $baseDir . '/lib/request/itemoperations.php', 'ItemOperations' => $baseDir . '/lib/request/itemoperations.php',
'KoeSignature' => $baseDir . '/lib/core/koesignatures.php', 'KoeSignature' => $baseDir . '/lib/core/koesignatures.php',
'KoeSignatures' => $baseDir . '/lib/core/koesignatures.php', 'KoeSignatures' => $baseDir . '/lib/core/koesignatures.php',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInitd6749fc2fb9944bbe86b2b7d79a7852f class ComposerAutoloaderInit153a56a781a72686b71399955d98204f
{ {
private static $loader; private static $loader;
...@@ -19,15 +19,15 @@ class ComposerAutoloaderInitd6749fc2fb9944bbe86b2b7d79a7852f ...@@ -19,15 +19,15 @@ class ComposerAutoloaderInitd6749fc2fb9944bbe86b2b7d79a7852f
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInitd6749fc2fb9944bbe86b2b7d79a7852f', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit153a56a781a72686b71399955d98204f', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(); self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitd6749fc2fb9944bbe86b2b7d79a7852f', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit153a56a781a72686b71399955d98204f', '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) { if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php'; require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitd6749fc2fb9944bbe86b2b7d79a7852f::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInit153a56a781a72686b71399955d98204f::getInitializer($loader));
} else { } else {
$map = require __DIR__ . '/autoload_namespaces.php'; $map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) { foreach ($map as $namespace => $path) {
...@@ -48,19 +48,19 @@ class ComposerAutoloaderInitd6749fc2fb9944bbe86b2b7d79a7852f ...@@ -48,19 +48,19 @@ class ComposerAutoloaderInitd6749fc2fb9944bbe86b2b7d79a7852f
$loader->register(true); $loader->register(true);
if ($useStaticLoader) { if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitd6749fc2fb9944bbe86b2b7d79a7852f::$files; $includeFiles = Composer\Autoload\ComposerStaticInit153a56a781a72686b71399955d98204f::$files;
} else { } else {
$includeFiles = require __DIR__ . '/autoload_files.php'; $includeFiles = require __DIR__ . '/autoload_files.php';
} }
foreach ($includeFiles as $fileIdentifier => $file) { foreach ($includeFiles as $fileIdentifier => $file) {
composerRequired6749fc2fb9944bbe86b2b7d79a7852f($fileIdentifier, $file); composerRequire153a56a781a72686b71399955d98204f($fileIdentifier, $file);
} }
return $loader; return $loader;
} }
} }
function composerRequired6749fc2fb9944bbe86b2b7d79a7852f($fileIdentifier, $file) function composerRequire153a56a781a72686b71399955d98204f($fileIdentifier, $file)
{ {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file; require $file;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInitd6749fc2fb9944bbe86b2b7d79a7852f class ComposerStaticInit153a56a781a72686b71399955d98204f
{ {
public static $files = array ( public static $files = array (
'158e247719544c05f5e89c414f630c24' => __DIR__ . '/../..' . '/version.php', '158e247719544c05f5e89c414f630c24' => __DIR__ . '/../..' . '/version.php',
...@@ -80,6 +80,7 @@ class ComposerStaticInitd6749fc2fb9944bbe86b2b7d79a7852f ...@@ -80,6 +80,7 @@ class ComposerStaticInitd6749fc2fb9944bbe86b2b7d79a7852f
'InterProcessData' => __DIR__ . '/../..' . '/lib/core/interprocessdata.php', 'InterProcessData' => __DIR__ . '/../..' . '/lib/core/interprocessdata.php',
'IpcMemcachedProvider' => __DIR__ . '/../..' . '/backend/ipcmemcached/ipcmemcachedprovider.php', 'IpcMemcachedProvider' => __DIR__ . '/../..' . '/backend/ipcmemcached/ipcmemcachedprovider.php',
'IpcSharedMemoryProvider' => __DIR__ . '/../..' . '/backend/ipcsharedmemory/ipcsharedmemoryprovider.php', 'IpcSharedMemoryProvider' => __DIR__ . '/../..' . '/backend/ipcsharedmemory/ipcsharedmemoryprovider.php',
'IpcWincacheProvider' => __DIR__ . '/../..' . '/backend/ipcwincache/ipcwincache.php',
'ItemOperations' => __DIR__ . '/../..' . '/lib/request/itemoperations.php', 'ItemOperations' => __DIR__ . '/../..' . '/lib/request/itemoperations.php',
'KoeSignature' => __DIR__ . '/../..' . '/lib/core/koesignatures.php', 'KoeSignature' => __DIR__ . '/../..' . '/lib/core/koesignatures.php',
'KoeSignatures' => __DIR__ . '/../..' . '/lib/core/koesignatures.php', 'KoeSignatures' => __DIR__ . '/../..' . '/lib/core/koesignatures.php',
...@@ -209,7 +210,7 @@ class ComposerStaticInitd6749fc2fb9944bbe86b2b7d79a7852f ...@@ -209,7 +210,7 @@ class ComposerStaticInitd6749fc2fb9944bbe86b2b7d79a7852f
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->classMap = ComposerStaticInitd6749fc2fb9944bbe86b2b7d79a7852f::$classMap; $loader->classMap = ComposerStaticInit153a56a781a72686b71399955d98204f::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment