Skip to content
CAI
Software that uses CAICheck a score

symfony/polyfill-mbstring

41.9

Weak · 19 September 2026

4.3k

lines of production code

PHP

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a PHP library providing polyfills for the mbstring extension, designed to ensure compatibility and consistent behavior across different PHP versions, particularly PHP 8+. It implements functions for multibyte string manipulation, including case conversion and trimming, while updating underlying Unicode data for accuracy. The package also manages its own dependencies and provides an alternative to the native ext-mbstring extension for environments where it is unavailable.

Behavioural changes

Symfony Mbstring Polyfill: PHP 8+ support and new functions

The Symfony Mbstring polyfill has been updated to support PHP 8 and later versions, introducing separate bootstrap files (bootstrap80.php and bootstrap72.php) to handle version-specific behaviors such as strict typing and null handling. This change adds polyfills for newly introduced PHP functions including mb\_str\_pad, mb\_ucfirst, mb\_lcfirst, mb\_trim, mb\_ltrim, and mb\_rtrim, while also fixing several existing functions to correctly handle null inputs and invalid UTF-8 sequences without throwing deprecation warnings or errors on PHP 8.1+.

(repo-wide) · high confidence

Updated Unicode case-conversion data and added case-folding support

The Resources/unidata directory now uses plain PHP arrays for lower-case, upper-case, and case-folding maps instead of the previous PHP serialized formats, which improves performance via OPcache. The underlying data has been updated to Unicode 13, and a new case-folding map has been added to support more accurate title-case conversions using Unicode derived properties.

Resources · high confidence

Dependencies

Update PHP requirements and add iconv dependency

The package now requires PHP 7.2 or higher (up from 5.3.3) and explicitly depends on the ext-iconv extension. It also declares that it provides the ext-mbstring extension, while suggesting ext-mbstring for best performance. The composer configuration has been updated to use the 'thanks' extra field for attribution and corrected the 'suggests' key to 'suggest'.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 42.

Lenses

  • Code Health 90
  • Architecture 100
  • Maturity 33
  • Readiness 17
  • Security 100

Changes since last survey

  • 121 commits — 92 feature/other, 29 fixes

By area

  • (root) — 102 commits
  • (repo) — 14 commits
  • Resources/unidata — 5 commits

Notable commits

  • fix: CS fix
  • fix: CS fixes
  • fix: Fix CS
  • fix: Fix CS
  • fix: Fix declaring extra constants when intl is loaded
  • fix: Fix php8 error passing too many arguments to strrchr
  • fix: Fix support for preloading
  • fix: Fix the name of arguments for PHP 8
  • fix: Fixed grapheme_str(r)ipos()
  • fix: Fixed wrong schema in composer files
  • fix: More CS fixes
  • fix: Test with PHP 7.1 + minor fixes
  • fix: Various fixes
  • fix: [Mbstring ] fix mb_substr return type
  • fix: [Mbstring] Fix iconv_substr(): Detected an illegal character in input string
  • fix: [Mbstring] Fix issues with mb_scrub()
  • fix: [Mbstring] Fix mb_strlen() for invalid UTF-8 input
  • fix: [Mbstring] fix mb_str_split() ignoring new-line characters
  • fix: [Mbstring] fix mb_strrpos with negative offset
  • fix: [Mbstring] fix throwing from mb_substitute_character on PHP >= 8
  • …and 101 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

symfony/polyfill-mbstring was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.