Skip to content

Commit

Permalink
Merge pull request #114 from helios-ag/script_fix
Browse files Browse the repository at this point in the history
composer script fix
  • Loading branch information
helios-ag committed May 15, 2015
2 parents 489be14 + 417cc15 commit 0112fc3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Composer/ScriptHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@

use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler as BaseHandler;

use Composer\Script\CommandEvent;

/**
* @author Al Ganiev, original from LiipMonitorBundle by @pulse00
* Composer ScriptHandler can be used to run postInstall/postUpdate dump emoticons
* when running composer.phar update/install.
*/
class ScriptHandler extends BaseHandler
{
public static function installEmoticons($event)
public static function installEmoticons(CommandEvent $event)
{
$options = self::getOptions($event);
$appDir = $options['symfony-app-dir'];
// use Symfony 3.0 dir structure if available
$consoleDir = isset($options['symfony-bin-dir']) ? $options['symfony-bin-dir'] : $options['symfony-app-dir'];
$event->getIO()->write('<info>Dumping emoticons...</info>');
static::executeCommand($event, $appDir, 'bbcode:dump');
static::executeCommand($event, $consoleDir, 'bbcode:dump');
}

}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Add the following commands to you projects composer.json:
}
```

To custumize emoticons assets folders, use `path` and `folder` node configuration:
To customize emoticons assets folders, use `path` and `folder` node configuration:

```yaml
# app/config.yml
Expand All @@ -271,3 +271,4 @@ fm_bbcode:
* [predakanga](https://github.com/predakanga)
* Dan [piratadelfuturo](https://github.com/piratadelfuturo)
* Alexandre Quercia [alquerci](https://github.com/alquerci)

0 comments on commit 0112fc3

Please sign in to comment.