Skip to content

Commit fbab1b3

Browse files
authored
Substitute params using regex (#364)
* Substitute params using regex * Record cache 🤷
1 parent 2de7ab0 commit fbab1b3

24 files changed

+7458
-9584
lines changed

.phpstan-dba-mysqli.cache

Lines changed: 4 additions & 807 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.phpstan-dba-pdo.cache

Lines changed: 4 additions & 1008 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/QueryReflection/QueryReflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ private function replaceParameters(string $queryString, array $parameters): stri
306306
}
307307

308308
if (\is_string($placeholderKey)) {
309-
$queryString = str_replace($placeholderKey, $value, $queryString);
309+
$queryString = (string) preg_replace('/'.$placeholderKey.'\\b/', $value, $queryString);
310310
} else {
311311
$queryString = $replaceFirst($queryString, '?', $value);
312312
}

0 commit comments

Comments
 (0)