code: protected function cleanupVendorDir($dir)
      {
          if (is_link($link = "$dir/vendor/yiisoft/yii2")) {
              $this->stdout("Removing symlink $link.\n");
              FileHelper::unlink($link);
          }
          $extensions = $this->findDirs("$dir/vendor/yiisoft");
          foreach ($extensions as $ext) {
              if (is_link($link = "$dir/vendor/yiisoft/yii2-$ext")) {
                  $this->stdout("Removing symlink $link.\n");
                  FileHelper::unlink($link);
              }
          }
      }
docs: Remove all symlinks in the vendor subdirectory of the directory specified.
  @param string $dir base directory