Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added composer ScriptHandler

  • Loading branch information...
commit b5ad2b92287dad66ec4a6188319904578ca30f65 1 parent bbaef63
@pulse00 pulse00 authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 Composer/ScriptHandler.php
View
21 Composer/ScriptHandler.php
@@ -0,0 +1,21 @@
+<?php
+namespace Liip\MonitorBundle\Composer;
+
+use Symfony\Component\Process\Process;
+use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler as BaseHandler;
+
+/**
+ * Composer ScriptHandler can be used to run postInstall/postUpdate health checks
+ * when running composer.phar update/install.
+ *
+ */
+class ScriptHandler extends BaseHandler
+{
+ public static function checkHealth($event)
+ {
+ $options = self::getOptions($event);
+ $appDir = $options['symfony-app-dir'];
+ $event->getIO()->write('<info>Performing system health checks...</info>');
+ static::executeCommand($event, $appDir, 'monitor:health');
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.