Skip to content

Commit 752c106

Browse files
committed
Merge branch '4.2' of github.com:windwalker-io/framework into 4.2
2 parents 5f51dac + f90277c commit 752c106

53 files changed

Lines changed: 821 additions & 191 deletions

Some content is hidden

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

composer.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,23 @@
5656
"reactivex/rxphp": "^2.0",
5757
"roave/security-advisories": "dev-master",
5858
"squizlabs/php_codesniffer": "^3.0",
59-
"swoole/ide-helper": "^4.0||^5.0",
59+
"swoole/ide-helper": "^4.0||^5.0||^6.0",
6060
"symfony/css-selector": "^6.0||^7.0||^8.0",
6161
"symfony/dom-crawler": "^6.0||^7.0||^8.0",
6262
"symfony/options-resolver": "^6.0||^7.0||^8.0",
63-
"symfony/process": "^5.1||^6.0||^7.0",
64-
"symfony/string": "^5.2||^6.0||^7.0",
65-
"symfony/var-dumper": "^5.0||^6.0",
66-
"symfony/yaml": "^5.0||^6.0||^7.0||^8.0",
63+
"symfony/process": "^6.0||^7.0||^8.0",
64+
"symfony/string": "^6.0||^7.0||^8.0",
65+
"symfony/var-dumper": "^6.0||^7.0||^8.0",
66+
"symfony/yaml": "^6.0||^7.0||^8.0",
6767
"twig/twig": "^2.0||^3.0",
6868
"webmozart/glob": "^4.1",
6969
"yosymfony/toml": "^1.0",
7070
"laravel/serializable-closure": "^1.0",
7171
"symfony/polyfill-php82": "^1.26",
7272
"asika/simple-benchmark": "^3.0",
7373
"rize/uri-template": "^0.3.5||^0.4.0",
74-
"guzzlehttp/uri-template": "^1.0"
74+
"guzzlehttp/uri-template": "^1.0",
75+
"asika/better-units": "^0.1.1"
7576
},
7677
"suggest": {
7778
"symfony/yaml": "Install ~4.0 if you require YAML support.",

packages/attributes/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
"config": {
4444
"platattributes": {
45-
"php": "8.4.1"
45+
"php": "8.4.6"
4646
}
4747
}
4848
}

packages/authentication/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
"config": {
4444
"platform": {
45-
"php": "8.4.1"
45+
"php": "8.4.6"
4646
}
4747
}
4848
}

packages/authorization/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
"config": {
4545
"platform": {
46-
"php": "8.4.1"
46+
"php": "8.4.6"
4747
}
4848
}
4949
}

packages/cache/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
},
5454
"config": {
5555
"platform": {
56-
"php": "8.4.1"
56+
"php": "8.4.6"
5757
}
5858
},
5959
"provide": {

packages/crypt/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
},
4949
"config": {
5050
"platform": {
51-
"php": "8.4.1"
51+
"php": "8.4.6"
5252
}
5353
}
5454
}

packages/data/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
},
4747
"config": {
4848
"platform": {
49-
"php": "8.4.1"
49+
"php": "8.4.6"
5050
}
5151
}
5252
}

packages/database/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
},
5858
"config": {
5959
"platform": {
60-
"php": "8.4.1"
60+
"php": "8.4.6"
6161
}
6262
}
6363
}

packages/database/src/Manager/WriterManager.php

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,53 @@ public function insertMultiple(string $table, iterable $items, ?string $key = nu
230230
return $result;
231231
}
232232

233+
public function insertBulk(
234+
string $table,
235+
iterable $items,
236+
array $options = []
237+
): StatementInterface {
238+
$options = array_merge(
239+
[
240+
'incrementField' => false,
241+
'filterFields' => false,
242+
],
243+
$options
244+
);
245+
246+
$columnRegistered = false;
247+
$query = $this->db->createQuery()
248+
->insert($table, $options['incrementField']);
249+
250+
foreach ($items as $i => $data) {
251+
$fields = [];
252+
$values = [];
253+
254+
$item = TypeCast::toArray($data);
255+
256+
if ($options['filterFields']) {
257+
$item = $this->filterFields($table, $item);
258+
}
259+
260+
// Iterate over the object variables to build the query fields and values.
261+
foreach ($item as $k => $v) {
262+
// Prepare and sanitize the fields and values for the database query.
263+
$fields[] = $k;
264+
$values[] = $v;
265+
}
266+
267+
// Create the base insert statement.
268+
if (!$columnRegistered) {
269+
$query->columns(...$fields);
270+
$columnRegistered = true;
271+
}
272+
273+
$query->values($values);
274+
}
275+
276+
// Set the query and execute the insert.
277+
return $this->execute($query);
278+
}
279+
233280
/**
234281
* updateMultiple
235282
*

packages/di/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
"config": {
4545
"platform": {
46-
"php": "8.4.1"
46+
"php": "8.4.6"
4747
}
4848
},
4949
"provide": {

0 commit comments

Comments
 (0)