File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ private function do(array $actions): string
99
99
$ params = $ this ->adjustClientParams ($ value );
100
100
$ params = var_export ($ params , true );
101
101
$ params = $ this ->convertDollarValueInVariable ($ params ); // replace '$var' or '${var}' in $var
102
+ $ params = $ this ->convertStdClass ($ params ); // convert "stdClass::__set_state(array())" in "(object)[]"
102
103
}
103
104
$ vars [':endpoint ' ] = $ this ->convertDotToArrow ($ key );
104
105
$ vars [':params ' ] = str_replace ("\n" ,"\n" . self ::TAB14 , $ params );
@@ -445,6 +446,15 @@ private function convertJavaRegexToPhp(string $regex): string
445
446
return $ regex ;
446
447
}
447
448
449
+ /**
450
+ * Convert "stdClass::__set_state" into "(object) []"
451
+ * @see https://www.php.net/manual/en/function.var-export.php#refsect1-function.var-export-changelog
452
+ */
453
+ private function convertStdClass (string $ value ): string
454
+ {
455
+ return preg_replace ("/stdClass::__set_state\(array\(\s+\)\)/ " , '(object) [] ' , $ value );
456
+ }
457
+
448
458
/**
449
459
* Adjust the client parameters (e.g. ignore)
450
460
*/
You can’t perform that action at this time.
0 commit comments