Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Composer/ScriptHandler.php')
-rw-r--r--core/Composer/ScriptHandler.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/core/Composer/ScriptHandler.php b/core/Composer/ScriptHandler.php
index d4db6536b0..0595473f48 100644
--- a/core/Composer/ScriptHandler.php
+++ b/core/Composer/ScriptHandler.php
@@ -16,13 +16,21 @@ namespace Piwik\Composer;
*/
class ScriptHandler
{
+ private static function isPhp7orLater()
+ {
+ return version_compare('7.0.0-dev', PHP_VERSION) < 1;
+ }
+
public static function cleanXhprof()
{
if (! is_dir('vendor/facebook/xhprof/extension')) {
return;
}
- passthru('misc/composer/clean-xhprof.sh');
+ if (!self::isPhp7orLater()) {
+ // doesn't work with PHP 7 at the moment
+ passthru('misc/composer/clean-xhprof.sh');
+ }
}
public static function buildXhprof()
@@ -31,6 +39,9 @@ class ScriptHandler
return;
}
- passthru('misc/composer/build-xhprof.sh');
+
+ if (!self::isPhp7orLater()) {
+ passthru('misc/composer/clean-xhprof.sh');
+ }
}
}