Skip to content

3.2.0: API refactoring

Choose a tag to compare

@wapmorgan wapmorgan released this 20 Jul 21:10
· 271 commits to master since this release

BC-breaking API changes

Russian

  • renamed classes:

    • GeneralDeclension → NounDeclension
    • Plurality → NounPluralization
    • TimeUnitSpeller → TimeSpeller
  • partially renamed classes:

    • CardinalNumeral → CardinalNumeralGenerator
    • OrdinalNumeral → OrdinalNumeralGenerator
    • FirstNamesDeclension, MiddleNamesDeclension, LastNamesDeclension, GeographicalNamesDeclension: Declension replaced with Inflection
  • functions change:

    • name() renamed to inflectName()
    • pluralize() now returns a string in format "%n %word" instead of inflected word only.

English:

  • renamed classes:
    • CardinalNumeral → CardinalNumeralGenerator
    • OrdinalNumeral → OrdinalNumeralGenerator
    • Plurality → NounPluralization

New features

Russian:

  • Added method NounDeclension::detectGender() for gender detection of nouns.
  • Updated rule of female last names ending with ха.

Project changes

Now Morphos fully meets PSR-2.