You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the EnglishInflector of the String component to pluralize the word alias it returns aliass which is wrong.
Alias seems to be usable as both a noun and an adverb.
in the case of a noun the plural is aliases
in the case of an adverb it is just alias.
I am not an expert in the English language so I am not sure what the preferred solution would be in cases like this but If alias is to be treated as plural by the inflector then the singular of the word would be incorrect as alias becomes alia.
// In an empty directory, run "composer require symfony/symfony:5.4.x-dev"// Then, execute this code:<?phprequire_once__DIR__.'/vendor/autoload.php';
useSymfony\Component\String\Inflector\EnglishInflector;
// if alias it singular then the inflector// returns "aliass" instead of "aliases" or "alias" when pluralizingvar_dump((newEnglishInflector())->pluralize('alias'));
// if alias is plural then the inflector// returns "alia" instead of "alias" when singularizingvar_dump((newEnglishInflector())->singularize('alias'));
Possible Solution
An extra pluralize/singularize rule can be added to ensure the correct result or alias be added to the list of "uninflected" words.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
…-daubois)
This PR was merged into the 5.4 branch.
Discussion
----------
[String] Add `alias` case to `EnglishInflector`
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix#57524
| License | MIT
Commits
-------
5468d38 [String] Add `alias` case to `EnglishInflector`
Symfony version(s) affected
5.4 +
Description
When using the EnglishInflector of the String component to pluralize the word alias it returns aliass which is wrong.
Alias seems to be usable as both a noun and an adverb.
I am not an expert in the English language so I am not sure what the preferred solution would be in cases like this but If alias is to be treated as plural by the inflector then the singular of the word would be incorrect as alias becomes alia.
references:
How to reproduce
Possible Solution
An extra pluralize/singularize rule can be added to ensure the correct result or alias be added to the list of "uninflected" words.
Additional Context
No response
The text was updated successfully, but these errors were encountered: