summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-04-29 11:40:42 +0200
committerLukas Reschke <lukas@owncloud.com>2016-04-29 11:40:42 +0200
commit5f9700ccdaf04e720dc23337bb7de53127698e31 (patch)
tree79fd87e64e1f4fb007979a605b11008a9017a035 /lib
parent1f63e8df61dbee0ee4acbdf485b1132312b88ce5 (diff)
parent4c1b55be92c418b168729d71b0e837b504014a49 (diff)
downloadnextcloud-server-5f9700ccdaf04e720dc23337bb7de53127698e31.tar.gz
nextcloud-server-5f9700ccdaf04e720dc23337bb7de53127698e31.zip
Merge pull request #24317 from owncloud/app-require-bits
Allow app developers to specify the minimum int size
Diffstat (limited to 'lib')
-rw-r--r--lib/private/App/DependencyAnalyzer.php6
-rw-r--r--lib/private/App/Platform.php7
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/App/DependencyAnalyzer.php b/lib/private/App/DependencyAnalyzer.php
index 6519e15bd8b..1e3a81c6351 100644
--- a/lib/private/App/DependencyAnalyzer.php
+++ b/lib/private/App/DependencyAnalyzer.php
@@ -145,6 +145,12 @@ class DependencyAnalyzer {
$missing[] = (string)$this->l->t('PHP with a version lower than %s is required.', $maxVersion);
}
}
+ if (isset($dependencies['php']['@attributes']['min-int-size'])) {
+ $intSize = $dependencies['php']['@attributes']['min-int-size'];
+ if ($intSize > $this->platform->getIntSize()*8) {
+ $missing[] = (string)$this->l->t('%sbit or higher PHP required.', $intSize);
+ }
+ }
return $missing;
}
diff --git a/lib/private/App/Platform.php b/lib/private/App/Platform.php
index 1d4c3767121..b1cb7c5aeb0 100644
--- a/lib/private/App/Platform.php
+++ b/lib/private/App/Platform.php
@@ -49,6 +49,13 @@ class Platform {
}
/**
+ * @return int
+ */
+ public function getIntSize() {
+ return PHP_INT_SIZE;
+ }
+
+ /**
* @return string
*/
public function getOcVersion() {