diff --git a/3rdparty b/3rdparty index f2974c2e72b..06ddcb5f830 160000 --- a/3rdparty +++ b/3rdparty @@ -1 +1 @@ -Subproject commit f2974c2e72b2ad5ab7ae745936c4d866405d2b61 +Subproject commit 06ddcb5f830abe40870c1738381a61d69e34006b diff --git a/lib/composer/composer/ClassLoader.php b/lib/composer/composer/ClassLoader.php index ac67d302a18..4626994fd4d 100644 --- a/lib/composer/composer/ClassLoader.php +++ b/lib/composer/composer/ClassLoader.php @@ -55,6 +55,7 @@ class ClassLoader 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,11 +334,6 @@ 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]; @@ -325,6 +341,12 @@ class ClassLoader 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'); @@ -333,6 +355,10 @@ class ClassLoader $file = $this->findFileWithExtension($class, '.hh'); } + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + if (false === $file) { // Remember that this class does not exist. $this->missingClasses[$class] = true; diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php index aa0d50cac97..8d0e5d689f8 100644 --- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php @@ -93,7 +93,7 @@ EOD; $client ->expects($this->once()) ->method('get') - ->with('https://apps.nextcloud.com/api/v1/platform/11.0.0/apps.json') + ->with('https://apps.nextcloud.com/api/v1/platform/11.0.1/apps.json') ->willReturn($response); $response ->expects($this->once()) diff --git a/version.php b/version.php index 9d31dd8b0e9..257fe0316cb 100644 --- a/version.php +++ b/version.php @@ -26,10 +26,10 @@ // between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel // when updating major/minor version number. -$OC_Version = array(11, 0, 0, 10); +$OC_Version = array(11, 0, 1, 0); // The human readable string -$OC_VersionString = '11.0.0'; +$OC_VersionString = '11.0.1'; $OC_VersionCanBeUpgradedFrom = array(9, 1);