From 4aaf6ed18367044cdf7017a0fd1e7fad451dbaf6 Mon Sep 17 00:00:00 2001 From: tuutti Date: Tue, 27 Feb 2024 09:25:28 +0200 Subject: [PATCH] Revert "Install Drupal core" This reverts commit 1ee35e9d71a1915260eb23df5f44d45634a2f2a3. --- composer.json | 23 ------ src/Drush/Commands/VersionDrushCommands.php | 80 --------------------- 2 files changed, 103 deletions(-) delete mode 100644 src/Drush/Commands/VersionDrushCommands.php diff --git a/composer.json b/composer.json index 8a41e6f..a000629 100644 --- a/composer.json +++ b/composer.json @@ -5,11 +5,9 @@ "license": "GPL-2.0-or-later", "minimum-stability": "dev", "require": { - "drupal/helfi_api_base": "*", "drush/drush": "^11 || ^12" }, "require-dev": { - "drupal/core-recommended": "^10", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "drupal/coder": "^8.3", "phpspec/prophecy-phpunit": "^2", @@ -31,31 +29,10 @@ }, "files": [ "tests/fixtures/migration_fixture.php" ] }, - "repositories": { - "platform": { - "type": "composer", - "url": "https://repository.drupal.hel.ninja" - }, - "drupal_org": { - "type": "composer", - "url": "https://packages.drupal.org/8" - } - }, "config": { "allow-plugins": { - "composer/installers": true, "dealerdirect/phpcodesniffer-composer-installer": true, "phpstan/extension-installer": true - }, - "extra": { - "installer-paths": { - "sut/core": ["type:drupal-core"], - "sut/libraries/{$name}": ["type:drupal-library"], - "sut/modules/contrib/{$name}": ["type:drupal-module"], - "sut/profiles/contrib/{$name}": ["type:drupal-profile"], - "sut/themes/contrib/{$name}": ["type:drupal-theme"], - "sut/drush/contrib/{$name}": ["type:drupal-drush"] - } } } } diff --git a/src/Drush/Commands/VersionDrushCommands.php b/src/Drush/Commands/VersionDrushCommands.php deleted file mode 100644 index ed0e8e3..0000000 --- a/src/Drush/Commands/VersionDrushCommands.php +++ /dev/null @@ -1,80 +0,0 @@ -get('helfi_api_base.package_version_checker'), - ); - } - - /** - * Checks whether Composer packages are up-to-date. - * - * @param string $file - * The path to composer.lock file. - * - * @return int - * The exit code. - */ - #[Command(name: 'helfi:tools:check-composer-versions')] - #[Argument(name: 'file', description: 'Path to composer.lock file')] - public function checkVersions(string $file) : int { - $info = new ComposerInfo($file); - - $versions = []; - /** @var \Composer\Package\Package $package */ - foreach (iterator_to_array($info->getPackages()) as $package) { - $version = $this->versionChecker->get($package->getName(), $package->getVersion()); - - // Skip dev versions since we can't easily verify the latest - // version. - if (!$version || $version->isLatest || str_starts_with($package->getVersion(), 'dev-')) { - continue; - } - $versions[] = [ - 'name' => $package->getName(), - 'currentVersion' => $package->getVersion(), - 'latestVersion' => $version->latestVersion, - ]; - } - if (!$versions) { - return DrushCommands::EXIT_SUCCESS; - } - - $this->io()->table( - ['Name', 'Version', 'Latest version'], - $versions, - ); - return DrushCommands::EXIT_FAILURE_WITH_CLARITY; - } - -}