src/composer/Installer.php
protected static function runCommands($event, $extraKey)
    {
        $params = $event->getComposer()->getPackage()->getExtra();
        if (isset($params[$extraKey]) && is_array($params[$extraKey])) {
            foreach ($params[$extraKey] as $method => $args) {
                $args = array_merge([
                    'vendorPath' => $event->getComposer()->getConfig()->get('vendor-dir')
                ], (array)$args);
                call_user_func([__CLASS__, $method], $args);
            }
        }
    }
protected static function runCommands($event, $extraKey)
    {
        $params = $event->getComposer()->getPackage()->getExtra();
        if (isset($params[$extraKey]) && is_array($params[$extraKey])) {
            foreach ($params[$extraKey] as $method => $args) {
                $args = array_merge([
                    'vendorPath' => $event->getComposer()->getConfig()->get('vendor-dir')
                ], (array)$args);
                call_user_func([__CLASS__, $method], $args);
            }
        }
    }
Special method to run tasks defined in `[extra][$extraKey]` key in `composer.json`

@param Event $event
@param string $extraKey