Skip to content
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

added Doctrine inflector as possibility for sigularizing #548

Merged
merged 1 commit into from
Sep 13, 2016
Merged

added Doctrine inflector as possibility for sigularizing #548

merged 1 commit into from
Sep 13, 2016

Conversation

hboomsma
Copy link

Doctrine also has an inflector which is able singularize words. Since most users will already depend
on doctrine it is opportunistic to also support this inflector. I added it at the bottom of the array to give precedence to the already existing ones.

@theofidry
Copy link
Member

Thanks @hboomsma, is there any way to port that to 3.x as well?

@theofidry theofidry merged commit 444c9af into nelmio:2.x Sep 13, 2016
@hboomsma
Copy link
Author

@theofidry, I looked for any reference to Inflector and singularize in the master branch, but I could not find any. So I am not quite sure where to "fix" this for 3.x. If you can give me a hint, I am more then willing to help out.

@theofidry
Copy link
Member

Indeed my bad. Actually in 3.x, instead of relying on a in house logic for
finding the accessors, we are using Symfony PropertyAccessor (check in
src/Generator/Hydrator). I have no idea if it can integrates with the
inflector. If not, a solution I can see is to decorate the current Hydrator
and on failure of the decorated one, try to make use of the inflector to
find the accessor.

On Thursday, 15 September 2016, Hidde Boomsma [email protected]
wrote:

@theofidry https://github.com/theofidry, I looked for any reference to
Inflector and singularize in the master branch, but I could not find any.
So I am not quite sure where to "fix" this for 3.x. If you can give me a
hint, I am more then willing to help out.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#548 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AE76gYYEoomgV_iolLEUx-iiuBKlYAtDks5qqQCxgaJpZM4J70H3
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants