Thanks to visit codestin.com
Credit goes to github.com

Skip to content

StringUtil::singularify() does not convert "movies" correctly #14189

Closed
@gwijnja

Description

@gwijnja

The plural map contains:

// babies (baby)
array('sei', 3, false, true, 'y'),

And as a result, movies is singularified to movy. Symfony is now looking for 'addMovy' and 'removeMovy' instead of 'addMovie' and 'removeMovie'.

(Is there a possibility to hint for function names by the way?)

The word 'movies' seems to be an exception to the general rule. I checked a couple of word sites and there are only 2 words ending in 'ovies': movies and anchovies. The singular of the latter is anchovy. All other words ending in "vies" should be singularified to "vy", as far as I can tell. This would result in an exception for just the word 'movies'.

Putting this in front of the 'babies' entry solves the issue:

// movies (movie)
array('seivom', 6, true, true, 'movie'),

Added a pull request, my very very first pull request on GitHub. Hope I did everything right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions