8000 bug #13618 [PropertyAccess] Fixed invalid feedback -> foodback singul… · symfony/symfony@ee47901 · GitHub
[go: up one dir, main page]

Skip to content

Commit ee47901

Browse files
committed
bug #13618 [PropertyAccess] Fixed invalid feedback -> foodback singularization (WouterJ)
This PR was merged into the 2.3 branch. Discussion ---------- [PropertyAccess] Fixed invalid feedback -> foodback singularization | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #13613 | License | MIT | Doc PR | - Commits ------- bc50125 Fixed invalid feedback -> foodback singularization
2 parents def4fd5 + bc50125 commit ee47901

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Symfony/Component/PropertyAccess/StringUtil.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public static function singularify($plural)
197197
}
198198

199199
// Convert teeth to tooth, feet to foot
200-
if (false !== ($pos = strpos($plural, 'ee')) && strlen($plural) > 3) {
200+
if (false !== ($pos = strpos($plural, 'ee')) && strlen($plural) > 3 && 'feedback' !== $plural) {
201201
return substr_replace($plural, 'oo', $pos, 2);
202202
}
203203

src/Symfony/Component/PropertyAccess/Tests/StringUtilTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function singularifyProvider()
5959
array('data', array('daton', 'datum')),
6060
array('days', 'day'),
6161
array('discos', 'disco'),
62+
array('devices', array('devex', 'devix', 'device')),
6263
array('drives', 'drive'),
6364
array('drivers', 'driver'),
6465
array('dwarves', array('dwarf', 'dwarve', 'dwarff')),
@@ -67,6 +68,7 @@ public function singularifyProvider()
6768
array('emphases', array('emphas', 'emphase', 'emphasis')),
6869
array('faxes', 'fax'),
6970
array('feet', 'foot'),
71+
array('feedback', 'feedback'),
7072
array('foci', 'focus'),
7173
array('focuses', array('focus', 'focuse', 'focusis')),
7274
array('formulae', 'formula'),

0 commit comments

Comments
 (0)
0