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
Description
Currently the package doctrine/inflector is used to build the route of a resource. Doctrine updated this package in a patch release to generate a different plural for some words. This means that API Platform built different routes for some entities. The change was later reversed in another patch release, but Doctrine will probably adjust some words again in the next major release. They generally advise to use this package only for one-time text or code generation, where you do not need a stable pluralization: doctrine/inflector#221 (comment)
Maybe it would make sense to replace doctrine/inflector with the symfony/string component, as the generated routes should be more stable and use more advanced pluralization? There was once a pull request to do this, but it was abandoned: #3580
Example
API Resource name: Permission
Route using doctrine/inflector:2.0.6: /api/permissions
Route using doctrine/inflector:2.0.7: /api/permission
Route using doctrine/inflector:2.0.8: /api/permissions
The text was updated successfully, but these errors were encountered:
👍 to deprecate using Doctrine Inflector in core and switch to Symfony too. We’ll have to support Doctrine Inflector until v4 for the sake of backward compatibility, thought.
Maybe it would make sense to replace doctrine/inflector with the symfony/string component, as the generated routes should be more stable
Symfony's policy on fixing pluralization rules is not that different from Doctrine's. That being said, switching to Symfony String is probably a good move for API Platform.
Description
Currently the package
doctrine/inflector
is used to build the route of a resource. Doctrine updated this package in a patch release to generate a different plural for some words. This means that API Platform built different routes for some entities. The change was later reversed in another patch release, but Doctrine will probably adjust some words again in the next major release. They generally advise to use this package only for one-time text or code generation, where you do not need a stable pluralization: doctrine/inflector#221 (comment)Maybe it would make sense to replace
doctrine/inflector
with thesymfony/string
component, as the generated routes should be more stable and use more advanced pluralization? There was once a pull request to do this, but it was abandoned: #3580Example
API Resource name: Permission
Route using
doctrine/inflector:2.0.6
: /api/permissionsRoute using
doctrine/inflector:2.0.7
: /api/permissionRoute using
doctrine/inflector:2.0.8
: /api/permissionsThe text was updated successfully, but these errors were encountered: