From ae233d8de0b7dc05ea35b1f8c9924bee6f209850 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Wed, 7 Feb 2024 09:54:59 +0100 Subject: [PATCH] [TASK] Prevent composer.lock file (#1161) This is a TYPO3 extension, a library. We do not track the `composer.lock` file for that reason. Composer itself offers an option to prevent generation of the file. This is now configured to prevent the creation of the file. That should prevent issues with local version of the file. One might change the `composer.json` version constraints but updates might fail due to locked version constraints. This no longer happens if no locked version, due to missing lock file, exist. Composer would render warnings when using `composer install` without a lock file. That's why we update the CI commands to use `composer update` instead. That warning was already rendered within CI due to missing file. --- .github/workflows/ci.yml | 2 +- .github/workflows/predefined.yml | 2 +- .gitlab/pipeline/jobs/build-composer-dependencies.yml | 2 +- composer.json | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e29955f..5bb3c9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: path: ~/.cache/composer restore-keys: "php${{ matrix.php-version }}-composer-\n" - name: "Install Composer dependencies" - run: "composer install --no-progress" + run: "composer update --no-progress" - name: "Run command" run: "composer ci:${{ matrix.command }}" strategy: diff --git a/.github/workflows/predefined.yml b/.github/workflows/predefined.yml index 2c8fbd2..1c1ee6c 100644 --- a/.github/workflows/predefined.yml +++ b/.github/workflows/predefined.yml @@ -107,7 +107,7 @@ jobs: path: ~/.cache/composer restore-keys: "php${{ matrix.php-version }}-composer-\n" - name: "Install Composer dependencies" - run: "composer install --no-progress" + run: "composer update --no-progress" - name: "Run command" run: "composer ci:${{ matrix.command }}" strategy: diff --git a/.gitlab/pipeline/jobs/build-composer-dependencies.yml b/.gitlab/pipeline/jobs/build-composer-dependencies.yml index 47fcfbb..03b4581 100644 --- a/.gitlab/pipeline/jobs/build-composer-dependencies.yml +++ b/.gitlab/pipeline/jobs/build-composer-dependencies.yml @@ -7,7 +7,7 @@ build-composer-dependencies: script: - composer --version - COMPOSER_CACHE_DIR=.composer - composer install --prefer-dist --no-progress --optimize-autoloader + composer update --prefer-dist --no-progress --optimize-autoloader artifacts: when: on_success expire_in: 2 weeks diff --git a/composer.json b/composer.json index bd6927d..c209777 100644 --- a/composer.json +++ b/composer.json @@ -95,6 +95,7 @@ "typo3/cms-composer-installers": true }, "bin-dir": ".Build/bin", + "lock": false, "preferred-install": { "*": "dist" },