-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
My composer.json:
{
"name": "example/repro-devmain",
"type": "project",
"license": "CC-0",
"require": {
"example/sample-dep": "dev-master",
"example/sample-other-dep": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "^9"
},
"minimum-stability": "dev",
"repositories": [
{
"type": "path",
"url": "./lib/sample-dep"
},
{
"type": "path",
"url": "./lib/sample-other-dep"
}
]
}Output of composer diagnose:
Checking composer.json: WARNING
License "CC-0" is not a valid SPDX license identifier, see https://spdx.org/licenses/ if you use an open license.
If the software is closed-source, you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK
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:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.2.9
PHP version: 8.1.4
PHP binary path: /usr/local/bin/php
OpenSSL version: OpenSSL 1.1.1n 15 Mar 2022
cURL version: 7.80.0 libz 1.2.11 ssl OpenSSL/1.1.1n
zip: extension present, unzip present, 7-Zip present (7z)
When I run this command:
composer require --dev phpunit/phpunit:^9 -vvv
I get the following output:
Running 2.2.9 (2022-03-15 22:13:37) with PHP 8.1.4 on Linux / 5.10.96-1-MANJARO
Reading ./composer.json (/app/composer.json)
Loading config file ./composer.json (/app/composer.json)
Checked CA file /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a file.
Checked directory /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a directory.
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/app): git branch -a --no-color --no-abbrev -v
Executing command (/app): git describe --exact-match --tags
Executing command (CWD): git --version
Executing command (/app): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/app): hg branch
Executing command (/app): fossil branch list
Executing command (/app): fossil tag list
Executing command (/app): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /tmp/composer.json
Reading /app/vendor/composer/installed.json
./composer.json has been updated
Reading ./composer.json (/app/composer.json)
Loading config file ./composer.json (/app/composer.json)
Executing command (/app): git branch -a --no-color --no-abbrev -v
Executing command (/app): git describe --exact-match --tags
Executing command (/app): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/app): hg branch
Executing command (/app): fossil branch list
Executing command (/app): fossil tag list
Executing command (/app): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /tmp/composer.json
Reading /app/vendor/composer/installed.json
Running composer update phpunit/phpunit
Reading ./composer.lock (/app/composer.lock)
Loading composer repositories with package information
Executing command (/app/lib/sample-dep/): git branch -a --no-color --no-abbrev -v
Executing command (/app/lib/sample-dep/): git describe --exact-match --tags
Executing command (/app/lib/sample-dep/): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/app/lib/sample-dep/): hg branch
Executing command (/app/lib/sample-dep/): fossil branch list
Executing command (/app/lib/sample-dep/): fossil tag list
Executing command (/app/lib/sample-dep/): svn info --xml
Executing command (/app/lib/sample-other-dep/): git branch -a --no-color --no-abbrev -v
Executing command (/app/lib/sample-other-dep/): git describe --exact-match --tags
Executing command (/app/lib/sample-other-dep/): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/app/lib/sample-other-dep/): hg branch
Executing command (/app/lib/sample-other-dep/): fossil branch list
Executing command (/app/lib/sample-other-dep/): fossil tag list
Executing command (/app/lib/sample-other-dep/): svn info --xml
Downloading https://repo.packagist.org/packages.json
[200] https://repo.packagist.org/packages.json
Info from https://repo.packagist.org: #StandWithUkraine
Writing /tmp/cache/repo/https---repo.packagist.org/packages.json into cache
Downloading https://repo.packagist.org/p2/phpunit/phpunit.json
Downloading https://repo.packagist.org/p2/phpunit/phpunit~dev.json
[200] https://repo.packagist.org/p2/phpunit/phpunit.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-phpunit~phpunit.json into cache
[200] https://repo.packagist.org/p2/phpunit/phpunit~dev.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-phpunit~phpunit~dev.json into cache
Found 155 package versions referenced in your dependency graph. 31 (20%) were optimized away.
Updating dependencies
Generating rules
Resolving dependencies through SAT
Looking at all rules.
Dependency resolution completed in 0.001 seconds
Analyzed 124 packages to resolve dependencies
Analyzed 710 rules to resolve dependencies
Generating rules
Resolving dependencies through SAT
Looking at all rules.
Dependency resolution completed in 0.000 seconds
Unable to find a compatible set of packages based on your non-dev requirements alone.
Your requirements can be resolved successfully when require-dev packages are present.
You may need to move packages from require-dev or some of their dependencies to require.
Problem 1
- Root composer.json requires example/sample-dep dev-master, found example/sample-dep[dev-main] but it does not match the constraint. Perhaps dev-master was renamed to dev-main?
Problem 2
- Root composer.json requires example/sample-other-dep dev-master, found example/sample-other-dep[dev-main] but it does not match the constraint. Perhaps dev-master was renamed to dev-main?
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
And I expected this to happen:
Successful install/upgrade of dependency without interacting/modifying dev-master dependency.
Composer 2.1 successfully runs this command.
Here is a reproduction repo: https://github.com/AlbinoDrought/repro-composer-22-issue
See failing pipeline here: https://github.com/AlbinoDrought/repro-composer-22-issue/runs/5632965991?check_suite_focus=true
Metadata
Metadata
Assignees
Labels
No labels