Skip to content

Commit e5b60d9

Browse files
committed
Merge branch '10.x'
Signed-off-by: Mior Muhammad Zaki <[email protected]>
2 parents 4acf1df + c38ff56 commit e5b60d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+545
-52
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,15 @@
120120
"psr/simple-cache-implementation": "1.0|2.0|3.0"
121121
},
122122
"conflict": {
123+
"carbonphp/carbon-doctrine-types": "<3.0.0|>=4.0",
124+
"doctrine/dbal": "<4.0.0|>=5.0",
123125
"tightenco/collect": "<5.5.33"
124126
},
125127
"autoload": {
126128
"files": [
127129
"src/Illuminate/Collections/helpers.php",
128130
"src/Illuminate/Events/functions.php",
131+
"src/Illuminate/Filesystem/functions.php",
129132
"src/Illuminate/Foundation/helpers.php",
130133
"src/Illuminate/Support/helpers.php"
131134
],

src/Illuminate/Bus/DynamoBatchRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public function get($limit = 50, $before = null)
102102
':id' => array_filter(['S' => $before]),
103103
]),
104104
'Limit' => $limit,
105+
'ScanIndexForward' => false,
105106
]);
106107

107108
return array_map(

src/Illuminate/Cache/ArrayLock.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ public function release()
8787
*/
8888
protected function getCurrentOwner()
8989
{
90+
if (! $this->exists()) {
91+
return null;
92+
}
93+
9094
return $this->store->locks[$this->name]['owner'];
9195
}
9296

src/Illuminate/Collections/Arr.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,17 @@ public static function divide($array)
109109
*/
110110
public static function dot($array, $prepend = '')
111111
{
112-
$results = [];
112+
$results = [[]];
113113

114114
foreach ($array as $key => $value) {
115115
if (is_array($value) && ! empty($value)) {
116-
$results = array_merge($results, static::dot($value, $prepend.$key.'.'));
116+
$results[] = static::dot($value, $prepend.$key.'.');
117117
} else {
118-
$results[$prepend.$key] = $value;
118+
$results[] = [$prepend.$key => $value];
119119
}
120120
}
121121

122-
return $results;
122+
return array_merge(...$results);
123123
}
124124

125125
/**

src/Illuminate/Console/MigrationGeneratorCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use Illuminate\Filesystem\Filesystem;
66

7+
use function Illuminate\Filesystem\join_paths;
8+
79
abstract class MigrationGeneratorCommand extends Command
810
{
911
/**
@@ -102,7 +104,7 @@ protected function replaceMigrationPlaceholders($path, $table)
102104
protected function migrationExists($table)
103105
{
104106
return count($this->files->glob(
105-
$this->laravel->joinPaths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php')
107+
join_paths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php')
106108
)) !== 0;
107109
}
108110
}

src/Illuminate/Console/Scheduling/ManagesFrequencies.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ public function quarterly()
583583
* Schedule the event to run quarterly on a given day and time.
584584
*
585585
* @param int $dayOfQuarter
586-
* @param int $time
586+
* @param string $time
587587
* @return $this
588588
*/
589589
public function quarterlyOn($dayOfQuarter = 1, $time = '0:0')

src/Illuminate/Database/Console/TableCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ protected function displayForCli(array $data)
212212
$columns->each(function ($column) {
213213
$this->components->twoColumnDetail(
214214
$column['column'].' <fg=gray>'.$column['attributes']->implode(', ').'</>',
215-
($column['default'] ? '<fg=gray>'.$column['default'].'</> ' : '').''.$column['type'].''
215+
(! is_null($column['default']) ? '<fg=gray>'.$column['default'].'</> ' : '').''.$column['type'].''
216216
);
217217
});
218218

src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,31 @@ protected function compileJsonLength($column, $operator, $value)
146146
return 'json_array_length('.$field.$path.') '.$operator.' '.$value;
147147
}
148148

149+
/**
150+
* Compile a "JSON contains" statement into SQL.
151+
*
152+
* @param string $column
153+
* @param mixed $value
154+
* @return string
155+
*/
156+
protected function compileJsonContains($column, $value)
157+
{
158+
[$field, $path] = $this->wrapJsonFieldAndPath($column);
159+
160+
return 'exists (select 1 from json_each('.$field.$path.') where '.$this->wrap('json_each.value').' is '.$value.')';
161+
}
162+
163+
/**
164+
* Prepare the binding for a "JSON contains" statement.
165+
*
166+
* @param mixed $binding
167+
* @return mixed
168+
*/
169+
public function prepareBindingForJsonContains($binding)
170+
{
171+
return $binding;
172+
}
173+
149174
/**
150175
* Compile a "JSON contains key" statement into SQL.
151176
*

src/Illuminate/Database/Query/Processors/PostgresProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function processColumns($results)
107107
$autoincrement = $result->default !== null && str_starts_with($result->default, 'nextval(');
108108

109109
return [
110-
'name' => str_starts_with($result->name, '"') ? str_replace('"', '', $result->name) : $result->name,
110+
'name' => $result->name,
111111
'type_name' => $result->type_name,
112112
'type' => $result->type,
113113
'collation' => $result->collation,

src/Illuminate/Database/Query/Processors/SQLiteProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function processColumns($results)
3636

3737
return [
3838
'name' => $result->name,
39-
'type_name' => strtok($type, '('),
39+
'type_name' => strtok($type, '(') ?: '',
4040
'type' => $type,
4141
'collation' => null,
4242
'nullable' => (bool) $result->nullable,

0 commit comments

Comments
 (0)