mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-10 05:56:11 +01:00

[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.
This commit is contained in:
Daniel Siepmann 2024-02-07 09:54:59 +01:00 committed by GitHub
parent 1462282da6
commit ae233d8de0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 3 deletions

View file

@ -60,7 +60,7 @@ jobs:
path: ~/.cache/composer path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-composer-\n" restore-keys: "php${{ matrix.php-version }}-composer-\n"
- name: "Install Composer dependencies" - name: "Install Composer dependencies"
run: "composer install --no-progress" run: "composer update --no-progress"
- name: "Run command" - name: "Run command"
run: "composer ci:${{ matrix.command }}" run: "composer ci:${{ matrix.command }}"
strategy: strategy:

View file

@ -107,7 +107,7 @@ jobs:
path: ~/.cache/composer path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-composer-\n" restore-keys: "php${{ matrix.php-version }}-composer-\n"
- name: "Install Composer dependencies" - name: "Install Composer dependencies"
run: "composer install --no-progress" run: "composer update --no-progress"
- name: "Run command" - name: "Run command"
run: "composer ci:${{ matrix.command }}" run: "composer ci:${{ matrix.command }}"
strategy: strategy:

View file

@ -7,7 +7,7 @@ build-composer-dependencies:
script: script:
- composer --version - composer --version
- COMPOSER_CACHE_DIR=.composer - COMPOSER_CACHE_DIR=.composer
composer install --prefer-dist --no-progress --optimize-autoloader composer update --prefer-dist --no-progress --optimize-autoloader
artifacts: artifacts:
when: on_success when: on_success
expire_in: 2 weeks expire_in: 2 weeks

View file

@ -95,6 +95,7 @@
"typo3/cms-composer-installers": true "typo3/cms-composer-installers": true
}, },
"bin-dir": ".Build/bin", "bin-dir": ".Build/bin",
"lock": false,
"preferred-install": { "preferred-install": {
"*": "dist" "*": "dist"
}, },