Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c06b1ce

Browse filesBrowse files
authored
Update serializer.rst
use php8 functions to manipulate string
1 parent 9b2310a commit c06b1ce
Copy full SHA for c06b1ce

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎components/serializer.rst

Copy file name to clipboardExpand all lines: components/serializer.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ A custom name converter can handle such cases::
556556
public function denormalize(string $propertyName): string
557557
{
558558
// removes 'org_' prefix
559-
return 'org_' === substr($propertyName, 0, 4) ? substr($propertyName, 4) : $propertyName;
559+
return str_starts_with($propertyName, 'org_') ? substr($propertyName, 4) : $propertyName;
560560
}
561561
}
562562

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.