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

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.

Related

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

How to fix library dependence in a conan package

I am trying to install qt/5.14.2 with conan.
Using
qt/5.14.2#bincrafters/stable
I receive
ERROR: libpq/11.5: Error in package_info() method, line 211
self.cpp_info.components["pq"].requires.append("zlib::zlib")
AttributeError: 'Component' object has no attribute 'requires'
OK, there is a bug in libpq/11.5
I am trying to downgrade to
libpq/11.4#bincrafters/stable
ERROR: Conflict in qt/5.14.2#bincrafters/stable:
'qt/5.14.2#bincrafters/stable' requires 'zlib/1.2.11' while 'libpq/11.4#bincrafters/stable' requires 'zlib/1.2.11#conan/stable'.
To fix this conflict you need to override the package 'zlib' in your root package.
BTW:
Why is it not enough to require the correct version of the library, and requiring the same repository? (and require two different repositories in two different packages for the same dependence)
OK, I attempted
zlib/1.2.11#bincrafters/stable
WARN: libpq/11.4#bincrafters/stable: requirement zlib/1.2.11#conan/stable overridden by your conanfile to zlib/1.2.11#bincrafters/stable
zlib/1.2.11#bincrafters/stable: Not found in local cache, looking in remotes...
zlib/1.2.11#bincrafters/stable: Trying with 'conan-center'...
zlib/1.2.11#bincrafters/stable: Trying with 'minres'...
zlib/1.2.11#bincrafters/stable: Trying with 'bincrafters'...
ERROR: Failed requirement 'zlib/1.2.11#bincrafters/stable' from 'libpq/11.4#bincrafters/stable'
ERROR: Unable to find 'zlib/1.2.11#bincrafters/stable' in remotes
Finally, I arrived at
libpq/11.4#bincrafters/stable
zlib/1.2.11#conan/stable
qt/5.14.2#bincrafters/stable
After this, it looks like it was oK:
Installing (downloading, building) binaries...
qt/5.14.2#bincrafters/stable: Retrieving package 93c70de10405da9f2d5a1f42b8c299ca7af869d2 from remote 'bincrafters'
Downloading conanmanifest.txt
Downloading conaninfo.txt
Downloading conan_package.tgz
....qt/5.14.2#bincrafters/stable: Package installed 93c70de10405da9f2d5a1f42b8c299ca7af869d2
qt/5.14.2#bincrafters/stable: Downloaded package revision 0
However, the install fails with
CMake was unable to find Qt5, put qmake in your path or set
QTDIR/QT_QMAKE_EXECUTABLE.
The package is downloaded, I see all components in the corresponding subdirectory in my home directory. However, unlike the other components, it is not installed, before CMake attempts to find it.
What do I wrong?
In case of any strange behavior of conan, upgrade! For me, switch 1.24.0 -> 1.28.1 with configs clean up fixed the same problem with libpq/11.5

When I try to install a package in Laravel using composer the following error occurs

./composer.json has been updated
Deprecation warning: require-dev.require is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]?|-{0,2})[a-z0-9]+)*$". Make sure you fix this as Composer 2.0 will error.
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
- The requested package require could not be found in any version, there may be a typo in the package name.
Problem 2
- Conclusion: don't install consoletvs/charts 5.4.0
Does anyone know the reason for this and how to fix it? It happened for several packages,when I try to install and at some point it shows the package is there on composer.json. but then results in reverting back to the previous state.

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.

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

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

Resources