Skip to content

Commit 31ecad3

Browse files
committed
bug symfony#57875 [String] Fixed Quorum plural, and Quora singular in EnglishInflector (Dean151)
This PR was merged into the 6.4 branch. Discussion ---------- [String] Fixed Quorum plural, and Quora singular in EnglishInflector | Q | A | ------------- | --- | Branch? | 6.4 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | None | License | MIT When asking English Inflector the plural of Quorum, we get Quora instead of expected Quorums. Also added the relevant test coverage for it. **Rationale**: ApiPlatform removed their "legacy inflector" and started using Symfony/String inflector instead. Quorum was inflected to Quorums with Api Platform legacy inflection. Therefore, the migration to Symfony inflection introduce breaking changes (with possible workarounds) **Problem**: After discussion on Slack, it turns out that Quora could be a valid plural, as explained on Wiktionary: https://en.wiktionary.org/wiki/quorum#Noun Therefore: > quorum (plural [quorums](https://en.wiktionary.org/wiki/quorums#English) or [quora](https://en.wiktionary.org/wiki/quora#English)) > The plural [quora](https://en.wiktionary.org/wiki/quora#English) is sometimes objected to on the grounds that it is not grammatically correct: in Latin quorum is a plural pronoun, not a singular noun. `@xabbuh` suggest that native speakers define which one is the most widely used to decide if this change is a good idea, or not. Debate is open :) **Proposed solution**: - Singular of Quora should return Quorum (Quora currently returned) - Plural of Quorum should return both Quora & Quorums ; in an order to be defined depending on the most used one. Commits ------- e457717 [String] Fixed Quorum plural, that was inflected to be only "Quora" and never "Quorums"
2 parents 5ff2e19 + e457717 commit 31ecad3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ final class EnglishInflector implements InflectorInterface
3737
// curricula (curriculum)
3838
['alucirruc', 9, true, true, 'curriculum'],
3939

40+
// quora (quorum)
41+
['arouq', 5, true, true, 'quorum'],
42+
4043
// genera (genus)
4144
['areneg', 6, true, true, 'genus'],
4245

@@ -265,6 +268,9 @@ final class EnglishInflector implements InflectorInterface
265268
// albums (album)
266269
['mubla', 5, true, true, 'albums'],
267270

271+
// quorums (quorum)
272+
['murouq', 6, true, true, ['quora', 'quorums']],
273+
268274
// bacteria (bacterium), curricula (curriculum), media (medium), memoranda (memorandum), phenomena (phenomenon), strata (stratum)
269275
['mu', 2, true, true, 'a'],
270276

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ public static function singularizeProvider()
134134
['poppies', 'poppy'],
135135
['prices', ['prex', 'prix', 'price']],
136136
['quizzes', 'quiz'],
137+
['quora', 'quorum'],
138+
['quorums', 'quorum'],
137139
['radii', 'radius'],
138140
['roofs', 'roof'],
139141
['roses', ['ros', 'rose', 'rosis']],
@@ -285,6 +287,7 @@ public static function pluralizeProvider()
285287
['poppy', 'poppies'],
286288
['price', 'prices'],
287289
['quiz', 'quizzes'],
290+
['quorum', ['quora', 'quorums']],
288291
['radius', 'radii'],
289292
['roof', ['roofs', 'rooves']],
290293
['rose', 'roses'],

0 commit comments

Comments
 (0)