From 0286c45a486a192d993f88f5ed9fc6cb405108bc Mon Sep 17 00:00:00 2001 From: Ted Bowman <ted+git@tedbow.com> Date: Sun, 15 Oct 2023 13:05:50 -0400 Subject: [PATCH] delete old auto-update script --- core/scripts/auto-update | 46 ---------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 core/scripts/auto-update diff --git a/core/scripts/auto-update b/core/scripts/auto-update deleted file mode 100644 index f107c958ae1b..000000000000 --- a/core/scripts/auto-update +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env php -<?php - -/** - * @file - * Provides a terminal command for performing automatic updates. - */ - -use Drupal\auto_updates\Commands\PostApplyCommand; -use Drupal\auto_updates\Commands\RunCommand; -use Symfony\Component\Console\Application; - -if (PHP_SAPI !== 'cli') { - throw new \RuntimeException('This command must be run from the command line.'); -} - -// Find the autoloader. We know that Automatic Updates is installed somewhere -// in a Drupal code base, so move up the file system until we find -// `./vendor/autoload.php`. -$current_dir = __DIR__; -$previous_dir = NULL; -while ($current_dir !== $previous_dir) { - $file = $current_dir . '/vendor/autoload.php'; - if (file_exists($file)) { - /** @var \Composer\Autoload\ClassLoader $autoloader */ - $autoloader = require_once $file; - break; - } - $previous_dir = $current_dir; - $current_dir = dirname($current_dir); -} - -if (empty($autoloader)) { - throw new \RuntimeException('The autoloader could not be found. Did you run `composer install`?'); -} - -// Automatic Updates' namespace is not available for autoloading because it is -// a Drupal module, which means Drupal must be booted up in order to access it. -// Since Drupal isn't booted yet, we need to make the autoloader aware of the -// command namespace. -$autoloader->addPsr4('Drupal\\auto_updates\\Commands\\', __DIR__ . '/src/Commands'); - -$application = new Application('Automatic Updates', '3.0.0'); -$application->add(new RunCommand($autoloader)); -$application->add(new PostApplyCommand($autoloader)); -$application->setDefaultCommand('run')->run(); -- GitLab