laravel installer - requirements could not be resolved - laravel

Problem 1
-laravel/installer v1.1.1 requires guzzlehttp/guzzle ~4.0 -> satisfiable by guzzlehttp/guzzle[...]
-guzzlehttp/guzzle 4.2.3 requires php>=5.4.0 -> no matching package found
I am using vagrant ( hashicorp/precise32 )
I used this to try and install the laravel installer
composer global require "laravel/installer=~1.1"

Just read the error message carefully and you have the problem:
Laravel installer requires guzzlehttp/guzzle. Guzzle requires php >= 5.4.0 (greater than or equal to version 5.4.0). This was not found.
In other words, you do not meet the PHP requirement (you'll properbly use PHP 5.3.x)

Related

Laravel PHP Version

when I check my PHP version it shows 8.0.3 but I changed the version to 7.2.0 in Laragon.
when I run the composer update command in Laravel it generates the error
Problem 1
Root composer.json requires PHP ^7.2.0 but your PHP version (8.0.3) does not satisfy that requirement.
Problem 2
laravel/framework[v5.8.0, ..., 5.8.x-dev] require php ^7.1.3 -> your php version (8.0.3) does not satisfy that requirement.
Root composer.json requires laravel/framework 5.8.* -> satisfiable by laravel/framework[v5.8.0, ..., 5.8.x-dev].
This is a common problem in PHP because your PHP version does not match Laravel or the packages you use. Now it's better to go to the composer.json file that says the last version you can have this way.
"require": {
"php": "^ 8.0.2",
For example, in Laravel version 9, the minimum PHP version is 8.0.2
In your command line type:
composer require
press enter and then it will ask for the package
search for a package : php
press enter and then it will ask for the version
Enter the version constraint to require (or leave blank to use the latest version) : 7.1.3
press enter twice. Hope this helps.

Can't install/update modules on Drupal 8.9.6 with composer 2.0

I'm trying to install a module on a Drupal 8.9.6 using composer 2.0 but I get the next error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- cweagans/composer-patches 1.6.7 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
- drupal/varbase_heroslider_media 7.13.0 requires cweagans/composer-patches ~1.0 -> satisfiable by cweagans/composer-patches[1.6.7].
- drupal/varbase_heroslider_media is locked to version 7.13.0 and an update of this package was not requested.
You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.
Then, I've tried to update cweagans/composer-patches to 1.7 because this issue was solved here. But I get the next error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- drupal/drupal-library-installer-plugin 0.3 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
- drupal/varbase_heroslider_media 7.13.0 requires drupal/drupal-library-installer-plugin ^0.3 -> satisfiable by drupal/drupal-library-installer-plugin[0.3].
- drupal/varbase_heroslider_media is locked to version 7.13.0 and an update of this package was not requested.
You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.
Ok, then, I've tried to update drupal/drupal-library-installer-plugin I get again the first error. It is a circle and I can't update Drupal.
How could I do it?
drupal/drupal-library-installer-plugin has not seen any updates since more than five years(!). Either search for an alternative, or downgrade Composer to v1

Cyber-duck Installation failed, reverting in Laravel-8

I had earlier installed maatwebsite/excel-3.1, and it was okay. I have Laravel-8 and PHP-7.3 and I am trying to install cyber-duck:
composer require cyber-duck/laravel-excel
But I got this error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
Root composer.json requires cyber-duck/laravel-excel ^2.1 -> >satisfiable by cyber-duck/laravel-excel[2.1.0].
cyber-duck/laravel-excel 2.1.0 requires illuminate/database >^6.0.0|^7.0.0 -> found illuminate/database[v6.0.0, ..., 6.x-dev, v7.0.0, >..., 7.x-dev] but these were not loaded, likely because it conflicts with >another require.
How do I resolve this?
Thanks
As far as release versions of cyber-duck/laravel-excel are concerned, the latest version of the package (commit: b98ad4d) is only supporting Laravel version 7.x.
https://github.com/Cyber-Duck/laravel-excel/releases
So, either you have to downgrade your Laravel version or wait for the latest release version which supports Laravel version 8.x.

Problem in installing elasticsearch for Laravel

When I tried to install Elasticsearch for my Laravel instance using the following command:
composer require elasticsearch/elasticsearch
I got this error:
Problem 1
- elasticsearch/elasticsearch v7.6.0 requires guzzlehttp/ringphp dev-fork-elasticsearch -> no matching package found.
- tamayo/laravel-scout-elastic 5.0.0 requires elasticsearch/elasticsearch ^5.0 -> satisfiable by
elasticsearch/elasticsearch[5.0.x-dev].
- tamayo/laravel-scout-elastic 5.0.0 requires elasticsearch/elasticsearch ^5.0 -> satisfiable by
elasticsearch/elasticsearch[5.0.x-dev].
- tamayo/laravel-scout-elastic 5.0.0 requires elasticsearch/elasticsearch ^5.0 -> satisfiable by
elasticsearch/elasticsearch[5.0.x-dev].
- Can only install one of: elasticsearch/elasticsearch[v7.6.1, 5.0.x-dev].
- Installation request for elasticsearch/elasticsearch ^7.6 -> satisfiable by elasticsearch/elasticsearch[v7.6.0, v7.6.1].
- Installation request for tamayo/laravel-scout-elastic ^5.0 -> satisfiable by tamayo/laravel-scout-elastic[5.0.0].
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.
- It's a private package and you forgot to add a custom repository to find it
Read https://getcomposer.org/doc/articles/troubleshooting.md for
further common problems.
Installation failed, reverting ./composer.json to its original
content.
then I tried to install the package mentioned in the error using the following command:
composer require guzzlehttp/ringphp
and I got the following warning:
Package guzzlehttp/ringphp is abandoned, you should avoid using it. No
replacement was suggested. Package guzzlehttp/streams is abandoned,
you should avoid using it. No replacement was suggested
Then I tried to install it again, and I got the same error.
What can I do to address the problem?
Please simply try installing it again - according to Packagist, there is a version 7.6.1 available that does not depend on such packages any more. This is something you can also find on https://github.com/elastic/elasticsearch-php/releases

Using composer to pull in Swipestripe module - requires payment module, no matching package found?

I am trying to pull in Swipestripe using composer using the following command as per their instructions: http://swipestripe.com/dev/docs/swipestripe/en/Basics/Install
composer require swipestripe/swipestripe:2.1.*#dev
I am getting this:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- swipestripe/swipestripe 2.1.x-dev requires silverstripe/payment 1.0.* -> no matching package found.
- swipestripe/swipestripe 2.1.0 requires silverstripe/payment 1.0.* -> no matching package found.
- Installation request for swipestripe/swipestripe 2.1.*#dev -> satisfiable by swipestripe/swipestripe[2.1.0, 2.1.x-dev].
I have tried to require just the silverstripe/payment module 2 ways, both don't work.
composer require "silverstripe/payment:1.0"
and
composer require "silverstripe-labs/silverstripe-payment:1.0"
What am I doing wrong?
According to packagist.org/packages/silverstripe/payment#1.0.x-dev there is a 1.0.x dev branch.
The according command is:
composer require silverstripe/payment:1.0.x-dev

Resources