public function getComposer($required = true, $disablePlugins = false)
    {
        if (null === $this->composer) {
            if ($this->composerFactory) {
                $this->composer = call_user_func($this->composerFactory, $required, $disablePlugins);
            }

            if ($required && !$this->composer) {
                throw new \RuntimeException(
                    'You must define a factory closure for wrapped commands to retrieve the ' .
                    'composer instance.'
                );
            }
        }

        return $this->composer;
    }