From 870d34237ee779d8091228cd561ed253c2d25f33 Mon Sep 17 00:00:00 2001 From: Andrew Codispoti Date: Fri, 29 Oct 2021 11:28:58 -0400 Subject: [PATCH] [Inflector] 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. --- src/Symfony/Component/Inflector/Inflector.php | 3 +++ src/Symfony/Component/Inflector/Tests/InflectorTest.php | 1 + 2 files changed, 4 insertions(+) diff --git a/src/Symfony/Component/Inflector/Inflector.php b/src/Symfony/Component/Inflector/Inflector.php index 098454f60d13d..eca8947121861 100644 --- a/src/Symfony/Component/Inflector/Inflector.php +++ b/src/Symfony/Component/Inflector/Inflector.php @@ -60,6 +60,9 @@ final class Inflector // indices (index), appendices (appendix), prices (price) ['seci', 4, false, true, ['ex', 'ix', 'ice']], + // zombies (zombie) + ['seibmoz', 7, true, true, 'zombie'], + // selfies (selfie) ['seifles', 7, true, true, 'selfie'], diff --git a/src/Symfony/Component/Inflector/Tests/InflectorTest.php b/src/Symfony/Component/Inflector/Tests/InflectorTest.php index e232c263f8a1e..5d7bf48761d45 100644 --- a/src/Symfony/Component/Inflector/Tests/InflectorTest.php +++ b/src/Symfony/Component/Inflector/Tests/InflectorTest.php @@ -151,6 +151,7 @@ public function singularizeProvider() ['trees', 'tree'], ['waltzes', ['waltz', 'waltze']], ['wives', 'wife'], + ['zombies', 'zombie'], // test casing: if the first letter was uppercase, it should remain so ['Men', 'Man'],