From 129884ef72f7b049467fdff32f8463f5e4705631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20J=C4=99drzejewski?= Date: Sun, 13 May 2012 13:25:02 +0200 Subject: [PATCH] rename skipScripts to runScripts. --- src/Composer/Command/InstallCommand.php | 2 +- src/Composer/Command/UpdateCommand.php | 2 +- src/Composer/Installer.php | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Composer/Command/InstallCommand.php b/src/Composer/Command/InstallCommand.php index 773167399..3f919d198 100644 --- a/src/Composer/Command/InstallCommand.php +++ b/src/Composer/Command/InstallCommand.php @@ -58,7 +58,7 @@ EOT ->setVerbose($input->getOption('verbose')) ->setPreferSource($input->getOption('prefer-source')) ->setDevMode($input->getOption('dev')) - ->setSkipScripts($input->getOption('skip-scripts')) + ->setRunScripts(!$input->getOption('skip-scripts')) ; return $install->run() ? 0 : 1; diff --git a/src/Composer/Command/UpdateCommand.php b/src/Composer/Command/UpdateCommand.php index e9ed94ec1..2d42713fc 100644 --- a/src/Composer/Command/UpdateCommand.php +++ b/src/Composer/Command/UpdateCommand.php @@ -56,7 +56,7 @@ EOT ->setVerbose($input->getOption('verbose')) ->setPreferSource($input->getOption('prefer-source')) ->setDevMode($input->getOption('dev')) - ->setSkipScripts($input->getOption('skip-scripts')) + ->setRunScripts(!$input->getOption('skip-scripts')) ->setUpdate(true) ; diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index 5d4cc8419..2d5c6c832 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -88,7 +88,7 @@ class Installer protected $dryRun = false; protected $verbose = false; protected $update = false; - protected $skipScripts = false; + protected $runScripts = true; /** * @var array @@ -152,7 +152,7 @@ class Installer $aliases = $this->aliasPackages(); - if (!$this->dryRun && !$this->skipScripts) { + if (!$this->dryRun && $this->runScripts) { // dispatch pre event $eventName = $this->update ? ScriptEvents::PRE_UPDATE_CMD : ScriptEvents::PRE_INSTALL_CMD; $this->eventDispatcher->dispatchCommandEvent($eventName); @@ -195,7 +195,7 @@ class Installer $localRepos = new CompositeRepository($this->repositoryManager->getLocalRepositories()); $this->autoloadGenerator->dump($localRepos, $this->package, $this->installationManager, $this->installationManager->getVendorPath() . '/composer', true); - if (!$this->skipScripts) { + if ($this->runScripts) { // dispatch post event $eventName = $this->update ? ScriptEvents::POST_UPDATE_CMD : ScriptEvents::POST_INSTALL_CMD; $this->eventDispatcher->dispatchCommandEvent($eventName); @@ -510,14 +510,14 @@ class Installer } /** - * skips scripts execution + * set whether to run scripts or not * - * @param boolean $skipScripts + * @param boolean $runScripts * @return Installer */ - public function setSkipScripts($skipScripts = true) + public function setRunScripts($runScripts = true) { - $this->skipScripts = (boolean) $skipScripts; + $this->runScripts = (boolean) $runScripts; return $this; }