Composer install fails: react/http dev-master requires react/socket - composer-php

While running the command "composer install" i get these problems:
$ composer install
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
- Installation request for react/http dev-master#cd15204bd15d106d7832c680e4fb0ca0ce2f5e30 -> satisfiable by react/http[dev-master].
- react/http dev-master requires react/socket ^1.0 || ^0.8.3 -> satisfiable by react/socket[v0.8.3, v0.8.4, v0.8.5, v0.8.6] but these conflict with your requirements or minimum-stability.
Problem 2
- react/http dev-master requires react/socket ^1.0 || ^0.8.3 -> satisfiable by react/socket[v0.8.3, v0.8.4, v0.8.5, v0.8.6] but these conflict with your requirements or minimum-stability.
- php-pm/php-pm dev-master requires react/http dev-master#cd15204bd15d106d7832c680e4fb0ca0ce2f5e30 -> satisfiable by react/http[dev-master].
- Installation request for php-pm/php-pm dev-master -> satisfiable by php-pm/php-pm[dev-master].
used composer.json
System:
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.1 (stretch)
Release: 9.1
Codename: stretch
Anybody here who knows how to solve these issues? Thx for your help.

Try adjusting your composer.json by
lowering minimum-stability to dev
setting prefer-stable to true (to still pull in stable packages if they are available)
For example:
{
"minimum-stability": "dev",
"prefer-stable": true
}
Then run:
$ composer require react/http:dev-master --update-with-dependencies
For reference, see:
https://getcomposer.org/doc/04-schema.md#minimum-stability
https://getcomposer.org/doc/04-schema.md#prefer-stable
https://getcomposer.org/doc/03-cli.md#require

Related

Composer package conflict when updating guzzlehttp

laravel version is 5.8, When I write this command in cmd,
composer require guzzlehttp/guzzle
I get the below problems:
Using version ^7.5 for guzzlehttp/guzzle
./composer.json has been updated
Running composer update guzzlehttp/guzzle
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires guzzlehttp/guzzle ^7.5, found guzzlehttp/guzzle[dev-master, 7.5.0, 7.5.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 2
- Root composer.json requires netflie/whatsapp-cloud-api ^1.3 -> satisfiable by netflie/whatsapp-cloud-api[1.3.0].
- netflie/whatsapp-cloud-api 1.3.0 requires guzzlehttp/guzzle ^7.0 -> found guzzlehttp/guzzle[dev-master, 7.0.0-beta.1, ..., 7.5.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 3
- php-http/guzzle6-adapter v1.1.1 requires guzzlehttp/guzzle ^6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.5).
- nexmo/laravel 1.1.2 requires nexmo/client ^1.0 -> satisfiable by nexmo/client[1.9.1].
- nexmo/client 1.9.1 requires php-http/guzzle6-adapter ^1.0 -> satisfiable by php-http/guzzle6-adapter[v1.1.1].
- nexmo/laravel is locked to version 1.1.2 and an update of this package was not requested.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require guzzlehttp/guzzle:*" to figure out if any version is installable, or "composer require guzzlehttp/guzzle:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
It's troublesome, and it seems like a catch22 situation and I cannot figure out the problem.

Laravel 5.5.x to 5.6.x upgrade requirements issue

Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework[v5.6.0, ..., v5.6.40] require php ^7.1.3 -> your php version (8.1.2) does not satisfy that requirement.
- Root composer.json requires laravel/framework 5.6.* -> satisfiable by laravel/framework[v5.6.0, ..., v5.6.40].

Composer require dependencies and version issue. Is it possible to force or change satisfiable version requirements?

I am currently working in Laravel 5.6.
I am trying to use the Corcel composer package.
It looks like I already have a version of the hautelook/phpass installed and locked at 0.3.5. Corcel seams to want 0.3.4. Is there a way to force Corcel ge to use 0.3.5 so I don't have to play with my lock?
From my terminal:
$ composer require jgrossi/corcel Using version ^2.6 for
jgrossi/corcel ./composer.json has been updated 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
Installation request for hautelook/phpass (locked at 0.3.5) -> satisfiable by hautelook/phpass[0.3.5].
jgrossi/corcel 2.6.x-dev requires hautelook/phpass 0.3.4 -> satisfiable by hautelook/phpass[0.3.4].
jgrossi/corcel v2.6.0 requires hautelook/phpass 0.3.4 -> satisfiable by hautelook/phpass[0.3.4].
jgrossi/corcel v2.6.1 requires hautelook/phpass 0.3.4 -> satisfiable by hautelook/phpass[0.3.4].
jgrossi/corcel v2.6.2 requires hautelook/phpass 0.3.4 -> satisfiable by hautelook/phpass[0.3.4].
Conclusion: don't install hautelook/phpass 0.3.4
Installation request for jgrossi/corcel ^2.6 -> satisfiable by jgrossi/corcel[2.6.x-dev, v2.6.0, v2.6.1, v2.6.2].
Installation failed, reverting ./composer.json to its original content.
Update:
moving forward when I run into version issues in a composer package I typically fork the repo, make my edits and use my repo in place until the original developer gets a chance to update.
Jeffery Way has a great tutorial on it here
[https://laracasts.com/series/whats-new-in-laravel-8/episodes/11][1]
[1]: https://laracasts.com/series/whats-new-in-laravel-8/episodes/11

Why does Composer say "Conclusion: don't install" when (seemingly) no obstacles are present?

The following composer.json:
{
"type": "project",
"minimum-stability": "dev",
"require": {
"jasny/bootstrap": ">=3.1.3",
"2amigos/yii2-file-input-widget": "*"
}
}
leads to the following output of composer update:
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
- 2amigos/yii2-file-input-widget 0.1.2 requires jasny/bootstrap v3.1.0 -> satisfiable by jasny/bootstrap[v3.1.0] but these conflict with your requirements or minimum-stability.
- 2amigos/yii2-file-input-widget 0.1.1 requires jasny/bootstrap v3.1.0 -> satisfiable by jasny/bootstrap[v3.1.0] but these conflict with your requirements or minimum-stability.
- 2amigos/yii2-file-input-widget 0.1.0 requires jasny/bootstrap v3.1.0 -> satisfiable by jasny/bootstrap[v3.1.0] but these conflict with your requirements or minimum-stability.
- 2amigos/yii2-file-input-widget 1.0.0 requires jasny/bootstrap ~3.1.0 -> satisfiable by jasny/bootstrap[v3.1.3].
- 2amigos/yii2-file-input-widget 1.0.1 requires jasny/bootstrap ~3.1.0 -> satisfiable by jasny/bootstrap[v3.1.3].
- 2amigos/yii2-file-input-widget 1.0.2 requires jasny/bootstrap ~3.1.0 -> satisfiable by jasny/bootstrap[v3.1.3].
- 2amigos/yii2-file-input-widget dev-master requires jasny/bootstrap ~3.1.0 -> satisfiable by jasny/bootstrap[v3.1.3].
- 2amigos/yii2-file-input-widget 1.0.x-dev requires jasny/bootstrap ~3.1.0 -> satisfiable by jasny/bootstrap[v3.1.3].
- Conclusion: don't install jasny/bootstrap v3.1.3
- Installation request for 2amigos/yii2-file-input-widget * -> satisfiable by 2amigos/yii2-file-input-widget[0.1.0, 0.1.1, 0.1.2, 1.0.0, 1.0.1, 1.0.2, dev-master, 1.0.x-dev].
Why?
Ok, I understand, why versions 0.1.0–0.1.2 of 2amigos/yii2-file-input-widget can't be installed — because they require jasny/bootstrap of exact version 3.1.0, which conflicts with >=3.1.3 requirement in composer.json (and therefore composer clarifies: but these conflict with your requirements or minimum-stability).
But, from common-sense view, composer can install version 1.0.0 or later of 2amigos/yii2-file-input-widget (which requires jasny/bootstrap of version ~3.1.0, which is satisfiable by 3.1.3). Neither I see any obstacles for installing 2amigos/yii2-file-input-widget 1.0.0+ together with jasny/bootstrap 3.1.3, nor composer writes any explicit clarification about it. Still it says: Conclusion: don't install jasny/bootstrap v3.1.3 — why?
Workaround 1
It seems it works with "prefer-stable": true.
Workaround 2
I actually found the other workaround some time ago: I replace "2amigos/yii2-file-input-widget": "*" with "2amigos/yii2-file-input-widget": "1.0.2", do composer update and then replace it back and do composer update again — and it works.
The question is why it works in so strange way: why it works with more restrictions, but fails with less restrictions (with no clarification). E.g. if it works with 1.0.2 (or with prefer-stable) works — then why it doesn't with * (or without prefer-stable)?
Change the order and it should work, e.g.
{
"minimum-stability": "dev",
"require": {
"2amigos/yii2-file-input-widget": "*",
"jasny/bootstrap": ">=3.1.3"
}
}
Why? I don't know. Most likely a Composer's bug.
I've tested two configurations with different order on the empty folder using composer install command (Composer v1.6.3), the original order fails, however the order above works. I've reported the issue at GH-7215.
The problem might well be that you are manually editing composer.json and then running
$ composer update
Instead, revert the changes to composer.json and then run:
$ composer require jasny/bootstrap:>=3.1.3
$ composer require "2amigos/yii2-file-input-widget:*"
or in one go:
$ composer require jasny/bootstrap:>=3.1.3 "2amigos/yii2-file-input-widget:*"
Note I recommend to avoid the * wildcard as version constraint because it could pull in any version of that dependency, and potentially break your application by pulling in a version that is not compatible with it.
For reference, see:
http://semver.org

how install fos CommentBundle on symfony 2.7.5 that that use fos\RestBundle ^2.0#dev

I use symfony 2.7.5-dev and install FOSRestBundle and JMSSerilizerBundle on it that installed version FOSRestBundle and JMSSerializerbundle is dev-master.
my `composer.json:
"minimum-stability": "dev",
...
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.7.*",
...
"friendsofsymfony/rest-bundle": "^2.0#dev",
"jms/serializer-bundle": "^1.1#dev",
...
I try install bundle by composer require friendsofsymfony/comment-bundle command, i add "minimum-stability": "dev" to composer.json, but that can not install and raise this errors:
Problem 1
- friendsofsymfony/comment-bundle v2.0.7 requires jms/serializer-bundle ~0.11 -> no matching package found.
- friendsofsymfony/comment-bundle v2.0.6 requires jms/serializer-bundle ~0.11 -> no matching package found.
- friendsofsymfony/comment-bundle v2.0.5 requires friendsofsymfony/rest-bundle >=0.11,<0.13-dev -> no matching package found.
- friendsofsymfony/comment-bundle v2.0.4 requires friendsofsymfony/rest-bundle 0.11.*#dev -> no matching package found.
- friendsofsymfony/comment-bundle 2.0.x-dev requires jms/serializer-bundle ~0.11 -> no matching package found.
- friendsofsymfony/comment-bundle v2.0.0 requires symfony/symfony 2.1.* -> satisfiable by symfony/symfony[2.1.x-dev].
- friendsofsymfony/comment-bundle v2.0.1 requires symfony/symfony 2.1.* -> satisfiable by symfony/symfony[2.1.x-dev].
- friendsofsymfony/comment-bundle v2.0.2 requires symfony/symfony 2.1.*#stable -> satisfiable by symfony/symfony[2.1.x-dev].
- friendsofsymfony/comment-bundle v2.0.3 requires symfony/symfony 2.1.*#stable -> satisfiable by symfony/symfony[2.1.x-dev].
- Conclusion: don't install symfony/symfony 2.1.x-dev
- Installation request for friendsofsymfony/comment-bundle ^2.0#dev -> satisfiable by friendsofsymfony/comment-bundle[2.0.x-dev, v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7].
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://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
I could install FOSCommentBundle by forking of repository & change depedencies (FOSRestBundle & JMSSerializerBundle) version to latest version.
I need change a few code in ThreadController, RouteRedirectView class is removed in new version of FOSRestBundle and we instead of this class must use createRouteRedirect method of View class.
My repository on github

Resources