From ba312574a7104569f33dd718276a2746dbd0c4ab Mon Sep 17 00:00:00 2001 From: Alexander Melihov Date: Sun, 3 Mar 2019 01:20:04 +0400 Subject: [PATCH] laravel 5.8 support --- composer.json | 10 +++++----- src/ShoppingCart/CartItem.php | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index b954046..646b423 100644 --- a/composer.json +++ b/composer.json @@ -28,13 +28,13 @@ ] }, "require": { - "illuminate/container": "~5.5.0|~5.6.0|~5.7.0", - "illuminate/database": "~5.5.0|~5.6.0|~5.7.0", - "illuminate/redis": "~5.5.0|~5.6.0|~5.7.0", - "illuminate/support": "~5.5.0|~5.6.0|~5.7.0" + "illuminate/container": "~5.5.0|~5.6.0|~5.7.0|~5.8.0", + "illuminate/database": "~5.5.0|~5.6.0|~5.7.0|~5.8.0", + "illuminate/redis": "~5.5.0|~5.6.0|~5.7.0|~5.8.0", + "illuminate/support": "~5.5.0|~5.6.0|~5.7.0|~5.8.0" }, "require-dev": { - "orchestra/testbench": "~3.5.0|~3.6.0|~3.7.0", + "orchestra/testbench": "~3.5.0|~3.6.0|~3.7.0|~3.8.0", "phpmd/phpmd": "^2.6", "phpunit/phpunit": "~6.0|~7.0", "predis/predis": "^1.1", diff --git a/src/ShoppingCart/CartItem.php b/src/ShoppingCart/CartItem.php index 5a8d9f4..5fd6814 100644 --- a/src/ShoppingCart/CartItem.php +++ b/src/ShoppingCart/CartItem.php @@ -3,6 +3,7 @@ namespace Melihovv\ShoppingCart; use Illuminate\Contracts\Support\Arrayable; +use Illuminate\Support\Arr; use InvalidArgumentException; class CartItem implements Arrayable @@ -105,7 +106,7 @@ public static function fromArray(array $attributes) $attributes['name'], $attributes['price'], $attributes['quantity'], - array_get($attributes, 'options', []) + Arr::get($attributes, 'options', []) ); }