diff --git a/composer.json b/composer.json index a133792b058..e23bf0dcf02 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,8 @@ "pimple/pimple": "3.*", "illuminate/database": "5.*", "firebase/php-jwt": "5.*", - "danielstjules/stringy": "3.*" + "danielstjules/stringy": "3.*", + "cweagans/composer-patches": "^1.7" }, "require-dev": { "phpunit/phpunit-selenium": "1.4.2", @@ -27,5 +28,12 @@ "platform": { "php": "7.1.0" } + }, + "extra": { + "patches": { + "illuminate/database": { + "Patch Laravel binding array issue": "lib/laravel-binding-6632.diff" + } + } } } diff --git a/composer.lock b/composer.lock index 44a8bb18f1b..d52a8895d94 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bb4ccf196beb62f31346a9c6b516f3ed", + "content-hash": "2c9d7f28579e62bd3c0ee1fa66fa2cf4", "packages": [ { "name": "alex198710/pnotify", @@ -197,8 +197,53 @@ ], "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", "homepage": "https://github.com/container-interop/container-interop", + "abandoned": "psr/container", "time": "2017-02-14T19:40:03+00:00" }, + { + "name": "cweagans/composer-patches", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/cweagans/composer-patches.git", + "reference": "ae02121445ad75f4eaff800cc532b5e6233e2ddf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/ae02121445ad75f4eaff800cc532b5e6233e2ddf", + "reference": "ae02121445ad75f4eaff800cc532b5e6233e2ddf", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3.0" + }, + "require-dev": { + "composer/composer": "~1.0 || ~2.0", + "phpunit/phpunit": "~4.6" + }, + "type": "composer-plugin", + "extra": { + "class": "cweagans\\Composer\\Patches" + }, + "autoload": { + "psr-4": { + "cweagans\\Composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Cameron Eagans", + "email": "me@cweagans.net" + } + ], + "description": "Provides a way to patch Composer packages.", + "time": "2020-09-30T17:56:20+00:00" + }, { "name": "danielstjules/stringy", "version": "3.1.0", @@ -535,6 +580,9 @@ "extra": { "branch-alias": { "dev-master": "5.5-dev" + }, + "patches_applied": { + "Patch Laravel binding array issue": "lib/laravel-binding-6632.diff" } }, "autoload": { @@ -913,6 +961,7 @@ "php", "stylesheet" ], + "abandoned": true, "time": "2017-03-28T22:19:25+00:00" }, { @@ -1651,6 +1700,7 @@ "email": "jakub.onderka@gmail.com" } ], + "abandoned": "php-parallel-lint/php-console-color", "time": "2018-09-29T17:23:10+00:00" }, { @@ -1697,6 +1747,7 @@ } ], "description": "Highlight PHP code in terminal", + "abandoned": "php-parallel-lint/php-console-highlighter", "time": "2018-09-29T18:48:56+00:00" }, { @@ -2212,6 +2263,7 @@ "keywords": [ "tokenizer" ], + "abandoned": true, "time": "2017-12-04T08:55:13+00:00" }, { @@ -3268,5 +3320,6 @@ "platform-dev": [], "platform-overrides": { "php": "7.1.0" - } + }, + "plugin-api-version": "1.1.0" } diff --git a/lib/laravel-binding-6632.diff b/lib/laravel-binding-6632.diff new file mode 100644 index 00000000000..fa1da4c98d9 --- /dev/null +++ b/lib/laravel-binding-6632.diff @@ -0,0 +1,38 @@ +diff --git a/src/Illuminate/Database/Query/Builder.php b/src/Illuminate/Database/Query/Builder.php +index 0d4c7c3ae16..83416d83be0 100755 +--- a/src/Illuminate/Database/Query/Builder.php +@@ -546,7 +546,7 @@ + ); + + if (! $value instanceof Expression) { +- $this->addBinding($value, 'where'); ++ $this->addBinding(is_array($value) ? head($value) : $value, 'where'); + } + + return $this; +@@ -908,7 +908,7 @@ + + $this->wheres[] = compact('column', 'type', 'boolean', 'not'); + +- $this->addBinding($values, 'where'); ++ $this->addBinding(array_slice($values, 0, 2), 'where'); + + return $this; + } +@@ -1096,6 +1096,7 @@ + $this->wheres[] = compact('column', 'type', 'boolean', 'operator', 'value'); + + if (! $value instanceof Expression) { ++ $value = is_array($value) ? head($value) : $value; + $this->addBinding($value, 'where'); + } + +@@ -1357,7 +1358,7 @@ + $this->havings[] = compact('type', 'column', 'operator', 'value', 'boolean'); + + if (! $value instanceof Expression) { +- $this->addBinding($value, 'having'); ++ $this->addBinding(is_array($value) ? head($value) : $value, 'having'); + } + + return $this;