8000 bug #43790 [String] Fix inflector for "zombies" (acodispo) · Korbeil/symfony@c2ecdc6 · GitHub
[go: up one dir, main page]

Skip to content

Commit c2ecdc6

Browse files
committed
bug symfony#43790 [String] Fix inflector for "zombies" (acodispo)
This PR was merged into the 5.3 branch. Discussion ---------- [String] Fix inflector for "zombies" The word "zombies" should be singularized to "zombie" (rather than "zomby"). We provide a PLURAL_MAP for this case, as well as a test. | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix symfony#43789 | License | MIT Commits ------- 46c63eb [String] Add PLURAL_MAP "zombies" -- fix symfony#43789
2 parents 1b8aa3c + 46c63eb commit c2ecdc6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Symfony/Component/String/Inflector/EnglishInflector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ final class EnglishInflector implements InflectorInterface
5858
// selfies (selfie)
5959
['seifles', 7, true, true, 'selfie'],
6060

61+
// zombies (zombie)
62+
['seibmoz', 7, true, true, 'zombie'],
63+
6164
// movies (movie)
6265
['seivom', 6, true, true, 'movie'],
6366

src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ public function singularizeProvider()
152152
['trees', 'tree'],
153153
['waltzes', ['waltz', 'waltze']],
154154
['wives', 'wife'],
155+
['zombies', 'zombie'],
155156

156157
// test casing: if the first letter was uppercase, it should remain so
157158
['Men', 'Man'],

0 commit comments

Comments
 (0)
0