From 711d27c73b89f86dc6dfd6699d5e1cb494545fd6 Mon Sep 17 00:00:00 2001 From: hbgamra Date: Fri, 16 Feb 2024 15:17:18 +0100 Subject: [PATCH] Update serializer.rst use php8 functions to manipulate string --- components/serializer.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/serializer.rst b/components/serializer.rst index d35051ddf5d..1ebe70bb204 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -606,7 +606,7 @@ A custom name converter can handle such cases:: public function denormalize(string $propertyName) { // removes 'org_' prefix - return 'org_' === substr($propertyName, 0, 4) ? substr($propertyName, 4) : $propertyName; + return str_starts_with($propertyName, 'org_') ? substr($propertyName, 4) : $propertyName; } }