Skip to content

[Serializer] Add SnakeCaseToCamelCaseNameConverter #58060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Aug 22, 2024

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues n/a
License MIT

Using snake_cased properties in PHP classes is a popular convention. For instance, it is used by Eloquent (the Laravel ORM). This new name converter makes it easier to use the Symfony Serializer with class following this convention.

This name converter mirrors the existing CamelCaseToSnakeCaseNameConverter behavior and uses the same dataset in tests.

@fabpot fabpot force-pushed the feat/SnakeCaseToCamelCaseNameConverter branch from 9db89b7 to b8ec3d9 Compare August 22, 2024 13:04
@fabpot
Copy link
Member

fabpot commented Aug 22, 2024

Thank you @dunglas.

@fabpot fabpot merged commit 00b9db7 into symfony:7.2 Aug 22, 2024
1 check was pending
@dunglas dunglas deleted the feat/SnakeCaseToCamelCaseNameConverter branch August 22, 2024 13:16
@fabpot fabpot mentioned this pull request Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants