PackageTrack
Sign in Get early access

mmucklo/inflect

inflect - a memoizing inflector for php

v2.0.0 25M downloads/mo #1029 most downloaded on Packagist mmucklo/inflect

What this package is like to depend on

Last release 4 months ago

13 Apr 2026

Release timing varies

gaps range from 5 months to 10.9 years

Some releases are documented

notes for 2 of 5 stable releases

Nothing withdrawn

no release was ever pulled

13 years old

5 releases · first in 2013

1 release in the last 12 months

see the full history below

Release timeline

5 releases · Jul 2013 to Apr 2026
2014 2016 2018 2020 2022 2024 2026
Release Pre-release

Releases

latest 5
  1. v2.0.0 13 Apr 2026
    Release notes

    First major release of mmucklo/inflect in over a decade. Modernizes the PHP baseline, ports tests to PHPUnit 10, moves to PSR-4, adds GitHub Actions CI with Codecov and Scrutinizer, tightens types, and expands correctness.

    ⚠️ Breaking changes

    • PHP 8.1+ required. Previous floor was PHP 5.3.17. Callers on ≤ PHP 8.0 cannot upgrade — stay on the php5.3 branch for back-ported fixes to the legacy baseline.
    • PSR-4 file layout. src/Inflect/Inflect.php moved to src/Inflect.php. Composer autoload changed from psr-0 to psr-4. autoload.php.dist was removed.
    • Inflect is now final. Subclassing is no longer supported. Locale support (v2.2) will extend via composition.
    • Static rule tables (\$plural, \$singular, \$irregular, \$uncountable) and caches are now private. External code that was reading or mutating these will break. Supported extension APIs are roadmap §5 (v2.1).
    • pluralize(null) / singularize(null) now throw TypeError. Previously returned null silently. Empty strings still return '' without error.
    • pluralizeIf uses strict comparison (===) for the count check. Callers passing '1' as a string now hit the plural branch.
    • phpunit.xml-dist renamed to phpunit.xml.dist (PHPUnit 10 convention). CI automation reading the old name must update.

    ✨ Added

    • GitHub Actions CI on PHP 8.1 / 8.2 / 8.3 / 8.4 (#13).
    • Codecov coverage reporting (98.07% on master) (#13, #16).
    • Scrutinizer quality analysis (#13, #17).
    • 9 new irregular inflections: datum/data, criterion/criteria, phenomenon/phenomena, cactus/cacti, nucleus/nuclei, syllabus/syllabi, curriculum/curricula, medium/media, bacterium/bacteria (#9).
    • 10 new uncountables: news, aircraft, software, hardware, luggage, advice, traffic, furniture, metadata, multimedia (#9).
    • Case preservation on irregular transforms: Man → Men, Children → Child (previously lowercased) (#9).
    • Double-inflection guard: pluralize('people') now returns 'people' (was 'peoples'); singularize('datum') stays 'datum' (was 'data') (#9).
    • Case-insensitive uncountable lookup in pluralize() to match singularize() behavior (#9).
    • declare(strict_types=1), string/int parameter and return types on all public methods (#14).
    • Typed static properties (PHP 7.4+ syntax) (#14).
    • Expanded test suite: 117 tests / 118 assertions, ported to namespaced PHPUnit\Framework\TestCase with #[DataProvider] attributes (#12, #14).
    • ROADMAP.md documenting planned improvements and the locale-support path (A: vendored; B: sibling mmucklo/inflections package) (#8, #11, #15).

    🔧 Changed

    • PHPUnit bumped from 3.7.* to ^10.5 (#12).
    • Autoload switched from PSR-0 to PSR-4; tests live in the Inflect\Tests namespace (#12).
    • Short array syntax ([]) throughout the class (#14).
    • Issue #4 fix (singularization of -ss words like business, wellness) is included.

    🗑 Removed

    • autoload.php.dist — obsoleted by Composer PSR-4 autoload.
    • .travis.yml — replaced by GitHub Actions.

    🌿 Branching

    • master — active development, PHP 8.1+.
    • php5.3 — back-port branch for critical fixes on the legacy baseline. All v2.0 correctness fixes were back-ported (#10).

    Full PR list

    #8, #9, #10, #11, #12, #13, #14, #15, #16, #17


    🤖 Release notes generated with assistance from Claude Code.

    Open source →
    Release notes

    Major release. Modernizes the PHP baseline, ports tests to PHPUnit 10, moves to PSR-4, adds GitHub Actions CI with Codecov and Scrutinizer, tightens types, and expands correctness.

    ⚠️ Breaking

    • PHP 8.1+ required (was PHP 5.3.17+). Stay on the php5.3 branch for back-ported fixes to the legacy baseline. ([#12])
    • src/Inflect/Inflect.php moved to src/Inflect.php. Autoload changed from PSR-0 to PSR-4. autoload.php.dist removed. ([#12])
    • Inflect class is now final. ([#14])
    • Static rule tables ($plural, $singular, $irregular, $uncountable) and memoization caches are now private. External code reading or mutating them will break. ([#14])
    • pluralize(null) and singularize(null) now throw TypeError. Empty strings still return ''. ([#14])
    • pluralizeIf uses strict comparison (===) for the count check. ([#14])
    • phpunit.xml-dist renamed to phpunit.xml.dist. ([#12])

    Added

    • GitHub Actions CI matrix on PHP 8.1 / 8.2 / 8.3 / 8.4. ([#13])
    • Codecov integration (98.07% coverage on master). ([#13], [#16])
    • Scrutinizer integration. ([#13], [#17])
    • 9 new irregular inflections: datum/data, criterion/criteria, phenomenon/phenomena, cactus/cacti, nucleus/nuclei, syllabus/syllabi, curriculum/curricula, medium/media, bacterium/bacteria. ([#9])
    • 10 new uncountables: news, aircraft, software, hardware, luggage, advice, traffic, furniture, metadata, multimedia. ([#9])
    • Case preservation on irregular transforms: pluralize('Man') === 'Men', singularize('Children') === 'Child'. ([#9])
    • Double-inflection guard: pluralize('people') === 'people', singularize('datum') === 'datum'. ([#9])
    • Case-insensitive uncountable lookup in pluralize() (matches singularize() behavior). ([#9])
    • declare(strict_types=1), typed parameters and return types on all public methods. ([#14])
    • Typed static properties (PHP 7.4+ syntax). ([#14])
    • ROADMAP.md documenting planned improvements and the locale-support path. ([#8], [#11], [#15])

    Changed

    • PHPUnit upgraded from 3.7.* to ^10.5. Tests ported to namespaced PHPUnit\Framework\TestCase, #[DataProvider] attributes, strict types. ([#12])
    • Composer autoload switched from PSR-0 to PSR-4. Tests live in the Inflect\Tests namespace. ([#12])
    • Short array syntax ([]) throughout the class. ([#14])
    • Issue #4 fix (singularization of -ss words like business, wellness) carried forward.

    Removed

    • autoload.php.dist (obsoleted by Composer PSR-4 autoload).
    • .travis.yml (replaced by GitHub Actions).
    Open source →
  2. v0.3.0 16 May 2015

    Nothing published for this version

  3. v0.2.1 16 May 2015

    Nothing published for this version

  4. v0.2.0 30 Nov 2013
    Release notes

    Removing urlify into its own package per a suggestion

    Open source →
  5. v0.1.0 14 Jul 2013

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive