Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dcbfcb4

Browse filesBrowse files
bug #52727 [String] Fix Inflector for 'icon' (podhy)
This PR was submitted for the 7.1 branch but it was merged into the 5.4 branch instead. Discussion ---------- [String] Fix Inflector for 'icon' | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Hello, this PR fixes problem when inflecting `icon` word into `icons`. Currently it returns wrong result `ica` Please make someone review because I'm not 100% sure if this is the right way how to fix it. Thank you. Btw: older versions are also affected and it should be possible to merge it there Commits ------- 4f620a1 [String] Fix Inflector for 'icon'
2 parents b6adb52 + 4f620a1 commit dcbfcb4
Copy full SHA for dcbfcb4

File tree

2 files changed

+4
-0
lines changed
Filter options

2 files changed

+4
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/String/Inflector/EnglishInflector.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ final class EnglishInflector implements InflectorInterface
253253
// seasons (season), treasons (treason), poisons (poison), lessons (lesson)
254254
['nos', 3, true, true, 'sons'],
255255

256+
// icons (icon)
257+
['noc', 3, true, true, 'cons'],
258+
256259
// bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
257260
['no', 2, true, true, 'a'],
258261

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ public static function pluralizeProvider()
295295
['tree', 'trees'],
296296
['waltz', 'waltzes'],
297297
['wife', 'wives'],
298+
['icon', 'icons'],
298299

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.