From 45b4edc2dc27dbf7e50239a3b63b14c4fde116f3 Mon Sep 17 00:00:00 2001 From: Maxime Helias Date: Fri, 13 Sep 2019 11:49:22 +0200 Subject: [PATCH] [Inflector] add support 'see' to 'ee' for singularize 'fees' to 'fee' --- src/Symfony/Component/Inflector/Inflector.php | 3 +++ src/Symfony/Component/Inflector/Tests/InflectorTest.php | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Inflector/Inflector.php b/src/Symfony/Component/Inflector/Inflector.php index 1d499ef876..bfd1fbdef4 100644 --- a/src/Symfony/Component/Inflector/Inflector.php +++ b/src/Symfony/Component/Inflector/Inflector.php @@ -124,6 +124,9 @@ final class Inflector // bureaus (bureau) ['suae', 4, false, true, 'eau'], + // fees (fee), trees (tree), employees (employee) + ['see', 3, true, true, 'ee'], + // roses (rose), garages (garage), cassettes (cassette), // waltzes (waltz), heroes (hero), bushes (bush), arches (arch), // shoes (shoe) diff --git a/src/Symfony/Component/Inflector/Tests/InflectorTest.php b/src/Symfony/Component/Inflector/Tests/InflectorTest.php index 9f1e1c6baf..ea752b3fac 100644 --- a/src/Symfony/Component/Inflector/Tests/InflectorTest.php +++ b/src/Symfony/Component/Inflector/Tests/InflectorTest.php @@ -38,7 +38,7 @@ class InflectorTest extends TestCase ['bases', ['bas', 'base', 'basis']], ['batches', ['batch', 'batche']], ['beaux', 'beau'], - ['bees', ['be', 'bee']], + ['bees', 'bee'], ['boxes', 'box'], ['boys', 'boy'], ['bureaus', 'bureau'], @@ -68,7 +68,9 @@ class InflectorTest extends TestCase ['echoes', ['echo', 'echoe']], ['elves', ['elf', 'elve', 'elff']], ['emphases', ['emphas', 'emphase', 'emphasis']], + ['employees', 'employee'], ['faxes', 'fax'], + ['fees', 'fee'], ['feet', 'foot'], ['feedback', 'feedback'], ['foci', 'focus'], @@ -139,14 +141,14 @@ class InflectorTest extends TestCase ['teeth', 'tooth'], ['theses', ['thes', 'these', 'thesis']], ['thieves', ['thief', 'thieve', 'thieff']], - ['trees', ['tre', 'tree']], + ['trees', 'tree'], ['waltzes', ['waltz', 'waltze']], ['wives', 'wife'], // test casing: if the first letter was uppercase, it should remain so ['Men', 'Man'], ['GrandChildren', 'GrandChild'], - ['SubTrees', ['SubTre', 'SubTree']], + ['SubTrees', 'SubTree'], // Known issues //['insignia', 'insigne'],