File tree 7 files changed +8
-6
lines changed
7 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 28
28
os : >-
29
29
['ubuntu-latest']
30
30
php : >-
31
- ['8.1', '8.2']
31
+ ['8.1', '8.2', '8.3' ]
Original file line number Diff line number Diff line change 18
18
- Enh #789 : Remove unnecessary type casting to array in ` AbstractDMLQueryBuilder::getTableUniqueColumnNames() ` (@Tigrov )
19
19
- Enh #795 : Allow to use ` DMLQueryBuilderInterface::batchInsert() ` method with empty columns (@Tigrov )
20
20
- Enh #794 : Add message type to log context (@darkdef )
21
+ - Enh #802 : Minor refactoring of ` SchemaCache ` , ` AbstractPdoCommand ` and ` AbstractDDLQueryBuilder ` (@Tigrov )
21
22
22
23
## 1.2.0 November 12, 2023
23
24
Original file line number Diff line number Diff line change 34
34
"rector/rector" : " ^0.19" ,
35
35
"roave/infection-static-analysis-plugin" : " ^1.16" ,
36
36
"spatie/phpunit-watcher" : " ^1.23" ,
37
- "vimeo/psalm" : " ^4.30|^5.12 " ,
37
+ "vimeo/psalm" : " ^4.30|^5.20 " ,
38
38
"yiisoft/aliases" : " ^3.0" ,
39
39
"yiisoft/cache-file" : " ^3.1" ,
40
40
"yiisoft/di" : " ^1.0" ,
Original file line number Diff line number Diff line change 16
16
</projectFiles >
17
17
<issueHandlers >
18
18
<MixedAssignment errorLevel =" suppress" />
19
+ <RiskyTruthyFalsyComparison errorLevel =" suppress" />
19
20
</issueHandlers >
20
21
</psalm >
Original file line number Diff line number Diff line change @@ -201,12 +201,12 @@ private function normalize(mixed $key): string
201
201
if (is_string ($ key ) || is_int ($ key )) {
202
202
$ key = (string )$ key ;
203
203
$ length = mb_strlen ($ key , '8bit ' );
204
- return (strpbrk ($ key , '{}()/\@: ' ) || $ length < 1 || $ length > 64 ) ? md5 ($ key ) : $ key ;
204
+ return (strpbrk ($ key , '{}()/\@: ' ) !== false || $ length < 1 || $ length > 64 ) ? md5 ($ key ) : $ key ;
205
205
}
206
206
207
207
$ key = json_encode ($ key );
208
208
209
- if (! $ key ) {
209
+ if ($ key === false ) {
210
210
throw new PsrInvalidArgumentException ('Invalid key. ' . json_last_error_msg ());
211
211
}
212
212
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ protected function internalExecute(string|null $rawSql): void
211
211
}
212
212
break ;
213
213
} catch (PDOException $ e ) {
214
- $ rawSql = $ rawSql ?: $ this ->getRawSql ();
214
+ $ rawSql ??= $ this ->getRawSql ();
215
215
$ e = (new ConvertException ($ e , $ rawSql ))->run ();
216
216
217
217
if ($ this ->retryHandler === null || !($ this ->retryHandler )($ e , $ attempt )) {
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ public function createIndex(
159
159
string $ indexType = null ,
160
160
string $ indexMethod = null
161
161
): string {
162
- return 'CREATE ' . ($ indexType ? ( $ indexType . ' ' ) : '' ) . 'INDEX '
162
+ return 'CREATE ' . (! empty ( $ indexType) ? $ indexType . ' ' : '' ) . 'INDEX '
163
163
. $ this ->quoter ->quoteTableName ($ name )
164
164
. ' ON ' . $ this ->quoter ->quoteTableName ($ table )
165
165
. ' ( ' . $ this ->queryBuilder ->buildColumns ($ columns ) . ') ' ;
You can’t perform that action at this time.
0 commit comments