diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-10-22 06:19:32 +0400 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-10-22 06:20:54 +0400 |
commit | b69e4c5fb041f3087328b5a97ebe00b25da22b8d (patch) | |
tree | 977e708ebc3ff21656170390039e1d3cf0d44809 /core | |
parent | 1362e25c2b0cb1706674d3b25e1a0f94299d3680 (diff) |
Fixes #6493 Composer install can now run on Windows
Diffstat (limited to 'core')
-rw-r--r-- | core/Composer/ScriptHandler.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/core/Composer/ScriptHandler.php b/core/Composer/ScriptHandler.php new file mode 100644 index 0000000000..d4db6536b0 --- /dev/null +++ b/core/Composer/ScriptHandler.php @@ -0,0 +1,36 @@ +<?php +/** + * Piwik - free/libre analytics platform + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +namespace Piwik\Composer; + +/** + * Scripts executed before/after Composer install and update. + * + * We use this PHP class because setting the bash scripts directly in composer.json breaks + * Composer on Windows systems. + */ +class ScriptHandler +{ + public static function cleanXhprof() + { + if (! is_dir('vendor/facebook/xhprof/extension')) { + return; + } + + passthru('misc/composer/clean-xhprof.sh'); + } + + public static function buildXhprof() + { + if (! is_dir('vendor/facebook/xhprof/extension')) { + return; + } + + passthru('misc/composer/build-xhprof.sh'); + } +} |