composer: Composer doesn't detect the latest package version 1 week after the release
My composer.json:
{
"require-dev": {
"phpstan/phpstan": "^1.10",
"friendsofphp/php-cs-fixer": "^3.40",
"phalcon/ide-stubs": "5.8"
},
"config": {
"platform": {
"php": "8.4.5",
"ext-phalcon": "5.9.0",
"ext-gd": "8.4"
}
},
"require": {
"dompdf/dompdf": "^2.0",
"phpmailer/phpmailer": "^6.9",
"phalcon/migrations": "^3.0"
}
}
Output of composer diagnose:
Checking composer.json: OK
Checking composer.lock: OK
Checking platform settings: OK
Checking git settings: OK git version 2.47.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 Composer and its dependencies for vulnerabilities: OK
Composer version: 2.8.5
PHP version: 8.4.5 - Package overridden via config.platform, same as actual
PHP binary path: /nix/store/f6bb2n52y1n1p2zd43i3l6mdxhcm7awd-php-with-extensions-8.4.5/bin/php
OpenSSL version: OpenSSL 3.3.3 11 Feb 2025
curl version: 8.12.1 libz 1.3.1 ssl OpenSSL/3.3.3
zip: extension present, unzip present, 7-Zip present (7zz)
When I run this command:
composer require --dev phalcon/ide-stubs:5.9 -vvv
I get the following output:
Cache directory does not exist (cache-vcs-dir):
Cache directory does not exist (cache-repo-dir):
Cache directory does not exist (cache-files-dir):
Clearing cache (cache-dir): /home/zan/.cache/composer
All caches cleared.
Running 2.8.5 (2025-01-21 15:23:40) with PHP 8.4.5 on Linux / 6.6.83
Reading ./composer.json (/home/zan/workspace/phalcon5-docker/www/lysms/composer.json)
Loading config file ./composer.json (/home/zan/workspace/phalcon5-docker/www/lysms/composer.json)
Checked CA file /nix/store/g5zffs84ia8kn5azkl2l3a2q3f47flxw-nss-cacert-3.108/etc/ssl/certs/ca-bundle.crt: valid
Executing command (/home/zan/workspace/phalcon5-docker/www/lysms): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Failed to initialize global composer: Composer could not find the config file: /home/zan/.config/composer/composer.json
Reading ./composer.lock (/home/zan/workspace/phalcon5-docker/www/lysms/composer.lock)
Reading /home/zan/workspace/phalcon5-docker/www/lysms/vendor/composer/installed.json
The "5.9" constraint for "phalcon/ide-stubs" appears too strict and will likely not match what you want. See https://getcomposer.org/constraints
./composer.json has been updated
Reading ./composer.json (/home/zan/workspace/phalcon5-docker/www/lysms/composer.json)
Loading config file ./composer.json (/home/zan/workspace/phalcon5-docker/www/lysms/composer.json)
Executing command (/home/zan/workspace/phalcon5-docker/www/lysms): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Failed to initialize global composer: Composer could not find the config file: /home/zan/.config/composer/composer.json
Reading ./composer.lock (/home/zan/workspace/phalcon5-docker/www/lysms/composer.lock)
Reading /home/zan/workspace/phalcon5-docker/www/lysms/vendor/composer/installed.json
Running composer update phalcon/ide-stubs
Loading composer repositories with package information
Downloading https://repo.packagist.org/packages.json
[200] https://repo.packagist.org/packages.json
Writing /home/zan/.cache/composer/repo/https---repo.packagist.org/packages.json into cache
Downloading https://repo.packagist.org/p2/phalcon/ide-stubs.json
[200] https://repo.packagist.org/p2/phalcon/ide-stubs.json
Writing /home/zan/.cache/composer/repo/https---repo.packagist.org/provider-phalcon~ide-stubs.json into cache
Built pool.
Running pool optimizer.
Updating dependencies
Generating rules
Resolving dependencies through SAT
Looking at all rules.
Dependency resolution completed in 0.000 seconds
Reading /home/zan/.cache/composer/repo/https---repo.packagist.org/provider-phalcon~ide-stubs.json from cache
Reading /home/zan/.cache/composer/repo/https---repo.packagist.org/provider-phalcon~ide-stubs.json from cache
Downloading https://repo.packagist.org/p2/phalcon/ide-stubs~dev.json
[200] https://repo.packagist.org/p2/phalcon/ide-stubs~dev.json
Writing /home/zan/.cache/composer/repo/https---repo.packagist.org/provider-phalcon~ide-stubs~dev.json into cache
Reading /home/zan/.cache/composer/repo/https---repo.packagist.org/provider-phalcon~ide-stubs.json from cache
Reading /home/zan/.cache/composer/repo/https---repo.packagist.org/provider-phalcon~ide-stubs~dev.json from cache
Reading /home/zan/.cache/composer/repo/https---repo.packagist.org/provider-phalcon~ide-stubs.json from cache
Reading /home/zan/.cache/composer/repo/https---repo.packagist.org/provider-phalcon~ide-stubs~dev.json from cache
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires phalcon/ide-stubs 5.9 (exact version match: 5.9, 5.9.0 or 5.9.0.0), found phalcon/ide-stubs[dev-master, dev-revert-97-master, v3.1.2, v3.2.0, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.3.0, v3.3.1, v3.3.2, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v4.0.0-alpha.4, v4.0.0-beta.1, v4.0.0-beta.2, v4.0.0-rc.1, v4.0.0-rc.2, v4.0.0-rc.3, v4.0.0, v4.0.2, v4.0.3, v4.0.4, v4.0.6, v4.1.0, v5.0.0-alpha.2, v5.0.0-alpha.3, v5.0.0-alpha.4, v5.0.0-alpha.5, v5.0.0-alpha.6, v5.0.0-alpha.7, v5.0.0-beta.1, v5.0.0beta2, v5.0.0-beta.3, v5.0.0-RC1, v5.0.0, v5.0.1, v5.1.0, v5.1.2, v5.1.3, v5.1.4, v5.2.0, v5.2.1, v5.2.2, v5.2.3, v5.3.0, v5.3.1, v5.4.0, 5.4.x-dev, v5.5.0, v5.6.0, v5.6.1, v5.6.2, v5.7.0, v5.8.0] but it does not match the constraint.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
And I expected this to happen: The package version should be found and installed. This package version is listed on packagist: https://packagist.org/packages/phalcon/ide-stubs#v5.9.0 but opening the link from the verbose output (https://repo.packagist.org/p2/phalcon/ide-stubs.json) shows that there is no version 5.9.0 available for this package - the latest release in this metadata is 5.8.0. I have also tried opening this metadata link and installing the package on machines in completely different networks to avoid some kind of network cache shenanigans - and the problem is the same everywhere I tried.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (11 by maintainers)
OK should be resolved and cache purged again… hopefully we’re good now.
Oh crap I found yet another issue 🙈 Thanks for reporting it, I’ll get this fixed in a bit.
Alright @gharlan your issue should be resolved as well now.