Open demonyun opened 8 months ago
While waiting original author to update the version to support Laravel 11, in the mean time:
E,g,
"require": {
"xxx/laravelshoppingcart": "dev-master",
},
"repositories": {
"repo-name": {
"type": "vcs",
"url": "git@github.com:xxx/laravelshoppingcart.git"
}
}
Replace xxx with your own github username.
Tested on my own project, laravelshoppingcart in Laravel 11 is worked.
+1 request for laravel 11
Just fork it an create a PR with the required changes if you need that, that is how open source works :)
@ronaldvaneede
Just fork it an create a PR with the required changes if you need that, that is how open source works :)
I'm sure I know very well how open source works, but if the main administrator of the repo doesn't take it into consideration, there's not much left to do.
Did you check the pull requests ?
There is already https://github.com/darryldecode/laravelshoppingcart/pull/379 and https://github.com/darryldecode/laravelshoppingcart/pull/375
I have this error when I try to install in Laravel 11, is this fixed with first response of this thread? thanks for advance
`Your requirements could not be resolved to an installable set of packages.
Problem 1
Installation failed, reverting ./composer.json and ./composer.lock to their original content.`
Thanks a lot, but not work. When I make composer install console returns this:
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run composer update
or composer update <package name>
.
And when I use composer update (as first error says) it return the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
Potential causes:
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
So please if someone can help me , i'll say thanks forever
Thanks a lot, but not work. When I make composer install console returns this:
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run
composer update
orcomposer update <package name>
.
- Required package "plescanos/laravelshoppingcart" is not present in the lock file. This usually happens when composer files are incorrectly merged or the composer.json file is manually edited. Read more about correctly resolving merge conflicts https://getcomposer.org/doc/articles/resolving-merge-conflicts.md and prefer using the "require" command over editing the composer.json file directly https://getcomposer.org/doc/03-cli.md#require-r
And when I use composer update (as first error says) it return the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1 - Root composer.json requires plescanos/laravelshoppingcart, it 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.
- 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.
So please if someone can help me , i'll say thanks forever
package name must be same or change your package name in your repos composer.json.
Example: xxxx = your github username
"require": {
"darryldecode/cart": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "git@github.com:xxxx/laravelshoppingcart.git"
}
]
Reason: In this respect, composer prioritizes private repos when updating; even if the package names are the same, it takes it into consideration first when it is found in your repo.
@plescanos
@tanero Thanks !! is solved. So in my case final solution was:
"require": { "darryldecode/cart": "dev-master" }, "repositories": [ { "type": "vcs", "url": "git@github.com:xxxx/laravelshoppingcart.git" } ]
Thanks again!
@darryldecode
@tanero Thanks !! is solved. So in my case final solution was:
- Change my composer.json
"require": { "darryldecode/cart": "dev-master" }, "repositories": [ { "type": "vcs", "url": "git@github.com:xxxx/laravelshoppingcart.git" } ]
- Do not use "composer install", I use "composer update" and it works fine.
Thanks again!
Work for me, thanks!
unfortunately this didn't work for me.
forked the repo, updated composer.json like so
"require": { "darryldecode/cart": "dev-master" }, "repositories": [ { "type": "vcs", "url": "git@github.com:xxxx/laravelshoppingcart.git" } ]
then ran 'composer update'
still got Updating dependencies Your requirements could not be resolved to an installable set of packages.
Problem 1
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Hey guys, I hope @darryldecode doesn't mind, but his latest push breaks his package because @saleem189 updated the composer name for the package.
I run an agency here in Australia Pixel and we build so many custom eCommerce checkouts in Laravel that having a package like this is a necessity for the business to function.
We have actually forked the package and started to rewrite it here: https://github.com/wearepixel/laravel-cart
Includes more tests, drops older PHP support for performance reasons, and includes some nice new methods, like getting the actual value being used on a condition (i.e a gift card) based on its priority.
See the test for this here: https://github.com/wearepixel/laravel-cart/blob/master/tests/Unit/CartConditionsTest.php#L761-L792
This is useful for what you can see in the test, where a discount covers the full amount, but someone still decides to apply a gift card, it will not display correctly if you use getValue
and if you want to get the calcated value normally, you'd need to pass in the subtotal, which is silly since everything has an order :)
When will laravel11 be supported? Thanks.