From 8d213aa1156284992fb37f72517464e27ec67f53 Mon Sep 17 00:00:00 2001 From: Jonas Staudenmeir Date: Wed, 26 Sep 2018 02:35:19 +0200 Subject: [PATCH 1/2] Add #25732 to upgrade guide --- upgrade.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/upgrade.md b/upgrade.md index 1f17ce46e96..ed4040d0683 100644 --- a/upgrade.md +++ b/upgrade.md @@ -15,6 +15,26 @@ Update your `laravel/framework` dependency to `5.8.*` in your `composer.json` fi Of course, don't forget to examine any 3rd party packages consumed by your application and verify you are using the proper version for Laravel 5.8 support. +### Database + +#### Unquoted MySQL JSON Values + +**Likelihood Of Impact: Low** + +The query builder will now return unquoted JSON values on MySQL/MariaDB. This makes the behavior consistent with the other databases: + + $value = DB::table('users')->value('options->language'); + + dump($value); + + // Laravel 5.7... + '"en"' + + // Laravel 5.8... + 'en' + +As a result, the `->>` operator is no longer supported. + ### Facades #### Facade Service Resolving From b481f982182e0d71b2a79113a4bf512a0d76d333 Mon Sep 17 00:00:00 2001 From: Jonas Staudenmeir Date: Wed, 26 Sep 2018 15:52:48 +0200 Subject: [PATCH 2/2] Add #25517 to upgrade guide --- upgrade.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/upgrade.md b/upgrade.md index ed4040d0683..ad800b06c57 100644 --- a/upgrade.md +++ b/upgrade.md @@ -35,6 +35,21 @@ The query builder will now return unquoted JSON values on MySQL/MariaDB. This ma As a result, the `->>` operator is no longer supported. +#### MariaDB JSON Support + +**Likelihood Of Impact: Very Low** + +The query builder will now support JSON queries on MariaDB. This changes the name of columns without an alias: + + $user = User::select('options->language')->first(); + dump($user->getAttributes()); + + // Laravel 5.7... + ["`options`->'$."language"'" => "en"] + + // Laravel 5.8... + ["json_extract(`options`, \'$."language"\')" => "en"] + ### Facades #### Facade Service Resolving