Composer: Your requirements could not be resolved to an installable set of packages - composer-php

I am trying to install a composer package and I continuously get the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package rondobley/extended-respect-validation could not be found in any version, there may be a typo in the package name.
Here is the composer.json
{
"minimum-stability": "dev",
"require": {
"rondobley/extended-respect-validation": "^1.0"
}
}
And the output from composer install -vvv:
vagrant#wheezy:/code/test$ composer install -vvv
Reading ./composer.json
Loading config file ./composer.json
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/code/test): git branch --no-color --no-abbrev -v
Executing command (/code/test): git describe --exact-match --tags
Executing command (/code/test): git log --pretty="%H" -n1 HEAD
Failed to initialize global composer: Composer could not find the config file: /home/vagrant/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Running 1.2.0 (2016-07-19 01:28:52) with PHP 5.5.38-1~dotdeb+7.1 on Linux / 3.2.0-4-amd64
Loading composer repositories with package information
Downloading https://packagist.org/packages.json
Writing /home/vagrant/.composer/cache/repo/https---packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2013.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2014.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2015.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2015-10.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2016-01.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2016-04.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2016-07.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-archived.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-latest.json from cache
Resolving dependencies through SAT
Dependency resolution completed in 0.001 seconds
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package rondobley/extended-respect-validation could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
The package seems to be fine to me:
https://packagist.org/packages/rondobley/extended-respect-validation
It is a new package, just published today, but it has been several hours. I have also tried composer clearcache and that does not help. I have read many of the other similar issues here with no luck. I am new to publishing composer packages, so maybe I an missing a simple step?
Ideally I would like to install version ^1.0.
Thanks for the help in advance.

See https://twitter.com/packagist/status/772034610632990720 - it was a temporary failure on packagist

Related

how can i fix this package installation error and install require hardevine/shoppingcart for my laravel project

PS F:\web\Laravel-Advance-Ecommerce-master>
PS F:\web\Laravel-Advance-Ecommerce-master>
PS F:\web\Laravel-Advance-Ecommerce-master> composer require hardevine/shoppingcart
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^3.1 for hardevine/shoppingcart
./composer.json has been updated
Running composer update hardevine/shoppingcart
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating optimized autoload files
Warning: Ambiguous class resolution, "Gloudemans\Shoppingcart\CanBeBought" was found in both "F:/web/Laravel-Advance-Ecommerce-master/vendor/bumbummen99/shoppingcart/src\CanBeBought.php" and "F:/web/Laravel-Advance-Ecommerce-master/vendor/hardevine/shoppingcart/src\CanBeBought.php", the first will be used.
Warning: Ambiguous class resolution, "Gloudemans\Shoppingcart\Cart" was found in both "F:/web/Laravel-Advance-Ecommerce-master/vendor/bumbummen99/shoppingcart/src\Cart.php" and "F:/web/Laravel-Advance-Ecommerce-master/vendor/hardevine/shoppingcart/src\Cart.php", the first will be used.
Warning: Ambiguous class resolution, "Gloudemans\Shoppingcart\CartItem" was found in both "F:/web/Laravel-Advance-Ecommerce-master/vendor/bumbummen99/shoppingcart/src\CartItem.php" and "F:/web/Laravel-Advance-Ecommerce-master/vendor/hardevine/shoppingcart/src\CartItem.php", the first will be used.
Warning: Ambiguous class resolution, "Gloudemans\Shoppingcart\CartItemOptions" was found in both "F:/web/Laravel-Advance-Ecommerce-master/vendor/bumbummen99/shoppingcart/src\CartItemOptions.php" and "F:/web/Laravel-Advance-Ecommerce-master/vendor/hardevine/shoppingcart/src\CartItemOptions.php", the first will be used.
Warning: Ambiguous class resolution, "Gloudemans\Shoppingcart\Contracts\Buyable" was found in both "F:/web/Laravel-Advance-Ecommerce-master/vendor/bumbummen99/shoppingcart/src\Contracts\Buyable.php" and "F:/web/Laravel-Advance-Ecommerce-master/vendor/hardevine/shoppingcart/src\Contracts\Buyable.php", the first will be used.
Warning: Ambiguous class resolution, "Gloudemans\Shoppingcart\Exceptions\CartAlreadyStoredException" was found in both "F:/web/Laravel-Advance-Ecommerce-master/vendor/bumbummen99/shoppingcart/src\Exceptions\CartAlrDiscovered Package: laravel/tinker
Discovered Package: livewire/livewireDiscovered Package: nesbot/carbon
Discovered Package: nunomaduro/collisionDiscovered Package: sven/artisan-view
Package manifest generated successfully.84 packages you are using are looking for funding.
Use the `composer fund` command to find out more!Found 11 security vulnerability advisories affecting 4 packages.
Run composer audit for a full list of advisories.
PS F:\web\Laravel-Advance-Ecommerce-master>
im trying to install this package and create shopping cart for my laravel project
the package you're trying to install hardevine/shoppingcart and the package that already exists in your installation bumbummen99/LaravelShoppingcart are both a fork of the same original package Crinsane/LaravelShoppingcart which is not compatible with the latest version of laravel. You can only use one of them.
Or if you have the patience, make your own fork that merges the functionalities of both forks or just use bumbummen99's which is the most up to date one. Depends on your needs and what those packages add to the original one.

First composer package published not found

i know this has already been asked but, i can't see what is going wrong without asking.
I've created a packagist for a custom code hosted on github.
Packagist : https://packagist.org/packages/claims/module-logger
Github : https://github.com/Minirock/claims-module-logger
But when i try to load it using composer, it says it can't find it.
composer require claims/module-logger
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
In InitCommand.php line 785:
Could not find a version of package claims/module-logger matching your minimum-stability (dev). Require it with an explicit version constraint allowing its desired stability.
I'm pretty sure this has to do with composer version but, how can i check if my package is available for composer 1 and / or 2. If not available for composer 1 (which is mandatory in my case) how can i make it accessible ?
I also tried specifying the version
composer require claims/module-logger:dev-main
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
In InitCommand.php line 792:
Could not find package claims/module-logger.
Did you mean this?
claims/module-logger
I has exactly the same problem.
I updated my composer version (using composer self-update).
I confirm the problem persist.
The github : https://github.com/j-barth/test
The packagist : https://packagist.org/packages/jbarthes/test
Thank you

issue with Userfrosting & Composer - no matching packages

Just working my way through the Userfrosting 4 tutorial. The basic app is up and running and am now creating the first sprinkle under "Your First UserFrosting Site".
On running composer update I get the following:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- userfrosting/config dev-master requires userfrosting/support ^4.0.0 -> no matching package found.
- userfrosting/config dev-master requires userfrosting/support ^4.0.0 -> no matching package found.
- Installation request for userfrosting/config dev-master -> satisfiable by userfrosting/config[dev-master].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
I've replaced my code with the copied / pasted code from the tutorial and still get the errors. I've absolutely no idea where to go from here - any pointers would be appreciated.
Make sure you have the latest version (4.0.11-alpha as of now) since the component versioning was changed/fixed in a recent version.
The core composer.json file shoudn't use the dev-master version of userfrosting/config component anymore, but one of the 4.0.x version. See : https://github.com/userfrosting/UserFrosting/blob/master/app/sprinkles/core/composer.json#L31. If you have a custom ^composer.json` file in your sprinkle, you don't need to add the packages define in the core composer file again.
That being said, if you're still having some issues, you can try running composer clear-cache as composer might have cached some outdated info.

Why I cannot install my composer new package?

The package - https://packagist.org/packages/drakonli/php-utils
My composer:
{
"require": {
"php": ">=5.3.0",
"drakonli/php-utils": "dev-master"
},
"minimum-stability": "dev"
}
The error I get when i use "composer install"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package drakonli/php-utils could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
I have added a tag to this package, so it should not be the problem with stability of version.
What I also tried - I tried to search for my package on packagist AND using command composer search. And this is what I got:
When I try to search for "drakonli/" - I CAN find my package, but when I try to search for "drakonli/php-utils" or "php-utils" I CAN'T find my package.
Help, pls.
UPDATE
I was wrong - the package is found but it's on the 1608 page after packages that don't even have "php" or anything in it's name. Even when using the package full name.
UPDATE #2
composer search drakonli
result:
drakonli/php-utils PHP lib of different utility interfaces/classes
AND
composer info drakonli/php-utils
result:
[InvalidArgumentException]
Package drakonli/php-utils not found
Losing my mind here :D
After about 12 hours it fixed on it's own...

yii2 composer update error: Invalid version string "2.*"

I'm use composer update in a Yii2 project, but it is exiting with an exception.
I have updated composer to the lastest version, c6cc6dd6070871f4b198ed39f76dd8047c116b02, but it still doesn't work:
Importing tag v2.0.2 (2.0.2.0)
Reading bower.json of bower-asset/yii2-pjax (v2.0.1)
Reading /home/xiaoai/.composer/cache/repo/github.com/yiisoft/jquery-pjax/bower-f07ce95f6098c0bd5421789a20789f39a19be73b from cache
Importing tag v2.0.1 (2.0.1.0)
Reading /home/xiaoai/.composer/cache/repo/https---packagist.org/provider-yiisoft$yii2-bootstrap.json from cache
Reading /home/xiaoai/.composer/cache/repo/https---packagist.org/provider-bower-asset$bootstrap.json from cache
Downloading https://bower.herokuapp.com/packages/bootstrap
Writing /home/xiaoai/.composer/cache/repo/https---bower.herokuapp.com-packages/bootstrap-3c71cc99d2fc1c12a3d3e1b27e448ca612a89a1d-package.json into cache
Adding VCS repository bower-asset/bootstrap
Downloading https://api.github.com/repos/twbs/bootstrap
Downloading https://api.github.com/repos/twbs/bootstrap/contents/bower.json?ref=master
Downloading https://api.github.com/repos/twbs/bootstrap/commits/master
Downloading https://api.github.com/repos/twbs/bootstrap/tags?per_page=100
Downloading https://api.github.com/repos/twbs/bootstrap/git/refs/heads?per_page=100
[UnexpectedValueException]
Could not parse version constraint <=2.*: Invalid version string "2.*"
Exception trace:
() at phar:///usr/bin/composer.phar/src/Composer/Package/Version/VersionParser.php:461
Composer\Package\Version\VersionParser->parseConstraint() at phar:///usr/bin/composer.phar/src/Composer/Package/Version/VersionParser.php:257
Composer\Package\Version\VersionParser->parseConstraints() at phar:///usr/bin/composer.phar/src/Composer/Package/Loader/ArrayLoader.php:234
Composer\Package\Loader\ArrayLoader->parseLinks() at phar:///usr/bin/composer.phar/src/Composer/Package/Loader/ArrayLoader.php:123
Composer\Package\Loader\ArrayLoader->load() at /home/xiaoai/.composer/vendor/fxp/composer-asset-plugin/Repository/AssetVcsRepository.php:174
Fxp\Composer\AssetPlugin\Repository\AssetVcsRepository->preInitBranchPackage() at /home/xiaoai/.composer/vendor/fxp/composer-asset-plugin/Repository/AssetVcsRepository.php:138
Fxp\Composer\AssetPlugin\Repository\AssetVcsRepository->initBranches() at /home/xiaoai/.composer/vendor/fxp/composer-asset-plugin/Repository/AssetVcsRepository.php:45
Fxp\Composer\AssetPlugin\Repository\AssetVcsRepository->initialize() at phar:///usr/bin/composer.phar/src/Composer/Repository/ArrayRepository.php:178
Composer\Repository\ArrayRepository->getPackages() at phar:///usr/bin/composer.phar/src/Composer/DependencyResolver/Pool.php:104
Composer\DependencyResolver\Pool->addRepository() at /home/xiaoai/.composer/vendor/fxp/composer-asset-plugin/Repository/Util.php:60
Fxp\Composer\AssetPlugin\Repository\Util::addRepositoryInstance() at /home/xiaoai/.composer/vendor/fxp/composer-asset-plugin/Repository/Util.php:39
Fxp\Composer\AssetPlugin\Repository\Util::addRepository() at /home/xiaoai/.composer/vendor/fxp/composer-asset-plugin/Repository/AbstractAssetsRepository.php:139
Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository->whatProvides() at phar:///usr/bin/composer.phar/src/Composer/DependencyResolver/Pool.php:199
Composer\DependencyResolver\Pool->computeWhatProvides() at phar:///usr/bin/composer.phar/src/Composer/DependencyResolver/Pool.php:188
Composer\DependencyResolver\Pool->whatProvides() at phar:///usr/bin/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php:161
Composer\DependencyResolver\RuleSetGenerator->whitelistFromPackage() at phar:///usr/bin/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php:273
Composer\DependencyResolver\RuleSetGenerator->whitelistFromJobs() at phar:///usr/bin/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php:324
Composer\DependencyResolver\RuleSetGenerator->getRulesFor() at phar:///usr/bin/composer.phar/src/Composer/DependencyResolver/Solver.php:177
Composer\DependencyResolver\Solver->solve() at phar:///usr/bin/composer.phar/src/Composer/Installer.php:505
Composer\Installer->doInstall() at phar:///usr/bin/composer.phar/src/Composer/Installer.php:230
Composer\Installer->run() at phar:///usr/bin/composer.phar/src/Composer/Command/UpdateCommand.php:140
I don't think this is my mistake, but how do I fix the exception?
Michael Nguyen's answer did not work for me, but updating to dev-master did:
php composer.phar global require "fxp/composer-asset-plugin:dev-master"
One may also need to update composer itself:
php composer.phar self-update
Also there was an extensive discussion on this yesterday: link.
UPDATE. It seems to me at this moment "fxp/composer-asset-plugin:1.0.*#dev" is better again.
I have the same issue and discussed on Yii Forum. It seems like this is a bug with "fxp/composer-asset-plugin".
Try
php composer.phar global require "fxp/composer-asset-plugin:1.0.1"
Then do whatever you need with composer
The bug is discussed at https://github.com/francoispluchino/composer-asset-plugin/issues/129
It helped for me
composer self-update
composer global update

Resources