diff --git a/Composer/ScriptHandler.php b/Composer/ScriptHandler.php index c30405d..fdbc185 100644 --- a/Composer/ScriptHandler.php +++ b/Composer/ScriptHandler.php @@ -4,6 +4,8 @@ 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 @@ -11,12 +13,13 @@ */ 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('Dumping emoticons...'); - static::executeCommand($event, $appDir, 'bbcode:dump'); + static::executeCommand($event, $consoleDir, 'bbcode:dump'); } } diff --git a/README.md b/README.md index e72db85..62a7321 100644 --- a/README.md +++ b/README.md @@ -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 @@ -271,3 +271,4 @@ fm_bbcode: * [predakanga](https://github.com/predakanga) * Dan [piratadelfuturo](https://github.com/piratadelfuturo) * Alexandre Quercia [alquerci](https://github.com/alquerci) +