Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Hondaman900's avatar

Can't install Cashier on Laravel 10 with Composer

I'm getting nowhere fast with this. I've seen several posts about this or similar issues but none with a good solution.

I am simply installing Laravel Cashier on a fresh Laravel 10 local dev install. Everything else is working fine. I have been working with laravel-stripe-php and have already installed laravel-stripe-webhooks, but now want to install Cashier to handle subscriptions. I have updated everything, am running latest version of stripe-php (^14.5), PHP version 8.1.10 and have cleared composer caches. I have also rebooted Apache and MySQL, all to no avail.

Here's what I'm getting:

composer require laravel/cashier --with-all-dependencies
./composer.json has been updated
Running composer update laravel/cashier --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/cashier[v1.0.0, v2.0.0, ..., v2.0.8] require illuminate/filesystem ~4.1 -> found illuminate/filesystem[v4.1.0, ..., v4.2.17] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v3.0.0, ..., v3.0.5, v4.0.0, ..., v4.0.3, v5.0.0, ..., v5.0.15] require illuminate/filesystem ~5.0 -> found illuminate/filesystem[v5.0.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v6.0.0, ..., v6.0.20] require illuminate/database ~5.1 -> found illuminate/database[v5.1.1, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v7.0.0, ..., v7.2.2, v8.0.0, ..., v8.0.1] require illuminate/database ~5.3 -> found illuminate/database[v5.3.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v9.0.0, ..., v9.0.1] require illuminate/database ~5.7 -> found illuminate/database[v5.7.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v9.1.0, ..., v9.2.1] require illuminate/database ~5.7.0|~5.8.0 -> found illuminate/database[v5.7.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v9.3.0, ..., v9.3.3] require illuminate/contracts ~5.7.0|~5.8.0|~5.9.0 -> found illuminate/contracts[v5.7.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier v9.3.4 requires illuminate/contracts ~5.7.0|~5.8.0|~5.9.0|^6.0 -> found illuminate/contracts[v5.7.0, ..., v5.8.36, v6.0.0, ..., v6.20.44] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v9.3.5, ..., v9.3.6] require illuminate/contracts ~5.7.0|~5.8.0|^6.0 -> found illuminate/contracts[v5.7.0, ..., v5.8.36, v6.0.0, ..., v6.20.44] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v10.0.0, ..., v10.1.0] require illuminate/contracts ~5.8.0|^6.0 -> found illuminate/contracts[v5.8.0, ..., v5.8.36, v6.0.0, ..., v6.20.44] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v10.1.1, ..., v10.7.1] require illuminate/contracts ~5.8.0|^6.0|^7.0 -> found illuminate/contracts[v5.8.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.
    - laravel/cashier[v11.0.0, ..., v11.3.1, v12.0.0, ..., v12.2.0] require illuminate/contracts ^6.0|^7.0 -> found illuminate/contracts[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v12.3.0, ..., v12.14.1] require illuminate/contracts ^6.0|^7.0|^8.0 -> found illuminate/contracts[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.
    - laravel/cashier v12.15.0 requires illuminate/console ^6.0|^7.0|^8.0 -> found illuminate/console[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.
    - laravel/cashier[v12.16.0, ..., v12.17.2] require illuminate/support ^6.0|^7.0|^8.0|^9.0 -> found illuminate/support[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.
    - laravel/cashier[v13.0.0, ..., v13.1.0] require illuminate/contracts ^8.0 -> found illuminate/contracts[v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v13.2.0, ..., v13.6.1] require illuminate/console ^8.0 -> found illuminate/console[v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v13.7.0, ..., v13.8.3] require illuminate/support ^8.0|^9.0 -> found illuminate/support[v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v13.8.4, ..., v13.16.0] require illuminate/support ^8.37|^9.0 -> found illuminate/support[v8.37.0, ..., v8.83.27, v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier v13.17.0 requires stripe/stripe-php ^7.39|^8.0|^9.0 -> found stripe/stripe-php[v7.39.0, ..., v7.128.0, v8.0.0, ..., v8.12.0, v9.0.0, ..., v9.9.0] but it conflicts with your root composer.json require (^14.5).
    - laravel/cashier[v14.0.0, ..., v14.6.0] require illuminate/support ^9.21 -> found illuminate/support[v9.21.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require.
    - laravel/cashier[v14.7.0, ..., v14.14.0] require stripe/stripe-php ^7.39|^8.0|^9.0|^10.0 -> found stripe/stripe-php[v7.39.0, ..., v7.128.0, v8.0.0, ..., v8.12.0, v9.0.0, ..., v9.9.0, v10.0.0, ..., v10.21.0] but it conflicts with your root composer.json require (^14.5).
    - laravel/cashier[v15.0.0, ..., v15.3.2] require stripe/stripe-php ^13.0 -> found stripe/stripe-php[v13.0.0, ..., v13.18.0] but it conflicts with your root composer.json require (^14.5).
    - Root composer.json requires laravel/cashier * -> satisfiable by laravel/cashier[v1.0.0, v2.0.0, ..., v2.0.8, v3.0.0, ..., v3.0.5, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v5.0.0, ..., v5.0.15, v6.0.0, ..., v6.0.20, v7.0.0, ..., v7.2.2, v8.0.0, v8.0.1, v9.0.0, ..., v9.3.6, v10.0.0, ..., v10.7.1, v11.0.0, ..., v11.3.1, v12.0.0, ..., v12.17.2, v13.0.0, ..., v13.17.0, v14.0.0, ..., v14.14.0, v15.0.0, ..., v15.3.2].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require laravel/cashier:*" to figure out if any version is installable, or "composer require laravel/cashier:^2.1" if you know which you need.

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

FWIW, here's my composer.json contents:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The skeleton application for the Laravel framework.",
    "keywords": ["laravel", "framework"],
    "license": "MIT",
    "require": {
        "php": "^8.1",
        "guzzlehttp/guzzle": "^7.2",
        "laravel/framework": "^10.10",
        "laravel/sanctum": "^3.3",
        "laravel/tinker": "^2.8",
        "laravel/ui": "^4.5",
        "spatie/laravel-stripe-webhooks": "^3.8",
        "stripe/stripe-php": "^14.5"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "laravel/pint": "^1.0",
        "laravel/sail": "^1.18",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^7.0",
        "phpunit/phpunit": "^10.1",
        "spatie/laravel-ignition": "^2.0"
    },
    "autoload": {
        "psr-4": {
            "App\": "app/",
            "Database\Factories\": "database/factories/",
            "Database\Seeders\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true,
        "allow-plugins": {
            "pestphp/pest-plugin": true,
            "php-http/discovery": true
        }
    },
    "minimum-stability": "stable",
    "prefer-stable": true
}

Any suggestions are very welcome - thank in advance.

0 likes
3 replies
gych's avatar
gych
Best Answer
Level 29

You need to downgrade stripe/stripe-php and use version 13 instead of 14

laravel/cashier[v15.0.0, ..., v15.3.2] require stripe/stripe-php ^13.0 -> found stripe/stripe-php[v13.0.0, ..., v13.18.0] but it conflicts with your root composer.json require (^14.5).
2 likes
Hondaman900's avatar

Thank you! I honestly didn't expect that to work (I read the error as saying it needed stripe-php v.13 or higher), but you were exactly right.

For those finding this later, @gych answer resolved this. I reverted to stripe-php v.13.8.0 with the following command:

composer require stripe/stripe-php:13.8.0

after which composer installed Cashier without issue.

Note for fellow Googlers, search results on how to downgrade a package using Composer say to use the --with flag, but that was gathered by AI from a GitHub discussion about possible changes to Composer commands that never happened. Ignore such references.

3 likes

Please or to participate in this conversation.