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 d3c0834

Browse filesBrowse files
bug #40499 [Inflector][String] Fixed pluralize "coupon" (Nyholm)
This PR was merged into the 4.4 branch. Discussion ---------- [Inflector][String] Fixed pluralize "coupon" | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #40467 | License | MIT | Doc PR | The rule for "bacteria (bacterium), criteria (criterion), phenomena (phenomenon)" is producing this behaviour. I added an exception to the "criterion exception". "coupon" is an old French word, that is maybe why it does not follow the classic "on" rule... I dont know. The test passes and I dont think I've added any side-effects. This is also my first time working with the `EnglishInflector`. Commits ------- d3412e9 [Inflector] Fixed pluralize "coupon"
2 parents 7678d62 + d3412e9 commit d3c0834
Copy full SHA for d3c0834

File tree

Expand file treeCollapse file tree

2 files changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Inflector/Inflector.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ final class Inflector
231231
// bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
232232
['noi', 3, true, true, 'ions'],
233233

234+
// coupon (coupons)
235+
['nop', 3, true, true, 'pons'],
236+
234237
// seasons (season), treasons (treason), poisons (poison), lessons (lesson)
235238
['nos', 3, true, true, 'sons'],
236239

‎src/Symfony/Component/Inflector/Tests/InflectorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Inflector/Tests/InflectorTest.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ public function pluralizeProvider()
201201
['crisis', 'crises'],
202202
['criteria', 'criterion'],
203203
['cup', 'cups'],
204+
['coupon', 'coupons'],
204205
['data', 'data'],
205206
['day', 'days'],
206207
['disco', 'discos'],

0 commit comments

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