aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-12-29 16:27:31 +0100
committerLukas Reschke <lukas@statuscode.ch>2016-12-29 18:36:31 +0100
commit5bf56f67beb7297a87693756a606d22829c7ec6c (patch)
treefda8e43ce1ab4302d968dfe74d0609ff3068aa0d
parenta2b45c3cb767bbb891046fdfd34d0866fa2668af (diff)
downloadnextcloud-server-5bf56f67beb7297a87693756a606d22829c7ec6c.tar.gz
nextcloud-server-5bf56f67beb7297a87693756a606d22829c7ec6c.zip
Increase version to 11.0.1
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
m---------3rdparty0
-rw-r--r--lib/composer/composer/ClassLoader.php36
-rw-r--r--tests/lib/App/AppStore/Fetcher/AppFetcherTest.php2
-rw-r--r--version.php4
4 files changed, 34 insertions, 8 deletions
diff --git a/3rdparty b/3rdparty
-Subproject f2974c2e72b2ad5ab7ae745936c4d866405d2b6
+Subproject 06ddcb5f830abe40870c1738381a61d69e34006
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()
{
@@ -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,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);