Skip to content

Commit 5aa2b4b

Browse files
committed
bug symfony#61447 [String] specific fix to avoid 'outag' when inflecting 'outages' (PhilETaylor)
This PR was merged into the 6.4 branch. Discussion ---------- [String] specific fix to avoid 'outag' when inflecting 'outages' | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no <!-- if yes, also update src/**/CHANGELOG.md --> | Deprecations? | no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md --> | License | MIT When inflecting `Outages` with EnglishInflector it would change to the incorrect `Outag` instead of the correct `Outage` Commits ------- b408f69 specific fix to avoid 'outag' when inflecting 'outages'
2 parents c06138b + b408f69 commit 5aa2b4b

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
@@ -166,6 +166,9 @@ final class EnglishInflector implements InflectorInterface
166166
// edges (edge)
167167
['segd', 4, true, true, 'dge'],
168168

169+
// outages (outage) - specific fix to avoid 'outag'
170+
['segatuo', 7, true, true, 'outage'],
171+
169172
// roses (rose), garages (garage), cassettes (cassette),
170173
// waltzes (waltz), heroes (hero), bushes (bush), arches (arch),
171174
// shoes (shoe)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ public static function singularizeProvider()
124124
['news', 'news'],
125125
['oases', ['oas', 'oase', 'oasis']],
126126
['objectives', 'objective'],
127+
['outages', 'outage'],
127128
['oxen', 'ox'],
128129
['parties', 'party'],
129130
['people', 'person'],

0 commit comments

Comments
 (0)