Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When will laravel11 be supported? #376

Open
demonyun opened this issue Mar 15, 2024 · 13 comments
Open

When will laravel11 be supported? #376

demonyun opened this issue Mar 15, 2024 · 13 comments

Comments

@demonyun
Copy link

When will laravel11 be supported? Thanks.

@sjkhew
Copy link

sjkhew commented Apr 29, 2024

While waiting original author to update the version to support Laravel 11, in the mean time:

  1. You can fork this repo and change the line illuminate/support, illuminate/validation, illuminate/translation to ^11.0 in the composer.json (not your project composer.json).
  2. Then use VCS type to load the laravelshoppingcart (in your project composer.json), and then composer install.

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.

@tanero
Copy link

tanero commented May 3, 2024

+1 request for laravel 11

@ronaldvaneede
Copy link

Just fork it an create a PR with the required changes if you need that, that is how open source works :)

@tanero
Copy link

tanero commented May 3, 2024

@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 #379 and #375

@plescanos
Copy link

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
- darryldecode/cart 4.0.0 requires illuminate/support 5.0.|5.1.|5.2.|5.3.|5.4.|5.5.|5.6.* -> found illuminate/support[v5.0.0, ..., v5.6.39] but these were not loaded, likely because it conflicts with another require.
- darryldecode/cart[4.0.1, ..., 4.0.2] require illuminate/support 5.0.|5.1.|5.2.|5.3.|5.4.|5.5.|5.6.|5.7. -> found illuminate/support[v5.0.0, ..., v5.7.28] but these were not loaded, likely because it conflicts with another require.
- darryldecode/cart[4.0.3, ..., 4.0.4] require illuminate/support 5.0.|5.1.|5.2.|5.3.|5.4.|5.5.|5.6.|5.7.|5.8.* -> found illuminate/support[v5.0.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
- darryldecode/cart 4.0.5 requires illuminate/support 5.0.|5.1.|5.2.|5.3.|5.4.|5.5.|5.6.|5.7.|5.8.|6.0. -> found illuminate/support[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.0.4] but these were not loaded, likely because it conflicts with another require.
- darryldecode/cart 4.0.6 requires illuminate/support 5.0.|5.1.|5.2.|5.3.|5.4.|5.5.|5.6.|5.7.|5.8.|6.0.|6.1.* -> found illuminate/support[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.1.0] but these were not loaded, likely because it conflicts with another require.
- darryldecode/cart[4.0.7, ..., 4.1.1] require illuminate/support 5.0.|5.1.|5.2.|5.3.|5.4.|5.5.|5.6.|5.7.|5.8.|^6.0 -> found illuminate/support[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44] but these were not loaded, likely because it conflicts with another require.
- darryldecode/cart 4.1.2 requires illuminate/support 5.0.
|5.1.|5.2.|5.3.|5.4.|5.5.|5.6.|5.7.|5.8.|^6.0|^7.0 -> found illuminate/support[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6] but these were not loaded, likely because it conflicts with another require.
- darryldecode/cart[4.2.0, ..., 4.2.1] require illuminate/support 5.0.|5.1.|5.2.|5.3.|5.4.|5.5.|5.6.|5.7.|5.8.|^6.0|^7.0|^8.0 -> found illuminate/support[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
- darryldecode/cart 4.2.2 requires illuminate/support 5.0.
|5.1.|5.2.|5.3.|5.4.|5.5.|5.6.|5.7.|5.8.|^6.0|^7.0|^8.0|^9.0 -> found illuminate/support[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require.
- darryldecode/cart[4.2.3, ..., 4.2.4] require illuminate/support 5.0.|5.1.|5.2.|5.3.|5.4.|5.5.|5.6.|5.7.|5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0 -> found illuminate/support[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.10] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires darryldecode/cart ~4.0 -> satisfiable by darryldecode/cart[4.0.0, ..., 4.2.4].

Installation failed, reverting ./composer.json and ./composer.lock to their original content.`

@maxxdev
Copy link

maxxdev commented May 10, 2024

plescanos

Yes, you can use solution provided by sjkhew

@plescanos
Copy link

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
- 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:

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

So please if someone can help me , i'll say thanks forever

@tanero
Copy link

tanero commented May 11, 2024

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 - 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:

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

@plescanos
Copy link

@tanero Thanks !! is solved. So in my case final solution was:

  1. Change my composer.json

"require": {
"darryldecode/cart": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "git@github.com:xxxx/laravelshoppingcart.git"
}
]

  1. Do not use "composer install", I use "composer update" and it works fine.

Thanks again!

@Misagh90
Copy link

@darryldecode

@eggcarvalho
Copy link

@tanero Thanks !! is solved. So in my case final solution was:

  1. Change my composer.json

"require": { "darryldecode/cart": "dev-master" }, "repositories": [ { "type": "vcs", "url": "git@github.com:xxxx/laravelshoppingcart.git" } ]

  1. Do not use "composer install", I use "composer update" and it works fine.

Thanks again!

Work for me, thanks!

@Raicon47
Copy link

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
- illuminate/validation[v5.6.0, ..., v5.8.36] require php ^7.1.3 -> your php version (8.3.8) does not satisfy that requirement.
- illuminate/validation[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.3.8) does not satisfy that requirement.
- illuminate/validation[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.3.8) does not satisfy that requirement.
- illuminate/validation[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.3.8) does not satisfy that requirement.
- Root composer.json requires darryldecode/cart dev-master -> satisfiable by darryldecode/cart[dev-master].
- Conclusion: don't install laravel/framework v11.9.2 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.10.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.11.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.11.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.12.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.13.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.14.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.15.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.16.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.17.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.18.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.18.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.19.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v11.20.0 (conflict analysis result)
- Root composer.json requires tightenco/ziggy ^2.0 -> satisfiable by tightenco/ziggy[v2.0.0, ..., v2.3.0].
- darryldecode/cart dev-master requires illuminate/validation 5.0.|5.1.|5.2.|5.3.|5.4.|5.5.|5.6.|5.7.|5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0 -> satisfiable by illuminate/validation[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.20].
- Only one of these can be installed: illuminate/validation[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.20, v11.0.0, ..., v11.20.0], laravel/framework[v11.9.0, ..., v11.20.0]. laravel/framework replaces illuminate/validation and thus cannot coexist with it.
- tightenco/ziggy[v2.0.0, ..., v2.3.0] require laravel/framework >=9.0 -> satisfiable by laravel/framework[v11.9.0, ..., v11.20.0].
- Conclusion: don't install laravel/framework v11.9.1 (conflict analysis result)

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

@joelwmale
Copy link

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants