pixelpeter / laravel5-woocommerce-api-client

Laravel 5 wrapper for the Woocommerce REST API
MIT License
125 stars 48 forks source link

Getting Error while installing "Call to Undefined method Illuminate\Foundation\Application::share()" #16

Closed sabdullah98 closed 7 years ago

sabdullah98 commented 7 years ago

Hi, i was installing , but got "Call to Undefined method Illuminate\Foundation\Application::share()"

log shows `[2017-03-05 18:25:21] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to undefined method Illuminate\Foundation\Application::share()' in C:\xampp\htdocs\WooAccountManager\vendor\pixelpeter\laravel5-woocommerce-api-client\src\WoocommerceServiceProvider.php:44 Stack trace:

0 {main} `

my composer.json is { "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "php": ">=5.6.4", "laravel/framework": "5.4.*", "laravel/tinker": "~1.0", "pixelpeter/laravel5-woocommerce-api-client": "2.0" }, "require-dev": { "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*", "phpunit/phpunit": "~5.7" }, "autoload": { "classmap": [ "database" ], "psr-4": { "App\\": "app/" } }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "scripts": { "post-root-package-install": [ "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "php artisan key:generate" ], "post-install-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postInstall", "php artisan optimize" ], "post-update-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postUpdate", "php artisan optimize" ] }, "config": { "preferred-install": "dist", "sort-packages": true } }

pixelpeter commented 7 years ago

You're using the wrong version. Error is because of Laravel 5.4. This module is compatible with Laravel 5.4 since v2.2.0.

Please update your composer.json to the correct version constraint composer require pixelpeter/laravel5-woocommerce-api-client ^2.0