From 10a24651c274ceb81f001212c17fe8a91f573f94 Mon Sep 17 00:00:00 2001 From: Bram Ceulemans Date: Thu, 20 Jan 2022 20:07:35 +0100 Subject: [PATCH] Allow for -> syntax to be used in parsing --- src/Faker/Generator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Faker/Generator.php b/src/Faker/Generator.php index 3d7ce6a6c9..c0a907f7a7 100644 --- a/src/Faker/Generator.php +++ b/src/Faker/Generator.php @@ -736,7 +736,7 @@ public function parse($string) return $this->format($matches[1]); }; - return preg_replace_callback('/\{\{\s?(\w+)\s?\}\}/u', $callback, $string); + return preg_replace_callback('/{{\s?(\w+|[\w\\\]+->\w+?)\s?}}/u', $callback, $string); } /**