From 1d0785b3d5210266e1b09c80b39ae5070cf68aef Mon Sep 17 00:00:00 2001 From: Helmut Hummel Date: Fri, 30 Sep 2022 16:31:07 +0200 Subject: [PATCH 1/3] [TASK] Remove conflict with composer/installers Since no installers are shipped any more, there is no conflict with other installers. --- composer.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/composer.json b/composer.json index bf7293e..94a1131 100644 --- a/composer.json +++ b/composer.json @@ -47,9 +47,6 @@ "phpunit/phpunit": "^8.5", "friendsofphp/php-cs-fixer": "^2.18" }, - "conflict": { - "composer/installers": "<2.0.0" - }, "scripts": { "test:php:lint": [ "phplint" From fea5daa8b9cde7fe8ceabb3d3edecf060bc3bda9 Mon Sep 17 00:00:00 2001 From: Helmut Hummel Date: Fri, 30 Sep 2022 16:31:29 +0200 Subject: [PATCH 2/3] [TASK] Mark main branch as alias for v5 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 94a1131..cfbc0a8 100644 --- a/composer.json +++ b/composer.json @@ -63,7 +63,7 @@ "extra": { "class": "TYPO3\\CMS\\Composer\\Installer\\Plugin", "branch-alias": { - "dev-main": "4.0.x-dev" + "dev-main": "5.0.x-dev" } } } From bf090567b642a8c873bdf24f7669cc43a1685416 Mon Sep 17 00:00:00 2001 From: Helmut Hummel Date: Fri, 30 Sep 2022 16:31:53 +0200 Subject: [PATCH 3/3] [TASK] Require at least PHP 8.1 --- .github/workflows/ci.yml | 2 -- composer.json | 2 +- src/Plugin/Config.php | 2 +- src/Plugin/Util/ExtensionKeyResolver.php | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f1b693..ddcb6b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,6 @@ jobs: fail-fast: false matrix: php-versions: - - "7.4" - - "8.0" - "8.1" - "8.2" composer-versions: diff --git a/composer.json b/composer.json index cfbc0a8..eaf9781 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "netresearch/composer-installers": "*" }, "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "composer-plugin-api": "^2.1.0" }, "require-dev": { diff --git a/src/Plugin/Config.php b/src/Plugin/Config.php index 06b0b3a..84d7c45 100644 --- a/src/Plugin/Config.php +++ b/src/Plugin/Config.php @@ -231,7 +231,7 @@ private static function handleRootPackageExtraConfig(IOInterface $io, RootPackag $config->merge($rootPackageExtraConfig); $baseDir = $fileSystem->normalizePath($config->get('base-dir')); $webDir = $fileSystem->normalizePath($config->get('web-dir')); - if (strpos($webDir, $baseDir) !== 0) { + if (!str_starts_with($webDir, $baseDir)) { unset($rootPackageExtraConfig['typo3/cms']['web-dir']); $io->writeError('TYPO3 public path must be a subdirectory of Composer root directory. Resetting web-dir config to default.'); } diff --git a/src/Plugin/Util/ExtensionKeyResolver.php b/src/Plugin/Util/ExtensionKeyResolver.php index f22ee7a..a728e12 100644 --- a/src/Plugin/Util/ExtensionKeyResolver.php +++ b/src/Plugin/Util/ExtensionKeyResolver.php @@ -33,7 +33,7 @@ class ExtensionKeyResolver public static function resolve(PackageInterface $package): string { $extra = $package->getExtra(); - if (empty($extra['typo3/cms']['extension-key']) && strpos($package->getType(), 'typo3-cms-') === 0) { + if (empty($extra['typo3/cms']['extension-key']) && str_starts_with($package->getType(), 'typo3-cms-')) { // The only reason this is enforced, is to ease the transition of extensions of type "typo3-cms-*" // Since the logic is removed how to derive the extension key from package name, we must enforce // the extension key to be set to avoid ambiguity of the extension key between previous installers versions and this one