You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Turn auto-boot off from composer.json #95
With it, src/bootstrap.php does not boot, and the project calls TypePHP::boot() where it wants checks, such as a test bootstrap file.
Motivation / Use Case
Installed as a dev dependency, TypePHP boots on every vendor/autoload.php require: the local web server, every developer's test run, every CI job. Today the only way out is TYPEPHP_DISABLE, which has to be set in every one of those environments.
It cannot be set where the tests are configured either: the PHPUnit binary requires the autoloader before it reads phpunit.xml, so an <env> entry there is too late.
We want TypePHP active in one dedicated CI job and nowhere else. Our workaround is to composer require it inside that job only.
Code Example
// tests/bootstrap.php, the only place where checks should runrequire__DIR__ . '/../vendor/autoload.php';
\TypePHP\TypePHP::boot();
Activity
rcalicdan commentedon Oct 3, 2026
This is a good feature for the next minor release..