Skip to content

Strings pluralizes nexus incorrectly #60235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
KorvinSzanto opened this issue Apr 17, 2025 · 0 comments · Fixed by #60236
Closed

Strings pluralizes nexus incorrectly #60235

KorvinSzanto opened this issue Apr 17, 2025 · 0 comments · Fixed by #60236

Comments

@KorvinSzanto
Copy link
Contributor

Symfony version(s) affected

7.x

Description

Nexus incorrectly maps to the "ends in 'us'" rule when pluralizing.

  • ->singularize('nexuses') = 'nexus'
  • ->singularize('nexi') = 'nexus'
  • ->pluralize('nexus') = 'nexi'

Both Oxford and Merriam Webster list "nexuses" as the proper pluralization

How to reproduce

<?php
require_once __DIR__.'/vendor/autoload.php';

$inflector = new \Symfony\Component\String\Inflector\EnglishInflector();
var_dump(
  $inflector->singularize('nexuses'),
  $inflector->singularize('nexi'),
  $inflector->pluralize('nexus'),
);

Possible Solution

nexus should be added as a specific case similar to hippocampus

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants