Skip to content

BootstrapShimGenerator

github-actions edited this page Apr 30, 2026 · 1 revision

Generates deterministic PHPUnit bootstrap shims for working-directory test runs.

The generated shim MUST load the consumer bootstrap first and MAY then load the active DevTools package autoloader so packaged PHPUnit configuration can still resolve DevTools-owned extension classes during global installations.


  • Full name: \FastForward\DevTools\PhpUnit\Bootstrap\BootstrapShimGenerator
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Methods

__construct

public __construct(\FastForward\DevTools\Filesystem\FilesystemInterface $filesystem): mixed

Parameters:

Parameter Type Description
$filesystem \FastForward\DevTools\Filesystem\FilesystemInterface the filesystem used to persist generated shims

generate

Writes a deterministic bootstrap shim under the resolved cache directory.

public generate(string $projectBootstrap, string $cacheDirectory): string

Parameters:

Parameter Type Description
$projectBootstrap string the consumer-project bootstrap path
$cacheDirectory string the cache directory where the shim SHOULD be stored

Return Value:

the generated bootstrap shim path


Clone this wiki locally