spatie / laravel-webhook-client

Receive webhooks in Laravel apps
https://freek.dev/1383-sending-and-receiving-webhooks-in-laravel-apps
MIT License
994 stars 146 forks source link

Error installing composer require spatie/laravel-webhook-client #24

Closed UdyW closed 5 years ago

UdyW commented 5 years ago

I'm trying to install this package in a Lumen project. composer require spatie/laravel-webhook-client

But I'm getting the error;

  [InvalidArgumentException]                                                                                           
  Package spatie/laravel-webhook-client at version  has a PHP requirement incompatible with your PHP version (7.1.23)  

My composer.json;

{ "name": "laravel/lumen", "description": "The Laravel Lumen Framework.", "keywords": ["framework", "laravel", "lumen"], "license": "MIT", "type": "project", "require": { "php": ">=7.1.3", "dusterio/lumen-passport": "^0.2.15", "laravel/lumen-framework": "5.8.*" }, "require-dev": { "fzaninotto/faker": "^1.4", "phpunit/phpunit": "^7.0", "mockery/mockery": "^1.0" }, "autoload": { "classmap": [ "database/seeds", "database/factories" ], "psr-4": { "App\": "app/" } }, "autoload-dev": { "classmap": [ "tests/" ] }, "scripts": { "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true }, "minimum-stability": "dev", "prefer-stable": true }

UdyW commented 5 years ago

I have fixed this by adding

    "platform": {
        "php": "7.3"
    }

in to the config section of the composer.jason file.