symfony/polyfill-php83
Symfony polyfill for PHP 8.3 backports PHP 8.3 features to older PHP versions, including json_validate, the Override attribute, mb_str_pad, str_increment/str_decrement, Date* exceptions, LDAP helpers, and stream_context_set_options.
json_validate, string-increment helpers, and multibyte padding logic. This replaces bespoke, undertested helpers with a Symfony-maintained implementation that already has years of edge-case fixes (v1.43 closed json_validate, str_increment/str_decrement, and mb_str_pad defects). The decision is "adopt and delete our versions," and the PM should explicitly budget the deletion work — otherwise you carry both.json_validate for API payload gating, str_increment/str_decrement for version counters and document/invoice numbering, mb_str_pad for multibyte-safe fixed-width exports, and the Override attribute for IDE/refactor safety. Without it, those are "someday" items; with it, they're standards.Adopt when:
json_validate in API controllers or str_increment for versioning). Adoption without intended use is pure dependency surface with no return.symfony/polyfill-* family already pulled in transitively, so marginal risk is near zero.^1.43 rather than a floating range, so the corrected edge cases are guaranteed across environments.Look elsewhere or skip when:
function_exists guards from other dependencies are a live conflict risk. Audit before rollout; this is the single most common integration problem.Override attribute isn't usable there, so scope it out of the value case.For executives — one paragraph: We want to use a handful of modern PHP language features that make our API validation and record-versioning code simpler and less error-prone, but our servers run an older PHP version than those features require. This package — a free, MIT-licensed component maintained by the Symfony team and already part of our dependency tree indirectly — lets us write that modern code today without scheduling a PHP platform upgrade. The ask is not a project: it's a version pin and a small amount of cleanup to remove our own hand-written equivalents. The benefit is that we defer a costly platform migration by a year or more, and we retire custom utility code that our team currently maintains and tests. The tradeoff is one more dependency to track, with a clear plan to remove it once we're on PHP 8.3.
For engineering — the operating agreement:
^1.43 (not a floating range) so the recent edge-case fixes are guaranteed everywhere.json_validate in request validation, str_increment in versioned models), then the Override attribute for IDE support.function_exists guards for portability — this is also the conflict mitigation against third-party packages shipping the same functions.UPGRADING.md; treat polyfill patch releases as routine maintenance, not as projects.How can I help you explore Laravel packages today?