Ready Or Not, Here It Comes
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
PHP 8.1 added return types to built-in interfaces like Iterator and IteratorAggregate, which broke PHPUnit's PHAR distribution. The root cause was that PHPUnit's PHAR used static preloading (a sorted list of require statements) to load all bundled code at startup, but PHP's compiler couldn't perform method compatibility checks when referenced classes hadn't been loaded yet. The fix combines static preloading with a dynamic autoloader fallback, so the compiler can resolve class dependencies during compatibility checks. The post also urges PHP developers to test their software against PHP 8.1 betas now, and advocates for treating PHP version upgrades as a routine operational procedure rather than a special project.
Table of contents
Type relationships can be trickyUnder the hood of PHPUnit's PHARProblems wherever you lookMaking things better, togetherHow does this affect you?Sort: