Class PHPStan\Turbo\TurboExtensionEnabler

final

Activates the phpstan_turbo extension's shadowing classes. The extension registers nothing under PHPStan's class names at module startup. Once the Composer autoloader is registered, activateIfCompatible() checks the loaded extension's version against EXPECTED_EXTENSION_VERSION and, when it matches, asks Runtime::activateShadowing() to declare the native classes under the PHP twins' real names — PHPStan\TrinaryLogic then is the native class, linked like a PHP declaration (parents and interfaces resolved through the autoloader). A mismatched or absent extension never gets the call, and the PHP implementations load as usual. The version is the short SHA of the last commit touching turbo-ext/src/, enforced by the phar.yml turbo-version job; the native classes must behave exactly like the PHP implementations, hence the gate.

Methods