public function run(OperationHandlerContract $handler, array $extensionsNames)
    {
        if (count($extensionsNames) === 0) {
            return $handler->operationInfo(new Operation('No extensions to install. Skipping composer.'));
        }
        $required = (array) config('components.required', []);

        $modules = [];
        if (!empty($required)) {
            foreach ($extensionsNames as $extension) {
                list($requiredExtension) = explode(':', $extension);
                if (!in_array($requiredExtension, $required)) {
                    array_push($modules, $extension);
                }
            }
        } else {
            $modules = $extensionsNames;
        }
        $names   = implode(' ', $modules);
        $command = 'composer require ' . $names . ' --no-progress';


        try {
            $handler->operationInfo(new Operation('Running composer command.'));
            $process = $this->composerHandler->run($command, function(Process $process, $type, $buffer) use($handler) {


                $handler->operationInfo(new Operation($buffer));
            });

            if (!$process->isSuccessful()) {
                throw new ExtensionException($process->getErrorOutput());
            }

            $this->dispatcher->fire(new Success($command));

            return $handler->operationInfo(new Operation('Composer command has been finished.'));
        } catch (\Exception $e) {
            Log::error($e);
            $this->dispatcher->fire(new Failed($command, $e));

            return $handler->operationFailed(new Operation($e->getMessage()));
        }
    }