Closed
Description
My composer.json
:
{
"name": "incenteev/emoji-pattern",
"description": "PHP regexp pattern matching Unicode emojis",
"license": "MIT",
"require": {
"php": ">=7.4"
},
"require-dev": {
"ext-mbstring": "*",
"phpunit/phpunit": "^9.5",
"symfony/http-client": "^5.3"
},
"autoload": {
"psr-4": {
"Incenteev\\EmojiPattern\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Incenteev\\EmojiPattern\\Tests\\": "tests/"
}
},
"authors": [
{
"name": "Christophe Coevoet",
"email": "[email protected]"
}
],
"config": {
"sort-packages": true
}
}
Output of composer diagnose
:
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK git version 2.39.1
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: 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.5.1
PHP version: 8.1.14
PHP binary path: /usr/bin/php8.1
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
cURL version: 7.68.0 libz 1.2.11 ssl OpenSSL/1.1.1g
zip: extension present, unzip present, 7-Zip present (7z)
When I run this command:
composer require phpstan/phpstan -vvv
I get the following output:
Running 2.5.1 (2022-12-22 15:33:54) with PHP 8.1.14 on Linux / 5.4.0-137-generic
Reading ./composer.json (/home/stof/src/Incenteev/emoji-pattern/composer.json)
Loading config file /home/stof/.config/composer/config.json
Loading config file /home/stof/.config/composer/auth.json
Loading config file ./composer.json (/home/stof/src/Incenteev/emoji-pattern/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 (/home/stof/src/Incenteev/emoji-pattern): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Failed to initialize global composer: Composer could not find the config file: /home/stof/.config/composer/composer.json
Reading ./composer.lock (/home/stof/src/Incenteev/emoji-pattern/composer.lock)
Reading /home/stof/src/Incenteev/emoji-pattern/vendor/composer/installed.json
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/packages.json from cache
Downloading https://repo.packagist.org/packages.json if modified
[304] https://repo.packagist.org/packages.json
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phpstan~phpstan.json from cache
Downloading https://repo.packagist.org/p2/phpstan/phpstan.json if modified
[304] https://repo.packagist.org/p2/phpstan/phpstan.json
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phpstan~phpstan.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phpstan~phpstan~dev.json from cache
Downloading https://repo.packagist.org/p2/phpstan/phpstan~dev.json if modified
[304] https://repo.packagist.org/p2/phpstan/phpstan~dev.json
./composer.json has been updated
Reading ./composer.json (/home/stof/src/Incenteev/emoji-pattern/composer.json)
Loading config file /home/stof/.config/composer/config.json
Loading config file /home/stof/.config/composer/auth.json
Loading config file ./composer.json (/home/stof/src/Incenteev/emoji-pattern/composer.json)
Executing command (/home/stof/src/Incenteev/emoji-pattern): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Failed to initialize global composer: Composer could not find the config file: /home/stof/.config/composer/composer.json
Reading ./composer.lock (/home/stof/src/Incenteev/emoji-pattern/composer.lock)
Reading /home/stof/src/Incenteev/emoji-pattern/vendor/composer/installed.json
Running composer update phpstan/phpstan
Loading composer repositories with package information
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/packages.json from cache
Downloading https://repo.packagist.org/packages.json if modified
[304] https://repo.packagist.org/packages.json
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phpstan~phpstan.json from cache
Downloading https://repo.packagist.org/p2/phpstan/phpstan.json if modified
[304] https://repo.packagist.org/p2/phpstan/phpstan.json
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-composer~xdebug-handler.json from cache
Downloading https://repo.packagist.org/p2/composer/xdebug-handler.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-jean85~pretty-package-versions.json from cache
Downloading https://repo.packagist.org/p2/jean85/pretty-package-versions.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~bootstrap.json from cache
Downloading https://repo.packagist.org/p2/nette/bootstrap.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~di.json from cache
Downloading https://repo.packagist.org/p2/nette/di.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~neon.json from cache
Downloading https://repo.packagist.org/p2/nette/neon.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~robot-loader.json from cache
Downloading https://repo.packagist.org/p2/nette/robot-loader.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~schema.json from cache
Downloading https://repo.packagist.org/p2/nette/schema.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~utils.json from cache
Downloading https://repo.packagist.org/p2/nette/utils.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phpstan~phpdoc-parser.json from cache
Downloading https://repo.packagist.org/p2/phpstan/phpdoc-parser.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-symfony~console.json from cache
Downloading https://repo.packagist.org/p2/symfony/console.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-symfony~finder.json from cache
Downloading https://repo.packagist.org/p2/symfony/finder.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~caching.json from cache
Downloading https://repo.packagist.org/p2/nette/caching.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-tracy~tracy.json from cache
[304] https://repo.packagist.org/p2/composer/xdebug-handler.json
[304] https://repo.packagist.org/p2/jean85/pretty-package-versions.json
[304] https://repo.packagist.org/p2/nette/bootstrap.json
[304] https://repo.packagist.org/p2/nette/di.json
[304] https://repo.packagist.org/p2/nette/neon.json
[304] https://repo.packagist.org/p2/nette/robot-loader.json
[304] https://repo.packagist.org/p2/nette/schema.json
[304] https://repo.packagist.org/p2/nette/utils.json
[304] https://repo.packagist.org/p2/phpstan/phpdoc-parser.json
Downloading https://repo.packagist.org/p2/tracy/tracy.json if modified
[304] https://repo.packagist.org/p2/symfony/console.json
[304] https://repo.packagist.org/p2/symfony/finder.json
[304] https://repo.packagist.org/p2/nette/caching.json
[304] https://repo.packagist.org/p2/tracy/tracy.json
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-composer~package-versions-deprecated.json from cache
Downloading https://repo.packagist.org/p2/composer/package-versions-deprecated.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-ocramius~package-versions.json from cache
Downloading https://repo.packagist.org/p2/ocramius/package-versions.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~utils.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~di.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~neon.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~php-generator.json from cache
Downloading https://repo.packagist.org/p2/nette/php-generator.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~robot-loader.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~finder.json from cache
Downloading https://repo.packagist.org/p2/nette/finder.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~caching.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-symfony~polyfill-mbstring.json from cache
Downloading https://repo.packagist.org/p2/symfony/polyfill-mbstring.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-symfony~contracts.json from cache
Downloading https://repo.packagist.org/p2/symfony/contracts.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-symfony~debug.json from cache
Downloading https://repo.packagist.org/p2/symfony/debug.json if modified
[304] https://repo.packagist.org/p2/composer/package-versions-deprecated.json
[304] https://repo.packagist.org/p2/ocramius/package-versions.json
[304] https://repo.packagist.org/p2/nette/php-generator.json
[304] https://repo.packagist.org/p2/nette/finder.json
[304] https://repo.packagist.org/p2/symfony/polyfill-mbstring.json
[304] https://repo.packagist.org/p2/symfony/contracts.json
[304] https://repo.packagist.org/p2/symfony/debug.json
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~neon.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nette~php-generator.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-psr~cache.json from cache
Downloading https://repo.packagist.org/p2/psr/cache.json if modified
[304] https://repo.packagist.org/p2/psr/cache.json
Built pool.
Running pool optimizer.
Pool optimizer completed in 0.206 seconds
Found 1,773 package versions referenced in your dependency graph. 1,435 (81%) were optimized away.
Updating dependencies
Generating rules
Resolving dependencies through SAT
Looking at all rules.
Dependency resolution completed in 0.003 seconds
Analyzed 338 packages to resolve dependencies
Analyzed 1132 rules to resolve dependencies
Generating rules
Resolving dependencies through SAT
Looking at all rules.
Dependency resolution completed in 0.000 seconds
Lock file operations: 1 install, 0 updates, 0 removals
Installs: phpstan/phpstan:1.9.14
- Locking phpstan/phpstan (1.9.14)
Writing lock file
Installing dependencies from lock file (including require-dev)
Reading ./composer.lock (/home/stof/src/Incenteev/emoji-pattern/composer.lock)
Package operations: 1 install, 0 updates, 0 removals
Installs: phpstan/phpstan:1.9.14
Reading /home/stof/.cache/composer/files/phpstan/phpstan/5e7fb17b0265289533088409f7e2340631af002b.zip from cache
- Loading phpstan/phpstan (1.9.14) from cache
- Installing phpstan/phpstan (1.9.14): Extracting archive
Executing async command (CWD): '/usr/bin/unzip' -qq '/home/stof/src/Incenteev/emoji-pattern/vendor/composer/tmp-4dd22c7e88a1ad00dc84d63981020bbd' -d '/home/stof/src/Incenteev/emoji-pattern/vendor/composer/3a707462'
Executing async command (CWD): rm -rf '/home/stof/src/Incenteev/emoji-pattern/vendor/composer/3a707462'
Downloading https://packagist.org/downloads/
[201] https://packagist.org/downloads/
Generating autoload files
32 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-doctrine~instantiator.json from cache
Downloading https://repo.packagist.org/p2/doctrine/instantiator.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-myclabs~deep-copy.json from cache
Downloading https://repo.packagist.org/p2/myclabs/deep-copy.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-nikic~php-parser.json from cache
Downloading https://repo.packagist.org/p2/nikic/php-parser.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phar-io~manifest.json from cache
Downloading https://repo.packagist.org/p2/phar-io/manifest.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phar-io~version.json from cache
Downloading https://repo.packagist.org/p2/phar-io/version.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phpunit~php-code-coverage.json from cache
Downloading https://repo.packagist.org/p2/phpunit/php-code-coverage.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phpunit~php-file-iterator.json from cache
Downloading https://repo.packagist.org/p2/phpunit/php-file-iterator.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phpunit~php-invoker.json from cache
Downloading https://repo.packagist.org/p2/phpunit/php-invoker.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phpunit~php-text-template.json from cache
Downloading https://repo.packagist.org/p2/phpunit/php-text-template.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phpunit~php-timer.json from cache
Downloading https://repo.packagist.org/p2/phpunit/php-timer.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phpunit~phpunit.json from cache
Downloading https://repo.packagist.org/p2/phpunit/phpunit.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-psr~container.json from cache
Downloading https://repo.packagist.org/p2/psr/container.json if modified
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-psr~log.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~cli-parser.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~code-unit.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~code-unit-reverse-lookup.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~comparator.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~complexity.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~diff.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~environment.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~exporter.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~global-state.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~lines-of-code.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~object-enumerator.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~object-reflector.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~recursion-context.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~resource-operations.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~type.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-sebastian~version.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-symfony~deprecation-contracts.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-symfony~http-client.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-symfony~http-client-contracts.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-symfony~polyfill-php73.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-symfony~polyfill-php80.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-symfony~service-contracts.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-theseer~tokenizer.json from cache
Reading /home/stof/.cache/composer/repo/https---repo.packagist.org/provider-phpstan~phpstan.json from cache
[304] https://repo.packagist.org/p2/doctrine/instantiator.json
[304] https://repo.packagist.org/p2/myclabs/deep-copy.json
[304] https://repo.packagist.org/p2/nikic/php-parser.json
[304] https://repo.packagist.org/p2/phar-io/manifest.json
[304] https://repo.packagist.org/p2/phar-io/version.json
[304] https://repo.packagist.org/p2/phpunit/php-code-coverage.json
[304] https://repo.packagist.org/p2/phpunit/php-file-iterator.json
[304] https://repo.packagist.org/p2/phpunit/php-invoker.json
[304] https://repo.packagist.org/p2/phpunit/php-text-template.json
[304] https://repo.packagist.org/p2/phpunit/php-timer.json
[304] https://repo.packagist.org/p2/phpunit/phpunit.json
Downloading https://repo.packagist.org/p2/psr/log.json if modified
Downloading https://repo.packagist.org/p2/sebastian/cli-parser.json if modified
Downloading https://repo.packagist.org/p2/sebastian/code-unit.json if modified
Downloading https://repo.packagist.org/p2/sebastian/code-unit-reverse-lookup.json if modified
Downloading https://repo.packagist.org/p2/sebastian/comparator.json if modified
Downloading https://repo.packagist.org/p2/sebastian/complexity.json if modified
Downloading https://repo.packagist.org/p2/sebastian/diff.json if modified
Downloading https://repo.packagist.org/p2/sebastian/environment.json if modified
Downloading https://repo.packagist.org/p2/sebastian/exporter.json if modified
Downloading https://repo.packagist.org/p2/sebastian/global-state.json if modified
Downloading https://repo.packagist.org/p2/sebastian/lines-of-code.json if modified
[304] https://repo.packagist.org/p2/psr/container.json
Downloading https://repo.packagist.org/p2/sebastian/object-enumerator.json if modified
[304] https://repo.packagist.org/p2/psr/log.json
[304] https://repo.packagist.org/p2/sebastian/cli-parser.json
[304] https://repo.packagist.org/p2/sebastian/code-unit.json
[304] https://repo.packagist.org/p2/sebastian/code-unit-reverse-lookup.json
[304] https://repo.packagist.org/p2/sebastian/comparator.json
[304] https://repo.packagist.org/p2/sebastian/complexity.json
[304] https://repo.packagist.org/p2/sebastian/diff.json
[304] https://repo.packagist.org/p2/sebastian/environment.json
[304] https://repo.packagist.org/p2/sebastian/exporter.json
[304] https://repo.packagist.org/p2/sebastian/global-state.json
[304] https://repo.packagist.org/p2/sebastian/lines-of-code.json
Downloading https://repo.packagist.org/p2/sebastian/object-reflector.json if modified
Downloading https://repo.packagist.org/p2/sebastian/recursion-context.json if modified
Downloading https://repo.packagist.org/p2/sebastian/resource-operations.json if modified
Downloading https://repo.packagist.org/p2/sebastian/type.json if modified
Downloading https://repo.packagist.org/p2/sebastian/version.json if modified
Downloading https://repo.packagist.org/p2/symfony/deprecation-contracts.json if modified
Downloading https://repo.packagist.org/p2/symfony/http-client.json if modified
Downloading https://repo.packagist.org/p2/symfony/http-client-contracts.json if modified
Downloading https://repo.packagist.org/p2/symfony/polyfill-php73.json if modified
Downloading https://repo.packagist.org/p2/symfony/polyfill-php80.json if modified
Downloading https://repo.packagist.org/p2/symfony/service-contracts.json if modified
[304] https://repo.packagist.org/p2/sebastian/object-enumerator.json
Downloading https://repo.packagist.org/p2/theseer/tokenizer.json if modified
[304] https://repo.packagist.org/p2/sebastian/object-reflector.json
[304] https://repo.packagist.org/p2/sebastian/recursion-context.json
[304] https://repo.packagist.org/p2/sebastian/resource-operations.json
[304] https://repo.packagist.org/p2/sebastian/type.json
[304] https://repo.packagist.org/p2/sebastian/version.json
[304] https://repo.packagist.org/p2/symfony/deprecation-contracts.json
[304] https://repo.packagist.org/p2/symfony/http-client.json
[304] https://repo.packagist.org/p2/symfony/http-client-contracts.json
[304] https://repo.packagist.org/p2/symfony/polyfill-php73.json
[304] https://repo.packagist.org/p2/symfony/polyfill-php80.json
[304] https://repo.packagist.org/p2/symfony/service-contracts.json
[304] https://repo.packagist.org/p2/theseer/tokenizer.json
No security vulnerability advisories found
Using version ^1.9 for phpstan/phpstan
And I expected this to happen:
composer should ask whether I want to add phpstan/phpstan as a dev requirement instead, because it has the static analysis
and dev
keywords in its metadata.
Looks like this feature was broken when implementing the improved package version guessing.