symfony/polyfill
Symfony Polyfill backports newer PHP features and provides compatibility layers for missing extensions and functions. Use it to keep apps portable across PHP versions, smoothing gaps in intl, mbstring/iconv, uuid, and many core APIs.
composer.json replace to exclude polyfills for unsupported PHP versions, reducing runtime overhead.password_algos, idn_to_ascii) to meet modern security standards (e.g., PHP 8.2’s SensitiveParameter) without rewriting business logic.Adopt When:
str_contains, Attribute).mbstring disabled, intl missing).mbstring.func_overload compatibility).Look Elsewhere If:
idn_to_ascii edge cases). Prefer upgrading PHP/extensions when possible.*"Symfony Polyfill lets us de-risk PHP upgrades while reducing maintenance costs. For example:
str_contains) without rewriting legacy code.Ask: "Which legacy systems or shared libraries would benefit most from this?"
*"This is a zero-tradeoff upgrade path for PHP compatibility:
symfony/polyfill-* packages (e.g., polyfill-php80) to enable PHP 8.0+ features on older versions.composer.json replace to remove unused polyfills (e.g., for PHP 7.4+) and eliminate runtime overhead.polyfill-php80 to support PHP 7.3+.polyfill-intl for cross-version Intl compatibility.Action Items:
symfony/polyfill-* packages are needed for your target PHP versions.replace in composer.json to phase out polyfills as PHP versions are upgraded."*Ask: "Which PHP versions do we need to support, and what’s the priority for upgrading?"
How can I help you explore Laravel packages today?