public static function addStub(\Phar $phar, $stubAlias)
    {
        if ($stubAlias === false) {
            return;
        }
        echo "\nAdd stub";
        $path = \Yii::getAlias($stubAlias);
        if (file_exists($path) === false) {
            throw new InvalidConfigException("Invalid configuration. Stub file '{$path}' does not exists.");
        }
        $phar->setStub(file_get_contents($path));
    }