Review and rework Composer tasks.

This commit is contained in:
Andrés Montañez
2014-06-12 17:42:47 -03:00
parent a51056b9c1
commit e01fbc6151
4 changed files with 61 additions and 41 deletions
@@ -0,0 +1,30 @@
<?php
namespace Mage\Task\BuiltIn\Composer;
use Mage\Task\AbstractTask;
use Mage\Task\ErrorWithMessageException;
class GenerateAutoloadTask extends AbstractTask
{
/**
* Returns the Title of the Task
* @return string
*/
public function getName()
{
return 'Generate autoload via Composer [built-in]';
}
/**
* Runs the task
*
* @return boolean
* @throws ErrorWithMessageException
*/
public function run()
{
$composerPath = $this->getConfig()->general('composer_path', 'php composer.phar');
return $this->runCommand($composerPath . ' dumpautoload --optimize');
}
}