darryldecode / laravelshoppingcart

Shopping Cart Implementation for Laravel Framework
1.32k stars 410 forks source link

When will laravel11 be supported? #376

Open demonyun opened 3 months ago

demonyun commented 3 months ago

When will laravel11 be supported? Thanks.

sjkhew commented 2 months ago

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 commented 2 months ago

+1 request for laravel 11

ronaldvaneede commented 2 months ago

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

tanero commented 2 months ago

@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

plescanos commented 1 month ago

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.`

maxxdev commented 1 month ago

plescanos

Yes, you can use solution provided by sjkhew

plescanos commented 1 month ago

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

tanero commented 1 month ago

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 commented 1 month ago

@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 commented 1 month ago

@darryldecode

eggcarvalho commented 6 days ago

@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!