diff --git a/src/Serializer/AbstractSerializer.php b/src/Serializer/AbstractSerializer.php index b5b33b49f..a949b5c07 100644 --- a/src/Serializer/AbstractSerializer.php +++ b/src/Serializer/AbstractSerializer.php @@ -291,7 +291,7 @@ protected function serializeCallable($callable): string // Prefer a string representation for simple strings that might just // happen to be callable, such as "file". if (\is_string($callable) && strpos($callable, '::') === false && strpos($callable, '_') === false) { - return $this->serializeString($callable); + return $callable; } try {