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
This PR was merged into the 1.0-dev branch.
Discussion
----------
Allow installing doctrine/inflector 2.0
With the release of doctrine/inflector 1.4, the existing API is deprecated in favour of a new API. This PR updates the MakerBundle to provide compatibility to doctrine/inflector 1.2 (required to provide support for PHP 7.1), Inflector 1.4 (providing the new API and deprecating the legacy API), and Inflector 2.0 (which drops the legacy API).
This adds a new (currently optional) constructor argument to the crud maker. This is the only maker that gets the inflector injected instead of using it through the `Str` class (which now provides its own static maker). In the long term, this should be made consistent: the new API technically allows us to support pluralising and singularising strings in a language other than English (Inflector 1.4+ supports English, Spanish, Portuguese, and a few more). This is beyond the scope of this PR and thus omitted for the time being.
NB: I saw that PHP 7.0 was dropped recently. Dropping PHP 7.1 as well would allow changing the constraint to require at least Inflector 1.4, removing the need for using the legacy inflector API and always using the new API. It is not required to make this bundle compatible with 2.0.
Commits
-------
335bd1e simplifying: creating Inflector when it's needed
2cec448 phpcs
4821139 Allow installing doctrine/inflector 2.0
0 commit comments