Skip to content

Commit cc9fa5b

Browse files
SanderMullerclaude
authored andcommitted
Mark the turbo worker extension lookup and isActive() as API
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent d88c17a commit cc9fa5b

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/Turbo/TurboExtensionEnabler.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ private static function isCompatible(): bool
122122
/**
123123
* Whether activateIfCompatible() declared the native classes — the
124124
* shadowed class names resolve to them only in that case.
125+
*
126+
* @api
125127
*/
126128
public static function isActive(): bool
127129
{

‎src/Turbo/TurboExtensionSelector.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ final class TurboExtensionSelector
5858
*/
5959
public const MINIMUM_PHP_VERSION_ID = 80300;
6060

61+
/** @api */
6162
public const EXTENSION_PATH_INI = 'phpstan.turboExtensionPath';
6263

6364
/**
@@ -75,6 +76,13 @@ public static function getRestartExtensionPath(): ?string
7576
return $path;
7677
}
7778

79+
/**
80+
* The extension path a spawned worker needs as `-d extension=`, along with
81+
* `-d` EXTENSION_PATH_INI with the same path. Null when the worker gets the
82+
* extension from the php.ini it inherits, or when there is no extension.
83+
*
84+
* @api
85+
*/
7886
public static function findExtensionForWorkers(?string $pharPath = null): ?string
7987
{
8088
if (TurboExtensionEnabler::isLoaded()) {

0 commit comments

Comments
 (0)