Open
Description
My composer.json
:
{
"name": "internal-project",
"type": "project",
"description": "Fancy project",
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"require": {
"php": "^8.2",
"ext-ctype": "*",
"ext-curl": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
"ext-iconv": "*",
"ext-intl": "*",
"ext-json": "*",
"ext-simplexml": "*",
"company/internal-library": "^2",
"php-http/message-factory": "^1.1",
"symfony/flex": "^1"
},
"require-dev": {
"mi-schi/phpmd-extension": "^4.3",
"phpmd/phpmd": "^2.6",
"phpstan/phpstan": "^1.6",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.3",
"symfony/browser-kit": "^6",
"symfony/css-selector": "^6",
"symfony/debug-bundle": "^6",
"symfony/maker-bundle": "^1.0",
"symfony/monolog-bundle": "^3.0",
"symfony/phpunit-bridge": "^6",
"symfony/stopwatch": "^6",
"symfony/web-profiler-bundle": "^6"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"config": {
"bin-dir": "bin",
"secure-http": false,
"sort-packages": true,
"allow-plugins": {
"composer/package-versions-deprecated": true,
"symfony/flex": true,
"php-http/discovery": true,
"symfony/runtime": true
}
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-var-dir": "var",
"symfony-bin-dir": "bin",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://internal-gitlab/internal-library.git"
}
]
}
Output of composer diagnose
:
Checking composer.json: WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK git version 2.39.2
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys: FAIL
Missing pubkey for tags verification
Missing pubkey for dev verification
Run composer self-update --update-keys to set them up
Checking composer version: OK
Composer version: 2.5.8
PHP version: 8.2.8
PHP binary path: /usr/local/bin/php
OpenSSL version: OpenSSL 3.0.9 30 May 2023
cURL version: 7.88.1 libz 1.2.13 ssl OpenSSL/3.0.9
zip: extension present, unzip present, 7-Zip not available
When I run this command:
composer update
or
composer install
I get the following output:
No special output, but when the package is replaced by another version the .git folder is gone.
And I expected this to happen:
Composer should not remove the .git folder unprompted, because it also deletes all the local commits and branches.
It would be better if composer wouldn't do anything in this case and would say that the update is not possible.