Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[String] EnglishInflector returns incorrect singular for plural zombies #43789

Closed
@acodispo

Description

@acodispo

Symfony version(s) affected

5.4

Description

The EnglishInflector singularizes "zombies" to "zomby".

How to reproduce

use Symfony\Component\String\Inflector\EnglishInflector;

$inflector = new EnglishInflector();

$result = $inflector->singularize('zombies');   // ['zomby']

Possible Solution

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

private const PLURAL_MAP = [
   // [...]

   // add the following 

   // zombies (zombie)
   ['seibmoz', 7, true, true, 'zombie'],

   // [...]
];

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions