protected function checkInstallerVersion()
    {
        // check update only if installer is running via a PHAR file
        if ('phar://' !== substr(__DIR__, 0, 7)) {
            return $this;
        }

        if (!$this->isInstallerUpdated()) {
            $this->output->writeln(sprintf(
                "\n <bg=red> WARNING </> Your Symfony Installer version (%s) is outdated.\n".
                ' Execute the command "%s selfupdate" to get the latest version (%s).',
                $this->localInstallerVersion, $_SERVER['PHP_SELF'], $this->latestInstallerVersion
            ));
        }

        return $this;
    }