symfony/polyfill-php81
Symfony Polyfill for PHP 8.1 features on older runtimes: array_is_list, enum_exists, MYSQLI_REFRESH_REPLICA constant, ReturnTypeWillChange, and CURLStringFile (PHP 7.4+). Part of the Symfony Polyfill suite, MIT licensed.
Architecture fit: This polyfill seamlessly integrates with Laravel applications targeting PHP 7.4 or lower while leveraging PHP 8.1 features. As a standalone Composer dependency with no external runtime requirements, it aligns perfectly with Laravel's dependency-driven architecture and Symfony component ecosystem.
Integration feasibility: High. Requires only composer require symfony/polyfill-php81 with zero configuration. The polyfill automatically detects native PHP implementations and only backports missing features, ensuring compatibility with existing codebases.
Technical risk: Very low. The package is battle-tested in Symfony ecosystems with 888 GitHub stars and 4.68 quality score. Primary risks include potential conflicts with custom polyfill implementations (e.g., manual array_is_list helpers) and edge cases in CURLStringFile for PHP <7.4.
Key questions:
How can I help you explore Laravel packages today?