diff --git a/composer.json b/composer.json index d6fe3da..aeab68b 100644 --- a/composer.json +++ b/composer.json @@ -10,11 +10,11 @@ } ], "require": { - "illuminate/support": "5.*|6.*|7.*|8.*|9.*|10.*", - "mnabialek/laravel-version": "^1.0.6", - "nesbot/carbon": "~1.0 || ^2.0", - "illuminate/filesystem": "5.*|6.*|7.*|8.*|9.*|10.*", - "illuminate/container": "5.*|6.*|7.*|8.*|9.*|10.*" + "illuminate/support": "5.*|6.*|7.*|8.*|9.*|10.*|11.*|12.*", + "mnabialek/laravel-version": "^v1.0.8", + "nesbot/carbon": "~1.0 || ^2.0 || ^3", + "illuminate/filesystem": "5.*|6.*|7.*|8.*|9.*|10.*|11.*|12.*", + "illuminate/container": "5.*|6.*|7.*|8.*|9.*|10.*|11.*|12.*" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.0", diff --git a/src/Objects/Concerns/ReplacesBindings.php b/src/Objects/Concerns/ReplacesBindings.php index 7edcf85..2ba88ad 100644 --- a/src/Objects/Concerns/ReplacesBindings.php +++ b/src/Objects/Concerns/ReplacesBindings.php @@ -16,6 +16,7 @@ trait ReplacesBindings */ protected function replaceBindings($sql, array $bindings) { + $sql = str_replace('??&', '__qm_amp__', $sql); $generalRegex = $this->getRegex(); foreach ($this->formatBindings($bindings) as $key => $binding) { @@ -23,7 +24,7 @@ protected function replaceBindings($sql, array $bindings) $sql = preg_replace($regex, $this->value($binding), $sql, 1); } - return $sql; + return str_replace('__qm_amp__', '?&', $sql); } /** @@ -92,7 +93,7 @@ protected function getRegex() return $this->wrapRegex( $this->notInsideQuotes('?') . '|' . - $this->notInsideQuotes('\:\w+', false) + $this->notInsideQuotes('[^:]\:\w+', false) ); }